Skip to content

Commit e4eda2d

Browse files
authored
feat: move husky settings into package.json (#104)
Settings are minor, and do not require a dedicated file. BREAKING CHANGE: .huskyrc.js moved into package.json file
1 parent f22df36 commit e4eda2d

File tree

4 files changed

+10
-12
lines changed

4 files changed

+10
-12
lines changed

.huskyrc.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
"lint--watch": "onchange 'src/**/*' --initial --kill --delay 1000 -- npm run lint",
3838
"lint-eslint": "eslint --cache --ext .js,.jsx,.ts,.tsx --format=pretty ./",
3939
"lint-markdown": "markdownlint --ignore coverage --ignore dist --ignore examples --ignore node_modules '**/*.md' '.**/**/*.md'",
40-
"pre-commit": "lint-staged",
4140
"prepublish": "rimraf dist && npm run build",
4241
"start": "node --require dotenv/config dist/create-exposed-app-cli.js",
4342
"start--dev": "NODE_ENV=development npm run start",
@@ -50,6 +49,11 @@
5049
"typecheck--watch": "npm run typecheck -- --watch",
5150
"validate": "run-p --print-label lint typecheck test build"
5251
},
52+
"husky": {
53+
"hooks": {
54+
"pre-commit": "lint-staged"
55+
}
56+
},
5357
"dependencies": {
5458
"asyncro": "^3.0.0",
5559
"chalk": "^2.4.2",

templates/.huskyrc.js.template

Lines changed: 0 additions & 5 deletions
This file was deleted.

templates/package.json.template

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
"lint--watch": "onchange 'src/**/*' --initial --kill --delay 1000 -- npm run lint",
3434
"lint-eslint": "eslint --cache --ext .js,.jsx,.ts,.tsx --format=pretty ./",
3535
"lint-markdown": "markdownlint --ignore coverage --ignore dist --ignore node_modules '**/*.md' '.**/**/*.md'",
36-
"pre-commit": "lint-staged",
3736
"prepublish": "rimraf dist && npm run build",
3837
"start": "node --require dotenv/config dist/<%- projectPackageName %>.js",
3938
"start--dev": "NODE_ENV=development npm run start",
@@ -46,6 +45,11 @@
4645
"typecheck--watch": "npm run typecheck -- --watch",
4746
"validate": "run-p --print-label lint typecheck test build"
4847
},
48+
"husky": {
49+
"hooks": {
50+
"pre-commit": "lint-staged"
51+
}
52+
},
4953
"dependencies": {
5054
"dotenv": "^7.0.0"
5155
},

0 commit comments

Comments
 (0)