-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patheslint.config.js
50 lines (48 loc) · 1.17 KB
/
eslint.config.js
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import globals from 'globals';
import pluginReactConfig from 'eslint-plugin-react/configs/recommended.js';
import { fixupConfigRules } from '@eslint/compat';
import prettier from 'eslint-plugin-prettier';
export default [
...fixupConfigRules(pluginReactConfig),
{
files: ['**/*.{js,mjs,cjs,jsx}'],
languageOptions: {
parserOptions: {
ecmaVersion: 2021,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
globals: globals.browser,
},
settings: {
react: {
version: 'detect', // Automatically detect the React version
},
},
rules: {
semi: ['error', 'always'],
quotes: ['error', 'single'],
'no-unused-vars': ['warn'],
'react/prop-types': 'off',
'react/react-in-jsx-scope': 'off',
'react/display-name': 'off',
'prettier/prettier': [
'error',
{
endOfLine: 'auto',
},
],
'arrow-parens': 'off',
'comma-dangle': 'off',
'max-len': 'off',
'no-mixed-operators': 'off',
'no-tabs': 'off',
'space-before-function-paren': 'off',
},
plugins: {
prettier,
},
},
];