forked from qntln/react-canvas
-
Notifications
You must be signed in to change notification settings - Fork 2
/
eslint.config.js
64 lines (63 loc) · 1.67 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import prettierConfig from './.prettierrc.js'
import eslintTsParser from '@typescript-eslint/parser'
import globals from 'globals'
import eslint_js from '@eslint/js'
import esp_react from '@eslint-react/eslint-plugin'
import esc_prettier from 'eslint-config-prettier'
import esp_prettier from 'eslint-plugin-prettier/recommended'
import esp_storybook from 'eslint-plugin-storybook'
import esp_import from 'eslint-plugin-import'
import esp_jsxA11y from 'eslint-plugin-jsx-a11y'
export default [
eslint_js.configs.recommended,
esp_react.configs.recommended,
{
files: ['**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}'],
languageOptions: {
parser: eslintTsParser,
parserOptions: {
ecmaVersion: 2017,
sourceType: 'module',
ecmaFeatures: {
jsx: true
}
},
globals: {
...globals.browser,
...globals.node,
...globals.es2015
}
},
plugins: {
storybook: esp_storybook,
react: esp_react,
import: esp_import,
'jsx-a11y': esp_jsxA11y
},
rules: {
'prettier/prettier': [2, prettierConfig],
'no-param-reassign': 0,
'no-underscore-dangle': 0,
'no-plusplus': 0,
'no-restricted-syntax': 0,
'import/prefer-default-export': 0,
'react/prefer-stateless-function': 0,
'react/destructuring-assignment': 0,
'react/jsx-uses-vars': 'error',
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: ['stories/**/*']
}
],
'jsx-a11y/mouse-events-have-key-events': 0
},
settings: {
react: {
version: 'detect'
}
}
},
esc_prettier,
esp_prettier
]