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

Visual Studio compatible formatter #4708

Closed
rhpijnacker opened this Issue Dec 15, 2015 · 16 comments

Comments

Projects
None yet
6 participants
@rhpijnacker
Copy link
Contributor

rhpijnacker commented Dec 15, 2015

Using eslint v1.10.3.

We would like to run eslint from within Visual Studio and be able to double click on the reported issues.
The report should look something like
folder\filename.js(123,56): [Warning] here goes the message (rule-name)
Actually, Visual Studio cares about the part up to the colon, the format of the message is arbitrary.

@eslintbot eslintbot added the triage label Dec 15, 2015

@eslintbot

This comment has been minimized.

Copy link

eslintbot commented Dec 15, 2015

@rhpijnacker Thanks for the issue! If you're reporting a bug, please be sure to include:

  1. The version of ESLint you are using (run eslint -v)
  2. What you did (the source code and ESLint configuration)
  3. The actual ESLint output complete with numbers
  4. What you expected to happen instead

Requesting a new rule? Please see Proposing a New Rule for instructions.

rhpijnacker added a commit to rhpijnacker/eslint that referenced this issue Dec 15, 2015

@nzakas

This comment has been minimized.

Copy link
Member

nzakas commented Dec 15, 2015

Is this just visual studio or do other editors use this format too? Is it possible to configure Visual Studio to use a different format?

@rhpijnacker

This comment has been minimized.

Copy link
Contributor Author

rhpijnacker commented Dec 15, 2015

As far as I know it is not possible to configure VS to recognize other formats.
I do not know about other editors that use this same format.

@nzakas

This comment has been minimized.

Copy link
Member

nzakas commented Dec 15, 2015

Can you point to any documentation about this format?

@rhpijnacker

This comment has been minimized.

Copy link
Contributor Author

rhpijnacker commented Dec 15, 2015

@nzakas nzakas added accepted and removed evaluating labels Dec 15, 2015

@nzakas

This comment has been minimized.

Copy link
Member

nzakas commented Dec 15, 2015

Okay great, I think this will be a good addition.

rhpijnacker added a commit to rhpijnacker/eslint that referenced this issue Dec 16, 2015

rhpijnacker added a commit to rhpijnacker/eslint that referenced this issue Dec 16, 2015

@nzakas nzakas closed this in 2a2dd5a Dec 16, 2015

nzakas added a commit that referenced this issue Dec 16, 2015

Merge pull request #4709 from rhpijnacker/master
New: Visual Studio compatible formatter (fixes #4708)
@rileytb

This comment has been minimized.

Copy link

rileytb commented Jan 9, 2018

I am looking to get the errors from gulp-sass-lint/sass-lint in the eslint Visual Studio format to display in the error list in Visual Studio 2017 and the provided link about this format is broken and I can't find a solution anywhere.
Could somebody explain how we should be expecting to use the eslint Visual Studio format in Visual Studio please?

(maybe I should just open a new issue/request for this?)

@platinumazure

This comment has been minimized.

Copy link
Member

platinumazure commented Jan 9, 2018

Hi @rileytb, it looks like you want to check out our Integrations page for more information. It looks like you can use Visual Studio Code with an ESLint extension. Not sure if that is easily adapted into Visual Studio itself, but hopefully you can start there and maybe find more precise documentation along the way.

@rileytb

This comment has been minimized.

Copy link

rileytb commented Jan 9, 2018

Thanks for the quick response. I personally have been using VSCode with ESLint and this works like a charm.
However, because other people exist that haven't/won't convert, I would need results in VS too.
I have tried similar extensions in VS 2017, I just don't know what to do with my output of gulp-sass-lint -> eslint data so that it can be read in (file location, extension, etc.). And that's the documentation I can't find.

Side note: Output to an HTML page is an ok reporting tool for now too for those using VS.

@platinumazure

This comment has been minimized.

Copy link
Member

platinumazure commented Jan 9, 2018

@rileytb In that case, sorry, I'm not sure. I would suggest stopping by our Gitter chat in case anyone there might know.

@rhpijnacker

This comment has been minimized.

Copy link
Contributor Author

rhpijnacker commented Jan 11, 2018

We use this by adding an entry to the Tools/External Tools... UI that just runs eslint.
The visualstudio formatter makes sure that we can double click the output.

@rileytb

This comment has been minimized.

Copy link

rileytb commented Jan 12, 2018

@rhpijnacker I have done (I think) as you explained, and it does work as an external tool where I can click it from the Tools menu to launch it, etc.

However, the output from the command is listed as plain text in my Output tab, and nothing in Error List, nor is anything clickable.

Below is my current setup.

image

@j-f1

This comment has been minimized.

Copy link
Contributor

j-f1 commented Jan 12, 2018

That looks like it’s running sass-lint, not eslint.

@rileytb

This comment has been minimized.

Copy link

rileytb commented Jan 12, 2018

You are correct. Maybe I am understanding incorrectly, but sass-lint's documentation reads:

All formatters have been brought across from eslint and modified slightly to fit the sass-lint package. Please direct issues to sass-lint team from v2 onwards as we no longer directly depend on eslint for our formatters.

I guess me assuming that it would work the same as eslint is my fault.

@j-f1

This comment has been minimized.

Copy link
Contributor

j-f1 commented Jan 12, 2018

Note that they say:

Please direct issues to sass-lint team from v2 onwards as we no longer directly depend on eslint for our formatters.

It seems like you should open an issue on their repository, since they maintain the formatters separately.

@rileytb

This comment has been minimized.

Copy link

rileytb commented Jan 19, 2018

Well, shoot. I feel silly. Thanks for bringing that to my attention. I will follow up with them.

@eslint eslint bot locked and limited conversation to collaborators Feb 6, 2018

@eslint eslint bot added the archived due to age label Feb 6, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.