First commit
This commit is contained in:
35
eslint.config.js
Normal file
35
eslint.config.js
Normal file
@@ -0,0 +1,35 @@
|
||||
import js from '@eslint/js';
|
||||
import globals from 'globals';
|
||||
import react from 'eslint-plugin-react';
|
||||
import reactHooks from 'eslint-plugin-react-hooks';
|
||||
import reactRefresh from 'eslint-plugin-react-refresh';
|
||||
|
||||
export default [
|
||||
{ ignores: ['dist', 'coverage'] },
|
||||
js.configs.recommended,
|
||||
{
|
||||
files: ['src/**/*.{js,jsx}', 'tests/**/*.js'],
|
||||
languageOptions: {
|
||||
ecmaVersion: 2024,
|
||||
globals: {
|
||||
...globals.browser,
|
||||
...globals.node,
|
||||
},
|
||||
parserOptions: {
|
||||
ecmaFeatures: { jsx: true },
|
||||
},
|
||||
},
|
||||
plugins: {
|
||||
react,
|
||||
'react-hooks': reactHooks,
|
||||
'react-refresh': reactRefresh,
|
||||
},
|
||||
rules: {
|
||||
'react/jsx-uses-vars': 'error',
|
||||
'react/react-in-jsx-scope': 'off',
|
||||
...reactHooks.configs.recommended.rules,
|
||||
'react-refresh/only-export-components': ['warn', { allowConstantExport: true }],
|
||||
'react-hooks/set-state-in-effect': 'off',
|
||||
},
|
||||
},
|
||||
];
|
||||
Reference in New Issue
Block a user