diff --git a/lint_js.sh b/lint_js.sh index 6edd49464951987c8b4e23bd8e8e74162730b489..a9ec8aa9511e97371f2bb7376d4709e39451fead 100755 --- a/lint_js.sh +++ b/lint_js.sh @@ -3,8 +3,8 @@ # Simple shell script for running jshint and nicely formatting the output :heart_eyes_cat: JS_HINT=./node_modules/jsxhint/cli.js -JS_HINT_OPTS='--babel --es6module --config .jshintrc' -JS_FILES=`find resources/frontend_client/app -name "*.js" | grep -v 'app/test/' | grep -v '\#' | grep -v 'app/dist/'` +JS_HINT_OPTS='--babel --es6module --verbose --config .jshintrc' +JS_FILES=`find resources/frontend_client/app -name "*.js" | grep -v bower_components | grep -v 'app/test/' | grep -v '\#' | grep -v 'app/dist/'` BOLD='\033[1;30m' RED='\033[0;31m' # \e doesn't work on OS X but \033 works on either diff --git a/resources/frontend_client/app/card/card.charting.js b/resources/frontend_client/app/card/card.charting.js index 0ac34fae1966acfeea9acfd2b429968134d9378c..07660327c15c00875b66cd96ddf5cb4224ac7f4f 100644 --- a/resources/frontend_client/app/card/card.charting.js +++ b/resources/frontend_client/app/card/card.charting.js @@ -2,11 +2,18 @@ /*jslint browser:true */ /*global document,_,google,console,vs*/ -import $ from 'jquery'; import d3 from 'd3'; -import crossfilter from 'crossfilter'; import dc from 'dc'; +// JSXHint workarounds: https://github.com/STRML/JSXHint/issues/69 +import _$ from 'jquery'; +var $ = _$; +import _crossfilter from 'crossfilter'; +var crossfilter = _crossfilter; + +// var crossfilter = require('crossfilter'); +// var $ = require('jquery'); + // ---------------------------------------- TODO - Maybe. Lots of these things never worked in the first place. ---------------------------------------- // IMPORTANT // - 'titles' (tooltips) diff --git a/resources/frontend_client/app/card/card.directives.js b/resources/frontend_client/app/card/card.directives.js index 8b13c1b743baca046ada5eadec55ec9234ff8ece..aebb5dfd763885ad6bd886f9e7c60acf7d60c903 100644 --- a/resources/frontend_client/app/card/card.directives.js +++ b/resources/frontend_client/app/card/card.directives.js @@ -1,8 +1,6 @@ 'use strict'; /*global setTimeout, React */ -import $ from 'jquery'; - import { CardRenderer } from './card.charting'; var CardDirectives = angular.module('corvus.card.directives', []); @@ -456,9 +454,7 @@ CardDirectives.directive('cvLatlongHeatmap', ['CardRenderer', function(CardRende scope.$watch('cvLatlongHeatmap', function(value) { if (value) { - $(function() { - CardRenderer.latlongHeatmap('map-canvas', 'whatever', value); - }); + CardRenderer.latlongHeatmap('map-canvas', 'whatever', value); } }); } diff --git a/resources/frontend_client/app/query_builder/gui_query_editor.react.js b/resources/frontend_client/app/query_builder/gui_query_editor.react.js index d6877ad6be66d205b5e5589d958d3f3caeef8acb..861da034cb06a48a2df612d95bc0cb31310b1059 100644 --- a/resources/frontend_client/app/query_builder/gui_query_editor.react.js +++ b/resources/frontend_client/app/query_builder/gui_query_editor.react.js @@ -121,11 +121,10 @@ export default React.createClass({ }, canRun: function() { - var canRun = false; if (this.hasValidAggregation()) { - canRun = true; + return true; } - return canRun; + return false; }, runQuery: function() {