Skip to content

Commit db097ec

Browse files
author
Matt Gaunt
committed
Adding stronger eslint - fixing linting issues, re-org of repo to src directory
1 parent db7c3dd commit db097ec

18 files changed

+317
-325
lines changed

.eslintrc

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
11
{
2-
"parserOptions": {
3-
"sourceType": "module"
2+
"extends": "airbnb/legacy",
3+
"env": {
4+
"es6": true
45
},
56
"rules": {
6-
"prefer-const": 2
7+
"no-var": 2,
8+
"no-const-assign": 2,
9+
"no-console": 0,
10+
"func-names": 0,
11+
"vars-on-top": 0,
12+
"no-use-before-define": 0,
13+
"space-before-function-paren": 0,
14+
"max-len": [1, 80, 4, {"ignoreComments": true, "ignoreUrls": true}],
15+
"no-param-reassign": 0,
16+
"quote-props": 0,
17+
"wrap-iife": [2, "inside"]
718
}
819
}

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
coverage
2-
node_modules
1+
coverage/
2+
node_modules/
33
wires
44
test/output/

bin/web-push.js

Lines changed: 0 additions & 65 deletions
This file was deleted.

package.json

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@
22
"name": "web-push",
33
"version": "2.2.0",
44
"description": "Web Push library for Node.js",
5-
"main": "index.js",
5+
"main": "src/index.js",
6+
"bin": {
7+
"web-push": "bin/web-push.js"
8+
},
69
"scripts": {
7-
"download-browser": "node ./test/helpers/download-test-browsers.js",
8-
"lint": "./node_modules/.bin/eslint index.js test/",
10+
"download-browser": "node --harmony ./test/helpers/download-test-browsers.js",
11+
"lint": "node ./node_modules/eslint/bin/eslint --ignore-path .gitignore '.'",
912
"pretest": "npm run lint && npm run download-browser",
1013
"test": "node --harmony node_modules/.bin/istanbul cover node_modules/.bin/_mocha -- --ui tdd test/test*"
1114
},
@@ -31,7 +34,6 @@
3134
"bluebird": "^3.3.5",
3235
"buffer-compare-shim": "^1.0.0",
3336
"buffer-equals-polyfill": "^1.0.0",
34-
"colors": "^1.1.2",
3537
"create-ecdh": "^4.0.0",
3638
"http_ece": "^0.5.1",
3739
"jws": "^3.1.3",
@@ -43,7 +45,9 @@
4345
"chromedriver": "^2.21.2",
4446
"del": "^2.2.1",
4547
"dmg": "^0.1.0",
46-
"eslint": "^2.3.0",
48+
"eslint": "^2.10.2",
49+
"eslint-config-airbnb": "^9.0.1",
50+
"eslint-plugin-import": "^1.11.1",
4751
"fs-extra": "^0.30.0",
4852
"istanbul": "^0.4.2",
4953
"mkdirp": "^0.5.1",
@@ -56,9 +60,6 @@
5660
"temp": "^0.8.3",
5761
"which": "^1.2.9"
5862
},
59-
"bin": {
60-
"web-push": "bin/web-push.js"
61-
},
6263
"engines": {
6364
"node": ">= v0.10.0"
6465
}

0 commit comments

Comments
 (0)