Skip to content

Commit

Permalink
chore(scripts): replace pretty-quick with lint-staged
Browse files Browse the repository at this point in the history
  • Loading branch information
phatpham9 committed Mar 28, 2020
1 parent c1e27f7 commit 17db803
Show file tree
Hide file tree
Showing 6 changed files with 377 additions and 80 deletions.
2 changes: 1 addition & 1 deletion .huskyrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"hooks": {
"pre-commit": "yarn format:stage && yarn lint",
"pre-commit": "lint-staged",
"pre-push": "yarn build"
}
}
3 changes: 3 additions & 0 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"**/*.ts": ["yarn format", "yarn lint"]
}
2 changes: 0 additions & 2 deletions .prettierignore

This file was deleted.

7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@
"postbuild": "copyfiles CHANGELOG.md LICENSE package.json README.md dist",
"purge": "rm -rf node_modules",
"clean": "rm -rf dist",
"format": "prettier --write .",
"format:check": "prettier --check .",
"format:stage": "pretty-quick --staged",
"format": "prettier --write --ignore-path .gitignore **/*.ts",
"format:check": "prettier --check --ignore-path .gitignore **/*.ts",
"lint": "eslint --quiet --ignore-path .gitignore **/*.ts",
"release": "standard-version --no-verify",
"release:major": "yarn release --release-as major",
Expand All @@ -41,8 +40,8 @@
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1",
"husky": "^2.3.0",
"lint-staged": "^10.0.9",
"prettier": "^2.0.2",
"pretty-quick": "^2.0.1",
"rollup": "^1.12.3",
"rollup-plugin-node-resolve": "^5.0.0",
"rollup-plugin-typescript2": "^0.21.1",
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
"sourceMap": true,
"strict": true
},
"include": ["src/**/*"]
"include": ["**/*.ts"]
}
Loading

0 comments on commit 17db803

Please sign in to comment.