Update husky and let lint-staged fix ESLint issues (#3370)

The new version of husky makes it possible to simplify the pre-commit
hook a little.

And since prettier no longer takes care of the JavaScript files in our
project, it can no longer come into conflict with ESLint while running
lint-staged. Therefore we can activate the correction of ESLint issues
here.
This commit is contained in:
Kristjan ESPERANTO
2024-01-28 23:15:18 +01:00
committed by GitHub
parent 3bf848075d
commit 431bf22adb
5 changed files with 14 additions and 14 deletions

View File

@@ -26,7 +26,7 @@
"lint:js": "eslint . --fix",
"lint:css": "stylelint 'css/main.css' 'fonts/*.css' 'modules/default/**/*.css' 'vendor/*.css' --config .stylelintrc.json --fix",
"lint:staged": "lint-staged",
"prepare": "[ -f node_modules/.bin/husky ] && husky install || echo no husky installed."
"prepare": "[ -f node_modules/.bin/husky ] && husky || echo no husky installed."
},
"repository": "MagicMirrorOrg/MagicMirror",
"keywords": [
@@ -53,7 +53,7 @@
"eslint-plugin-package-json": "^0.10.1",
"eslint-plugin-unicorn": "^50.0.1",
"express-basic-auth": "^1.2.1",
"husky": "^8.0.3",
"husky": "^9.0.6",
"jest": "^29.7.0",
"jsdom": "^23.2.0",
"lint-staged": "^15.2.0",
@@ -88,8 +88,8 @@
},
"lint-staged": {
"*": "prettier --write",
"*.js": "eslint",
"*.css": "stylelint"
"*.js": "eslint --fix",
"*.css": "stylelint --fix"
},
"_moduleAliases": {
"node_helper": "js/node_helper.js",