-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc
131 lines (112 loc) · 2.94 KB
/
.eslintrc
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
{
"extends": "airbnb",
// 2 will report an error, meaning the eslint grunt task will fail.
// 1 will report a warning, but will not cause the task to fail.
// All rules that are set to 0 are off.
"rules": {
// Error if trying to access arguments.caller or arguments.callee
"no-caller": 2,
// Don't check for use of strict mode
"strict": 0,
// Only warn about new Captial because Angular uses $constructorName
"new-cap": 1,
// Error for use of alert, confirm, and prompt globals
"no-alert": 2,
// Airbnb dictate 100, but we <3 80
// Ignore for i18n filter and import statements
"max-len": [2, {
code: 80,
tabWidth: 2,
ignorePattern: "\\$filter\\('i18n'|'i18n_n'\\)|^import",
ignoreUrls: true
}],
// So we can continue to inject bootstrap around the place
"no-unused-vars": [2, { "argsIgnorePattern": "bootstrap" }],
// Use typeof properly
"valid-typeof": 2,
// Use JSDocs properly
"valid-jsdoc": [2, { "requireReturn": false }],
// For our dodgy regexes
"no-useless-escape": 1,
"consistent-return": 1,
// We use function() in Angular stuff and tests
"prefer-arrow-callback": 0,
"func-names": 0,
// Otherwise it bitches about adding $scope props etc.
"no-param-reassign": 0,
// End files with \n
"eol-last": 2,
// Ignore import resolver due to paths specified in e2e.
// TODO: We can implement our own resolver see:
// https://github.com/benmosher/eslint-plugin-import/blob/master/resolvers/README.md
"import/no-unresolved": 0,
"spaced-comment": [
"error",
"always",
{
"exceptions": [
"@ngInject"
]
}
]
},
"globals": {
// Used in both
"window": false,
"document": false,
"angular": false,
"moment": false,
// Used in the browser
"XMLSerializer": false,
"DOMParser": false,
"srcDoc": false,
"XPathResult": false,
"XPathEvaluator": false,
"Jed": false,
"google": false,
"Highcharts": false,
"Modernizr" : false,
"Node": false,
"Aviary": false,
"Slider": false,
"Image": false,
"Prism": false,
"angularDragula": false,
// Used in tests
"jasmine": false,
"spyOn": false,
"describe": false,
"beforeEach": false,
"afterEach": false,
"inject": false,
"module": false,
"it": false,
"by": false,
"browser": false,
"expect": false,
"phantomClick": false,
"require": false,
"recompile": false,
"getMock": false,
"generateStringByLength": false,
"Element": false,
"element": false,
"beforeAll": false,
"afterAll": false,
"protractor": false,
"Raygun": false,
// Used in Node
"__dirname": false,
"process": false
},
"env": {
"es6": true
},
"parserOptions": {
"ecmaVersion": 6,
"ecmaFeatures": {
"modules": true,
"experimentalObjectRestSpread": true
}
}
}