-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.mjs
98 lines (96 loc) · 2.42 KB
/
eslint.config.mjs
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
import js from "@eslint/js";
import globals from "globals";
import jsdoc from "eslint-plugin-jsdoc";
export default [
js.configs.recommended,
{
files: ['pyfahviewer/static/*.js'],
languageOptions: {
ecmaVersion: 9,
globals: {
...globals.browser,
}
},
plugins: {
jsdoc: jsdoc
},
rules: {
"no-console": ["off"],
curly: ["error", "all"],
"default-case": ["error"],
"no-eval": ["error"],
"no-multi-spaces": [
"warn",
{
ignoreEOLComments: true,
exceptions: {
Property: true,
VariableDeclarator: true,
ImportDeclaration: true
}
}
],
"no-shadow": ["error"],
"no-undefined": ["error"],
"array-bracket-spacing": ["warn", "never"],
"block-spacing": ["warn", "always"],
"brace-style": ["warn", "1tbs"],
camelcase: ["warn", {properties: "always"}],
"comma-spacing": [
"warn",
{
before: false,
after: true
}
],
"comma-style": ["warn", "last"],
indent: ["warn", 2, {SwitchCase: 1}],
"new-cap": [
"warn",
{
newIsCap: true,
capIsNew: true,
properties: false
}
],
"no-mixed-spaces-and-tabs": ["warn", "smart-tabs"],
"no-multiple-empty-lines": ["warn"],
"no-nested-ternary": ["warn"],
"no-spaced-func": ["warn"],
"no-trailing-spaces": ["warn"],
semi: ["warn", "always"],
"space-in-parens": ["warn", "never"],
"space-infix-ops": ["warn"],
"spaced-comment": [
"warn",
"always",
{
block:
{
exceptions: ["*"]
}
}
],
"jsdoc/require-jsdoc": [
"error",
{
require: {
FunctionDeclaration: true,
MethodDefinition: true,
ClassDeclaration: false
}
}
],
"jsdoc/require-returns": ["error"],
"jsdoc/require-returns-type": ["error"],
"jsdoc/require-returns-description": ["error"],
"jsdoc/require-returns-check": ["error"],
"jsdoc/require-param": ["error"],
"jsdoc/require-param-description": ["error"],
"jsdoc/require-param-type": ["error"],
"jsdoc/check-param-names": ["error"],
"jsdoc/valid-types": ["error"],
"jsdoc/require-param-name": ["error"],
}
}
];