[Pkg-javascript-commits] [d3-tip.js] 09/17: More ESLint tweaks

Sunil Mohan Adapa sunilmohan-guest at moszumanska.debian.org
Thu Dec 8 10:37:11 UTC 2016


This is an automated email from the git hooks/post-receive script.

sunilmohan-guest pushed a commit to branch upstream
in repository d3-tip.js.

commit e6cef9901fc4608326a536d60ca803266787fff4
Author: Tim van der Horst <tim.vanderhorst at sportsmedglobal.com>
Date:   Tue Sep 6 10:54:12 2016 +1000

    More ESLint tweaks
    
    - Removed custom `no-unused-vars` settings and added individual ignores for the two functions instead
    - Added an extra semicolon to the start of the file to satisfy my concatenation paranoia
---
 .eslintrc.yaml |  7 -------
 index.js       | 20 ++++++++++++--------
 2 files changed, 12 insertions(+), 15 deletions(-)

diff --git a/.eslintrc.yaml b/.eslintrc.yaml
index 765cda5..5fc8161 100644
--- a/.eslintrc.yaml
+++ b/.eslintrc.yaml
@@ -48,13 +48,6 @@
 
     # Additional rules
     func-names: 0
-    no-unused-vars:
-      - 1
-      -
-        vars: all
-        args: all
-        varsIgnorePattern: ^_
-        argsIgnorePattern: ^_
 
     # Disabled for IE8 support
     comma-dangle: 0
diff --git a/index.js b/index.js
index 121bffd..b0bbc3b 100644
--- a/index.js
+++ b/index.js
@@ -1,9 +1,11 @@
-// d3.tip
-// Copyright (c) 2013 Justin Palmer
-//
-// Tooltips for d3.js SVG visualizations
-
-(function(root, factory) {
+/**
+ * d3.tip
+ * Copyright (c) 2013 Justin Palmer
+ *
+ * Tooltips for d3.js SVG visualizations
+ */
+// eslint-disable-next-line no-extra-semi
+;(function(root, factory) {
   if (typeof define === 'function' && define.amd) {
     // AMD. Register as an anonymous module with d3 as a dependency.
     define(['d3'], factory)
@@ -84,7 +86,8 @@
     // v - value of the attribute
     //
     // Returns tip or attribute value
-    tip.attr = function(n, _v) {
+    // eslint-disable-next-line no-unused-vars
+    tip.attr = function(n, v) {
       if (arguments.length < 2 && typeof n === 'string') {
         return getNodeEl().attr(n)
       }
@@ -101,7 +104,8 @@
     // v - value of the property
     //
     // Returns tip or style property value
-    tip.style = function(n, _v) {
+    // eslint-disable-next-line no-unused-vars
+    tip.style = function(n, v) {
       if (arguments.length < 2 && typeof n === 'string') {
         return getNodeEl().style(n)
       }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/d3-tip.js.git



More information about the Pkg-javascript-commits mailing list