Skip to content

Commit

Permalink
fix: linting rules and affected code
Browse files Browse the repository at this point in the history
  • Loading branch information
tarsisexistence committed Nov 13, 2022
1 parent b55683c commit 4c1e96a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
11 changes: 8 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ module.exports = {
ecmaVersion: 6,
sourceType: 'module',
ecmaFeatures: {
modules: true
}
}
modules: true,
},
},
rules: {
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-unnecessary-type-constraint': 0,
'@typescript-eslint/no-empty-function': 0,
},
};
4 changes: 4 additions & 0 deletions src/fuzion.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ import { forEach } from './forEach/forEach';

describe('fuzion', () => {
test('should return empty array when input is empty and empty handlers', () => {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
expect(fuzion([])).toEqual([]);
});

test('should return input array when empty handlers array', () => {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
expect(fuzion([1, 2, 3])).toEqual([1, 2, 3]);
});
Expand Down Expand Up @@ -143,6 +145,7 @@ describe('fuzion', () => {
forEach(() => Symbol()), // 8
forEach(() => () => {}), // 9
forEach(() => Promise.resolve(5)), // 10
// eslint-disable-next-line no-new-wrappers
forEach(() => new String('s')), // 11
),
).toEqual([1, 2, 3, 4]);
Expand All @@ -162,6 +165,7 @@ describe('fuzion', () => {
forEach(() => Symbol()), // 8
forEach(() => () => {}), // 9
forEach(() => Promise.resolve(5)), // 10
// eslint-disable-next-line no-new-wrappers
forEach(() => new String('s')), // 11,
map(() => 1), // 12
),
Expand Down
2 changes: 1 addition & 1 deletion src/fuzion.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Kind } from './common';
import type { Map, MapFn } from './map/map';
import type { Map } from './map/map';
import type { Filter } from './filter/filter';
import type { ForEach } from './forEach/forEach';
import type { Take } from './take/take';
Expand Down

0 comments on commit 4c1e96a

Please sign in to comment.