-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.eslintrc.js
58 lines (58 loc) · 1.37 KB
/
.eslintrc.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
module.exports = {
extends: ['react-app', 'prettier'],
plugins: ['@emotion'],
env: {
browser: true,
es6: true,
},
parserOptions: {
ecmaVersion: 8,
},
rules: {
'@emotion/pkg-renaming': 'error',
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: [
'**/*.test.js',
'**/*.spec.js',
'**/stories/**/*.js',
'**/*.stories.js',
'**/setupProxy.js',
],
},
],
'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx'] }],
'react/jsx-one-expression-per-line': 0,
'react/no-did-update-set-state': 0,
'react/sort-comp': [
2,
{
order: [
'static-methods',
'instance-variables',
'lifecycle',
'everything-else',
'render',
],
},
],
'jsx-a11y/href-no-hash': 'off',
'no-param-reassign': ['error', { props: false }],
'no-underscore-dangle': ['error', { allow: ['_token'] }],
camelcase: [2, { ignoreDestructuring: true }],
'no-console': ['warn', { allow: ['warn', 'error'] }],
'import/no-named-as-default': 'off',
'import/no-cycle': 'warn',
},
settings: {
'import/resolver': {
node: {
moduleDirectory: [
'node_modules',
'src', // replace with your app-module-path directory
],
},
},
},
}