-
Notifications
You must be signed in to change notification settings - Fork 3
/
.eslintrc.js
122 lines (122 loc) · 2.83 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 = {
root: true,
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 2017,
sourceType: 'module',
ecmaFeatures: {
experimentalObjectRestSpread: true
}
},
plugins: [
'ember'
],
extends: [
'eslint:recommended',
'plugin:ember/recommended'
],
env: {
browser: true,
mocha: true
},
rules: {
'new-parens': 'error',
'no-bitwise': 2,
'camelcase': [
1,
{
'properties': 'never'
}
],
'curly': [
1,
'all'
],
'eqeqeq': 2,
'guard-for-in': 2,
'no-extend-native': 2,
'no-caller': 2,
'no-empty': 2,
'no-irregular-whitespace': 2,
'quotes': [
2,
'single'
],
'no-undef': 2,
'no-unused-vars': 2,
'complexity': 2,
'max-len': [
1,
{
'code': 120,
'ignoreComments': true
}
],
'semi': 2,
'no-eval': 2,
'no-lone-blocks': 2,
'comma-style': [
2
],
'no-shadow': 2,
'dot-notation': 2,
'indent': [
'error',
4,
{
'SwitchCase': 1
}
],
'consistent-this': [
2,
'that',
'self'
],
'one-var-declaration-per-line': 2,
'key-spacing': 2,
'comma-dangle': 2,
'comma-spacing': 2,
'eol-last': 2,
'no-lonely-if': 2,
'no-alert': 2,
'no-unreachable': 2,
'max-statements': [1, 40],
'no-trailing-spaces': 1,
'no-multi-spaces': 2,
'no-multiple-empty-lines': 2
},
overrides: [
// node files
{
files: [
'.eslintrc.js',
'.template-lintrc.js',
'ember-cli-build.js',
'index.js',
'testem.js',
'blueprints/*/index.js',
'config/**/*.js',
'tests/dummy/config/**/*.js'
],
excludedFiles: [
'addon/**',
'addon-test-support/**',
'app/**',
'tests/dummy/app/**'
],
parserOptions: {
sourceType: 'script',
ecmaVersion: 2015
},
'env': {
'browser': false,
'node': true,
'jquery': true
},
plugins: ['node'],
rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, {
// add your custom rules and overrides for node files here
})
}
]
};