'require is not defined' (linter-jshint 3.1.5)


I’ve been using /* jshint node: true */ locally to prevent warnings, but ideally I’d like to set something up globally.

I’ve tried adding the following to the .jshintrc file, but to no avail. { "node": true }

Any pointers?


Could we see your .jshintrc?


Sure, cheers. It’s just this:
{ "node": true }

There’s nothing else in the file…


Okay, go to Settings -> Packages -> linter-jshint, click on the package’s card to get to its settings view, and check the setting Disable When No Jshintrc File In Path. If it’s checked, the linter will refuse to run if it doesn’t find your settings. If you check it and the linter turns off, then you know that the .jshintrc isn’t in a directory that jshint is looking in.


Thanks @DamnedScholar It wasn’t checked, i’ve now checked the box and the linter is disabled.

Could you please advise which directory it should be in?

Here’s a screenshot of the linter-jshint file structure, and the settings area.


…very sorry to ask this:
Do you have JSHint installed?

Reason for asking: It is easy to overlook that
some packages link Atom and other programs to each other,
as is the case here.


@danPadric Thanks, I wasn’t aware of that. I’ve since installed it but am still encountering the same problem with W117 - ‘require’ is not defined.


@meysuhn The JSHint documentation tells you where to put .jshintrc.