-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mjs
More file actions
101 lines (98 loc) · 3.61 KB
/
eslint.config.mjs
File metadata and controls
101 lines (98 loc) · 3.61 KB
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
import globals from "globals";
import js from "@eslint/js";
import jsdoc from "eslint-plugin-jsdoc";
import stylistic from "@stylistic/eslint-plugin";
export default [
{
files: ["**/*.js"],
languageOptions: {
sourceType: "commonjs",
globals: {
...globals.node,
...globals.jest
}
},
plugins: {
jsdoc,
"@stylistic": stylistic
},
rules: {
...js.configs.all.rules,
...stylistic.configs["disable-legacy"].rules,
...stylistic.configs.all.rules,
"camelcase": "off",
"capitalized-comments": ["error", "always", {"ignorePattern": "html"}],
"complexity": "off",
"consistent-this": "off",
"default-case": "off",
"func-names": ["error", "as-needed"],
"id-length": "off",
"init-declarations": "off",
"max-depth": "off",
"max-lines": "off",
"max-lines-per-function": "off",
"max-params": "off",
"max-statements": "off",
"new-cap": ["error", {"properties": false, "capIsNewExceptions": ["Express", "HttpErrors"]}],
"no-console": "off",
"no-continue": "off",
"no-inline-comments": "off",
"no-magic-numbers": "off",
"no-param-reassign": "off",
"no-plusplus": "off",
"no-ternary": "off",
"no-underscore-dangle": ["error", {"allow": ["_getData", "_id"]}],
"no-unused-vars": ["error", {"argsIgnorePattern": "^_"}],
"no-void": "off",
"one-var": "off",
"require-unicode-regexp": "off",
"sort-keys": "off",
"sort-vars": "off",
"strict": "off",
"jsdoc/require-jsdoc": [
"error", {
"require": {
"FunctionDeclaration": true,
"MethodDefinition": true,
"ClassDeclaration": true,
"ArrowFunctionExpression": true,
"FunctionExpression": true
}
}
],
"jsdoc/require-returns": ["error", {"forceRequireReturn": true}],
"jsdoc/require-returns-description": "error",
"@stylistic/array-element-newline": "off",
"@stylistic/dot-location": "off",
"@stylistic/function-call-argument-newline": "off",
"@stylistic/indent": ["error", 4, {"SwitchCase": 1}],
"@stylistic/linebreak-style": ["error", "windows"],
"@stylistic/lines-around-comment": "off",
"@stylistic/multiline-comment-style": "off",
"@stylistic/multiline-ternary": "off",
"@stylistic/newline-per-chained-call": "off",
"@stylistic/no-confusing-arrow": "off",
"@stylistic/no-extra-parens": "error",
"@stylistic/no-trailing-spaces": ["error", {"ignoreComments": false}],
"@stylistic/object-property-newline": "off",
"@stylistic/padded-blocks": "off",
"@stylistic/quote-props": "off",
"@stylistic/quotes": ["error", "double"],
"@stylistic/space-before-function-paren": "off"
}
},
{
files: ["public/**/*.js"],
languageOptions: {
ecmaVersion: 2022,
sourceType: "script",
globals: {
...globals.es6,
...globals.browser
}
},
rules: {
"no-alert": "off"
}
}
];