Vscode: Provide linting support (eslint?) for deprecated extension APIs

Created on 9 Apr 2020  路  6Comments  路  Source: microsoft/vscode

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 @jrieken

api extensions-development feature-request

Most helpful comment

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.

All 6 comments

@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 https://github.com/microsoft/vscode/issues/88391

I love the idea and I am disappointed that TypeScript didn't look at this https://github.com/microsoft/TypeScript/issues/33093. Pretty please, @DanielRosenwasser

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.

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 #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.

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chrisdias picture chrisdias  路  3Comments

sirius1024 picture sirius1024  路  3Comments

lukehoban picture lukehoban  路  3Comments

sijad picture sijad  路  3Comments

philipgiuliani picture philipgiuliani  路  3Comments