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

Pretend ' ' for empty views #242

Merged
merged 1 commit into from
Apr 25, 2018
Merged

Pretend ' ' for empty views #242

merged 1 commit into from
Apr 25, 2018

Conversation

kaste
Copy link
Contributor

@kaste kaste commented Apr 24, 2018

eslint < 4.10.0 has a bug where it shows its CLI usage info when
we send the empty string via stdin. The solution here is to send
one space instead.

Tested with the 'no-trailing-spaces' rule to not mark as an error
for such cases.

Proper version branching is maybe over-engineering, and left as
exercise for the reader.

Another solution would be to just check the configuration bc empty
views usually cannot have lint errors. This could be done via
eslint --print-config .

eslint < 4.10.0 has a bug where it shows its CLI usage info when
we send the empty string via stdin. The solution here is to send
one space instead.

Tested with the 'no-trailing-spaces' rule to not mark as an error
for such cases.

Proper version branching is maybe over-engineering, and left as
exercise for the reader.

Another solution would be to just check the configuration bc empty
views usually cannot have lint errors. This *could* be done via
`eslint --print-config .`
@kaste
Copy link
Contributor Author

kaste commented Apr 24, 2018

Refixes #230

@braver
Copy link
Member

braver commented Apr 25, 2018

Would be really nice to run this hack only on eslint < 4.10.0?

@kaste
Copy link
Contributor Author

kaste commented Apr 25, 2018

Yeah, sure we need SublimeLinter/SublimeLinter#1335 first. Then some idea to cache the result of the version call. Or we need to check and parse the semver from packages.json

@kaste kaste merged commit 7e1bab7 into master Apr 25, 2018
@kaste kaste deleted the handle-empty-views branch April 25, 2018 18:18
@braver
Copy link
Member

braver commented Apr 25, 2018

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants