Skip to content

Commit 5c85ea8

Browse files
coderaisersnitin315mdjermanovic
authored
chore: Add lint-staged (#565)
Co-authored-by: Nitin Kumar <[email protected]> Co-authored-by: Milos Djermanovic <[email protected]>
1 parent bc306d9 commit 5c85ea8

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.lintstagedrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"*.{js,cjs}": "eslint --fix"
3+
}

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,12 @@
4848
"eslint-plugin-node": "^11.1.0",
4949
"eslint-release": "^3.2.0",
5050
"esprima-fb": "^8001.2001.0-dev-harmony-fb",
51+
"lint-staged": "^13.2.0",
5152
"mocha": "^9.2.2",
5253
"npm-run-all": "^4.1.5",
5354
"rollup": "^2.41.2",
54-
"shelljs": "^0.3.0"
55+
"shelljs": "^0.3.0",
56+
"yorkie": "^2.0.0"
5557
},
5658
"keywords": [
5759
"ast",
@@ -61,6 +63,9 @@
6163
"syntax",
6264
"acorn"
6365
],
66+
"gitHooks": {
67+
"pre-commit": "lint-staged"
68+
},
6469
"scripts": {
6570
"unit": "npm-run-all -s unit:*",
6671
"unit:esm": "c8 mocha --color --reporter progress --timeout 30000 'tests/lib/**/*.js'",

0 commit comments

Comments
 (0)