-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.eslintrc.js
98 lines (98 loc) · 3.2 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
module.exports = {
root: true,
plugins: ['react'],
env: {
browser: true,
es6: true,
node: true,
},
'extends': [
"eslint:recommended",
"plugin:react/recommended"
],
parser: "babel-eslint",
parserOptions: {
sourceType: 'module',
},
rules: {
'strict': 0,
indent: 'off',
'no-cond-assign': 'off',
'no-constant-condition': 'off',
'no-console': 'off',
'no-control-regex': 'warn',
'no-extra-parens': 'error',
'no-func-assign': 'warn',
'no-inner-declarations': 'off',
'no-negated-in-lhs': 'warn',
'no-sparse-arrays': 'warn',
'no-unexpected-multiline': 'warn',
'use-isnan': 'warn',
'valid-typeof': 'warn',
'no-shadow': 'warn',
'no-restricted-globals': ['error', 'event'],
// Best practices
'block-scoped-var': 'warn',
'no-case-declarations': 'warn',
'no-else-return': 'warn',
'no-empty': 'off',
'no-empty-pattern': 'warn',
'no-extra-bind': 'error',
'no-extra-label': 'error',
'no-fallthrough': 'off',
'no-iterator': 'error',
'no-lone-blocks': 'warn',
'no-multi-spaces': 'error',
'no-multi-str': 'error',
'no-proto': 'error',
'no-self-compare': 'warn',
'no-unmodified-loop-condition': 'warn',
'no-useless-call': 'error',
'no-useless-concat': 'error',
// Variables
'no-label-var': 'error',
'no-undef': 'off',
'no-unused-vars': ['error', {args: 'none'}],
// Stylistic issues
'array-bracket-spacing': 'error',
'block-spacing': 'error',
// XXX yuval vadiml: last element ',' for objs and arrays.
// 'comma-dangle': ['error', 'always-multiline'],
'comma-spacing': 'error',
'eol-last': 'error',
'key-spacing': 'error',
'keyword-spacing': ['error', {
overrides: {'catch': {after: false}, 'this': {before: false}},
}],
'linebreak-style': 'error',
'max-len': ['error', 79, 8, {
ignoreUrls: true,
ignorePattern: '/.+/',
}],
'no-mixed-spaces-and-tabs': 'off',
'no-multiple-empty-lines': ['error', {max: 2}],
'no-spaced-func': 'error',
'no-trailing-spaces': 'error',
'space-before-blocks': ['error', {functions: 'never',
keywords: 'never', classes: 'always'}],
'no-whitespace-before-property': 'error',
/* quotes: ['error', 'single', {
avoidEscape: true,
allowTemplateLiterals: true,
}], */
semi: ['error', 'always'],
'space-before-function-paren': 'off',
'space-in-parens': 'error',
'spaced-comment': ['error', 'always', {
markers: ['jslint', 'zlint', 'global'],
}],
'object-curly-spacing': 'warn',
'generator-star-spacing': ['error', {before: false, after: false}],
'require-yield': 'warn',
'arrow-parens': ['warn', 'as-needed'],
'no-template-curly-in-string': 'warn',
'react/react-in-jsx-scope': 'off',
'react/display-name': 'off',
'react/prop-types': 'off'
},
};