-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy patheslint.config.js
More file actions
97 lines (96 loc) · 2.72 KB
/
eslint.config.js
File metadata and controls
97 lines (96 loc) · 2.72 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
import js from '@eslint/js';
import babelParser from '@babel/eslint-parser';
import flowtype from 'eslint-plugin-flowtype';
import { importX } from 'eslint-plugin-import-x';
import jest from 'eslint-plugin-jest';
import jsxA11y from 'eslint-plugin-jsx-a11y';
import react from 'eslint-plugin-react';
import globals from 'globals';
import stylistic from '@stylistic/eslint-plugin';
export default [
importX.flatConfigs.recommended,
js.configs.recommended,
react.configs.flat.recommended,
{
files: ['**/*.{js,jsx,mjs,cjs,ts,tsx}'],
languageOptions: {
ecmaVersion: 'latest',
globals: {
...globals.browser,
...jest.environments.globals.globals,
__dirname: 'readonly',
Atomics: 'readonly',
JSX: 'readonly',
SharedArrayBuffer: 'readonly',
TimeoutID: 'readonly',
process: 'readonly'
},
parser: babelParser,
parserOptions: {
ecmaFeatures: {
jsx: true
},
requireConfigFile: false,
babelOptions: {
parserOpts: {
plugins: ['jsx']
}
}
},
sourceType: 'module'
},
plugins: {
react,
flowtype,
jest,
'jsx-a11y': jsxA11y,
'@stylistic': stylistic
},
rules: {
'class-methods-use-this': 'off',
'@stylistic/comma-dangle': ['error', 'never'],
"import-x/no-named-as-default": "off",
"import-x/no-named-as-default-member": "off",
'import-x/prefer-default-export': 'off',
'jsx-a11y/media-has-caption': 'off',
'@stylistic/jsx-quotes': ['error', 'prefer-single'],
'@stylistic/lines-between-class-members': 'off',
'@stylistic/max-len': ['error', {
code: 120,
ignoreStrings: true
}],
'no-underscore-dangle': 'off',
'no-use-before-define': 'off',
'@stylistic/quote-props': ['error', 'as-needed', {
keywords: false,
unnecessary: true,
numbers: true
}],
'react/display-name': 'off',
'react/default-props-match-prop-types': 'off',
'react/destructuring-assignment': 'off',
'react/jsx-filename-extension': [1, {
extensions: ['.js', '.jsx']
}],
'react/jsx-no-bind': 'off',
'react/jsx-props-no-spreading': 'off',
'react/no-array-index-key': 'off',
'react/no-did-update-set-state': 'off',
'react/prefer-stateless-function': 'off',
'react/require-default-props': 'off',
'react/sort-comp': 'off',
'react/static-property-placement': 'off',
'@stylistic/semi-style': ['error', 'last'],
'@stylistic/semi': ['error', 'always']
},
settings: {
react: {
version: 'detect'
}
}
}, {
ignores: [
'**/dist/*'
]
}
];