From 0d75d5b541e4e58399152c34ebb3aa520af6e674 Mon Sep 17 00:00:00 2001 From: Blade Barringer Date: Thu, 31 Dec 2015 15:46:47 -0600 Subject: [PATCH 1/2] lint: Move test eslint rules to .eslintrc in test directory --- tasks/gulp-eslint.js | 21 ++------------------- test/.eslintrc | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 19 deletions(-) create mode 100644 test/.eslintrc diff --git a/tasks/gulp-eslint.js b/tasks/gulp-eslint.js index b107a1d515..f559c4433c 100644 --- a/tasks/gulp-eslint.js +++ b/tasks/gulp-eslint.js @@ -33,7 +33,7 @@ let linter = (src, options) => { .pipe(eslint(options)) .pipe(eslint.format()) .pipe(eslint.failAfterError()); -} +}; // TODO lint client // TDOO separate linting cong between @@ -49,24 +49,7 @@ gulp.task('lint:common', () => { }); gulp.task('lint:tests', () => { - let options = { - rules: { - 'one-var': 0, - 'max-nested-callbacks': 0, - 'no-unused-expressions': 0, - 'mocha/no-exclusive-tests': 2, - 'mocha/no-global-tests': 2, - 'mocha/handle-done-callback': 2, - }, - globals: { - 'expect': true, - '_': true, - 'sinon': true, - }, - plugins: [ 'mocha' ], - }; - - return linter(TEST_FILES, options); + return linter(TEST_FILES); }); gulp.task('lint', ['lint:server', 'lint:common', 'lint:tests']); diff --git a/test/.eslintrc b/test/.eslintrc new file mode 100644 index 0000000000..4b9c65beb2 --- /dev/null +++ b/test/.eslintrc @@ -0,0 +1,16 @@ +{ + "rules": { + "one-var": 0, + "max-nested-callbacks": 0, + "no-unused-expressions": 0, + "mocha/no-exclusive-tests": 2, + "mocha/no-global-tests": 2, + "mocha/handle-done-callback": 2 + }, + "globals": { + "expect": true, + "_": true, + "sinon": true + }, + "plugins": [ "mocha" ] +} From 730e5e3431d875e209e6af2c8ebd9a47895e8148 Mon Sep 17 00:00:00 2001 From: Blade Barringer Date: Thu, 31 Dec 2015 15:49:33 -0600 Subject: [PATCH 2/2] chore(lint): Add sandbox as global to test .eslintrc --- test/.eslintrc | 1 + 1 file changed, 1 insertion(+) diff --git a/test/.eslintrc b/test/.eslintrc index 4b9c65beb2..7b5868eca9 100644 --- a/test/.eslintrc +++ b/test/.eslintrc @@ -10,6 +10,7 @@ "globals": { "expect": true, "_": true, + "sandbox": true, "sinon": true }, "plugins": [ "mocha" ]