-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
executable file
·122 lines (122 loc) · 3.54 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
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
module.exports = {
extends: [
'plugin:react/recommended',
// Disable ESLint rules that would conflict with Prettier
'prettier',
'plugin:prettier/recommended',
'next/core-web-vitals',
],
env: {
node: true,
commonjs: true,
es6: true,
},
parser: '@babel/eslint-parser',
parserOptions: {
ecmaVersion: 2018,
requireConfigFile: false,
sourceType: 'module',
ecmaFeatures: {
impliedStrict: true,
jsx: true,
},
},
settings: {
react: {
version: 'detect',
},
polyfills: ['promises'],
'import/resolver': {
node: {
moduleDirectory: 'node_modules',
},
},
},
rules: {
'no-mixed-spaces-and-tabs': 'off',
'arrow-body-style': ['warn', 'as-needed'],
'arrow-parens': 'off',
'class-methods-use-this': 'off',
'comma-dangle': ['error', 'always-multiline'],
'consistent-return': 'off',
curly: ['warn', 'multi-or-nest'],
'dot-notation': 'warn',
eqeqeq: ['warn', 'smart'],
'global-require': 'off',
'import/extensions': 'off',
'import/first': 'off',
'import/no-named-as-default': 'off',
'import/no-named-as-default-member': 'off',
'import/prefer-default-export': 'off',
'import/no-default-export': 'off',
'key-spacing': [
'warn',
{
beforeColon: false,
afterColon: true,
},
],
'keyword-spacing': [
'warn',
{
before: true,
after: true,
},
],
'linebreak-style': ['error', 'unix'],
'max-len': 'off',
'multiline-comment-style': ['warn', 'separate-lines'],
'newline-per-chained-call': ['off'],
'no-alert': 'off',
'no-console': 'off',
'no-const-assign': 'error',
'no-debugger': process.env.ENV === 'production' ? 'error' : 'off',
'no-extra-parens': 'off',
'no-lonely-if': 'warn',
'no-mixed-operators': 'off',
'no-multiple-empty-lines': 'warn',
'no-multi-spaces': 'warn',
'no-prototype-builtins': 'off',
'no-param-reassign': 'off',
'no-plusplus': 'off',
'no-restricted-syntax': 'off',
'no-return-assign': 'off',
'no-template-curly-in-string': 'off',
'no-underscore-dangle': 'off',
'no-useless-catch': 'warn',
'no-useless-escape': 'warn',
'no-whitespace-before-property': 'warn',
'object-curly-spacing': ['warn', 'always'],
'padded-blocks': ['warn', 'never'],
'prefer-destructuring': 'off',
'prefer-spread': 'off',
'prefer-template': 'warn',
'prettier/prettier': 'off',
'quote-props': ['warn', 'as-needed'],
quotes: [
'warn',
'single',
{
allowTemplateLiterals: true,
avoidEscape: true,
},
],
semi: [
'error',
'always',
],
'space-before-function-paren': 'off',
'space-in-parens': ['warn', 'never'],
'space-infix-ops': [
'warn',
{
int32Hint: false,
},
],
'spaced-comment': ['warn', 'always'],
'switch-colon-spacing': 'warn',
yoda: 'error',
'react/react-in-jsx-scope': 'off',
'react/prop-types': 0,
},
};