Skip to content

Commit 9f6fd6e

Browse files
authored
Drop Node 12 support (#301)
1 parent fc0d740 commit 9f6fd6e

File tree

3 files changed

+5
-21
lines changed

3 files changed

+5
-21
lines changed

.github/workflows/nodejs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99

1010
strategy:
1111
matrix:
12-
node-version: [12.x, 14.x]
12+
node-version: [14.x, 16.x, 18.x, 20.x]
1313

1414
steps:
1515
- uses: actions/checkout@v1
@@ -23,7 +23,7 @@ jobs:
2323
npm run build --if-present
2424
npm test
2525
npm run report
26-
npm i --no-save [email protected]
26+
npm i --no-save [email protected] --force
2727
npm run onlytest
2828
env:
2929
CI: true

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"scripts": {
1717
"pretest": "eslint --report-unused-disable-directives .",
1818
"test": "nyc mocha --reporter dot tests/** && git diff --exit-code docs/ src/ README.md",
19-
"onlytest": "mocha --reporter dot tests/** --nofix",
19+
"onlytest": "mocha --reporter dot tests/**",
2020
"report": "nyc report --reporter=text-lcov > coverage.lcov",
2121
"reporthtml": "nyc report --reporter=html",
2222
"testpath": "mocha",

tools/rule-tester.js

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,4 @@
11
'use strict';
22

3-
const DocGenRuleTester = require( 'eslint-docgen' ).RuleTester;
4-
const noFix = process.argv.includes( '--nofix' );
5-
6-
class RuleTester extends DocGenRuleTester {
7-
run( name, rule, tests ) {
8-
if ( noFix ) {
9-
tests.valid.forEach( ( test ) => {
10-
delete test.output;
11-
} );
12-
tests.invalid.forEach( ( test ) => {
13-
delete test.output;
14-
} );
15-
}
16-
return super.run.call( this, name, rule, tests );
17-
}
18-
}
19-
20-
module.exports = RuleTester;
3+
// TODO: This no longer overrides RuleTester so can be deleted and replaced
4+
module.exports = require( 'eslint-docgen' ).RuleTester;

0 commit comments

Comments
 (0)