jshint-mode icon indicating copy to clipboard operation
jshint-mode copied to clipboard

.jshintrc file?

Open flamingbear opened this issue 12 years ago • 4 comments

So I'm not very familiar with all of this, and I'm really just sort of hacking at it to get it running, which I've managed to do. What I'm curious about is if there a way to set up a .jshintrc file that will contain all of the defaults that I want rather than placing them at the top of each .js file?

Can this be done? Can someone tell me how it would be done?

Sorry if this is a boneheaded question, (Or the incorrect place to ask)

Thanks Matt

flamingbear avatar Apr 03 '12 17:04 flamingbear

Thats a good idea, I have just been changing the default inlines, it should be as simple as auto prepending the contents of a .jshintrc file

I would like to get this a bit less of a hack and improve the install process etc

daleharvey avatar Apr 03 '12 17:04 daleharvey

That's an excellent idea and didn't occur to me...

flamingbear avatar Apr 03 '12 21:04 flamingbear

I'm sorry but where is the default options ? I see an empty dict passed as below

function lintify(mode, sourcedata, filename) {
  var passed = hinters[mode](sourcedata, {});
  return passed ? "js: No problems found in " + filename + "\n"
    : outputErrors(hinters[mode].errors);
}

tonyouyang avatar May 30 '12 12:05 tonyouyang

You could check out my pull request https://github.com/daleharvey/jshint-mode/pull/9

diasjorge avatar Sep 10 '12 12:09 diasjorge