Skip to content

Commit afc143b

Browse files
chore(lint): create .lintstagedrc and add to npm precommit hook
1 parent ee635a0 commit afc143b

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

.lintstagedrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"*.js": ["npm run lint:fix", "git add"]
3+
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"coveralls": "cat coverage/lcov.info | coveralls",
1414
"lint": "eslint --ignore-path .gitignore .",
1515
"lint:fix": "npm run lint -- --fix",
16+
"precommit": "lint-staged",
1617
"prepublishOnly": "npm run clean && npm run build:unmin && npm run build:min",
1718
"release": "standard-version --no-verify",
1819
"test": "mocha"

0 commit comments

Comments
 (0)