Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebUI: migrate ESLint rules #20727

Merged
merged 1 commit into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 11 additions & 7 deletions src/webui/www/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,27 @@
"browser": true,
"es2022": true
},
"extends": "eslint:recommended",
"extends": [
"eslint:recommended",
"plugin:@stylistic/disable-legacy"
],
"plugins": [
"html"
"html",
"@stylistic"
],
"rules": {
"eqeqeq": "error",
"no-mixed-operators": [
"no-undef": "off",
"no-unused-vars": "off",
"@stylistic/no-mixed-operators": [
"error",
{
"groups": [
["&", "|", "^", "~", "<<", ">>", ">>>", "==", "!=", "===", "!==", ">", ">=", "<", "<=", "&&", "||", "in", "instanceof"]
]
}
],
"no-undef": "off",
"no-unused-vars": "off",
"nonblock-statement-body-position": ["error", "below"],
"semi": "error"
"@stylistic/nonblock-statement-body-position": ["error", "below"],
"@stylistic/semi": "error"
}
}
1 change: 1 addition & 0 deletions src/webui/www/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"lint": "eslint private/*.html private/scripts/*.js private/views/*.html public/*.html public/scripts/*.js && stylelint **/*.css && html-validate private public"
},
"devDependencies": {
"@stylistic/eslint-plugin": "*",
"eslint": "^8",
"eslint-plugin-html": "^8",
"html-validate": "*",
Expand Down