Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Dash causes linter to not underline whole error #73

Closed
OmgImAlexis opened this issue Apr 23, 2017 · 4 comments
Closed

Dash causes linter to not underline whole error #73

OmgImAlexis opened this issue Apr 23, 2017 · 4 comments
Labels
💵 Funded on Issuehunt This issue has been funded on Issuehunt enhancement help wanted

Comments

@OmgImAlexis
Copy link

OmgImAlexis commented Apr 23, 2017

Issuehunt badges

If there's an issue with importing a js package only the first half of the package name is highlighted when there's a dash in it.

screen shot 2017-04-23 at 8 14 23 pm

Ref: steelbrain/linter#1440


IssueHunt Summary

Sponsors (Total: $40.00)

Become a sponsor now!

Or submit a pull request to get the deposits!

Tips

@OmgImAlexis OmgImAlexis changed the title Dash causes linter to not underline whole error #1440 Dash causes linter to not underline whole error Apr 23, 2017
@Arcanemagus
Copy link

At it's absolute root, this is a combination ESLint and Atom issue.

Some ESLint rules give a full start line:col and end line:col, allowing the range highlighted to come straight from ESLint. The problem is that most ESLint rules only return a single line:column as the location for the rule, which means some guessing as to the end of the range has to be made. When this is all the information that is available the fallback to to use the regex from Atom's language-javascript that defines a "word" to determine how long to make the range. In this case it seems the definition of "word" stops on a - character.

I know there is some effort to majorly expand the number of rules that ESLint provides a range result for, I'm not sure how outdated xo is on the version of ESLint it bundles so it's possible an update of that will fix some cases. The "word" definition from Atom unfortunately most likely can't be changed since it must be very generic (It's not just words in strings).

tl;dr: The best that can be done about this is already being done, and time will fix this in more and more cases.

@Arcanemagus
Copy link

Ah, looks like the "major expansion of range results" will be in ESLint v4: eslint/eslint#3307 (comment).

@issuehunt-oss issuehunt-oss bot added the 💵 Funded on Issuehunt This issue has been funded on Issuehunt label Jun 9, 2019
@IssueHuntBot
Copy link

@issuehunt has funded $40.00 to this issue.


@sindresorhus
Copy link
Owner

Closing as Atom is abandoned.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
💵 Funded on Issuehunt This issue has been funded on Issuehunt enhancement help wanted
Projects
None yet
Development

No branches or pull requests

4 participants