From 095e92c7dd1c11d7ae06c1c47b59be84481ff9a7 Mon Sep 17 00:00:00 2001 From: Keivan Beigi Date: Tue, 3 Feb 2015 16:56:18 -0800 Subject: [PATCH] Moved jshint config to .jshintrc --- gulp/jshint.js | 16 +--------------- package.json | 3 ++- src/UI/.jshintrc | 19 +++++++++++++++++++ src/UI/AddSeries/SearchResultView.js | 4 ---- webpack.config.js | 16 ++++++++++++++-- 5 files changed, 36 insertions(+), 22 deletions(-) create mode 100644 src/UI/.jshintrc diff --git a/gulp/jshint.js b/gulp/jshint.js index 6ab06b7d8..dc8399272 100644 --- a/gulp/jshint.js +++ b/gulp/jshint.js @@ -8,20 +8,6 @@ var paths = require('./paths.js'); gulp.task('jshint', function () { return gulp.src([paths.src.scripts, paths.src.exclude.libs]) .pipe(cache('jshint')) - .pipe(jshint({ - '-W030': false, - '-W064': false, - '-W097': false, //Use the function form of “use strict” - '-W100': false, //Silently deleted characters (in locales) - 'undef': true, - 'globals': { - 'module': true, - 'require': true, - 'define': true, - 'window': true, - 'document': true, - 'console': true - } - })) + .pipe(jshint()) .pipe(jshint.reporter(stylish)); }); diff --git a/package.json b/package.json index 974ad5148..33627741b 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "gulp-wrap": "0.5.0", "jshint-stylish": "1.0.0", "run-sequence": "1.0.2", - "streamqueue": "0.1.1" + "streamqueue": "0.1.1", + "jshint-loader" : "0.8.1" } } diff --git a/src/UI/.jshintrc b/src/UI/.jshintrc new file mode 100644 index 000000000..888afe448 --- /dev/null +++ b/src/UI/.jshintrc @@ -0,0 +1,19 @@ +{ + "-W030": false, + "-W064": false, + "-W097": false, + "-W100": false, + "undef": true, + "curly": true, + "immed": true, + "eqeqeq": true, + "latedef": true, + "globals": { + "module": true, + "require": true, + "define": true, + "window": true, + "document": true, + "console": true + } +} diff --git a/src/UI/AddSeries/SearchResultView.js b/src/UI/AddSeries/SearchResultView.js index 35d308377..448ab1031 100644 --- a/src/UI/AddSeries/SearchResultView.js +++ b/src/UI/AddSeries/SearchResultView.js @@ -241,10 +241,6 @@ define( vent.trigger(vent.Events.SeriesAdded, { series: self.model }); }); - - promise.fail(function () { - icon.removeClass('icon-spin icon-spinner disabled').addClass('icon-search'); - }); }, _rootFoldersUpdated: function () { diff --git a/webpack.config.js b/webpack.config.js index 201a58d13..bf1cc4ab9 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,4 +1,5 @@ var path = require('path'); +var stylish = require('jshint-stylish'); module.exports = { entry : 'main.js', @@ -37,8 +38,19 @@ module.exports = { 'bootstrap.tagsinput' : 'JsLibraries/bootstrap.tagsinput', 'libs' : 'JsLibraries/' } - }, output : { + }, + output : { filename : '_output/UI/main.js', sourceMapFilename : '_output/UI/main.map' - } + }, + module: { + //this doesn't work yet. wainting for https://github.com/spenceralger/rcloader/issues/5 + preLoaders: [ + { + test: /\.js$/, // include .js files + loader: "jshint-loader", + exclude: [/JsLibraries/,/node_modules/] + } + ] + } };