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

ESLint - Stylish reporter now reports absolute paths. #2202

Closed
egamma opened this issue Jan 23, 2016 · 4 comments
Closed

ESLint - Stylish reporter now reports absolute paths. #2202

egamma opened this issue Jan 23, 2016 · 4 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug tasks Task system issues verified Verification succeeded
Milestone

Comments

@egamma
Copy link
Member

egamma commented Jan 23, 2016

Extracted from comment from @felixfbecker in issue #1420.

I have the exact same problem with eslint:

image

tasks.json:

{
  "version": "0.1.0",
  "command": "npm",
  "args": ["--loglevel", "silent", "run"],
  "isShellCommand": true,
  "showOutput": "silent",
  "tasks": [
    {
      "taskName": "lint",
      "problemMatcher": "$eslint-stylish"
    }
  ]
}

Setting the problem matcher with fileLocation: absolute works, but imo this should not be needed. I have the latest eslint version installed so $eslint-stylish should set this automatically.

@dbaeumer
Copy link
Member

The default of the eslint-stylish matcher is fileLocation: "relative" since eslint stylish usually reports relative paths. @felixfbecker: could it be that you configured eslint to report absolute paths.

@dbaeumer dbaeumer added tasks Task system issues info-needed Issue requires more information from poster labels Jan 25, 2016
@dbaeumer dbaeumer added this to the Backlog milestone Jan 25, 2016
@felixfbecker
Copy link
Contributor

I don't know how and where I could have set that, but eslint has been reporting absolute paths for me as far as I can remember. What I don't get is why you don't just call path.resolve() on it. That would work with both.

@dbaeumer
Copy link
Member

I restested it and interestingly paths are now reported as absolute paths. I digged around a little and the reason is as follows: in the past the eslint-stylish reporter was optional (see https://github.com/sindresorhus/eslint-stylish) and reported relative paths. It is now part of eslint and reports paths absolute. I will keep the issue open to adopt that.

Regarding your suggestion: because we say output (not eslint) having a leading slash but not being absolute :-). The issue we have open is to have a setting automatic (using path.resolve) which would be the default. But it will not make it for Jan.

@dbaeumer dbaeumer changed the title Cannot navigate to error from eslint error ESLint - Stylish reporter now reports absolute paths. Jan 25, 2016
@dbaeumer dbaeumer added bug Issue identified by VS Code Team member as probable bug and removed info-needed Issue requires more information from poster labels Jan 25, 2016
@dbaeumer dbaeumer modified the milestones: Feb 2016, Backlog Jan 25, 2016
@bsed
Copy link

bsed commented May 8, 2016

tks

@dbaeumer dbaeumer added the verified Verification succeeded label May 27, 2016
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug tasks Task system issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants