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

.html.erb files not recognized #11

Closed
dogweather opened this issue Nov 12, 2015 · 13 comments
Closed

.html.erb files not recognized #11

dogweather opened this issue Nov 12, 2015 · 13 comments

Comments

@dogweather
Copy link

The linter is great, but only seems to be triggered on .erb files. And it seems that by default, an HTML linter is working on .html.erb files.

Anyone know where the fix for this would lie?

@Arcanemagus
Copy link
Member

Can you run Log Cursor Scope in the file? Both in a "regular" HTML part, and part of the templated Ruby part? I'm guessing at least one of those sections has the wrong scope being applied.

@dogweather
Copy link
Author

Interesting. When in an HTML part, it's:

screen shot 2015-11-11 at 11 49 37 pm

And in an erb tag:

screen shot 2015-11-11 at 11 50 55 pm

Here's the full screen:

screen shot 2015-11-11 at 11 48 41 pm

@dogweather
Copy link
Author

Here are some, logged when the cursor is in the 'error' region:

screen shot 2015-11-11 at 11 53 08 pm

screen shot 2015-11-11 at 11 54 03 pm

screen shot 2015-11-11 at 11 55 19 pm

Thank you!

@Arcanemagus
Copy link
Member

So it looks like this linter would trigger in all of those situations as it identifies itself as being able to handle anything under the text.html.erb or text.html.ruby scopes... the issue is that this has never been updates to the current Linter API and as such will never run, any messages you are seeing come from a different linter-* provider.

Would you be interested in updating this linter so it can be used again? Or are you still interested in maintaining this @exprojects?

@dogweather
Copy link
Author

So you mean that actually, linter-erb isn't even running — these messages are coming from another linter? So would that mean that there are two issues, 1) update linter-erb to the new api, and 2) update the other linter not to run on .erb files?

@ricardograca
Copy link
Member

@Arcanemagus I wouldn't mind giving a shot at updating this. Where should I start (besides forking the repo and setting up the dev env)?

@Arcanemagus
Copy link
Member

The "documentation" is available here: https://github.com/atom-community/linter/wiki/Linter-API

But I would recommend just checking out how one of the other linters that has already been updated works and emulating that. I try to keep linter-php as up to date as I can and then update the other ones that I maintain to match. However if you want to migrate this project to pure JS something like linter-stylelint is a good example to start from.

If you have any questions feel free to comment here or ask in the Atom Slack instance. (I'm @Arcanemagus there as well.)

@iamricard
Copy link

Since it seems like nobody has given this a shot I'm happy to work a pure JS version of this.

@Arcanemagus
Copy link
Member

@rcsole great! We look forward to your PR!

@Arcanemagus
Copy link
Member

@rcsole linter-eslint is another good example of a pure JS one.

@Arcanemagus
Copy link
Member

@ricardograca or @rcsole are either of you planning on re-implementing this linter? If not I'll give it a shot sometime soon.

@Arcanemagus
Copy link
Member

Marking this particular issue as a duplicate of #9.

@ricardograca
Copy link
Member

@Arcanemagus Sorry for the lack of activity, but I haven't used the ERB linter in a while so I currently have no plans for working on this. I'll keep an eye open for this though.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants