Skip to content

Commit 17db803

Browse files
committed
chore(scripts): replace pretty-quick with lint-staged
1 parent c1e27f7 commit 17db803

File tree

6 files changed

+377
-80
lines changed

6 files changed

+377
-80
lines changed

.huskyrc

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

.lintstagedrc

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

.prettierignore

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

package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@
1616
"postbuild": "copyfiles CHANGELOG.md LICENSE package.json README.md dist",
1717
"purge": "rm -rf node_modules",
1818
"clean": "rm -rf dist",
19-
"format": "prettier --write .",
20-
"format:check": "prettier --check .",
21-
"format:stage": "pretty-quick --staged",
19+
"format": "prettier --write --ignore-path .gitignore **/*.ts",
20+
"format:check": "prettier --check --ignore-path .gitignore **/*.ts",
2221
"lint": "eslint --quiet --ignore-path .gitignore **/*.ts",
2322
"release": "standard-version --no-verify",
2423
"release:major": "yarn release --release-as major",
@@ -41,8 +40,8 @@
4140
"eslint-plugin-promise": "^4.2.1",
4241
"eslint-plugin-standard": "^4.0.1",
4342
"husky": "^2.3.0",
43+
"lint-staged": "^10.0.9",
4444
"prettier": "^2.0.2",
45-
"pretty-quick": "^2.0.1",
4645
"rollup": "^1.12.3",
4746
"rollup-plugin-node-resolve": "^5.0.0",
4847
"rollup-plugin-typescript2": "^0.21.1",

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
"sourceMap": true,
1414
"strict": true
1515
},
16-
"include": ["src/**/*"]
16+
"include": ["**/*.ts"]
1717
}

0 commit comments

Comments
 (0)