mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-23 16:58:06 -06:00
WebUI: migrate to ESLint v9
This commit is contained in:
41
src/webui/www/eslint.config.mjs
Normal file
41
src/webui/www/eslint.config.mjs
Normal file
@@ -0,0 +1,41 @@
|
||||
import Globals from 'globals';
|
||||
import Html from 'eslint-plugin-html';
|
||||
import Js from '@eslint/js';
|
||||
import Stylistic from '@stylistic/eslint-plugin';
|
||||
|
||||
export default [
|
||||
Js.configs.recommended,
|
||||
Stylistic.configs["disable-legacy"],
|
||||
{
|
||||
files: [
|
||||
"**/*.html",
|
||||
"**/*.js",
|
||||
"**/*.mjs"
|
||||
],
|
||||
languageOptions: {
|
||||
ecmaVersion: 2022,
|
||||
globals: {
|
||||
...Globals.browser
|
||||
}
|
||||
},
|
||||
plugins: {
|
||||
Html,
|
||||
Stylistic
|
||||
},
|
||||
rules: {
|
||||
"eqeqeq": "error",
|
||||
"no-undef": "off",
|
||||
"no-unused-vars": "off",
|
||||
"Stylistic/no-mixed-operators": [
|
||||
"error",
|
||||
{
|
||||
"groups": [
|
||||
["&", "|", "^", "~", "<<", ">>", ">>>", "==", "!=", "===", "!==", ">", ">=", "<", "<=", "&&", "||", "in", "instanceof"]
|
||||
]
|
||||
}
|
||||
],
|
||||
"Stylistic/nonblock-statement-body-position": ["error", "below"],
|
||||
"Stylistic/semi": "error"
|
||||
}
|
||||
}
|
||||
];
|
||||
Reference in New Issue
Block a user