Flet / SublimeLinter-contrib-standard

MIT License
71 stars 13 forks source link

Doesn't work with SublimeLinter 4 #36

Open OKNoah opened 5 years ago

OKNoah commented 5 years ago

I don't seem to get any listing whatsoever when using the latest SublimeLinter, and I haven't found a simple way to downgrade to SublimeLinter 3.0.

Is this abnormal or has the project not been updated for 4.0+?

bcomnes commented 5 years ago

I haven't tracked the sublime linter dev cycle closely for years. It worked the last time I tried it but I am not sure what version of SL I was using.

Ill check it out right now.

bcomnes commented 5 years ago

Yeah, just checked, it working for me:

Sublime linter 4.11.2 Standard contrib: 3.1.3

Do you have standard installed as a project local dev dependency?

matthewgertner commented 5 years ago

@bcomnes I'm really struggling with this as well. I see the following warnings when the plugin loads:

reloading plugin SublimeLinter-contrib-standard.linter
standard: Defining 'cls.syntax' has been deprecated. Use http://www.sublimelinter.com/en/stable/linter_settings.html#selector
standard: Defining 'cls.selectors' has been deprecated. Use http://www.sublimelinter.com/en/stable/linter_settings.html#selector
standard: Defining 'cls.version_args' has no effect. Please cleanup and remove these settings.
standard: Defining 'cls.version_re' has no effect. Please cleanup and remove these settings.
standard: Defining 'cls.version_requirement' has no effect. Please cleanup and remove these settings.
standard: Defining 'cls.npm_name' has no effect. Please cleanup and remove these settings.

I haven't been able to get any linter output after a couple of hours of trying. You're sure it works with SublimeLinter 4.11.2? If so, is there anything I can do to help track down the problem? When I run the linter I see nothing in the console at all.

bcomnes commented 5 years ago

I recently reinstalled my system and reinstalled sublime from scratch, and everything worked as expected.

Screen Shot 2019-06-08 at 8 27 56 PM

Maybe upgrade/overwrite all packages?

Screen Shot 2019-06-08 at 8 29 11 PM

If that doesn't work, its going to require doing some kind of debugging or research.

matthewgertner commented 5 years ago

@bcomnes Found the problem. We are using React and the syntax highlighting in Sublime is broken by React fragments (see https://github.com/babel/babel-sublime/issues/348). I therefore switched to using https://github.com/Thom1729/Sublime-JS-Custom as the comments in that issue suggest. This means the file type needs to be set to User -> JS Custom.

This fixed the syntax highlighting but I guess the Standard JS linter doesn't realize the file is JS so it doesn't try to lint it. When I switched to the normal JavaScript file type then it linted just fine (but I'll have to cope with the broken syntax highlighting in that case).

bcomnes commented 5 years ago

Ah, crap that sucks. Anything actionable on this end? Add a new detection mechanism for the other highlighter? @Flet any ideas?

Flet commented 5 years ago

is this related? https://github.com/Flet/SublimeLinter-contrib-standard/issues/31

matthewgertner commented 5 years ago

Could be. Let me give that a try and report back.

matthewgertner commented 5 years ago

Nice one @Flet, that fixed it! I guess you guys might want to add js custom - default and js custom - react to https://github.com/Flet/SublimeLinter-contrib-standard/blob/master/linter.py#L20.