Skip to content

The no-deprecated-api rule should adhere to the targeted Node.js version #141

@sindresorhus

Description

@sindresorhus

Same as the no-unsupported-features rule: https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-unsupported-features/es-syntax.md#configured-nodejs-version-range

If my package has "engines": { "node": ">=6" } it should not show:

assert.deepEqual was deprecated since v10.0.0. Use assert.deepStrictEqual or assert.strict.deepEqual instead.  node/no-deprecated-api

As there's no way for me to use the new API, since it's only available in Node.js 10 and I need to support Node.js 6 users. It should only become an error when my engine is >=10.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions