Enable customizing the save statistics time interval
[qBittorrent.git] / src / webui / www / eslint.config.mjs
blobe77e7d422f2c4ba19b23aac9d78de31c8a8c7a9e
1 import Globals from "globals";
2 import Html from "eslint-plugin-html";
3 import Js from "@eslint/js";
4 import Stylistic from "@stylistic/eslint-plugin";
5 import * as RegexpPlugin from "eslint-plugin-regexp";
7 export default [
8     Js.configs.recommended,
9     RegexpPlugin.configs["flat/recommended"],
10     Stylistic.configs["disable-legacy"],
11     {
12         files: [
13             "**/*.html",
14             "**/*.js",
15             "**/*.mjs"
16         ],
17         languageOptions: {
18             ecmaVersion: 2022,
19             globals: {
20                 ...Globals.browser
21             }
22         },
23         plugins: {
24             Html,
25             RegexpPlugin,
26             Stylistic
27         },
28         rules: {
29             "curly": ["error", "multi-or-nest", "consistent"],
30             "eqeqeq": "error",
31             "guard-for-in": "error",
32             "no-undef": "off",
33             "no-unused-vars": "off",
34             "no-var": "error",
35             "operator-assignment": "error",
36             "prefer-arrow-callback": "error",
37             "prefer-const": "error",
38             "radix": "error",
39             "Stylistic/no-mixed-operators": [
40                 "error",
41                 {
42                     "groups": [
43                         ["&", "|", "^", "~", "<<", ">>", ">>>", "==", "!=", "===", "!==", ">", ">=", "<", "<=", "&&", "||", "in", "instanceof"]
44                     ]
45                 }
46             ],
47             "Stylistic/nonblock-statement-body-position": ["error", "below"],
48             "Stylistic/quotes": [
49                 "error",
50                 "double",
51                 {
52                     "avoidEscape": true,
53                     "allowTemplateLiterals": true
54                 }
55             ],
56             "Stylistic/semi": "error",
57             "Stylistic/spaced-comment": ["error", "always", { "exceptions": ["*"] }]
58         }
59     }