Permalink
Browse files

Add eslint

  • Loading branch information...
1 parent 0ab03f8 commit 49fb48f861d528bbcdf2f99970950f89324eb934 @tristen committed Apr 6, 2016
Showing with 23 additions and 4 deletions.
  1. +15 −0 .eslintrc
  2. +1 −1 dist/deep-linking.min.js
  3. +5 −2 index.js
  4. +2 −1 package.json
View
@@ -0,0 +1,15 @@
+{
+ "rules": {
+ "linebreak-style": [
+ 2,
+ "unix"
+ ],
+ "no-console": [
+ 0
+ ]
+ },
+ "env": {
+ "browser": true
+ },
+ "extends": "eslint:recommended"
+}
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -1,4 +1,7 @@
-;(function(global) {
+'use strict';
+/* global module */
+
+(function(global) {
var DeepLinking = function(el) {
this.init(el);
@@ -111,7 +114,7 @@ DeepLinking.prototype = {
},
updateURLHash: function(change) {
- var key, nSent, hash;
+ var nSent, sLen, hash;
// Scan the Tags, note selections, highlights and update the URL with the new Hash
if (change) {
var h = 'h[',
View
@@ -5,7 +5,7 @@
"main": "index.js",
"scripts": {
"build": "browserify index.js -s DeepLinking | uglifyjs -mc > dist/deep-linking.min.js",
- "test": "echo \"Error: no test specified\" && exit 1"
+ "test": "eslint index.js"
},
"repository": {
"type": "git",
@@ -23,6 +23,7 @@
"homepage": "https://github.com/tristen/deep-linking",
"devDependencies": {
"browserify": "^8.1.1",
+ "eslint": "^2.7.0",
"uglify-js": "^2.4.16"
}
}

0 comments on commit 49fb48f

Please sign in to comment.