Coder Social home page Coder Social logo

Comments (8)

stefan-schweiger avatar stefan-schweiger commented on July 26, 2024

+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.

EvHaus avatar EvHaus commented on July 26, 2024

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.

stefan-schweiger avatar stefan-schweiger commented on July 26, 2024

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.

stefan-schweiger avatar stefan-schweiger commented on July 26, 2024

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.

EvHaus avatar EvHaus commented on July 26, 2024

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.

MiguelCastillo avatar MiguelCastillo commented on July 26, 2024

@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.

  1. disable interactive linting for javascript.
  2. 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.

amamf avatar amamf commented on July 26, 2024

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.

MiguelCastillo avatar MiguelCastillo commented on July 26, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.