mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-29 05:48:47 +03: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,
|
"space_in_empty_paren": false,
|
||||||
"jslint_happy": false,
|
"jslint_happy": false,
|
||||||
"space_after_anon_function": false,
|
"space_after_anon_function": false,
|
||||||
"brace_style": "end-expand",
|
"brace_style": "end-expand,preserve-inline",
|
||||||
"unindent_chained_methods": false,
|
"unindent_chained_methods": false,
|
||||||
"break_chained_methods": false,
|
"break_chained_methods": false,
|
||||||
"keep_array_indentation": 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…
Reference in a new issue