Skip to content

Commit 35623ee

Browse files
kaicataldoplatinumazure
authored andcommitted
Chore: update linting config (#406)
1 parent 4b86a7d commit 35623ee

File tree

6 files changed

+28
-9
lines changed

6 files changed

+28
-9
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
!.eslintrc.js

.eslintrc

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

.eslintrc.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
"use strict";
2+
3+
module.exports = {
4+
root: true,
5+
extends: "eslint",
6+
env: {
7+
node: true,
8+
es6: true
9+
},
10+
overrides: [
11+
{
12+
files: ["tests/lib/*"],
13+
env: {
14+
mocha: true
15+
}
16+
}
17+
]
18+
};

Makefile.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ const NODE_MODULES = "./node_modules/",
2828
MOCHA = `${NODE_MODULES}mocha/bin/_mocha `,
2929

3030
// Files
31-
MAKEFILE = "./Makefile.js",
31+
MAKEFILE = "Makefile.js",
32+
CONFIG_FILES = ".eslintrc.js",
3233
JS_FILES = "\"lib/**/*.js\" \"espree.js\"",
3334
TEST_FILES = "tests/lib/**/*.js";
3435

@@ -50,6 +51,12 @@ target.lint = function() {
5051
errors++;
5152
}
5253

54+
echo("Validating configuration files");
55+
lastReturn = nodeCLI.exec("eslint", CONFIG_FILES);
56+
if (lastReturn.code !== 0) {
57+
errors++;
58+
}
59+
5360
echo("Validating JavaScript files");
5461
lastReturn = nodeCLI.exec("eslint", JS_FILES);
5562
if (lastReturn.code !== 0) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"chai": "^1.10.0",
2828
"eslint": "^5.7.0",
2929
"eslint-config-eslint": "^5.0.1",
30-
"eslint-plugin-node": "^7.0.1",
30+
"eslint-plugin-node": "^8.0.0",
3131
"eslint-release": "^1.0.0",
3232
"esprima": "latest",
3333
"esprima-fb": "^8001.2001.0-dev-harmony-fb",

tests/lib/.eslintrc

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

0 commit comments

Comments
 (0)