Skip to content

Commit

Permalink
feat: improve no-unused-vars options
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Apr 9, 2024
1 parent 7975fd8 commit 1e091eb
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/configs/javascript.ts
Expand Up @@ -201,10 +201,15 @@ export async function javascript(
'symbol-description': 'error',
'unicode-bom': ['error', 'never'],
'unused-imports/no-unused-imports': isInEditor ? 'off' : 'error',

'unused-imports/no-unused-vars': [
'error',
{ args: 'after-used', argsIgnorePattern: '^_', vars: 'all', varsIgnorePattern: '^_' },
{
args: 'after-used',
argsIgnorePattern: '^_',
ignoreRestSiblings: true,
vars: 'all',
varsIgnorePattern: '^_',
},
],
'use-isnan': ['error', { enforceForIndexOf: true, enforceForSwitchCase: true }],
'valid-typeof': ['error', { requireStringLiterals: true }],
Expand Down

0 comments on commit 1e091eb

Please sign in to comment.