forked from jerryscript-project/iotjscode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
99 lines (94 loc) · 2.35 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
/* Copyright 2017 Samsung Electronics Co., Ltd. and other contributors
*
* Licensed under the Apache License, Version 2.0 (the 'License');
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an 'AS IS' BASIS
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
var ignored_eslint_recommended = {
'no-console': 0,
}
var best_practices = {
'guard-for-in': 2,
'no-plusplus': 0,
'no-caller': 2,
'no-extend-native': 2,
'no-new-wrappers': 2,
'semi': 2,
}
var stylistic_issues = {
'array-bracket-spacing': [2, 'never'],
'block-spacing': [2, 'never'],
'brace-style': 2,
'comma-dangle': [2, 'always-multiline'],
'comma-spacing': 2,
'comma-style': 2,
'computed-property-spacing': 2,
'eol-last': 2,
'func-call-spacing': 2,
'key-spacing': 2,
'keyword-spacing': 2,
'linebreak-style': 2,
'new-cap': 2,
'no-array-constructor': 2,
'no-multiple-empty-lines': [2, {
'max': 2
}],
'no-multi-spaces': 2,
'no-multi-str': 2,
'no-new-object': 2,
'no-tabs': 2,
'no-trailing-spaces': 2,
'operator-linebreak': 2,
'quotes': [2, 'single'],
'semi-spacing': 2,
'space-before-blocks': 2,
'multiline-comment-style': [2, 'starred-block'],
'space-before-function-paren': [2, {
'anonymous': 'never',
'named': 'never',
}],
'spaced-comment': [2, 'always'],
'switch-colon-spacing': 2,
}
var es6 = {
'generator-star-spacing': [2, 'after'],
'no-var': 2,
'prefer-rest-params': 2,
'prefer-spread': 2,
'rest-spread-spacing': 2,
'yield-star-spacing': [2, 'after'],
}
module.exports = {
'extends': 'eslint:recommended',
'env': {
'browser': true,
'node': true,
'es6': true,
'jquery': true,
},
'parserOptions': {
'ecmaVersion': 6,
'sourceType': 'module',
},
'rules': Object.assign(
ignored_eslint_recommended,
stylistic_issues,
best_practices,
es6,
{
'max-len': ['error', {
'code': 120,
'ignoreUrls': true,
'ignoreTemplateLiterals': true,
'ignoreRegExpLiterals': true,
}]
}),
}