Skip to content

Commit

Permalink
Chore: update linting config (#406)
Browse files Browse the repository at this point in the history
  • Loading branch information
kaicataldo authored and platinumazure committed Dec 2, 2018
1 parent 4b86a7d commit 35623ee
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 9 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
!.eslintrc.js
5 changes: 0 additions & 5 deletions .eslintrc

This file was deleted.

18 changes: 18 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
"use strict";

module.exports = {
root: true,
extends: "eslint",
env: {
node: true,
es6: true
},
overrides: [
{
files: ["tests/lib/*"],
env: {
mocha: true
}
}
]
};
9 changes: 8 additions & 1 deletion Makefile.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ const NODE_MODULES = "./node_modules/",
MOCHA = `${NODE_MODULES}mocha/bin/_mocha `,

// Files
MAKEFILE = "./Makefile.js",
MAKEFILE = "Makefile.js",
CONFIG_FILES = ".eslintrc.js",
JS_FILES = "\"lib/**/*.js\" \"espree.js\"",
TEST_FILES = "tests/lib/**/*.js";

Expand All @@ -50,6 +51,12 @@ target.lint = function() {
errors++;
}

echo("Validating configuration files");
lastReturn = nodeCLI.exec("eslint", CONFIG_FILES);
if (lastReturn.code !== 0) {
errors++;
}

echo("Validating JavaScript files");
lastReturn = nodeCLI.exec("eslint", JS_FILES);
if (lastReturn.code !== 0) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"chai": "^1.10.0",
"eslint": "^5.7.0",
"eslint-config-eslint": "^5.0.1",
"eslint-plugin-node": "^7.0.1",
"eslint-plugin-node": "^8.0.0",
"eslint-release": "^1.0.0",
"esprima": "latest",
"esprima-fb": "^8001.2001.0-dev-harmony-fb",
Expand Down
2 changes: 0 additions & 2 deletions tests/lib/.eslintrc

This file was deleted.

0 comments on commit 35623ee

Please sign in to comment.