forked from dtzinov/ggrc-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
93 lines (90 loc) · 2.35 KB
/
.eslintrc.json
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
{
"extends": "eslint-config-google",
"env": {
"browser": true,
"jasmine": true,
"jquery": true
},
"globals": {
"_": false,
"can": false,
"CMS": false,
"GGRC": false,
"moment": false,
"Mustache": false,
"MutationObserver": false,
"ModelRefreshQueue": false,
"Permission": false,
"PersistentNotifier": false,
"RefreshQueue": false,
"RefreshQueueManager": false,
"Spinner": false,
"Stickyfill": false,
"Clipboard": false,
// TODO: Check why these vars are global
"process_gapi_query": false,
"calculate_spinner_z_index": false,
"resolve_computed": false,
"rangy": false,
"gapi": false,
"oauth_dfd": false,
"getPageToken": false,
"google": false,
"st": false,
"wysihtml5ParserRules": false,
"wysihtml5": false
},
"rules": {
"id-length": [1, {
"min": 2,
"max": 25,
"properties": "never",
// x, y, z - Point coordinates
// i, j, k - Loop indexes
// k, v - Key, Value
// a, b - common parameter names in sorting comparison helper functions
// e - exception
// $, _ - libraries
"exceptions": ["x", "y", "z", "i", "j", "k", "v", "a", "b", "e", "$", "_"]
}],
"require-jsdoc": 0,
"space-before-function-paren": [2, {
"anonymous": "always",
"named": "never"
}],
"max-len": [1, 80, 2, {
"ignoreComments": true,
"ignoreUrls": true
}],
"quotes": [1, "single", {
"avoidEscape": true
}],
"no-implicit-coercion": [2, {
"boolean": false
}],
"no-inline-comments": 0,
"no-negated-condition": 0,
"no-unused-vars": [2, {
"args": "none",
"vars": "all"
}],
// Each variable declaration must have its own var keyword
"one-var": [2, "never"],
"quote-props": [2, "as-needed", {
"numbers": true,
"keywords": true
}],
"vars-on-top": 2,
// CanJS uses a lot of the following, thus the exceptions...
//
// NOTE: camelCase check is disabled for object properties, because 3rd
// party libraries' APIs might expect object arguments with properties
// following a different naming conventions, and trying to work around
// that just to make the linter happy is simply not worth it.
"camelcase": [1, {
"properties": "never"
}],
"new-cap": 0,
"no-new": 0
}
}