mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-14 02:27:09 -07:00
Add tools for js code formatting and linting
Due to eslint couldn't correctly resolve the context for the variables, two eslint rules are disabled for now.
This commit is contained in:
parent
45c0d5a823
commit
1d6af22813
3 changed files with 32 additions and 1 deletions
14
src/webui/www/.eslintrc.json
Normal file
14
src/webui/www/.eslintrc.json
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"env": {
|
||||
"browser": true,
|
||||
"es2020": true
|
||||
},
|
||||
"extends": "eslint:recommended",
|
||||
"plugins": [
|
||||
"html"
|
||||
],
|
||||
"rules": {
|
||||
"no-undef": "off",
|
||||
"no-unused-vars": "off"
|
||||
}
|
||||
}
|
|
@ -11,7 +11,7 @@
|
|||
"space_in_empty_paren": false,
|
||||
"jslint_happy": false,
|
||||
"space_after_anon_function": false,
|
||||
"brace_style": "end-expand",
|
||||
"brace_style": "end-expand,preserve-inline",
|
||||
"unindent_chained_methods": false,
|
||||
"break_chained_methods": false,
|
||||
"keep_array_indentation": false,
|
||||
|
|
17
src/webui/www/package.json
Normal file
17
src/webui/www/package.json
Normal file
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"name": "webui",
|
||||
"description": "qBittorrent WebUI",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/qbittorrent/qBittorrent.git"
|
||||
},
|
||||
"scripts": {
|
||||
"format": "js-beautify private/*.html private/scripts/*.js private/views/*.html public/*.html public/scripts/*.js",
|
||||
"lint": "eslint private/*.html private/scripts/*.js private/views/*.html public/*.html public/scripts/*.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "*",
|
||||
"eslint-plugin-html": "*",
|
||||
"js-beautify": "*"
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue