Skip to content

Commit 13baf7e

Browse files
committed
chore(scripts): replace pretty-quick with lint-staged
1 parent f98cbaf commit 13baf7e

File tree

4 files changed

+271
-48
lines changed

4 files changed

+271
-48
lines changed

.huskyrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"hooks": {
3-
"pre-commit": "yarn format:stage && yarn lint",
3+
"pre-commit": "lint-staged",
44
}
55
}

.lintstagedrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"**/*.js": ["yarn format", "yarn lint"]
3+
}

package.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@
1313
],
1414
"scripts": {
1515
"purge": "rm -rf node_modules",
16-
"format": "prettier --write .",
17-
"format:check": "prettier --check .",
18-
"format:stage": "pretty-quick --staged",
19-
"lint": "eslint --ignore-path .gitignore --ignore-pattern templates .",
16+
"format": "prettier --write --ignore-path .gitignore **/*.js",
17+
"format:check": "prettier --check --ignore-path .gitignore **/*.js",
18+
"lint": "eslint --ignore-path .gitignore --ignore-pattern templates **/*.js",
2019
"release": "standard-version --no-verify",
2120
"release:major": "yarn release --release-as major",
2221
"release:minor": "yarn release --release-as minor",
@@ -36,16 +35,16 @@
3635
"devDependencies": {
3736
"@boringcodes/eslint-config": "^1.0.0",
3837
"@boringcodes/prettier-config": "^1.0.0",
38+
"eslint": "^6.8.0",
3939
"eslint-config-prettier": "^6.10.1",
4040
"eslint-config-standard": "^14.1.1",
4141
"eslint-plugin-import": "^2.20.1",
4242
"eslint-plugin-node": "^11.0.0",
4343
"eslint-plugin-promise": "^4.2.1",
4444
"eslint-plugin-standard": "^4.0.1",
45-
"eslint": "^6.8.0",
4645
"husky": "^4.2.3",
46+
"lint-staged": "^10.0.9",
4747
"prettier": "^2.0.2",
48-
"pretty-quick": "^2.0.1",
4948
"standard-version": "^7.1.0"
5049
}
5150
}

0 commit comments

Comments
 (0)