forked from ILIAS-eLearning/ILIAS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
executable file
·67 lines (67 loc) · 1.58 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
{
"extends": "airbnb-base",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
// allow certain globals to be used without declaration.
"globals": {
// globals from the browser environment.
"document": "readonly",
"window": "readonly",
"il": "writable",
// globals from the mocha testing framework.
"beforeEach": "readonly",
"afterEach": "readonly",
"describe": "readonly",
"before": "readonly",
"after": "readonly",
"it": "readonly"
},
// minified and bundled scripts are exempt from the
// code-style.
"ignorePatterns": [
"**/dist/*",
"*.min.js"
],
"rules": {
// allow function hoisting as javascript code is
// compiled before execution.
"no-use-before-define": [
"error",
"nofunc"
],
// enforce camelcase for classes as well.
"camelcase": [
"error",
{
"properties": "always",
"ignoreDestructuring": false,
"ignoreGlobals": false
}
],
// allow anonymous functions for iife's and mocha.js.
"func-names": [
"warn",
"never"
],
// allow unresolved imports due to module-bundling
// and third-party libraries.
"import/no-unresolved": 0,
// allow import of devDependencies in test files.
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": true
}
],
// allow to reassign argument properties for e.g. altering
// HTMLElement styles and state.
"no-param-reassign": [
"error",
{
"props": false
}
]
}
}