Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use dev Node to check for unsupported Node builtins in tests (#5158)
The `n/no-unsupported-features/es-builtins`, `n/no-unsupported-features/es-syntax`, and `n/no-unsupported-features/node-builtins` ESLint rules ensure that production code is not using features of JavaScript that are unsupported by the expected version of Node. It does this by keeping track of which versions various features will become generally available and failing if the version of Node it sees does not match. By default, this rule uses `engines.node` to know which is the "expected version of Node". While that is fine for production code, we use a later version of Node — which is set to the current LTS version — for tests, and therefore we may be allowed to use features that were once experimental in previous versions. To fix this, this commit overrides the three `n/no-unsupported-features/*` rules to use the current LTS of Node for tests.
- Loading branch information