Skip to content

Latest commit

 

History

History
63 lines (49 loc) · 833 Bytes

valid-values-name-scope.md

File metadata and controls

63 lines (49 loc) · 833 Bytes
id title
valid-values-name-scope
valid-values-name-scope

Enabling this rule will result in an error being generated if the package name does not have a scope set to one of the values in the array of valid values.

Example .npmpackagejsonlintrc configuration

{
  "rules": {
    "valid-values-name-scope": ["error", [
      "@lerna",
      "@babel"
    ]]
  }
}

Rule Details

Incorrect example(s)

{
  "name": "@awesome/my-program"
}
{
  "name": "my-program"
}

Correct example(s)

{
  "name": "@lerna/my-program"
}
{
  "name": "@babel/my-program"
}

Shorthand for disabling the rule in .npmpackagejsonlintrc configuration

{
  "rules": {
    "valid-values-name-scope": "off"
  }
}

History

  • Introduced in version 3.4.0