66 lines
1.8 KiB
JavaScript
66 lines
1.8 KiB
JavaScript
import js from '@eslint/js';
|
|||
|
|
import reactPlugin from 'eslint-plugin-react';
|
||
|
|
import reactHooksPlugin from 'eslint-plugin-react-hooks';
|
||
|
|
import reactRefreshPlugin from 'eslint-plugin-react-refresh';
|
||
|
|
import globals from 'globals';
|
||
|
|
|
||
|
|
export default [
|
||
|
|
{
|
||
|
|
ignores: ['dist', 'build', 'node_modules', '.vite', '*.log', '.DS_Store'],
|
||
|
|
},
|
||
|
|
{
|
||
|
|
files: ['**/*.{js,jsx}'],
|
||
|
|
languageOptions: {
|
||
|
|
ecmaVersion: 'latest',
|
||
|
|
sourceType: 'module',
|
||
|
|
globals: {
|
||
|
|
...globals.browser,
|
||
|
|
...globals.es2020,
|
||
|
|
process: 'readonly',
|
||
|
|
},
|
||
|
|
parserOptions: {
|
||
|
|
ecmaFeatures: {
|
||
|
|
jsx: true,
|
||
|
|
},
|
||
|
|
},
|
||
|
|
},
|
||
|
|
settings: {
|
||
|
|
react: {
|
||
|
|
version: '18.2',
|
||
|
|
},
|
||
|
|
},
|
||
|
|
plugins: {
|
||
|
|
'@eslint/js': js,
|
||
|
|
react: reactPlugin,
|
||
|
|
'react-hooks': reactHooksPlugin,
|
||
|
|
'react-refresh': reactRefreshPlugin,
|
||
|
|
},
|
||
|
|
rules: {
|
||
|
|
...js.configs.recommended.rules,
|
||
|
|
...reactPlugin.configs.recommended.rules,
|
||
|
|
...reactHooksPlugin.configs.recommended.rules,
|
||
|
|
'react/jsx-no-target-blank': 'off',
|
||
|
|
'react/jsx-no-undef': 'off',
|
||
|
|
'react/no-unknown-property': 'off',
|
||
|
|
'react/react-in-jsx-scope': 'off',
|
||
|
|
'react/require-render-return': 'off',
|
||
|
|
'react-refresh/only-export-components': 'off',
|
||
|
|
'no-unused-vars': 'off',
|
||
|
|
'no-console': 'off',
|
||
|
|
'no-undef': 'off',
|
||
|
|
'no-useless-escape': 'off',
|
||
|
|
'react/prop-types': 'off',
|
||
|
|
'react/display-name': 'off',
|
||
|
|
'react/no-unescaped-entities': 'off',
|
||
|
|
'no-case-declarations': 'off',
|
||
|
|
'no-empty': 'off',
|
||
|
|
'react-hooks/rules-of-hooks': 'off',
|
||
|
|
'react-hooks/exhaustive-deps': 'off',
|
||
|
|
'react-hooks/set-state-in-effect': 'off',
|
||
|
|
'react-hooks/static-components': 'off',
|
||
|
|
'react-hooks/refs': 'off',
|
||
|
|
'react-hooks/immutability': 'off',
|
||
|
|
},
|
||
|
|
},
|
||
|
|
];
|