Skip to content

Commit b95b587

Browse files
committed
Modernize eslint configuration, customize eslint for tests
Fixes #179
1 parent f1c82b2 commit b95b587

File tree

8 files changed

+17
-25
lines changed

8 files changed

+17
-25
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
test/fixture/*

.eslintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"root": true,
23
"parser": "espree",
34
"rules": {
45
"space-before-function-paren": 2,

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
"url": "[email protected]:documentationjs/documentation.git"
7171
},
7272
"scripts": {
73-
"lint": "eslint --no-eslintrc -c .eslintrc bin lib streams index.js test/*.js test/lib test/misc test/streams",
73+
"lint": "eslint bin lib index.js test",
7474
"test": "npm run lint && tap --coverage test/*.js test/lib test/misc test/streams"
7575
}
7676
}

streams/input/README.md

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

streams/output/README.md

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

test/.eslintrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"rules": {
3+
"valid-jsdoc": [0],
4+
"no-unused-vars": [0]
5+
}
6+
}

test/fixture/infer-params.input.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
/* eslint valid-jsdoc: 0 */
2-
31
/**
42
* This function returns the number one.
53
* @param {number} b the second param
64
*/
75
function addThem(a, b, c) {
86
return a + b + c;
9-
};
7+
}

test/fixture/infer-params.output.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,33 +15,33 @@
1515
],
1616
"loc": {
1717
"start": {
18-
"line": 3,
18+
"line": 1,
1919
"column": 0
2020
},
2121
"end": {
22-
"line": 6,
22+
"line": 4,
2323
"column": 3
2424
}
2525
},
2626
"context": {
2727
"loc": {
2828
"start": {
29-
"line": 7,
29+
"line": 5,
3030
"column": 0
3131
},
3232
"end": {
33-
"line": 9,
33+
"line": 7,
3434
"column": 1
3535
}
3636
},
37-
"code": "/* eslint valid-jsdoc: 0 */\n\n/**\n * This function returns the number one.\n * @param {number} b the second param\n */\nfunction addThem(a, b, c) {\n return a + b + c;\n};\n"
37+
"code": "/**\n * This function returns the number one.\n * @param {number} b the second param\n */\nfunction addThem(a, b, c) {\n return a + b + c;\n}\n"
3838
},
3939
"errors": [],
4040
"params": [
4141
{
4242
"title": "param",
4343
"name": "a",
44-
"lineNumber": 7
44+
"lineNumber": 5
4545
},
4646
{
4747
"title": "param",
@@ -56,7 +56,7 @@
5656
{
5757
"title": "param",
5858
"name": "c",
59-
"lineNumber": 7
59+
"lineNumber": 5
6060
}
6161
],
6262
"name": "addThem",

0 commit comments

Comments
 (0)