Browse Source

Add JSHint support.

Use `npm run check` or `npm run lint` to check the js/lightbox.js file with JSHint.
master
XhmikosR 7 years ago
parent
commit
64d43351ee
3 changed files with 26 additions and 2 deletions
  1. +20
    -0
      .jshintrc
  2. +1
    -0
      .npmignore
  3. +5
    -2
      package.json

+ 20
- 0
.jshintrc View File

@@ -0,0 +1,20 @@
{
"bitwise": true,
"boss": true,
"browser": true,
"camelcase": true,
"curly": true,
"eqeqeq": true,
"indent": 2,
"latedef": false,
"maxerr": 100,
"multistr": true,
"noarg": true,
"noempty": true,
"plusplus": false,
"quotmark": "true",
"regexp": true,
"strict": false,
"trailing": true,
"unused": true
}

+ 1
- 0
.npmignore View File

@@ -1,3 +1,4 @@
.jshintrc
coffee
releases
sass

+ 5
- 2
package.json View File

@@ -16,7 +16,9 @@
"url": "https://github.com/lokesh/lightbox2/issues"
},
"scripts": {
"build": "coffee --compile --output ../js/ ../coffee/"
"build": "coffee --compile --output ../js/ ../coffee/",
"check": "jshint ./js/lightbox.js",
"lint": "jshint ./js/lightbox.js"
},
"licenses": [
{
@@ -25,6 +27,7 @@
}
],
"devDependencies": {
"coffee-script": "~1.6.3"
"coffee-script": "~1.6.3",
"jshint": "~2.1.4"
}
}

Loading…
Cancel
Save