Skip to content

Commit

Permalink
ESLint improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
sadanandpai committed Mar 29, 2024
1 parent cac6d48 commit 5988ca2
Show file tree
Hide file tree
Showing 7 changed files with 909 additions and 7 deletions.
16 changes: 14 additions & 2 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,25 @@ module.exports = {
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
'plugin:react/jsx-runtime',
'plugin:react-hooks/recommended',
'prettier',
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parser: '@typescript-eslint/parser',
parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },
plugins: ['react-refresh', 'unused-imports'],
settings: {
react: {
version: 'detect',
},
},
rules: {
'react-refresh/only-export-components': 'warn',
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
'@typescript-eslint/no-unused-vars': [
'error',
{
Expand All @@ -22,6 +33,7 @@ module.exports = {
argsIgnorePattern: '_*',
},
],
'unused-imports/no-unused-imports': 'warn',
'react/prop-types': 'off',
'no-console': ['error', { allow: ['warn', 'error'] }],
},
};
Loading

0 comments on commit 5988ca2

Please sign in to comment.