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

Error applying custom parser in v3.4.0 #120

Closed transcranial closed 8 years ago

transcranial commented 8 years ago

With the upgrade from v3.3.3 to v3.4.0, Atom can no longer correctly use the custom parser defined in package.json, which in my case is babel-eslint. Downgrading back to v3.3.3 resolved the issue.

ricardofbarros commented 8 years ago

Hey @transcranial thank you for the feedback will look into it. Thanks.

dapetcu21 commented 8 years ago

I'm experiencing similar issues. It fails silently on React files, with the occasional linter error on class properties and some other stuff.

screen shot 2016-06-25 at 14 06 25

My package.json:

"semistandard": {
  "globals": ["__DEV__", "fetch"],
  "parser": "babel-eslint"
},
rog commented 8 years ago

yeah, same problem with me. I had to downgrade to v3.3.3 to fix.

@ricardofbarros look like the problem is this: https://github.com/ricardofbarros/linter-js-standard/commit/8d138d4d5ee1d5aaf96f26660aeadd3f0a9c9b44

now the linter ignores the package.json rules because can't find them

rog commented 8 years ago

@ricardofbarros, @transcranial, @dapetcu21 The problem is at line 15 of style-settings.js: https://github.com/ricardofbarros/linter-js-standard/blob/master/lib/utils/style-settings.js#L15

The method findPaths is undefined because is named getPaths: https://atom.io/docs/api/v1.8.0/Project#instance-getPaths

Changing atom.project.findPaths() to atom.project.getPaths() fix the issue.

ricardofbarros commented 8 years ago

Good catch @rog

ricardofbarros commented 8 years ago

Just pushed a patch, please update and test. Thank you again for the catch @rog

rog commented 8 years ago

@ricardofbarros Yeah, is fixed now!

transcranial commented 8 years ago

Fixed for me, too. Thanks, @rog!