0.9.0 • Published 7 years ago
@build-chores/staged v0.9.0
@build-chores/staged
Staging JS projects is complicated.
Synopsis
Stage files of your JS project before committing them with git.
Usage
Install the @build-chores/staged package into your project:
yarn install --dev @build-chores/stagedUse Husky to lint your stage whenever you commit.
yarn add --dev huskyPlace a pre-commit hook in your .huskyrc. The following example hook only lints your stage when committing to the master branch. See the example .huskyrc for a template.
{
"hooks": {
"pre-commit": "! git rev-parse --abbrev-ref HEAD | grep -q master || lint-staged -c @build-chores/staged"
}
}To make sure that prettier isn't touching the package.json file during staging, place a .prettierignore file. See the example .prettierignore for a template.
package.jsonYou are ready to lint your staged files before committing.
Contribute
Check out our contributing.md to get started.