Skip to content

Commit

Permalink
Merge pull request #441 from MareStare/feat/extend-eslint-config-afte…
Browse files Browse the repository at this point in the history
…r-search-history-feature

[Part 3.5] Allow `expect*` functions in vitest lints and ignore no-extra-parens in eslint
  • Loading branch information
liamwhite authored Mar 5, 2025
2 parents 8b3f112 + cb380b0 commit 391561c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions assets/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,11 @@ export default tsEslint.config(
'no-unused-vars': 'off',
'no-redeclare': 'off',
'no-shadow': 'off',

// Often conflicts with prettier.
// TODO: prettier should just be enforced by CI.
'no-extra-parens': 'off',

'@typescript-eslint/no-unused-vars': [
2,
{ vars: 'all', args: 'after-used', varsIgnorePattern: '^_.*', argsIgnorePattern: '^_.*' },
Expand All @@ -285,6 +290,13 @@ export default tsEslint.config(
'no-unused-expressions': 0,
'vitest/valid-expect': 0,
'@typescript-eslint/no-unused-expressions': 0,
'vitest/expect-expect': [
'error',
{
// Custom `expectStuff()` functions must also count as assertions.
assertFunctionNames: ['expect*', '*.expect*'],
},
],
},
},
);

0 comments on commit 391561c

Please sign in to comment.