Commit before lint

This commit is contained in:
nicolargo 2025-04-12 14:51:38 +02:00
parent 7de582fdb0
commit 0d2f5e4ba3
8 changed files with 2936 additions and 5912 deletions

View File

@ -223,6 +223,9 @@ webui-audit: ## Audit the Web UI
webui-audit-fix: ## Fix audit the Web UI
cd $(DIR) && npm audit fix && npm ci && npm run build
webui-update: ## Update JS dependencies
cd $(DIR) && npm update --save && npm ci && npm run build
# ===================================================================
# Packaging
# ===================================================================

View File

@ -1,13 +0,0 @@
/* eslint-disable */
module.exports = {
env: {
browser: true,
es2021: true
},
extends: ['eslint:recommended', 'plugin:vue/vue3-essential'],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module'
},
rules: {}
};

View File

@ -32,10 +32,25 @@ hash -r
You must run the following command from the `glances/outputs/static/` directory.
```bash
cd glances/outputs/static/
```
### Install dependencies
```bash
$ npm ci
npm ci
```
### Update dependencies
To update all the dependencies to the latest version and package.json and package-lock.json,
you can use the command "npm update --save":
```bash
npm update --save
npx npm-check-updates -u
npm install
```
### Build assets
@ -43,13 +58,13 @@ $ npm ci
Run the build command to build assets once :
```bash
$ npm run build
npm run build
```
or use the watch command to rebuild only modified files :
```bash
$ npm run watch
npm run watch
```
## Anatomy

View File

@ -0,0 +1,29 @@
import eslint from '@eslint/js';
import eslintConfigPrettier from 'eslint-config-prettier';
import eslintPluginVue from 'eslint-plugin-vue';
import globals from 'globals';
import typescriptEslint from 'typescript-eslint';
export default typescriptEslint.config(
{ ignores: ['*.d.ts', '**/coverage', '**/dist'] },
{
extends: [
eslint.configs.recommended,
...typescriptEslint.configs.recommended,
...eslintPluginVue.configs['flat/recommended'],
],
files: ['**/*.{ts,vue}'],
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
globals: globals.browser,
parserOptions: {
parser: typescriptEslint.parser,
},
},
rules: {
// your rules
},
},
eslintConfigPrettier
);

File diff suppressed because it is too large Load Diff

View File

@ -1,31 +1,34 @@
{
"private": true,
"dependencies": {
"bootstrap": "^5.3.3",
"bootstrap": "^5.3.5",
"favico.js": "^0.3.10",
"hotkeys-js": "^3.10.2",
"hotkeys-js": "^3.13.9",
"lodash": "^4.17.21",
"sanitize-html": "^2.10.0",
"vue": "^3.3.2"
"sanitize-html": "^2.15.0",
"vue": "^3.5.13"
},
"devDependencies": {
"@vue/compiler-sfc": "^3.3.2",
"copy-webpack-plugin": "^11.0.0",
"css-loader": "^6.7.3",
"del": "^7.0.0",
"eslint": "^8.40.0",
"eslint-plugin-vue": "^9.12.0",
"html-webpack-plugin": "^5.5.1",
"less": "^4.2.0",
"less-loader": "^11.1.4",
"sass": "^1.62.1",
"sass-loader": "^13.2.2",
"style-loader": "^3.3.2",
"@vue/compiler-sfc": "^3.5.13",
"copy-webpack-plugin": "^13.0.0",
"css-loader": "^7.1.2",
"del": "^8.0.0",
"eslint": "^9.24.0",
"eslint-config-prettier": "^10.1.2",
"eslint-plugin-vue": "^10.0.0",
"globals": "^16.0.0",
"html-webpack-plugin": "^5.6.3",
"less": "^4.3.0",
"less-loader": "^12.2.0",
"sass": "^1.86.3",
"sass-loader": "^16.0.5",
"style-loader": "^4.0.0",
"typescript-eslint": "^8.29.1",
"url-loader": "^4.1.1",
"vue-loader": "^17.1.1",
"webpack": "^5.94.0",
"webpack-cli": "^5.1.1",
"webpack-dev-server": "^4.15.0"
"vue-loader": "^17.4.2",
"webpack": "^5.99.5",
"webpack-cli": "^6.0.1",
"webpack-dev-server": "^5.2.1"
},
"scripts": {
"build": "webpack --progress --mode=production",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long