Skip to content

Commit 8f3e73f

Browse files
committed
chore: add lint-staged configuration and update pre-commit script
1 parent 419eeca commit 8f3e73f

File tree

5 files changed

+325
-7
lines changed

5 files changed

+325
-7
lines changed

.lintstagedrc.json

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

.markdownlintignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.husky/
2+
.lintstagedrc.json
3+
.markdownlintignore
4+
.prettier*
5+
node_modules/
6+
yarn.lock

.prettierignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.git/
2+
.husky/
3+
.markdownlintignore
4+
.prettierignore
5+
.vscode/
6+
dist/
7+
LICENSE
8+
node_modules/
9+
package-lock.json
10+
package.json
11+
yarn.lock

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@
66
"devDependencies": {
77
"auto-authors": "^0.1.5",
88
"husky": "^9.1.5",
9+
"lint-staged": "^15.2.9",
910
"markdownlint-cli": "^0.41.0",
1011
"prettier": "^3.3.3"
1112
},
1213
"scripts": {
1314
"postinstall": "husky",
14-
"format": "prettier --write docs/**/*.md && prettier --write ./{README,CONTRIBUTION}.md",
15-
"lint": "markdownlint docs/**/*.md ./README.md ./CONTRIBUTION.md",
15+
"lint": "markdownlint",
16+
"pretty": "prettier --write",
1617
"authors": "auto-authors",
17-
"precommit": "yarn format && yarn lint"
18+
"precommit": "lint-staged"
1819
}
1920
}

0 commit comments

Comments
 (0)