diff --git a/src/webui/www/.eslintrc.json b/src/webui/www/.eslintrc.json new file mode 100644 index 000000000..c2cb0a275 --- /dev/null +++ b/src/webui/www/.eslintrc.json @@ -0,0 +1,14 @@ +{ + "env": { + "browser": true, + "es2020": true + }, + "extends": "eslint:recommended", + "plugins": [ + "html" + ], + "rules": { + "no-undef": "off", + "no-unused-vars": "off" + } +} diff --git a/src/webui/www/.jsbeautifyrc b/src/webui/www/.jsbeautifyrc index 63cfb7984..8aa593440 100644 --- a/src/webui/www/.jsbeautifyrc +++ b/src/webui/www/.jsbeautifyrc @@ -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, diff --git a/src/webui/www/package.json b/src/webui/www/package.json new file mode 100644 index 000000000..e94124882 --- /dev/null +++ b/src/webui/www/package.json @@ -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": "*" + } +}