mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-23 16:58:06 -06:00
55 lines
1.5 KiB
JavaScript
55 lines
1.5 KiB
JavaScript
import Globals from "globals";
|
|
import Html from "eslint-plugin-html";
|
|
import Js from "@eslint/js";
|
|
import Stylistic from "@stylistic/eslint-plugin";
|
|
import * as RegexpPlugin from "eslint-plugin-regexp";
|
|
|
|
export default [
|
|
Js.configs.recommended,
|
|
RegexpPlugin.configs["flat/recommended"],
|
|
Stylistic.configs["disable-legacy"],
|
|
{
|
|
files: [
|
|
"**/*.html",
|
|
"**/*.js",
|
|
"**/*.mjs"
|
|
],
|
|
languageOptions: {
|
|
ecmaVersion: 2022,
|
|
globals: {
|
|
...Globals.browser
|
|
}
|
|
},
|
|
plugins: {
|
|
Html,
|
|
RegexpPlugin,
|
|
Stylistic
|
|
},
|
|
rules: {
|
|
"eqeqeq": "error",
|
|
"no-undef": "off",
|
|
"no-unused-vars": "off",
|
|
"no-var": "error",
|
|
"prefer-const": "error",
|
|
"Stylistic/no-mixed-operators": [
|
|
"error",
|
|
{
|
|
"groups": [
|
|
["&", "|", "^", "~", "<<", ">>", ">>>", "==", "!=", "===", "!==", ">", ">=", "<", "<=", "&&", "||", "in", "instanceof"]
|
|
]
|
|
}
|
|
],
|
|
"Stylistic/nonblock-statement-body-position": ["error", "below"],
|
|
"Stylistic/quotes": [
|
|
"error",
|
|
"double",
|
|
{
|
|
"avoidEscape": true,
|
|
"allowTemplateLiterals": true
|
|
}
|
|
],
|
|
"Stylistic/semi": "error"
|
|
}
|
|
}
|
|
];
|