Skip to content

Commit

Permalink
Merge pull request #5 from mixmaxhq/vincent/eslint
Browse files Browse the repository at this point in the history
Add eslint config and automatic fixes
  • Loading branch information
vinnyoodles authored Aug 2, 2017
2 parents 1fed64d + cee7907 commit a6bce95
Show file tree
Hide file tree
Showing 5 changed files with 833 additions and 11 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "mixmax/node"
}
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function corsGate(options) {
// CSRF! Abort.
failure(req, res, next);
};
};
}

/**
* If the Origin header is missing, fill it with the origin part of the Referer.
Expand Down
13 changes: 10 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"description": "Gate requests based on CORS data.",
"main": "index.js",
"scripts": {
"test": "mocha"
"test": "mocha",
"lint": "eslint ."
},
"author": "Jeff Wear <[email protected]> (https://mixmax.com)",
"contributors": [
Expand All @@ -13,8 +14,14 @@
"license": "MIT",
"devDependencies": {
"cors": "^2.8.3",
"eslint": ">=3",
"eslint-config-mixmax": "^0.6.0",
"express": "^4.15.2",
"mocha": "^3.3.0",
"pre-commit": "^1.2.2",
"supertest": "^3.0.0"
}
}
},
"pre-commit": [
"lint"
]
}
3 changes: 3 additions & 0 deletions test/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "mixmax/node/spec"
}
Loading

0 comments on commit a6bce95

Please sign in to comment.