no-restricted-pre-release-devDependencies
Enabling this rule will result in an error being generated if one of the dependencies in devDependencies
has a is equal to one of the values in the array of restricted dependencies and it has a pre-release version specified.
Example .npmpackagejsonlintrc configuration
{
"rules": {
"no-restricted-pre-release-devDependencies": ["error", [
"grunt-npm-package-json-lint"
]]
}
}
Rule Details
Incorrect example(s)
{
"devDependencies": {
"grunt-npm-package-json-lint": "^1.0.0-beta.1"
}
}
Correct example(s)
{
"devDependencies": {
"gulp-npm-package-json-lint": "^1.0.0"
}
}
Shorthand for disabling the rule in .npmpackagejsonlintrc configuration
{
"rules": {
"no-restricted-pre-release-devDependencies": "off"
}
}
History
- Improved messaging when an invalid configuration is detected in version 6.3.0
- Renamed from devDependencies-invalid-pre-release-dependencies to no-restricted-pre-release-devDependencies in version 1.0.0
- Introduced in version 0.1.0