-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
29 lines (29 loc) · 946 Bytes
/
Copy patheslint.config.js
File metadata and controls
29 lines (29 loc) · 946 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
export default [
{
files: ['**/*.jsx', '**/*.js'],
languageOptions: {
ecmaVersion: 'latest',
ecmaFeatures: { jsx: true },
sourceType: 'module',
},
settings: {
react: { version: 'detect' }, // Utilisez 'detect' pour éviter de spécifier une version manuelle
},
plugins: {
react: require('eslint-plugin-react'),
'react-hooks': require('eslint-plugin-react-hooks'),
'react-refresh': require('eslint-plugin-react-refresh'),
},
rules: {
...require('@eslint/js').configs.recommended.rules,
...require('eslint-plugin-react').configs.recommended.rules,
...require('eslint-plugin-react').configs['jsx-runtime'].rules,
...require('eslint-plugin-react-hooks').configs.recommended.rules,
'react/jsx-no-target-blank': 'off',
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
},
];