babel/generator-babel-boilerplate

Add a .jshintrc file

Closed this issue · 5 comments

Tried to oen a scaffolded project in Atom. Got loads of "errors".
To fix it, I had to add a .jshintrc file

{
    "node": true,
    "esnext": true,
    "bitwise": true,
    "camelcase": false,
    "curly": true,
    "eqeqeq": true,
    "immed": true,
    "indent": 2,
    "latedef": "nofunc",
    "newcap": false,
    "noarg": true,
    "quotmark": "single",
    "regexp": true,
    "undef": true,
    "unused": false,
    "strict": false,
    "trailing": true,
    "smarttabs": true,
    "white": false,
    "globals": {
        "it": true,
        "describe": true,
        "before": true,
        "beforeEach": true,
        "after": true,
        "afterEach": true,
        "exports": true
    }
}

Hmmm...that's unexpected! This project doesn't use JSHint out-of-the-box (though it should be straightforward to swap it in manually). Do you have a JSHint plugin for Atom that lints all of your JS?

Also, I scaffolded out 5-10 projects this weekend with this boilerplate, and didn't run into the issue. Are you on the latest version?

yeah, I think that is the problem. I had to make the plugin to ignore certain globals such as describe, it etc.

Which jshint plugin are you using? I thought linter-jshint (http://atomlinter.github.io/) only applies itself if it sees a .jshintrc file, similar for linter-eslint

I'd be -1 for sporting rc files not used by the boilerplate to support things like this

https://github.com/sindresorhus/atom-jshint

"Reads your .jshintrc config and jshintConfig in package.json using the same logic as JSHint."

I'm changing to atom linter now :) Thanks!

Glad it got worked out, @kristianmandrup ! ✌️