Skip to content

Commit 0b3a04c

Browse files
Switch to 'npx' for lint-staged in pre-commit hook (#3658)
This way we get rid of the script entry in the `package.json` and the whole thing becomes a little less complex.
1 parent c485ff6 commit 0b3a04c

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

.husky/pre-commit

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/sh
22

3-
if command -v npm &> /dev/null; then
4-
npm run lint:staged
3+
if command -v npx &> /dev/null; then
4+
npx lint-staged
55
fi

CHANGELOG.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,15 @@ _This release is scheduled to be released on 2025-01-01._
2323
- [linter] Re-activate `eslint-plugin-package-json` to lint `package.json` (#3643)
2424
- [linter] Add linting for markdown files (#3646)
2525
- [calendar] Add ability to display end date for full date events, where end is not same day (showEnd=true) (#3650)
26-
- [core] Add text to the config.js.sample file about the locale variable (#3654)
26+
- [core] Add text to the config.js.sample file about the locale variable (#3654, #3655)
2727

2828
### Changed
2929

3030
- [core] Run code style checks in workflow only once (#3648)
3131
- [core] Fix animations export #3644 only on server side (#3649)
32-
- [core] Use project URL in fallback config.
33-
- [core] fix Access Denied crash writing js/positions.js (on synology nas) #3651. new message, MM starts, but no modules showing
32+
- [core] Use project URL in fallback config (#3656)
33+
- [core] Fix Access Denied crash writing js/positions.js (on synology nas) #3651. new message, MM starts, but no modules showing (#3652)
34+
- [linter] Switch to 'npx' for lint-staged in pre-commit hook
3435

3536
### Removed
3637

@@ -40,7 +41,7 @@ _This release is scheduled to be released on 2025-01-01._
4041
### Updated
4142

4243
- [repo] Reactivate `stale.yaml` as GitHub action to mark issues as stale after 60 days and close them 7 days later (if no activity) (#3577, #3580, #3581)
43-
- [core] Update electron dependency to v32 (test electron rebuild) and other dependencies
44+
- [core] Update electron dependency to v32 (test electron rebuild) and other dependencies (#3657)
4445
- [tests] All test configs have been updated to allow full external access, allowing for easier debugging (especially when running as a container)
4546
- [core] Run and test with node 23 (#3588)
4647

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
"lint:js": "eslint . --fix",
3434
"lint:markdown": "markdownlint-cli2 . --fix",
3535
"lint:prettier": "prettier . --write",
36-
"lint:staged": "lint-staged",
3736
"postinstall": "npm run install-vendor && npm run install-fonts && echo \"MagicMirror² installation finished successfully! \n\"",
3837
"prepare": "[ -f node_modules/.bin/husky ] && husky || echo no husky installed.",
3938
"server": "node ./serveronly",

0 commit comments

Comments
 (0)