forked from emberjs/ember.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
132 lines (120 loc) · 2.77 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
123
124
125
126
127
128
129
130
131
132
module.exports = {
root: true,
extends: [
'eslint:recommended',
'prettier',
],
plugins: [
'ember-internal',
'prettier',
],
rules: {
'semi': 'error',
'no-unused-vars': 'error',
'no-useless-escape': 'off', // TODO: bring this back
'prettier/prettier': 'error',
},
overrides: [
{
files: [ 'packages/**/*.js' ],
parserOptions: {
ecmaVersion: 2017,
sourceType: 'module',
},
globals: {
// A safe subset of 'browser:true':
'window': true,
'document': true,
'setTimeout': true,
'clearTimeout': true,
'setInterval': true,
'clearInterval': true,
'console': true,
'Map': true,
'Set': true,
'Symbol': true,
'WeakMap': true,
},
rules: {
'ember-internal/require-yuidoc-access': 'error',
'ember-internal/no-const-outside-module-scope': 'error',
'semi': 'error',
'no-unused-vars': 'error',
'comma-dangle': 'off',
},
},
{
files: [
'packages/*/tests/**/*.js',
'packages/internal-test-helpers/**/*.js',
],
env: {
qunit: true,
},
globals: {
'expectAssertion': true,
'expectDeprecation': true,
'expectNoDeprecation': true,
'expectWarning': true,
'expectNoWarning': true,
'ignoreAssertion': true,
'ignoreDeprecation': true,
},
},
{
// matches all node-land files
files: [
'node-tests/**/*.js',
'tests/node/**/*.js',
'blueprints/**/*.js',
'bin/**/*.js',
'config/**/*.js',
'lib/**/*.js',
'server/**/*.js',
'testem.travis-browsers.js',
'testem.dist.js',
'd8-runner.js',
'broccoli/**/*.js',
'ember-cli-build.js',
'rollup.config.js',
],
parserOptions: {
ecmaVersion: 2018,
sourceType: 'script',
},
env: {
node: true,
es6: true,
},
plugins: ['node'],
rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, {
// add your custom rules and overrides for node files here
'no-process-exit': 'off',
}),
},
{
// matches node-land files that aren't shipped to consumers (allows using Node 6+ features)
files: [
'broccoli/**/*.js',
'ember-cli-build.js',
'rollup.config.js',
'd8-runner.js',
],
rules: {
'node/no-unsupported-features': ['error', { version: 6 }],
}
},
{
files: [ 'node-tests/**/*.js' ],
env: {
mocha: true,
},
},
{
files: [ 'tests/node/**/*.js' ],
env: {
qunit: true
},
},
]
};