Merge pull request #441 from MareStare/feat/extend-eslint-config-after-search-history-feature

[Part 3.5] Allow `expect*` functions in vitest lints and ignore no-extra-parens in eslint
This commit is contained in:
liamwhite 2025-03-04 19:33:24 -05:00 committed by GitHub
commit 391561cf3b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -265,6 +265,11 @@ export default tsEslint.config(
'no-unused-vars': 'off', 'no-unused-vars': 'off',
'no-redeclare': 'off', 'no-redeclare': 'off',
'no-shadow': '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': [ '@typescript-eslint/no-unused-vars': [
2, 2,
{ vars: 'all', args: 'after-used', varsIgnorePattern: '^_.*', argsIgnorePattern: '^_.*' }, { vars: 'all', args: 'after-used', varsIgnorePattern: '^_.*', argsIgnorePattern: '^_.*' },
@ -285,6 +290,13 @@ export default tsEslint.config(
'no-unused-expressions': 0, 'no-unused-expressions': 0,
'vitest/valid-expect': 0, 'vitest/valid-expect': 0,
'@typescript-eslint/no-unused-expressions': 0, '@typescript-eslint/no-unused-expressions': 0,
'vitest/expect-expect': [
'error',
{
// Custom `expectStuff()` functions must also count as assertions.
assertFunctionNames: ['expect*', '*.expect*'],
},
],
}, },
}, },
); );