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

Support for VS Code for Web #1366

Open
JosefJezek opened this issue Nov 10, 2021 · 7 comments
Open

Support for VS Code for Web #1366

JosefJezek opened this issue Nov 10, 2021 · 7 comments
Labels
feature-request Request for new features or functionality
Milestone

Comments

@JosefJezek
Copy link

The 'ESLint' extension is not available in Visual Studio Code for the Web.

https://vscode.dev

Learn Why https://code.visualstudio.com/docs/editor/vscode-web#_extensions

@dbaeumer dbaeumer added the feature-request Request for new features or functionality label Nov 11, 2021
@dbaeumer
Copy link
Member

This will be hard to achieve.

@dbaeumer dbaeumer added this to the Backlog milestone Nov 11, 2021
@isidorn
Copy link

isidorn commented Nov 22, 2021

Definitely something that would be super cool to have.

@jdrydn
Copy link

jdrydn commented Jan 27, 2022

From the Learn Way link above:

There are also extensions that run in the browser with partial support only. A good example is a language extension that restricts its support to single files or the currently opened files.

I wonder if this extension could be adjusted to only execute on the currently opened file(s) on the web?

There's also a web extension authors guide that may be useful for implementation(s).

@ChocolateLoverRaj
Copy link

ChocolateLoverRaj commented Mar 11, 2023

Here is my idea for implementing this:

  • Load eslint in the actual plugin
  • Instead of using fs, use the vscode file system API
  • Somehow load plugins (maybe use the node_modules folder and load the CJS files in the browser somehow)
    I'm not sure exactly what eslint does internally, and how hard it would be to run eslint in the browser, but I think it's definitely possible.

@filipef101
Copy link

filipef101 commented Jun 19, 2023

Should be possible, atleast for the current active file

If you want to lint code on browsers, use the Linter class instead.

https://github.com/eslint/eslint/blob/main/docs/src/integrate/nodejs-api.md#linter

@filipef101
Copy link

Also they have a demo running in the browser https://eslint.org/play/

@jameswomack
Copy link

I have a limited, but very functional within those limits, web version of this extension that's deployed in the wild. It doesn't support all plugins & parse options, but does have typescript and core ESLint rule support out of the box. I'm interested in collaborating on expanding that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants