Skip to content
Snippets Groups Projects
Commit 46d5d1dc authored by Tom Robinson's avatar Tom Robinson
Browse files

Linting fixes/workarounds (we should switch to ESLint)

parent 7af54fa2
No related branches found
No related tags found
No related merge requests found
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
# Simple shell script for running jshint and nicely formatting the output :heart_eyes_cat: # Simple shell script for running jshint and nicely formatting the output :heart_eyes_cat:
JS_HINT=./node_modules/jsxhint/cli.js JS_HINT=./node_modules/jsxhint/cli.js
JS_HINT_OPTS='--babel --es6module --config .jshintrc' JS_HINT_OPTS='--babel --es6module --verbose --config .jshintrc'
JS_FILES=`find resources/frontend_client/app -name "*.js" | grep -v 'app/test/' | grep -v '\#' | grep -v 'app/dist/'` 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' BOLD='\033[1;30m'
RED='\033[0;31m' # \e doesn't work on OS X but \033 works on either RED='\033[0;31m' # \e doesn't work on OS X but \033 works on either
......
...@@ -2,11 +2,18 @@ ...@@ -2,11 +2,18 @@
/*jslint browser:true */ /*jslint browser:true */
/*global document,_,google,console,vs*/ /*global document,_,google,console,vs*/
import $ from 'jquery';
import d3 from 'd3'; import d3 from 'd3';
import crossfilter from 'crossfilter';
import dc from 'dc'; 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. ---------------------------------------- // ---------------------------------------- TODO - Maybe. Lots of these things never worked in the first place. ----------------------------------------
// IMPORTANT // IMPORTANT
// - 'titles' (tooltips) // - 'titles' (tooltips)
......
'use strict'; 'use strict';
/*global setTimeout, React */ /*global setTimeout, React */
import $ from 'jquery';
import { CardRenderer } from './card.charting'; import { CardRenderer } from './card.charting';
var CardDirectives = angular.module('corvus.card.directives', []); var CardDirectives = angular.module('corvus.card.directives', []);
...@@ -456,9 +454,7 @@ CardDirectives.directive('cvLatlongHeatmap', ['CardRenderer', function(CardRende ...@@ -456,9 +454,7 @@ CardDirectives.directive('cvLatlongHeatmap', ['CardRenderer', function(CardRende
scope.$watch('cvLatlongHeatmap', function(value) { scope.$watch('cvLatlongHeatmap', function(value) {
if (value) { if (value) {
$(function() { CardRenderer.latlongHeatmap('map-canvas', 'whatever', value);
CardRenderer.latlongHeatmap('map-canvas', 'whatever', value);
});
} }
}); });
} }
......
...@@ -121,11 +121,10 @@ export default React.createClass({ ...@@ -121,11 +121,10 @@ export default React.createClass({
}, },
canRun: function() { canRun: function() {
var canRun = false;
if (this.hasValidAggregation()) { if (this.hasValidAggregation()) {
canRun = true; return true;
} }
return canRun; return false;
}, },
runQuery: function() { runQuery: function() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment