Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
eamodio opened this issue Apr 9, 2020 · 6 comments
Closed

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

eamodio opened this issue Apr 9, 2020 · 6 comments
Assignees
Labels
api extensions-development Issues for developing extensions feature-request Request for new features or functionality
Milestone

Comments

@eamodio
Copy link
Contributor

eamodio commented Apr 9, 2020

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

@eamodio
Copy link
Contributor Author

eamodio commented Apr 9, 2020

@Ikuyadeu
Copy link
Contributor

Ikuyadeu commented Apr 9, 2020

@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

@jrieken
Copy link
Member

jrieken commented Apr 9, 2020

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

@jrieken jrieken added api extensions-development Issues for developing extensions feature-request Request for new features or functionality labels Apr 14, 2020
@jrieken jrieken modified the milestones: Backlog Candidates, Backlog Apr 14, 2020
@microsoft microsoft deleted a comment Apr 14, 2020
@DanielRosenwasser
Copy link
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.

@Ikuyadeu
Copy link
Contributor

Ikuyadeu commented Apr 28, 2020

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.

@jrieken
Copy link
Member

jrieken commented Sep 29, 2020

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

@jrieken jrieken closed this as completed Sep 29, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Dec 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api extensions-development Issues for developing extensions feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

5 participants
@eamodio @DanielRosenwasser @jrieken @Ikuyadeu and others