forked from sakaiproject/sakai
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
100 lines (100 loc) · 3.36 KB
/
.eslintrc.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
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
module.exports = {
"env": { "browser": true, "es2022": true },
"globals": {
"$": "readonly",
"bootstrap": "readonly",
"sakai": "readonly",
"sakaiSessionId": "readonly",
"portal": "readonly",
"profile": "readonly",
"CKEDITOR": "readonly",
"moment": "readonly",
"confirmDatePlugin": "readonly",
"flatpickr": "readonly",
"jQuery": "readonly",
"MathJax": "readonly",
"globalThis": "readonly",
},
"extends": [ "eslint:recommended" ],
"parserOptions": { "ecmaVersion": 2022, "sourceType": "module" },
"rules": {
"accessor-pairs": "error",
"array-bracket-spacing": [ 'error', 'always' ],
"array-callback-return": "error",
"arrow-parens": [ "error", "as-needed" ],
"arrow-spacing": "error",
"block-spacing": "error",
"camelcase" : "error",
"comma-spacing": "error",
"curly": [ "error", "multi-line" ],
"dot-notation": "error",
"indent": ["warn", 2, { "SwitchCase": 1, "MemberExpression": "off", "ImportDeclaration": "off", "ignoredNodes": ["TemplateLiteral > *"] }],
"keyword-spacing": "error",
"linebreak-style": ["error", "unix"],
"no-array-constructor": "error",
"no-caller": "error",
"no-cond-assign": "error",
"no-constructor-return": "error",
"no-duplicate-imports": "error",
"no-else-return": "error",
"no-empty": ["error", { allowEmptyCatch: true }],
"no-eval": "error",
"no-extend-native": ["error", { "exceptions": ["Date"] }],
"no-extra-bind": "error",
"no-implied-eval": "error",
"no-iterator": "error",
"no-labels": "error",
"no-lone-blocks": "error",
"no-lonely-if": "error",
"no-loop-func": "error",
"no-loss-of-precision": "error",
"no-multi-str": "error",
"no-multiple-empty-lines": "error",
"no-new-func": "error",
"no-new-object": "error",
"no-new-wrappers": "error",
"no-octal-escape": "error",
"no-param-reassign": "error",
"no-proto": "error",
"no-redeclare": "error",
"no-return-await": "error",
"no-script-url": "error",
"no-self-compare": "error",
"no-sequences": "error",
"no-shadow": ["error", { "allow": ["html"] }],
"no-tabs": "error",
"no-trailing-spaces": "error",
"no-multi-spaces" : "error",
"no-undef": "error",
"no-undef-init": "error",
"no-unmodified-loop-condition": "error",
"no-unneeded-ternary": ["error", { defaultAssignment: false }],
"no-unreachable-loop": "error",
"no-unused-vars": ["error"],
"no-use-before-define": ["error", "nofunc"],
"no-useless-backreference": "error",
"no-useless-call": "error",
"no-useless-computed-key": "error",
"no-useless-constructor": "error",
"no-useless-escape": "error",
"no-useless-rename": "error",
"no-useless-return": "error",
"no-var": "error",
"object-curly-spacing": [ 'error', 'always' ],
"object-shorthand": "error",
"prefer-arrow-callback": "error",
"prefer-const": "error",
"prefer-exponentiation-operator": "error",
"prefer-numeric-literals": "error",
"prefer-object-spread": "error",
"prefer-regex-literals": "error",
"prefer-rest-params": "error",
"prefer-spread": "error",
"require-atomic-updates": "error",
"semi": ["error", "always"],
"space-infix-ops": "error",
"space-before-blocks": "error",
"strict": "error",
"yoda": ["error", "never", { onlyEquality: true }],
}
};