-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathangularjs.js
51 lines (51 loc) · 1.31 KB
/
angularjs.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
/**
* Vayne Eslint 规则
* 主要用于vue 和 ng1 项目开发
* 使用 babel-eslint 作为解析器 继承 至 standard
* 'off' or 0 - 关闭规则
* 'warn' or 1 - 将规则视为一个警告(不会影响退出码)
* 'error' or 2 - 将规则视为一个错误 (退出码为1)
*/
module.exports = {
root: true,
parser: 'babel-eslint',
parserOptions: {
sourceType: 'module'
},
env: {
browser: true,
},
extends: 'standard',
globals: {
'angular': false,
'$': false,
'NgModule': false,
'Inject': false,
'Injector': false,
'Factory': false,
'FormData': false,
'debugger': false,
'Image': false,
'rrc': false
},
rules: {
// allow paren-less arrow functions
'arrow-parens': 0,
'semi': [2, 'never'],
'max-len': [2, 200, 2],
// allow async-await
'generator-star-spacing': 0,
'space-before-function-paren': 0,
'padded-blocks': 0,
'no-var': 2,
// allow debugger during development
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
'no-unused-vars': ['error', {
'varsIgnorePattern': 'Service|Inject|Injector|Factory|Globar|Controller|[iI]gnored|Module|Directive',
'caughtErrors': 'none',
'argsIgnorePattern': '^_',
'ignoreRestSiblings': true
}, ],
'allowEmptyReject': 0
}
}