Skip to content

Commit

Permalink
Merge pull request #355 from MetroStar/eslint-cleanup
Browse files Browse the repository at this point in the history
Cleanup eslint config.
  • Loading branch information
jbouder authored Oct 14, 2024
2 parents 8024434 + 861caa7 commit 4904e02
Showing 1 changed file with 12 additions and 18 deletions.
30 changes: 12 additions & 18 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,14 @@ import hooksPlugin from 'eslint-plugin-react-hooks';
import tseslint from 'typescript-eslint';

export default [
// Flat Configs
pluginJs.configs.recommended,
...tseslint.configs.recommended,
prettierRecommended,
reactPlugin.configs.flat.recommended,
// Default Configs
{
files: ['**/*.{js,mjs,cjs,ts,jsx,tsx}'],
files: ['**/*.{ts,tsx}'],
settings: {
react: {
version: 'detect',
Expand All @@ -19,12 +25,9 @@ export default [
},
},
},
},
pluginJs.configs.recommended,
...tseslint.configs.recommended,
reactPlugin.configs.flat.recommended,
prettierRecommended,
{
plugins: {
'react-hooks': hooksPlugin,
},
rules: {
// Base Warnings
'no-console': 'warn',
Expand All @@ -42,18 +45,9 @@ export default [
},
],

// TypeScript
'@typescript-eslint/no-unused-vars': 'error',
},
},
{
plugins: {
'react-hooks': hooksPlugin,
},
rules: {
'react/react-in-jsx-scope': 'off',
// React
...hooksPlugin.configs.recommended.rules,
'react/react-in-jsx-scope': 'off',
},
ignores: ['*.test.tsx'],
},
];

0 comments on commit 4904e02

Please sign in to comment.