File tree Expand file tree Collapse file tree 9 files changed +16
-43
lines changed Expand file tree Collapse file tree 9 files changed +16
-43
lines changed Original file line number Diff line number Diff line change 8
8
" @babel/preset-env" ,
9
9
{
10
10
"targets" : {
11
- "node" : 16
11
+ "node" : 20
12
12
}
13
13
}
14
14
]
Original file line number Diff line number Diff line change 13
13
- name : setup node.js
14
14
uses : actions/setup-node@v4
15
15
with :
16
- node-version : ' 20'
16
+ node-version : ' 20.11.0 '
17
17
- run : pnpm install
18
18
- run : pnpm build
19
19
- run : pnpm lint
40
40
fail-fast : false
41
41
matrix :
42
42
node_js_version :
43
- - ' 18'
44
- - ' 20'
43
+ - ' 20.11.0'
45
44
- ' 22'
46
45
build :
47
46
runs-on : ubuntu-latest
57
56
- name : setup node.js
58
57
uses : actions/setup-node@v4
59
58
with :
60
- node-version : ' 20'
59
+ node-version : ' 20.11.0 '
61
60
- run : pnpm install
62
61
- run : pnpm build
63
62
timeout-minutes : 10
Original file line number Diff line number Diff line change 14
14
- name : setup node.js
15
15
uses : actions/setup-node@v4
16
16
with :
17
- node-version : " 20 "
17
+ node-version : " 22 "
18
18
- run : pnpm install
19
19
- run : pnpm build
20
20
- run : npx semantic-release
Original file line number Diff line number Diff line change @@ -4,10 +4,5 @@ module.exports = {
4
4
reject : [
5
5
// Todo: When our package converted to ESM only
6
6
'escape-string-regexp' ,
7
-
8
- // todo[engine:node@>=20]: Can reenable
9
- 'glob' ,
10
- // todo[engine:node@>=20]: Can reenable
11
- 'rimraf' ,
12
7
] ,
13
8
} ;
Original file line number Diff line number Diff line change 55
55
"eslint" : " 9.28.0" ,
56
56
"eslint-config-canonical" : " ~44.9.5" ,
57
57
"gitdown" : " ^4.1.1" ,
58
- "glob" : " ^10.4 .2" ,
58
+ "glob" : " ^11.0 .2" ,
59
59
"globals" : " ^16.2.0" ,
60
60
"husky" : " ^9.1.7" ,
61
61
"jsdoc-type-pratt-parser" : " ^4.1.0" ,
65
65
"mocha" : " ^11.5.0" ,
66
66
"open-editor" : " ^5.1.0" ,
67
67
"replace" : " ^1.2.2" ,
68
- "rimraf" : " ^5 .0.7 " ,
68
+ "rimraf" : " ^6 .0.1 " ,
69
69
"semantic-release" : " ^24.2.5" ,
70
70
"typescript" : " 5.8.3" ,
71
71
"typescript-eslint" : " ^8.33.0"
72
72
},
73
73
"engines" : {
74
- "node" : " >=18 "
74
+ "node" : " >=20.11.0 "
75
75
},
76
76
"keywords" : [
77
77
" eslint" ,
Original file line number Diff line number Diff line change @@ -7,14 +7,9 @@ import {
7
7
/**
8
8
* This script is used to inline assertions into the README.md documents.
9
9
*/
10
- import path , {
11
- dirname as getDirname ,
12
- } from 'path' ;
13
- import {
14
- fileURLToPath ,
15
- } from 'url' ;
10
+ import path from 'path' ;
16
11
17
- const dirname = getDirname ( fileURLToPath ( import . meta. url ) ) ;
12
+ const dirname = import . meta. dirname ;
18
13
19
14
/**
20
15
* @param {string } code
Original file line number Diff line number Diff line change 5
5
existsSync ,
6
6
} from 'fs' ;
7
7
import fs from 'fs/promises' ;
8
+ // Todo: Add back `@example` when reject other langs from processing
8
9
/**
9
10
*
10
11
* ```shell
@@ -13,15 +14,8 @@ import fs from 'fs/promises';
13
14
*/
14
15
import open from 'open-editor' ;
15
16
import {
16
- dirname as getDirname ,
17
17
resolve ,
18
18
} from 'path' ;
19
- // Todo: Add back `@example` when reject other langs from processing
20
- import {
21
- fileURLToPath ,
22
- } from 'url' ;
23
-
24
- const dirname = getDirname ( fileURLToPath ( import . meta. url ) ) ;
25
19
26
20
// Todo: Would ideally have prompts, e.g., to ask for whether
27
21
// type was problem/layout, etc.
@@ -284,7 +278,7 @@ export default iterateJsdoc(({
284
278
*/
285
279
286
280
// Set chdir as somehow still in operation from other test
287
- process . chdir ( resolve ( dirname , '../../' ) ) ;
281
+ process . chdir ( resolve ( import . meta . dirname , '../../' ) ) ;
288
282
await open ( [
289
283
// Could even add editor line column numbers like `${rulePath}:1:1`
290
284
ruleReadmePath ,
Original file line number Diff line number Diff line change @@ -15,20 +15,14 @@ import {
15
15
readFileSync ,
16
16
} from 'node:fs' ;
17
17
import {
18
- dirname as getDirname ,
19
18
join ,
20
19
} from 'node:path' ;
21
- import {
22
- fileURLToPath ,
23
- } from 'node:url' ;
24
-
25
- const dirname = getDirname ( fileURLToPath ( import . meta. url ) ) ;
26
20
27
21
const {
28
22
version,
29
23
} = JSON . parse (
30
24
// @ts -expect-error `Buffer` is ok for `JSON.parse`
31
- readFileSync ( join ( dirname , '../package.json' ) ) ,
25
+ readFileSync ( join ( import . meta . dirname , '../package.json' ) ) ,
32
26
) ;
33
27
34
28
// const zeroBasedLineIndexAdjust = -1;
Original file line number Diff line number Diff line change @@ -9,27 +9,23 @@ import {
9
9
} from 'fs' ;
10
10
import defaultsDeep from 'lodash.defaultsdeep' ;
11
11
import {
12
- dirname as getDirname ,
13
12
join ,
14
13
} from 'path' ;
15
14
import semver from 'semver' ;
16
- import {
17
- fileURLToPath ,
18
- } from 'url' ;
19
15
20
16
/**
21
17
* @typedef {object } TestCases
22
18
* @property {import('eslint').RuleTester.ValidTestCase[] } valid Valid test cases
23
19
* @property {import('eslint').RuleTester.InvalidTestCase[] } invalid Invalid test cases
24
20
*/
25
21
26
- const dirname = getDirname ( fileURLToPath ( import . meta. url ) ) ;
27
-
28
22
const ruleTester = new RuleTester ( ) ;
29
23
30
24
// eslint-disable-next-line complexity -- Temporary
31
25
const main = async ( ) => {
32
- const ruleNames = JSON . parse ( readFileSync ( join ( dirname , './ruleNames.json' ) , 'utf8' ) ) ;
26
+ const ruleNames = JSON . parse ( readFileSync ( join (
27
+ import . meta. dirname , './ruleNames.json' ,
28
+ ) , 'utf8' ) ) ;
33
29
34
30
if ( ! config . rules ) {
35
31
throw new Error ( 'TypeScript guard' ) ;
You can’t perform that action at this time.
0 commit comments