-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.cjs
39 lines (39 loc) · 1.19 KB
/
.eslintrc.cjs
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
module.exports = {
root: true,
env: {
browser: true,
node: true,
commonjs: true,
es6: true
},
globals: {
__DEV__: true
},
plugins: ['prettier'],
extends: ['airbnb', 'airbnb-typescript', 'plugin:compat/recommended', 'eslint-config-prettier'],
rules: {
'prettier/prettier': 'error',
'react/jsx-props-no-spreading': 'off',
'no-return-assign': ['error', 'except-parens'],
'no-shadow': 'off',
'no-plusplus': 'off',
'no-param-reassign': 'off',
'react/require-default-props': 'off',
'react/react-in-jsx-scope': 'off',
'no-use-before-define': ['error', {functions: false}],
'@typescript-eslint/no-use-before-define': ['error', {functions: false}],
"import/no-extraneous-dependencies": ["error", {"devDependencies": ["{demos,test}/**/*"]}],
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'warn',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off'
},
settings: {
'import/resolver': 'eslint-import-resolver-typescript',
'polyfills': [
// App which dependence this lib should pollyfill these methods:
'Promise',
]
},
parserOptions: {
project: './tsconfig.json'
}
};