Skip to content

Commit

Permalink
WebUI: migrate ESLint rules
Browse files Browse the repository at this point in the history
  • Loading branch information
Chocobo1 committed May 3, 2024
1 parent 8ef7d3e commit 79eb7b8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
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

0 comments on commit 79eb7b8

Please sign in to comment.