node-dependencies/prefer-tilde-range-version
require tilde(
~
) version instead of range version.
- 🔧 The
--fix
option on the command line can automatically fix some of the problems reported by this rule.
📖 Rule Details
This rule enforces the use of the tilde(~
) ranges syntax.
jsonc
/* eslint "node-dependencies/prefer-tilde-range-version": "error" */
{
"dependencies": {
/* ✓ GOOD */
"a": "~1.0.0",
/* ✗ BAD */
"b": ">=1.0.0 <1.1.0",
"c": ">=0.1.0 <0.2.0",
"e": "1.2.3 - 1.2"
},
}
🔧 Options
Nothing.
🚀 Version
This rule was introduced in eslint-plugin-node-dependencies v0.8.0