ricardofbarros / linter-js-standard

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

linter-js-standard doesn't seem to work. #220

Closed Skeeve closed 6 years ago

Skeeve commented 6 years ago

I hav this test code

console.log('test');
++
a

and linter-js-standard doesn't even complain about anything :( What could I be doing wrong?

More info: https://discuss.atom.io/t/linter-linter-js-standard-does-it-work/57467

sonicdoe commented 6 years ago

Did you save the file or are you editing an untitled file? Does standard on the command line complain? Could you post the output of Linter: Debug?

Skeeve commented 6 years ago

Hi and thanks for looking into it.

I saved the file.

The output of Linter:Debug:

Platform: darwin
Atom Version: 1.29.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: 
  - Code Actions
  - Go (go-langserver)
  - go build
  - gometalinter
  - PHP (FelixFBecker)
  - Serenata
UI Providers: 
  - Linter
Ignore Glob: **/*.min.{js,css}
VCS Ignored Paths are excluded: true
Current File Scopes: 
  - *
  - source.js

standard on the commandline:

$ standard OhneTitel.js
standard: Use JavaScript Standard Style (https://standardjs.com)
standard: Run `standard --fix` to automatically fix some problems.
  …myproject…/OhneTitel.js:1:1: Expected indentation of 0 spaces but found 4.
  …myproject…/OhneTitel.js:1:24: Extra semicolon.
  …myproject…/OhneTitel.js:2:1: Expected indentation of 0 spaces but found 4.
  …myproject…/OhneTitel.js:2:5: Unexpected space after unary operator '++'.
  …myproject…/OhneTitel.js:3:1: Expected indentation of 0 spaces but found 4.
  …myproject…/OhneTitel.js:3:5: 'a' is not defined.
Skeeve commented 6 years ago

I seem to found the issue… Sorry for bugging.

I browsed through the source here on github and found:

    select-style.js     Add setting to disable linter if project uses ESLint 

It's not my project and so I created a new one where I put my test file and it was "lintered" as expected. Then I looked into the project I "inherited" and found under devDependencies

    "eslint": "^3.19.0",
    "eslint-config-standard": "^10.2.1",
    "eslint-friendly-formatter": "^3.0.0",
    "eslint-loader": "^1.7.1",
    "eslint-plugin-html": "^3.0.0",
    "eslint-plugin-import": "^2.13.0",
    "eslint-plugin-node": "^5.2.0",
    "eslint-plugin-promise": "^3.8.0",
    "eslint-plugin-standard": "^3.1.0",

So again: sorry for bugging