Skip to content

node-dependencies/valid-semver

enforce versions that is valid as a semantic version.

  • ⚙️ This rule is included in "plugin:node-dependencies/recommended".

📖 Rule Details

This rule checks the versions defined in package.json and reports if it is a valid semver.

jsonc
/* eslint "node-dependencies/valid-semver": "error" */
{
  "dependencies": {
    "semver": 
"^7.3.5 |"
/* ✗ BAD */
} }

🔧 Options

Nothing.

🚀 Version

This rule was introduced in eslint-plugin-node-dependencies v0.1.0

🔍 Implementation