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

Not working w/ zsh #1

Closed derekr closed 9 years ago

derekr commented 9 years ago

I think this is the issue, but it could be something else.

atom 1.8.9 linter 0.12.0 linter-js-standard 0.1.2 osx 10.10.2 system iojs 1.4.2

apm --version
apm  0.157.0
npm  2.5.1
node 0.10.35
python 2.7.6
git 1.9.5
apm ls
Built-in Atom packages (85)
├── archive-view@0.53.0
├── atom-dark-syntax@0.26.0
├── atom-dark-ui@0.49.0
├── atom-light-syntax@0.26.0
├── atom-light-ui@0.41.0
├── autocomplete@0.44.0
├── autoflow@0.22.0
├── autosave@0.20.0
├── background-tips@0.23.0
├── base16-tomorrow-dark-theme@0.25.0
├── base16-tomorrow-light-theme@0.8.0
├── bookmarks@0.35.0
├── bracket-matcher@0.73.0
├── command-palette@0.34.0
├── deprecation-cop@0.39.0
├── dev-live-reload@0.45.0
├── encoding-selector@0.19.0
├── exception-reporting@0.24.0
├── feedback@0.38.0
├── find-and-replace@0.159.0
├── fuzzy-finder@0.72.0
├── git-diff@0.54.0
├── go-to-line@0.30.0
├── grammar-selector@0.46.0
├── image-view@0.54.0
├── incompatible-packages@0.24.0
├── keybinding-resolver@0.29.0
├── language-c@0.42.0
├── language-clojure@0.13.0
├── language-coffee-script@0.39.0
├── language-csharp@0.5.0
├── language-css@0.28.0
├── language-gfm@0.67.0
├── language-git@0.10.0
├── language-go@0.22.0
├── language-html@0.31.0
├── language-hyperlink@0.12.2
├── language-java@0.14.0
├── language-javascript@0.67.0
├── language-json@0.14.0
├── language-less@0.25.0
├── language-make@0.14.0
├── language-mustache@0.11.0
├── language-objective-c@0.15.0
├── language-perl@0.22.0
├── language-php@0.22.0
├── language-property-list@0.8.0
├── language-python@0.33.0
├── language-ruby@0.50.0
├── language-ruby-on-rails@0.21.0
├── language-sass@0.36.0
├── language-shellscript@0.13.0
├── language-source@0.9.0
├── language-sql@0.15.0
├── language-text@0.6.0
├── language-todo@0.17.0
├── language-toml@0.15.0
├── language-xml@0.28.0
├── language-yaml@0.22.0
├── link@0.30.0
├── markdown-preview@0.146.0
├── metrics@0.45.0
├── notifications@0.35.0
├── one-dark-syntax@0.3.0
├── one-dark-ui@0.5.0
├── one-light-syntax@0.4.0
├── one-light-ui@0.4.0
├── open-on-github@0.36.0
├── package-generator@0.38.0
├── release-notes@0.52.0
├── settings-view@0.187.0
├── snippets@0.86.0
├── solarized-dark-syntax@0.32.0
├── solarized-light-syntax@0.19.0
├── spell-check@0.55.0
├── status-bar@0.66.0
├── styleguide@0.44.0
├── symbols-view@0.93.0
├── tabs@0.67.0
├── timecop@0.31.0
├── tree-view@0.168.0
├── update-package-dependencies@0.9.0
├── welcome@0.26.0
├── whitespace@0.29.0
└── wrap-guide@0.31.0

/Users/derekreynolds/.atom/packages (17)
├── Zen@0.11.3
├── afterglow-monokai-syntax@1.3.2
├── auto-indent@0.1.0
├── editorconfig@0.3.3
├── emmet@2.3.6
├── file-icons@1.5.2
├── git-control@0.1.8
├── language-jsx@0.1.4
├── linter@0.12.0
├── linter-js-standard@0.1.2
├── monokai-syntax-for-one-dark@0.2.1
├── react@0.10.1
├── resize-indent@0.2.1
├── seti-monokai@0.3.1
├── sort-lines@0.10.0
├── spacegray-dark-syntax@0.2.0
└── spacegray-dark-ui@0.8.0
ricardofbarros commented 9 years ago

Ah so your using iojs How do you call the executable? node index.js or iojs index.js ?

ricardofbarros commented 9 years ago

Could you open the Atom Developer Tools and print here the output of the console when you try to save a .js file?

derekr commented 9 years ago

I still use node index.js.

which node
/usr/local/bin/node

So there is no additional output on file save:

screen shot 2015-04-02 at 9 42 13 am

Note that line 4 has a semi colon – would expect the linter to highlight that.

ricardofbarros commented 9 years ago

Hmm strange :/ no errors, could you type in the console process.env.PATH and check if you have the path /usr/local/bin?

derekr commented 9 years ago

A bit crufty haha, but yeah it's in there:

/usr/local/heroku/bin:/usr/local/share/npm/bin:/usr/local/share/python:/Users/derekreynolds/.rbenv/bin:/usr/local/php5/bin:/usr/local/packer:/Users/derekreynolds/.node_modules/bin:/Users/derekreynolds/.rbenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/heroku/bin:/usr/local/share/npm/bin:/usr/local/share/python:/Users/derekreynolds/.rbenv/bin:/usr/local/php5/bin:/usr/local/packer:/Users/derekreynolds/.node_modules/bin:/Users/derekreynolds/.rbenv/shims:/Users/derekreynolds/.rbenv/bin
derekr commented 9 years ago

screen shot 2015-04-02 at 9 57 25 am

ricardofbarros commented 9 years ago

Heheh that is one big PATH

So the problem doesn't lie on the init script since it's working like it should, I should add that piece of code on the README as well. But first let's try sort this out.

ricardofbarros commented 9 years ago

Do you have the linter configured to lint on save? Could you force lint on that piece of code with ctrl + cmd + l ? And see if it lints

derekr commented 9 years ago

ctrl + cmd + l doesn't seem to do anything either.

screen shot 2015-04-02 at 10 10 35 am

ricardofbarros commented 9 years ago

Found out what it was, I think. Currently at linter-js-standard@0.1.2 doesn't work with linter@<=0.12, I had linter@0.11, so my package was working with me.

I released the new version that is "compatible" with the latest version, the fix was simple but it was a headache to find it.

In case you're curious the commit to AtomLinter that broke linter-js-standard was this https://github.com/AtomLinter/Linter/commit/82a314ac5dc180c67cb3bb470b57f782de6b8cb1

The fix was this, line 34 -> https://github.com/ricardofbarros/linter-js-standard/commit/17bb78e60b083996244735d84a449595e8eef67d

ricardofbarros commented 9 years ago

Give me some feedback after you updated the linter-js-standard, thank you! :smile:

derekr commented 9 years ago

Awwwwww yeahhhhh! Thanks a lot! Looks rad.

screen shot 2015-04-02 at 6 25 29 pm

ricardofbarros commented 9 years ago

Ehehe, thank you