ricardofbarros / linter-js-standard

Atom linter plugin for JavaScript, using JavaScript Standard Style
https://atom.io/packages/linter-js-standard
MIT License
99 stars 50 forks source link

Stopped linting... #210

Closed stephen-last closed 6 years ago

stephen-last commented 6 years ago

I've updated to these versions and now I'm not getting any linting at all:

I have standard 10.0.3 installed in my project, under devDependencies in package.json.

When editing a .js file I get no linter warnings when I deliberately do something like no space after a function name (function myFunc() {}).

Why would it not be linting now..?

grudra7714 commented 6 years ago

I don't think it is "syntactically" wrong. What would happen is your myFunc would be out of scope and you have to reference this function to another variable if you have to use it.

See this

stephen-last commented 6 years ago

@grudra7714 I think you may have misunderstood.

Writing a function without a space after the name should give me a lint error (see the rules) when following JavaScript Standard Style.

The problem is that Atom isn't linting even with the setup I mentioned.

It's not a code issue.

Arcanemagus commented 6 years ago

Can you post the output of running Linter: Debug from the Command Palette? It's possible you installed a custom language file that is making the foo.js file not look like JavaScript to Atom.

stephen-last commented 6 years ago
Platform: win32
Atom Version: 1.22.0
Linter Version: 2.2.0
Opened file is ignored: No
Matching Linter Providers: 
  - js-standard
Disabled Linter Providers: 
Standard Linter Providers: 
  - js-standard
Indie Linter Providers: 
UI Providers: 
  - Linter
Ignore Glob: **/*.min.{js,css}
VCS Ignored Paths are excluded: true
Current File Scopes: 
  - *
  - source.js
vincenzoml commented 6 years ago

I have the same bug on a fresh installation. Since I had installed many packages, I deleted my ~/.atom entirely (is that sufficient or are there other places where config is saved?) and only installed linter-js-standard and dependencies. linter-js-standard lints html embedded script. In js files, it gives me an error for a delete of a local variable, but no extra semicolon errors for example. I had the bug also before upgrading linter to 2.2.0

vincenzoml commented 6 years ago
Platform: linux
Atom Version: 1.22.1
Linter Version: 2.2.0
Opened file is ignored: No
Matching Linter Providers: 
  - js-standard
Disabled Linter Providers: 
Standard Linter Providers: 
  - js-standard
Indie Linter Providers: 
UI Providers: 
  - Linter
Ignore Glob: **/*.min.{js,css}
VCS Ignored Paths are excluded: true
Current File Scopes: 
  - *
  - source.js
  - meta.method-call.js
  - meta.arguments.js
sonicdoe commented 6 years ago

I’ve tried to reproduce this on a fresh Ubuntu installation with Atom v1.22.0, linter@2.2.0, linter-js-standard@4.0.2, and linter-ui-default@1.6.10 (as specified in your original post) but I did not run into this issue.

A few questions:

@vincenzoml Your issue seems to be different since the linter produces some errors, at least. Would you mind opening a new issue for that?

vincenzoml commented 6 years ago

As soon as I return to my main machine I'll check and open a new issue.

sonicdoe commented 6 years ago

If anyone is still running into this issue, let me know and I’ll reopen.

ricardograca commented 6 years ago

I'm having this issue when using the Tree Sitter Packages. If I disable the linter-eslint package the Linter: Debug command isn't even available in this case.

sonicdoe commented 6 years ago

linter-js-standard v5.1.0 adds support for Atom’s experimental Tree-sitter parsing system, see https://github.com/ricardofbarros/linter-js-standard/commit/46c803841d61a720aa45d72234fe7ac8267c531b.