Comments (8)
+1 it does also not work for me under windows, JSHint works just fine but JSCS does not display any errors defined in the settings file
from brackets-jscs.
v0.3.0 was just pushed to the Brackets Extension registry which should resolve this issue.
Make sure your config file is called .jscsrc
or .jscs.json
and not .jscs
from brackets-jscs.
You might want to reopen this issue.
It still does not work for me (Windows 8.1, Brackets 1.2 build 1.2.0-15697, brackets-jscs 0.3.0), after updating the extension and restarting Brackets. JSHint stuff is shown for me, but JSCS still does not appear in the Interactive Linter.
Just to be sure I got everything right:
brackets.json (Application Preferences File)
...
"language": {
"javascript": {
"linting.prefer": ["JSHint", "JSCS"],
"linting.usePreferredOnly": true
}
},
...
.jscsrc (In project root folder)
{
"disallowKeywordsOnNewLine": ["else"]
}
somefile.js
var x = 0;
if (x < 0) {
x++;
}
else {
x--;
}
from brackets-jscs.
Ok it seems that, some other extension was messing with JSCS (works when I only have JSHint and JSCS installed), I will now try to enable them again one by one and give you some feedback.
EDIT: Interactive Linter was the problem...I don't know if there is anything on your side you can do about this, so I will open an issue on their project
from brackets-jscs.
Hmm, yeah, I'm not sure what Interactive Linter does. Reference the issue you open with the author and maybe together we can find a solution.
from brackets-jscs.
@stefan-schweiger thanks for reaching out. interactive linter is pretty invasive in the sense that it will remove any registered javascript linters. this is simple because of performance issues. my take is that if you have interactive linter then having another linter running along side is not what you are looking for.
let me clarify quickly that interactive linter is just a lint runner with a plugin ecosystem where you can create ur own linters.
with that said, I have just added support for defining what linter you want to run via brackets preferences. this gives you two options.
- disable interactive linting for javascript.
- use jscs linter in interactive linter, which I have just revamped.
Here is a list of supported linters.
And you can add the following line to your global brackets.json
or project .brackets.json
to customize the linter:
{
"interactive-linter.javascript": ["jscs"],
"interactive-linter.coffeescript": ["coffeelint"]
}
jscs supports .jscs.json
. Also, you can disable interactive linter on a per language basis by setting the linter language to null. e.g.
{
"interactive-linter.javascript": null,
"interactive-linter.coffeescript": ["coffeelint"]
}
all the stuff about configuration is brand new and only in master... once documentation is added, I will be posting it to the brackets registry.
-- I am really not trying highjack this thread to promote interactive linter. This is just in response to the issue that was logged for interactive linter.
from brackets-jscs.
I'm suffering from not being able to use 2 linters side by side that run one after another. The point is that jshint and jscs are aimed at a bit different goals, so it would be logically if I could use both, especially taking into account that "interactive-linter.javascript" is an array which implies that I can define more than one linter, but when I try to use both linters - "interactive-linter.javascript": ["jshint", "jscs"], only the first one works. If I for instance change that option to "interactive-linter.javascript": ["jscs", "jshint"], then only "jscs" will work.
from brackets-jscs.
@amamf Yeah the long term is to allow multiple linters to run in interactive linter. But for right now only the first one runs, as you pointed out. Sorry for the confusion. I am thinking of getting back to this in the next two weeks... Really swamped with other stuff right now. :/
from brackets-jscs.
Related Issues (20)
- Upgrade to newest JSCS version
- After upgrading to 0.6.0 I get a JSCS processing error HOT 24
- Cannot find module 'jscs' HOT 13
- Unexpectedly stop the node server HOT 2
- JSCS timing out HOT 8
- Plugin breaks when JSCS is used with plugin HOT 1
- The JSCS 2.0 does not use esprima anymore HOT 1
- How to upgrade to JSCS 2.0.0 ? HOT 6
- Configuration file path HOT 1
- Feature request: Add JSCS formatting HOT 1
- Ignored rule: One space required after opening bracket. HOT 5
- Support JSCS v2.2.1 HOT 2
- I'm getting: Unexpected JSCS processing error: Unable to load one of the modules * reason: Cannot find module 'color' HOT 4
- error after latest update: HOT 4
- JSCS issue "Unexpected JSCS processing error: timeout" HOT 2
- Support for the fix parameter HOT 3
- Using multiple brackets windows broke the extension HOT 5
- update to use JSCS 3 HOT 4
- Is there a way to invoke jscs auto fix as part of "save" of a file? HOT 1
- Not clear install instruction HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from brackets-jscs.