Skip to content

Commit

Permalink
chore(repo): run linter fix against staged files in pre-commit hook (#…
Browse files Browse the repository at this point in the history
…13349)

* chore(repo): run linter fix against staged files in pre-commit hook

* exclude .husky from license header check
  • Loading branch information
HuiSF committed May 9, 2024
1 parent 2ce82f9 commit b1dec5a
Show file tree
Hide file tree
Showing 5 changed files with 239 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .husky/pre-commit
@@ -0,0 +1,2 @@
# Run `eslint --fix` against staged files
yarn lint-staged
3 changes: 3 additions & 0 deletions .lintstagedrc.mjs
@@ -0,0 +1,3 @@
export default {
"*.{ts,tsx}": "eslint --fix"
}
3 changes: 2 additions & 1 deletion license_config.json
Expand Up @@ -38,7 +38,8 @@
"**/Gemfile",
"**/.rollup.cache",
"**/rollup.config.mjs",
"rollup"
"rollup",
".husky"
],
"ignoreFile": ".gitignore",
"license": "license_header.txt",
Expand Down
4 changes: 3 additions & 1 deletion package.json
Expand Up @@ -32,7 +32,7 @@
"publish:v5-stable": "lerna publish --conventional-commits --yes --dist-tag=stable-5 --message 'chore(release): Publish [ci skip]' --no-verify-access",
"publish:verdaccio": "lerna publish --canary --force-publish --no-push --dist-tag=unstable --preid=unstable --yes",
"ts-coverage": "lerna run ts-coverage",
"prepare": "./scripts/set-preid-versions.sh"
"prepare": "husky && ./scripts/set-preid-versions.sh"
},
"workspaces": {
"packages": [
Expand Down Expand Up @@ -103,11 +103,13 @@
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-unused-imports": "^3.0.0",
"glob": "^10.3.10",
"husky": "^9.0.11",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"json-loader": "^0.5.7",
"lerna": "^7.4.2",
"license-check-and-add": "^4.0.5",
"lint-staged": "^15.2.2",
"mkdirp": "^3.0.1",
"prettier": "^3.2.5",
"rimraf": "^2.6.2",
Expand Down

0 comments on commit b1dec5a

Please sign in to comment.