Skip to content

Commit

Permalink
build: configure lint-staged (refinedev#2853)
Browse files Browse the repository at this point in the history
* fix(build): lint-staged configuration

* build(pre-commit): update hook command
  • Loading branch information
aliemir authored Oct 20, 2022
1 parent a7a513b commit c9f9de9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run lint:fix
npm run lint:staged
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"bootstrap": "cd packages/codemod && npm ci && cd ../.. && lerna bootstrap --hoist --strict --ignore @pankod/refine-codemod --ignore @pankod/refine-react-router --scope @pankod/refine*",
"lint": "eslint -c ./.eslintrc packages examples",
"lint:fix": "npm run lint -- --quiet --fix",
"lint:staged": "lint-staged",
"build": "lerna run build --ignore @pankod/refine-react-router --scope @pankod/refine*",
"start:docs": "concurrently \"cd documentation && npm run start\" \"npm run start -- --scope @pankod/refine-live-previews\" --names docs,live --prefix-colors blue,red",
"nuke": "rm -rf node_modules; for d in for d in packages/*/node_modules; do echo $d; rm -rf $d; done; for d in for d in packages/*/dist; do echo $d; rm -rf $d; done; for d in packages/*/dist; do echo $d; rm -rf $d; done; for d in examples/*/node_modules; do echo $d; rm -rf $d; done; for d in examples/*/package-lock.json; do echo $d; rm -rf $d; done;",
Expand All @@ -23,7 +24,7 @@
},
"lint-staged": {
"*.{js,jsx,ts,tsx}": [
"npm run lint:fix"
"eslint -c ./.eslintrc --quiet --fix"
]
},
"name": "refinejs-repo",
Expand Down

0 comments on commit c9f9de9

Please sign in to comment.