Skip to content

Commit

Permalink
chore: fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
david-luna committed May 19, 2024
1 parent cecc367 commit f9c2bf2
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 13 deletions.
9 changes: 2 additions & 7 deletions lib/factories/fromEvent.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// ): void;
// }


// export interface EventEmitterLike<T extends (...args: any[]) => void> {
// addListener(
// type: string,
Expand All @@ -27,8 +26,6 @@
// ): void;
// }



import { createObsevable } from '../observable.js';

/**
Expand Down Expand Up @@ -70,8 +67,6 @@ import { createObsevable } from '../observable.js';
* @typedef {T extends EventEmitterLike<infer F> ? Parameters<F> : EventParam<T>} EventOrParams<T>
*/



/**
* @param {EventTargetLike<any>} target
* @param {string} eventName
Expand Down Expand Up @@ -106,8 +101,8 @@ function fromEventEmitter(target, eventName) {

/**
* @template {EventTargetLike<any> | EventEmitterLike<any>} T
* @param {T} target
* @param {string} eventName
* @param {T} target
* @param {string} eventName
* @returns {import('../observable').Observable<EventOrParams<T>>}
*/
export function fromEvent(target, eventName) {
Expand Down
1 change: 0 additions & 1 deletion lib/utils/pipe.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* @returns {R}
*/


/**
* @template T
* @overload
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,12 @@
},
"scripts": {
"test": "node --test",
"test:lcov": "node --test --experimental-test-coverage --test-reporter=lcov --test-reporter-destination=test-report-lcov.info",
"test:junit": "node --test --test-reporter=junit --test-reporter-destination=test-report-junit.xml",
"test:ci": "node --test --experimental-test-coverage --test-reporter=./test/lcov-reporter.js --test-reporter-destination=test-report-lcov.info",
"lcov": "cat test-report-lcov.info | coveralls",
"lint": "npm run lint:js && npm run lint:ts",
"lint:js": "eslint 'lib/**/*.js' 'test/**/*.js'",
"lint:ts": "rm -rf build && tsc && diff -ur types build/lib",
"lint:fix": "eslint 'lib/**/*.js' 'test/**/*.js' --fix",
"gen:types": "rm -rf build types && tsc && mv build/lib types",
"clean": "rm -rf build"
},
Expand Down
1 change: 0 additions & 1 deletion test/factories/combineLatest.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,3 @@ test('combineLatest - should complete when all source observables complete', ()
assert.strictEqual(sourceStrings.mocks.tearDown.mock.callCount(), 1);
assert.strictEqual(sourceBooleans.mocks.tearDown.mock.callCount(), 1);
});

1 change: 0 additions & 1 deletion test/factories/fromEvent.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,3 @@ test('fromEvent - should be able to get an observable from EventTarget', () => {
assert.strictEqual(observerMock.error.mock.callCount(), 0);
assert.strictEqual(observerMock.complete.mock.callCount(), 0);
});

2 changes: 1 addition & 1 deletion test/operators/mergeMap.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ test('mergeMap - should error from any of the projected observables', () => {
assert.deepStrictEqual(nextMock.calls[index].arguments, [valuesToEmit[index]]);
}
assert.strictEqual(errorMock.callCount(), 1);
assert.strictEqual(errorMock.calls[0].arguments[0].message, 'explosion in projected observable')
assert.strictEqual(errorMock.calls[0].arguments[0].message, 'explosion in projected observable');
assert.strictEqual(completeMock.callCount(), 0);
assert.strictEqual(tearDownMock.callCount(), 1);
observableMocks.forEach((obsMock) => {
Expand Down

0 comments on commit f9c2bf2

Please sign in to comment.