Skip to content

Commit

Permalink
chore: fix issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ST-DDT committed Apr 1, 2024
1 parent 7bd9da0 commit 1db9d53
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
17 changes: 10 additions & 7 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,16 @@ module.exports = defineConfig({
{ blankLine: 'always', prev: 'block-like', next: '*' },
],
'@typescript-eslint/prefer-regexp-exec': 'error',
'@typescript-eslint/restrict-plus-operands': [
'error',
{
allowAny: false,
allowBoolean: false,
allowNullish: false,
allowNumberAndString: true,
allowRegExp: false,
},
],
'@typescript-eslint/restrict-template-expressions': [
'error',
{ allowNumber: true, allowBoolean: true },
Expand All @@ -106,13 +116,6 @@ module.exports = defineConfig({
'@typescript-eslint/unbound-method': 'off',
'@typescript-eslint/unified-signatures': 'off', // incompatible with our api docs generation

'@typescript-eslint/restrict-plus-operands': [
'error',
{
allowNumberAndString: true
},
],

// TODO @ST-DDT 2023-10-10: The following rules currently conflict with our code.
// Each rule should be checked whether it should be enabled/configured and the problems fixed, or stay disabled permanently.
'@typescript-eslint/no-confusing-void-expression': 'off',
Expand Down
4 changes: 1 addition & 3 deletions test/faker.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ describe('faker', () => {
it('should not log anything on startup', async () => {
const spies: MockInstance[] = keys(console)
.filter((key) => typeof console[key] === 'function')
.map((methodName) =>
vi.spyOn(console, methodName as keyof typeof console)
);
.map((methodName) => vi.spyOn(console, methodName));

(await import('..')).default;

Expand Down

0 comments on commit 1db9d53

Please sign in to comment.