-
Notifications
You must be signed in to change notification settings - Fork 13
/
.eslintrc.js
38 lines (38 loc) · 1.21 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
module.exports = {
"root": true,
"extends": ["eslint:recommended"],
"env": {
"es6": true,
"node": true,
"jquery" : true,
"browser": true,
"mocha": true
},
"globals": {
"Promise": true
},
"parserOptions": {
"ecmaVersion": 2022,
"sourceType": "module"
},
"rules": {
"max-len": ['error', {"code": 120, "ignoreComments": true}], // default 80
"indent": ['error', 2, {"SwitchCase": 1}], // not set by default
"quote-props": ["error", "as-needed"],
"comma-dangle": ["error", "only-multiline"], // allow trailing comma on multiline https://github.com/airbnb/javascript#commas--dangling
"curly": [2, "all"], // enfornce curly braces even in single line if-else
"no-unused-vars": ["error", { "vars": "all", "args": "after-used", "ignoreRestSiblings": false, "argsIgnorePattern": "(next|model|^_)"}],
"require-jsdoc": ["error", {
"require": {
"FunctionDeclaration": true,
"MethodDefinition": true,
"ClassDeclaration": true,
"ArrowFunctionExpression": true,
"FunctionExpression": true
}
}],
"no-prototype-builtins": "off",
"no-cond-assign": "off",
"linebreak-style": "warn"
}
}