MiguelCastillo / Brackets-InteractiveLinter

Interactive linting for Brackets
Other
119 stars 26 forks source link

Additional usage examples/docs #152

Open wyattbiker opened 9 years ago

wyattbiker commented 9 years ago

I would like to use the default.json for jshint settings.

The default value in default.json for

"interactive-linter.javascript": [
        "eshint"
    ],

Was very confusing because when I fired up a .js file it showed a myriad errors. Took me a while to figure out and change it to jshint

How do I add additional settings to default.json section? For example to add this:

{
    "undef": true,
    "unused": true,
    "curly": true,
    "indent": 4,
    "devel": true,
    "globals": {
        "brackets": true,
        "window": true,
        "document": true,
        "importScripts": true,
        "postMessage": true,
        "onmessage": true,
        "requirejs": true,
        "require": true,
        "define": true,
        "$": true,
        "Mustache": true,
        "clearTimeout": true,
        "setTimeout": true,
        "Worker": true
    }
}

Also, If I add this to default.json:

"interactive-linter.json": [
        "jsonlint"
    ],

Where and how do i add the json settings. Any example files?

Also where do the .jshintrc files get placed? Are they in the same directory as the project?

Thanks!

MiguelCastillo commented 9 years ago

Hi, thanks for your feedback. So there are a few things going on here.

  1. Configuring what linter to run.
    • The configuration for the particular linter you want to run is a brackets settings. I have added some more details about it here. I also included a sample file here.
  2. Defining linter settings.
    • That's explained here. Perhaps the documentation needs to be improved. I am happy to take PRs :)
  3. Where do you place the .jshintrc files.
    • .jshintrc files can exist in any directory, and those settings will be applied to all the files in that directory and any other subfolder that does not have another .jshintrc file. I generally have one at the project level to define project specific settings, and another one in my tests folder to define test specific settings.

Let me know if I can help you any further.