From a7df09cf79b459d12558cc19ae16f273315078ac Mon Sep 17 00:00:00 2001 From: Kristjan ESPERANTO <35647502+KristjanESPERANTO@users.noreply.github.com> Date: Fri, 6 Dec 2024 09:32:52 +0100 Subject: [PATCH] Add scripts for linting --- package.json | 5 +++++ readme.md | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/package.json b/package.json index fe1cfc0..c1e5c5e 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,11 @@ "url": "https://github.com/edward-shen/MMM-pages/issues" }, "homepage": "https://github.com/edward-shen/MMM-pages#readme", + "scripts": { + "lint": "eslint .", + "lint:fix": "eslint . --fix", + "test": "npm run lint" + }, "devDependencies": { "@eslint/js": "^9.16.0", "@stylistic/eslint-plugin": "^2.11.0", diff --git a/readme.md b/readme.md index cbec17a..db894bd 100644 --- a/readme.md +++ b/readme.md @@ -190,5 +190,13 @@ See also FAQ below. 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 [page indicator]: https://github.com/edward-shen/MMM-page-indicator