Skip to content

Commit 42993ec

Browse files
author
Erwin Dondorp
committed
upgraded to eslint 9
1 parent 0bd0627 commit 42993ec

File tree

11 files changed

+717
-510
lines changed

11 files changed

+717
-510
lines changed

eslint.config.js

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
// eslint.config.js
2+
import js from "@eslint/js";
3+
import pluginCompat from "eslint-plugin-compat";
4+
5+
export default [
6+
{
7+
files: ["saltgui/static/scripts/**/*.js", "tests/**/*.js"],
8+
languageOptions: {
9+
ecmaVersion: "latest",
10+
sourceType: "module",
11+
},
12+
plugins: {
13+
compat: pluginCompat,
14+
},
15+
rules: {
16+
"array-element-newline": 0,
17+
"capitalized-comments": 0,
18+
"class-methods-use-this": 2,
19+
"complexity": 0,
20+
"dot-notation": 0,
21+
"function-call-argument-newline": 0,
22+
"function-paren-newline": 0,
23+
"guard-for-in": 0,
24+
"id-length": ["error", { "exceptions": ["i"] }],
25+
"indent": ["error", 2],
26+
"init-declarations": 0,
27+
"keyword-spacing": "warn",
28+
"max-classes-per-file": "off",
29+
"max-len": "off",
30+
"max-lines": "off",
31+
"max-lines-per-function": "off",
32+
"max-params": "off",
33+
"max-statements": "off",
34+
"multiline-comment-style": "off",
35+
"multiline-ternary": "off",
36+
"no-console": "error",
37+
"no-continue": "off",
38+
"no-invalid-this": "error",
39+
"no-loss-of-precision": "off",
40+
"no-magic-numbers": "off",
41+
"no-mixed-operators": "off",
42+
"no-param-reassign": "off",
43+
"no-plusplus": ["error", { "allowForLoopAfterthoughts": true }],
44+
"no-redeclare": "error",
45+
"no-ternary": "off",
46+
"no-undef-init": "error",
47+
"no-undefined": "off",
48+
"no-underscore-dangle": "off",
49+
"no-unused-vars": ["error", { "args": "all", "caughtErrors": "all", "vars": "all" }],
50+
"no-warning-comments": "off",
51+
"object-property-newline": "off",
52+
"object-shorthand": "off",
53+
"one-var": "off",
54+
"padded-blocks": "off",
55+
"prefer-destructuring": "off",
56+
"prefer-named-capture-group": "off",
57+
"prefer-template": "off",
58+
"require-unicode-regexp": "off",
59+
"space-before-function-paren": ["error", "always"],
60+
61+
"arrow-body-style": ["error", "as-needed"],
62+
"compat/compat": "error",
63+
"curly": ["error", "all"],
64+
"func-names": ["error", "always"],
65+
"line-comment-position": ["error", { "position": "above" }],
66+
"max-depth": ["error", 4],
67+
"no-bitwise": "error",
68+
"no-extra-parens": ["error"],
69+
"no-inline-comments": "error",
70+
"no-labels": "error",
71+
"no-lonely-if": "error",
72+
"no-self-assign": ["error", { "props": true }],
73+
"prefer-object-spread": "error",
74+
"sort-keys": ["error", "asc", { "caseSensitive": true, "natural": false }]
75+
}
76+
}
77+
];

0 commit comments

Comments
 (0)