mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-03-06 19:11:27 +01:00
Allow expect*
functions in vitest lints and ignore no-extra-parens in eslint
This commit is contained in:
parent
64f954e686
commit
50c08aa35a
1 changed files with 11 additions and 0 deletions
|
@ -265,6 +265,10 @@ 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. In fact, 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 +289,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*'],
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Reference in a new issue