Skip to content

Commit d5fd206

Browse files
committed
feat(template): replace pretty-quick with lint-staged, add tsconfig.json
1 parent ea56e13 commit d5fd206

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

generators/app/templates/.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
}
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+
}

generators/app/templates/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",
@@ -39,8 +38,8 @@
3938
"eslint-plugin-promise": "^4.2.1",
4039
"eslint-plugin-standard": "^4.0.1",
4140
"husky": "^2.3.0",
41+
"lint-staged": "^10.0.9",
4242
"prettier": "^2.0.2",
43-
"pretty-quick": "^2.0.1",
4443
"rollup": "^1.12.3",
4544
"rollup-plugin-node-resolve": "^5.0.0",
4645
"rollup-plugin-typescript2": "^0.21.1",

generators/app/templates/tsconfig.json

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

0 commit comments

Comments
 (0)