Update eslint rules

Those are in sync with qbt WebUI.
This commit is contained in:
Chocobo1 2024-07-15 19:51:23 +08:00
parent b90e669071
commit f45a15e7bc
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
3 changed files with 19 additions and 3 deletions

View File

@ -1,4 +1,4 @@
'use strict';
"use strict";
function setIdClassAttr(id, value) {
const element = document.getElementById(id);

View File

@ -23,9 +23,16 @@ export default [
Stylistic
},
rules: {
"curly": ["error", "multi-or-nest", "consistent"],
"eqeqeq": "error",
"guard-for-in": "error",
"no-undef": "off",
"no-unused-vars": "off",
"no-var": "error",
"operator-assignment": "error",
"prefer-arrow-callback": "error",
"prefer-const": "error",
"radix": "error",
"Stylistic/no-mixed-operators": [
"error",
{
@ -35,7 +42,16 @@ export default [
}
],
"Stylistic/nonblock-statement-body-position": ["error", "below"],
"Stylistic/semi": "error"
"Stylistic/quotes": [
"error",
"double",
{
"avoidEscape": true,
"allowTemplateLiterals": true
}
],
"Stylistic/semi": "error",
"Stylistic/spaced-comment": ["error", "always", { "exceptions": ["*"] }]
}
}
];

View File

@ -1,4 +1,4 @@
'use strict';
"use strict";
function setIdClassAttr(id, value) {
const element = document.getElementById(id);