Skip to content

Commit

Permalink
chore(eslint-config-payload): improve @typescript-eslint/no-unused-va…
Browse files Browse the repository at this point in the history
…rs rule (payloadcms#4793)
  • Loading branch information
AlessioGr committed Mar 12, 2024
1 parent c038acb commit 0eb7b44
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion packages/eslint-config-payload/eslint-config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,18 @@ module.exports = {
'class-methods-use-this': 'off',

// By default, it errors for unused variables. This is annoying, warnings are enough.
'@typescript-eslint/no-unused-vars': 'warn',
'@typescript-eslint/no-unused-vars': [
'warn',
{
vars: 'all',
args: 'after-used',
ignoreRestSiblings: false,
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
destructuredArrayIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^ignore',
},
],

'@typescript-eslint/no-use-before-define': 'off',
'arrow-body-style': 0,
Expand Down

0 comments on commit 0eb7b44

Please sign in to comment.