Skip to content

Latest commit

 

History

History
82 lines (62 loc) · 1009 Bytes

valid-values-private.md

File metadata and controls

82 lines (62 loc) · 1009 Bytes
id title
valid-values-private
valid-values-private

Enabling this rule will result in an error being generated if the value in private is not equal to one of the values in the array of valid values.

Example .npmpackagejsonlintrc configuration

{
  "rules": {
    "valid-values-private": ["error", [
      false
    ]]
  }
}

Rule Details

Incorrect example(s)

{
  "private": true
}

Correct example(s)

{
  "private": false
}

Example .npmpackagejsonlintrc configuration

{
  "private": [
    false,
    true
  ]
}

Rule Details

Incorrect example(s)

N/A

Correct example(s)

{
  "private": false
}
{
  "private": true
}

Shorthand for disabling the rule in .npmpackagejsonlintrc configuration

{
  "rules": {
    "valid-values-private": "off"
  }
}

History

  • Renamed from private-valid-values to valid-values-private in version 1.0.0
  • Introduced in version 0.1.0