Skip to main content

no-git-devDependencies

Enabling this rule will result in an error being generated if one of the devDependencies in devDependencies uses git repository.

Example .npmpackagejsonlintrc configuration

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

With exceptions

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

Rule Details

Incorrect examples

{
"devDependencies": {
"grunt-npm-package-json-lint": "github:miripiruni/grunt-npm-package-json-lint"
}
}
{
"devDependencies": {
"grunt-npm-package-json-lint": "miripiruni/grunt-npm-package-json-lint"
}
}
{
"devDependencies": {
"grunt-npm-package-json-lint": "miripiruni/grunt-npm-package-json-lint#miri/issue-42"
}
}
{
"devDependencies": {
"grunt-npm-package-json-lint": "miripiruni/grunt-npm-package-json-lint#v1.0.0-rc-1"
}
}
{
"devDependencies": {
"grunt-npm-package-json-lint": "miripiruni/grunt-npm-package-json-lint#4f9012b132aa4d2d6097b516b31327c999b0a846"
}
}
{
"devDependencies": {
"grunt-npm-package-json-lint": "git://github.com/miripiruni/grunt-npm-package-json-lint.git"
}
}
{
"devDependencies": {
"grunt-npm-package-json-lint": "git@github.com:miripiruni/grunt-npm-package-json-lint.git"
}
}
{
"devDependencies": {
"grunt-npm-package-json-lint": "git+https://github.com/miripiruni/grunt-npm-package-json-lint.git"
}
}
{
"devDependencies": {
"grunt-npm-package-json-lint": "git+ssh://github.com/miripiruni/grunt-npm-package-json-lint.git"
}
}
{
"devDependencies": {
"grunt-npm-package-json-lint": "http://github.com/miripiruni/grunt-npm-package-json-lint.git"
}
}
{
"devDependencies": {
"grunt-npm-package-json-lint": "https://github.com/miripiruni/grunt-npm-package-json-lint.git"
}
}

Correct example(s)

{
"devDependencies": {
"gulp-npm-package-json-lint": "4.0.0"
}
}
{
"devDependencies": {
"gulp-npm-package-json-lint": "^4.0.0"
}
}
{
"devDependencies": {
"gulp-npm-package-json-lint": "~4.0.0"
}
}
{
"devDependencies": {
"gulp-npm-package-json-lint": ">=4.0.0"
}
}
{
"devDependencies": {
"gulp-npm-package-json-lint": "<=4.0.0"
}
}
{
"devDependencies": {
"gulp-npm-package-json-lint": "*"
}
}

Shorthand for disabling the rule in .npmpackagejsonlintrc configuration

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

History

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