Closed TommiGustafsson closed 10 years ago
The build menu is just logging all activities. You can right click it and clear the window.
Thus build window is the wrong place to look for the linter warnings. Use Error window.
As soon as you change the indention count in settings file, those warnings disappear from Error window.
Now I need to check for errors in the Build window, and sometimes I may miss them.
You don't need to check in build window. You can just check the error window with segregated Warnings, Errors and (other) Messages.
Thanks! This helped to find the correct line of the error messages. But STILL setting indentation to 4 has no effect for me. :-\
The order by which it applies coffeelint.json
settings is; first look in current directory, its parent ... upto the drive's root, if none is found, it applies the one in user's home directory "C:\Userstslint.json
, .jshintrc
, .jscsrc
et el.
What I did was to click Web Essentials in the menu bar, and then Edit Global CoffeeLint Settings. It opened a JSON file, and I edited it. I thought it would affect all my projects immediately.
When I added coffeelint.json to the project root, everything started to work.
It seems that C:\Users
Additionally, I suggest that you add coffeelint.json file to SideWaffle files.
I tested with the following steps:
And got 89 warnings:
CoffeeLint: Line contains inconsistent indentation; context: Expected 3 got 4
Do you have another coffee.json
in the directory tree; between drive's root and your project root?
I checked that I have no coffee.json nor coffeelint.json files anywhere between the project folder and the system root. When I change the global CoffeeLint settings they seem not to work in any of my projects. It keeps on saying:
CoffeeLint: CoffeeScript1.coffee compilation failed: CoffeeLint: Line contains inconsistent indentation; context: Expected 2 got 4
Maybe it does not find the global file. My user name is Tommi Gustafsson on the computer I'm using. So the file is C:\Users\Tommi Gustafsson\coffeelint.json.
@TommiGustafsson, do you get C:\Users\Tommi Gustafsson\
when you do:
Run (Windows Key + R) > type %homepath% > press Enter
Not sure but it could be that nodejs is not resolving home.
Also, is your project on same drive as your WE and Windows installations?
%HOMEDRIVE%%HOMEPATH%
or %HOMEPATH%
should point to your home directory, for instance C:\Users\Adeel
.
You need to fix it first.
Perhaps this can fix your issue, using gpedit.msc
.
@madskristensen, it seems like the issue here is with altered configuration (environment variable).
This can be closed now.
For reference I got this working, but only after restarting Brackets after creating the coffeelint.json file for the first time (i.e. it seems that the settings are not picked up if the coffeelint.json doesn't exist when Brackets starts)).
After the first restart, I have
which works ok
and If I change the value to 3, I get the expected error:
What is nice is that once I change it back to 4, the settings take effect immediately
CoffeeLint. I tried to change the default indentation to 4 (from 2) in global settings (coffeelint.json in the menu), but it had no effect.
I get the following error:
Also, there is no indication what line caused the problem.
Furthermore, it would be nice feature to have that there would be an alert box or something similar to pop up, when I save a coffeescript file (or any other preprocessed file) and it fails to compile. Now I need to check for errors in the Build window, and sometimes I may miss them. A clearer error alert box would catch my attention easier.