-
Notifications
You must be signed in to change notification settings - Fork 1
prepost trigger defined
tannerbaum edited this page Feb 26, 2020
·
3 revisions
This rule is not fixable ✖︎
package.json
script hooks are scripts that are automatically triggered before or after other scripts. Here, the project is built before publishing it on npm, yet before that, the build directory is cleared:
{
"prepublish": "npm run build",
"build": "...",
"prebuild": "rimraf dist/"
}
If these scripts are defined, there should also be a trigger script:
"scripts": {
"pretest:lint": "npm run build" 🚨
"test:eslint": "eslint ./src"
}
yields some custom hooks (pretest:lint) are missing their trigger script(s) (prepost-trigger-defined)
- Motivation
- The scriptlint "standard" tl;dr
-
The scriptlint "standard"
- Rules enforceable via the scriptlint CLI
- Best practices
- The scriptlint CLI
- Contributing to scriptlint