This repository has been archived by the owner on Jan 3, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
79 lines (78 loc) · 1.64 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
module.exports = {
root: true,
parserOptions: {
ecmaVersion: 2017,
sourceType: 'module'
},
plugins: [
'ember'
],
extends: [
'eslint:recommended',
'./node_modules/eslint-config-semistandard/index.js',
'plugin:ember/recommended'
],
env: {
'browser': true
},
rules: {
"comma-dangle": [2, "only-multiline"],
"no-console": 0,
"no-extra-boolean-cast": 0,
// don't allow uses of jQuery
"ember/no-jquery": 2,
// don't allow use of the global fetch
"no-restricted-globals": [2, {
name: "fetch",
message: "Use ember-fetch (import fetch from 'fetch') instead of the global."
}]
},
globals: {
"_": false,
"moment": false,
"Set": false,
"Map": false,
"md5": false
},
overrides: [
// node files
{
files: [
'index.js',
'testem.js',
'ember-cli-build.js',
'config/**/*.js',
'tests/dummy/config/**/*.js'
],
excludedFiles: [
'app/**',
'addon/**',
'tests/dummy/app/**'
],
parserOptions: {
sourceType: 'script',
ecmaVersion: 2015
},
env: {
browser: false,
node: true
},
plugins: ['node'],
rules: Object.assign({}, require('eslint-plugin-node').configs.recommended.rules, {
// add your custom rules and overrides for node files here
})
},
// test files
{
files: ['tests/**/*.js'],
excludedFiles: ['tests/dummy/**/*.js'],
env: {
embertest: true
},
rules: {
// warn against use of jQuery in tests
"ember/no-jquery": 1
}
}
]
};