Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: update linting config #406

Merged
merged 1 commit into from
Dec 2, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.