Skip to main content

no-archive-devDependencies

Enabling this rule will result in an error being generated if one of the devDependencies in devDependencies is url to archive file.

Example .npmpackagejsonlintrc configuration

{
"rules": {
"no-archive-devDependencies": "error"
}
}

With exceptions

{
"rules": {
"no-archive-devDependencies": ["error", {
"exceptions": ["myModule"]
}]
}
}

Rule Details

Incorrect examples

{
"devDependencies": {
"grunt-npm-package-json-lint": "https://github.com/miripiruni/grunt-npm-package-json-lint/archive/v1.2.3.tar.gz"
}
}
{
"devDependencies": {
"grunt-npm-package-json-lint": "https://github.com/miripiruni/grunt-npm-package-json-lint/archive/v1.2.3.zip"
}
}

Correct examples

{
"devDependencies": {
"gulp-npm-package-json-lint": "4.0.0"
}
}
{
"devDependencies": {
"gulp-npm-package-json-lint": "miripiruni/grunt-npm-package-json-lint"
}
}

Shorthand for disabling the rule in .npmpackagejsonlintrc configuration

{
"rules": {
"no-archive-devDependencies": "off"
}
}

History

  • Improved messaging when an invalid configuration is detected in version 6.3.0
  • Introduced in version 4.3.0