Skip to content

Provide linting support (eslint?) for deprecated extension APIs #94751

Closed

Description

@eamodio

Refs: #93604

It would be great if we provided a lint package that extension authors could use to identify deprecated APIs. Additionally, any other common mistakes, or anti-patterns we've seen used.

/cc Johannes Rieken (@jrieken)

Activity

  1. Ikuyadeu commented on Apr 9, 2020

    @Ikuyadeu
    Contributor

    Eric Amodio (@eamodio) Thank you for summarizing!

    I want to add the information that I could not tell due to my English.
    The lint is available as the vscode plugin
    devreplay_usage

    Left is deprecated code, right is setting file ./devreplay.json
    That fixes the vscode rules https://github.com/devreplay/devreplay/blob/master/src/rules/vscode.ts#L43

    Also, implementing vscode-plugin like eslint-plugin-vue is good, but sounds costy.

    p.s. I plan to update them based on #88391

  2. jrieken commented on Apr 9, 2020

    @jrieken
    Contributor

    I love the idea and I am disappointed that TypeScript didn't look at this microsoft/TypeScript#33093. Pretty please, Daniel Rosenwasser (@DanielRosenwasser)

  3. added
    extensions-development
    feature-request
    on Apr 14, 2020
  4. DanielRosenwasser commented on Apr 15, 2020

    @DanielRosenwasser
    Member

    We were looking at this recently and we might have the information on hand to do this at least from things like completion. Whether we could do this for suggestion diagnostics might be another issue.

  5. Ikuyadeu commented on Apr 28, 2020

    @Ikuyadeu
    Contributor

    In my idea, my extension and linter are MIT, so it can be used in this repository like language syntax files by the following steps.

    1. Importing my extension as the basic vscode function
    2. Using rule file as the .vscode/rules.json that refer the vscode.deprecated.d.ts #88391 knowledge.
    3. Putting the rule files on the extension template in Yo.
    4. New extension users can get the warning by the rule file.

    How do you think? I hope to improve the extension development even linter ownership will be moved.

  6. jrieken commented on Sep 29, 2020

    @jrieken
    Contributor

    TS now supports the @deprecated and usages of deprecated APIs are flag accordingly. Closing as obsolete

  7. locked and limited conversation to collaborators on Dec 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

apiextensions-developmentfeature-request

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions