From 40b129fdd0db58445316faac360ba513f611487f Mon Sep 17 00:00:00 2001 From: Dan Dascalescu Date: Mon, 8 Dec 2014 01:09:09 -0800 Subject: [PATCH] Extract JSHint settings into .jshintrc Editors/IDEs can now pass options to JSHint --- .jshintrc | 24 ++++++++++++++++++++++++ Gruntfile.js | 23 +---------------------- 2 files changed, 25 insertions(+), 22 deletions(-) create mode 100644 .jshintrc diff --git a/.jshintrc b/.jshintrc new file mode 100644 index 0000000..e870dcc --- /dev/null +++ b/.jshintrc @@ -0,0 +1,24 @@ +{ + "strict": true, + "newcap": false, // "Tolerate uncapitalized constructors" + "node": true, + "expr": true, // - true && call() "Expected an assignment or function call and instead saw an expression." + "supernew": true, // - "Missing '()' invoking a constructor." + "laxbreak": true, + "white": true, + "globals": { + "define": true, + "test": true, + "expect": true, + "module": true, + "asyncTest": true, + "start": true, + "ok": true, + "equal": true, + "notEqual": true, + "deepEqual": true, + "window": true, + "document": true, + "performance": true + } +} diff --git a/Gruntfile.js b/Gruntfile.js index 38764b7..4897fb4 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -12,28 +12,7 @@ module.exports = function (grunt) { all: ['*.js', '!*.min.js'], options: { - strict: true, - newcap: false, // "Tolerate uncapitalized constructors" - node: true, - expr: true, // - true && call() "Expected an assignment or function call and instead saw an expression." - supernew: true, // - "Missing '()' invoking a constructor." - laxbreak: true, - white: true, - globals: { - define: true, - test: true, - expect: true, - module: true, - asyncTest: true, - start: true, - ok: true, - equal: true, - notEqual: true, - deepEqual: true, - window: true, - document: true, - performance: true - } + jshintrc: true } },