forked from dtzinov/ggrc-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
127 lines (122 loc) · 3.04 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
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
{
"extends": ["eslint:recommended", "eslint-config-google"],
"env": {
"es6": true,
"browser": true,
"jasmine": true,
"jquery": true,
"amd": true
},
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"globals": {
"_": false,
"can": false,
"GGRC": false,
"moment": false,
"Mustache": false,
"MutationObserver": false,
"Spinner": false,
"Stickyfill": false,
"Clipboard": false,
"calculate_spinner_z_index": false,
"resolve_computed": false,
"rangy": false,
"ga": false,
"gapi": false,
"oauth_dfd": false,
"getPageToken": false,
"google": false,
"st": false,
// Webpack variables
"DEV_MODE": false,
"GOOGLE_ANALYTICS_ID": false,
"RELEASE_NOTES_DATE": false,
"BUILD_DATE": false
},
"rules": {
"arrow-spacing": ["error", {"before": true, "after": true}],
"eqeqeq": 2,
"comma-dangle": [
1, "always-multiline"
],
"indent": [2, 2, {
"FunctionDeclaration": {
"body": 1,
"parameters": 1
},
"FunctionExpression": {
"body": 1,
"parameters": 1
},
"SwitchCase": 1
}],
"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,
"ignorePattern": "^import (.+ from )?'.+';$"
}],
"quotes": [1, "single", {
"avoidEscape": true
}],
"no-implicit-coercion": [2, {
"boolean": false
}],
"no-inline-comments": 0,
"no-invalid-this": 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"],
"prefer-rest-params": 0,
"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,
"no-console": ["error", {
"allow": ["warn", "error"]
}],
"no-restricted-properties": [2, {
"object": "can",
"property": "Deferred"
}, {
"object": "can",
"property": "when"
}]
}
}