From 4fcbcddc5bd4545b0cebe80e95a1086bb4de8a63 Mon Sep 17 00:00:00 2001 From: Tom MacWright Date: Tue, 6 Sep 2016 10:18:05 -0400 Subject: [PATCH] Fix eslint --- modules/lib/d3.combobox.js | 6 +++--- modules/lib/d3.keybinding.js | 6 +++--- modules/svg/areas.js | 2 +- modules/ui/fields/access.js | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/lib/d3.combobox.js b/modules/lib/d3.combobox.js index 2f64be1c7..0e4d9b6ca 100644 --- a/modules/lib/d3.combobox.js +++ b/modules/lib/d3.combobox.js @@ -221,7 +221,7 @@ export function d3combobox() { options .attr('title', function(d) { return d.title; }) - .classed('selected', function(d, i) { return i == idx; }) + .classed('selected', function(d, i) { return i === idx; }) .on('mouseover', select) .on('click', accept) .order(); @@ -283,7 +283,7 @@ export function d3combobox() { }; return rebind(combobox, event, 'on'); -}; +} d3combobox.off = function(input) { input @@ -300,4 +300,4 @@ d3combobox.off = function(input) { d3.select(document.body) .on('scroll.combobox', null); -} +}; diff --git a/modules/lib/d3.keybinding.js b/modules/lib/d3.keybinding.js index 36d168f0d..c152f6d97 100644 --- a/modules/lib/d3.keybinding.js +++ b/modules/lib/d3.keybinding.js @@ -15,7 +15,7 @@ export function d3keybinding(namespace) { function matches(binding, event) { for (var p in binding.event) { - if (event[p] != binding.event[p]) + if (event[p] !== binding.event[p]) return false; } return true; @@ -37,7 +37,7 @@ export function d3keybinding(namespace) { function bubble() { var tagName = d3.select(d3.event.target).node().tagName; - if (tagName == 'INPUT' || tagName == 'SELECT' || tagName == 'TEXTAREA') { + if (tagName === 'INPUT' || tagName === 'SELECT' || tagName === 'TEXTAREA') { return; } testBindings(false); @@ -90,7 +90,7 @@ export function d3keybinding(namespace) { }; return keybinding; -}; +} d3keybinding.modifierCodes = { // Shift key, ⇧ diff --git a/modules/svg/areas.js b/modules/svg/areas.js index fddda7e84..9c5dd8f08 100644 --- a/modules/svg/areas.js +++ b/modules/svg/areas.js @@ -111,7 +111,7 @@ export function Areas(projection) { paths.exit() .remove(); - var fills = surface.selectAll('.area-fill path.area')[0]; + var fills = surface.selectAll('.area-fill path.area').nodes(); var bisect = d3.bisector(function(node) { return -node.__data__.area(graph); diff --git a/modules/ui/fields/access.js b/modules/ui/fields/access.js index fe4f8d26a..1f4dc852c 100644 --- a/modules/ui/fields/access.js +++ b/modules/ui/fields/access.js @@ -14,7 +14,7 @@ export function access(field) { var divEnter = wrap.enter().append('div') .attr('class', 'cf preset-input-wrap'); - divEnter.append('ul') + divEnter.append('ul'); wrap = wrap.merge(divEnter); items = wrap.select('ul').selectAll('li')