Requires support for all Node LTS version.
Currently, this requires engines
in package.json
to contain an entry for node
set to ">=12.0.0"
unless a nodeVersionOverride
value is present.
This rule is fixable using the --fix
option.
{
"engines": {
"node": ">=14.0.0"
}
}
{
"engine": {
"node": ">=14.0.0"
}
}
{
"engine": ">=6.0.0"
}
{
"engine": ">=10.0.0"
}
{}
Only if the rule breaks.
This rule as an object option:
"nodeVersionOverride"
: allow providing a custom supported node version if an external dependency enforces it
Example of correct code for this rule with the { "nodeVersionOverride": ">=10.0.0" }
option:
{
"engines": {
"node": ">=10.0.0"
}
}
Also encompasses ts-node-support, as the rules are similar enough to not exist separately for linting purposes.