Linting for php/js/css as newbie


#1

Hi I wanted to give atom a chance and started using it yesterday but I have some problems with the setup regarding error highlighting (in general). Usually I work with php, js and css files and my old IDE was shipped with error highlighting for every language it supports. I searched for something in the available packages and found linter but none of the linter packages (linter-csslint, linter-php, linter-js-standard) is actual working with the current version of atom.
Is it just “bad luck” for me because these packages are not maintained anymore? I like the look and feel of atom but since I consider error highlighting a core feature (who wants to search for missing semicolons multiple minutes?) I guess I have to go back to my old editor.
Do you guys simply don’t use/need this feature? Are you using an older version which works fine with the available packages? Do your (sub-)packages work because you use different or just other languages that are supported?


#2

linter-jshint works fine though.

And what’s wrong with linter-php? Was there some breaking change between now and a few months ago? Same goes for linter-csslint and linter-stylelint.

Has it ever worked for you before (in Atom)? If you’ve never tried, it’s probably an issue with your setup. You can ask for help with that here too. For example, what linting related packages do you have installed?


#3

Thanks for replying.
As I stated I just started using Atom, so I havn’t any experience from the packages before. I just tried linter-jshint but it doesn’t seem to work for me, too. As I am using a fresh installation so I wonder what’s wrong with my Setup.
In case of the linter-jshint package I don’t even receive any error messages in the developer console. The only community packages I have installed so far are:
remote-ftp, project-viewer and linter (dependencies with linter-ui-default, intentions, busy-signal)


#4

What error message(s) did you see for linter-csslint, linter-js-standard, and linter-php?


#5

linter-js-standard seems to work now, dunno why. Maybe I restarted atom this time after installation.

linter-php:

linter-registry.js:137 [Linter] Error running PHP Error: Der Befehl “php” ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
at ChildProcess. (C:\Users\icke.atom\packages\linter-jshint\node_modules\sb-exec\lib\index.js:56)
at emitTwo (events.js:106)
at ChildProcess.emit (events.js:194)
at maybeClose (internal/child_process.js:899)
at Socket. (internal/child_process.js:342)
at emitOne (events.js:96)
at Socket.emit (events.js:191)
at Pipe._handle.close [as _onclose] (net.js:510)

linter-css-lint:

C:\Users\icke.atom\packages\linter\lib\linter-registry.js:159 [Linter] Error running CSSLint Error: Der Befehl “node” ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
at ChildProcess. (C:\Users\icke.atom\packages\linter-jshint\node_modules\sb-exec\lib\index.js:56:20)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:194:7)
at maybeClose (internal/child_process.js:899:16)
at Socket. (internal/child_process.js:342:11)
at emitOne (events.js:96:13)
at Socket.emit (events.js:191:7)
at Pipe._handle.close [as _onclose] (net.js:510:12)


#6

I re-installed js-hint and changed the settings. It is working now, too. I just had to uncheck the “disable when no jshintrc file in path” box.


#7

I used Google to translate your error messages, and they say that you don’t have PHP or Node installed. You should install those programs, then close and reopen Atom.


#8

Okay, that did the trick. I thought Atom is shipped with stuff like that. Thanks for clarification.


#9

No, Atom has no ability to run or interpret code that isn’t its own JavaScript/HTML.