Skip to content

Commit

Permalink
Cleanup eslint config.
Browse files Browse the repository at this point in the history
  • Loading branch information
jbouder committed Oct 14, 2024
1 parent 8024434 commit 861caa7
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 861caa7

Please sign in to comment.