Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Rule proposal: Warn when deprecated APIs are used (eslint-plugin-deprecation) #8988

Closed
Labels
enhancement: new plugin ruleNew rule request for eslint-pluginlocked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.package: eslint-pluginIssues related to @typescript-eslint/eslint-pluginteam assignedA member of the typescript-eslint team should work on this.
@JoshuaKGoldberg

Description

@JoshuaKGoldberg

Before You File a Proposal Please Confirm You Have Done The Following...

My proposal is suitable for this project

  • My proposal specifically checks TypeScript syntax, or it proposes a check that requires type information to be accurate.
  • My proposal is not a "formatting rule"; meaning it does not just enforce how code is formatted (whitespace, brace placement, etc).
  • I believe my proposal would be useful to the broader TypeScript community (meaning it is not a niche proposal).

Description

Re-opening#1223: being able to lint against usage of an API marked as@deprecated is a common request for TypeScript developers. It was aTSLint rule back in those days, and now is provided primarily byhttps://github.com/gund/eslint-plugin-deprecation.eslint-plugin-deprecation existing is why#1223 was closed by a docs change pointing folks externally.

But! Since then:

Proposal: let's write a new implementation of adeprecation rule in this repo?

Fail Cases

/**@deprecated */declarefunctionv1():unknown;v1();

Pass Cases

declarefunctionv2():unknown;v2();

Additional Info

Note that the licensing here is tricky.https://github.com/gund/eslint-plugin-deprecation includes the following README.md note:

This rule was originally ported from theSonarJS repository.

...and is licensed under the GNU Lesser General Public License.

We need to be very sure that if this issue is accepted, any code added to our project isnot based on the GNU license, and is at most licensed under MIT. If this is accepted, I think a member of the typescript-eslint team should work on it.

Other references of related licensed rules are:

cc@gund - you've done a great job for a while of keepingeslint-plugin-deprecation afloat ❤️. If you have any thoughts here, that'd be great.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement: new plugin ruleNew rule request for eslint-pluginlocked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.package: eslint-pluginIssues related to @typescript-eslint/eslint-pluginteam assignedA member of the typescript-eslint team should work on this.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp