This repository was archived by the owner on Apr 4, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy path.eslintrc.js
More file actions
115 lines (114 loc) · 2.79 KB
/
Copy path.eslintrc.js
File metadata and controls
115 lines (114 loc) · 2.79 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
// eslint-disable-next-line import/no-extraneous-dependencies
const path = require('path');
module.exports = {
root: true,
parser: '@babel/eslint-parser',
plugins: [
'babel',
'react',
],
env: {
browser: true,
es6: true,
jquery: true,
commonjs: true,
},
extends: [
'airbnb',
],
parserOptions: {
sourceType: 'module',
ecmaVersion: 7,
ecmaFeatures: {
impliedStrict: true,
experimentalObjectRestSpread: true,
jsx: true,
legacyDecorators: true,
},
babelOptions: {
configFile: './babel.config.js',
},
},
settings: {
'import/resolver': {
webpack: {
config: {
resolve: {
extensions: ['.js', '.jsx'],
alias: {
vj: path.resolve(__dirname),
},
},
},
},
},
},
globals: {
__webpack_public_path__: true,
__webpack_require__: true,
UiContext: true,
UserContext: true,
Context: true,
LOCALES: true,
window: true,
},
rules: {
'comma-dangle': [
'error',
'always-multiline',
],
indent: [
'error',
2,
{
SwitchCase: 0,
},
],
'max-len': ['error', 150],
quotes: 'warn',
'class-methods-use-this': 'off',
'consistent-return': 'warn',
'func-names': 'off',
'import/first': 'off',
'import/no-extraneous-dependencies': 'off',
'max-classes-per-file': 'off',
'no-unused-vars': 'warn',
'no-console': 'off',
'no-continue': 'off',
'no-mixed-operators': 'off',
'no-multi-assign': 'off',
'no-plusplus': 'off',
'no-restricted-syntax': [
'error',
{
selector: 'LabeledStatement',
message: 'Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.',
},
{
selector: 'WithStatement',
message: '`with` is disallowed in strict mode because it makes code impossible to predict and optimize.',
},
],
'no-underscore-dangle': 'off',
'no-await-in-loop': 'off',
'no-lonely-if': 'off',
'no-param-reassign': 'off',
'no-bitwise': 'off',
'react/prefer-stateless-function': 'off',
'react/static-property-placement': 'off',
'react/self-closing-comp': 'off',
'react/prop-types': 'off',
'react/jsx-filename-extension': 'off',
'react/jsx-one-expression-per-line': 'off',
'react/jsx-props-no-spreading': 'off',
'react/no-string-refs': 'off',
'react/require-default-props': 'off',
'react/react-in-jsx-scope': 'off',
'react/destructuring-assignment': 'off',
'react/button-has-type': 'off',
'react/forbid-prop-types': 'off',
'jsx-a11y/no-static-element-interactions': 'off',
'jsx-a11y/anchor-is-valid': 'off',
'jsx-a11y/click-events-have-key-events': 'off',
},
};