Add scripts for linting

This commit is contained in:
Kristjan ESPERANTO 2024-12-06 09:32:52 +01:00
parent ce58e1bc60
commit a7df09cf79
2 changed files with 13 additions and 0 deletions

View file

@ -18,6 +18,11 @@
"url": "https://github.com/edward-shen/MMM-pages/issues" "url": "https://github.com/edward-shen/MMM-pages/issues"
}, },
"homepage": "https://github.com/edward-shen/MMM-pages#readme", "homepage": "https://github.com/edward-shen/MMM-pages#readme",
"scripts": {
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"test": "npm run lint"
},
"devDependencies": { "devDependencies": {
"@eslint/js": "^9.16.0", "@eslint/js": "^9.16.0",
"@stylistic/eslint-plugin": "^2.11.0", "@stylistic/eslint-plugin": "^2.11.0",

View file

@ -190,5 +190,13 @@ See also FAQ below.
Please make an issue. Thanks! Please make an issue. Thanks!
## Developer commands
If you want to contribute to this poject, pleases use the following commands to maintain code quality:
- `npm install` - Install development dependencies for linting.
- `npm run lint` - Run linting checks.
- `npm run lint:fix` - Fix linting issues. Please run this before committing.
[mm]: https://github.com/MagicMirrorOrg/MagicMirror [mm]: https://github.com/MagicMirrorOrg/MagicMirror
[page indicator]: https://github.com/edward-shen/MMM-page-indicator [page indicator]: https://github.com/edward-shen/MMM-page-indicator