Skip to content

Commit

Permalink
improve eslint config
Browse files Browse the repository at this point in the history
  • Loading branch information
morewings committed Dec 14, 2023
1 parent 90fcd30 commit f277d3d
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,24 @@ module.exports = {
arrowParens: 'avoid',
},
],
/* Required by vite */
'react-refresh/only-export-components': ['warn', {allowConstantExport: true}],
'@typescript-eslint/consistent-type-definitions': ['error', 'type'],
'@typescript-eslint/no-unused-vars': ['error', { varsIgnorePattern: "_", ignoreRestSiblings: true }],
/**
* Allow unused variables with names stating with '_'
* @see https://eslint.org/docs/latest/rules/no-unused-vars
* @see https://typescript-eslint.io/rules/no-unused-vars/
*/
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
ignoreRestSiblings: true,
args: 'after-used',
},
],
},
overrides: [
/* Allow require imports for internal scripts */
Expand Down

0 comments on commit f277d3d

Please sign in to comment.