Skip to content

Commit

Permalink
feat: add lint-staged (eslint#562 (comment))
Browse files Browse the repository at this point in the history
  • Loading branch information
coderaiser committed Mar 11, 2023
1 parent bc306d9 commit 7e44330
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .husky/pre-commit
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

rollup -c rollup.config.js && lint-staged
3 changes: 3 additions & 0 deletions .lintstagedrc.json
@@ -0,0 +1,3 @@
{
"*.js": "eslint . --fix"
}
5 changes: 4 additions & 1 deletion package.json
Expand Up @@ -48,6 +48,8 @@
"eslint-plugin-node": "^11.1.0",
"eslint-release": "^3.2.0",
"esprima-fb": "^8001.2001.0-dev-harmony-fb",
"husky": "^8.0.3",
"lint-staged": "^13.2.0",
"mocha": "^9.2.2",
"npm-run-all": "^4.1.5",
"rollup": "^2.41.2",
Expand Down Expand Up @@ -77,6 +79,7 @@
"generate-alpharelease": "eslint-generate-prerelease alpha",
"generate-betarelease": "eslint-generate-prerelease beta",
"generate-rcrelease": "eslint-generate-prerelease rc",
"publish-release": "eslint-publish-release"
"publish-release": "eslint-publish-release",
"prepare": "husky install"
}
}

0 comments on commit 7e44330

Please sign in to comment.