Skip to content

Commit 8572071

Browse files
committed
Require Node.js 22
1 parent 38cd4fd commit 8572071

11 files changed

Lines changed: 24 additions & 23 deletions

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ jobs:
1313
strategy:
1414
fail-fast: false
1515
matrix:
16-
node-version: [^20.19]
16+
node-version:
17+
- 22
1718
steps:
1819
- uses: actions/checkout@v6
1920
- uses: actions/setup-node@v6

package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
},
1212
"sideEffects": false,
1313
"engines": {
14-
"node": ">=20.19"
14+
"node": ">=22"
1515
},
1616
"scripts": {
1717
"integration": "node ./test/integration/test.js",
@@ -43,27 +43,27 @@
4343
],
4444
"dependencies": {
4545
"@eslint-community/eslint-utils": "^4.9.1",
46-
"@eslint/json": "^1.0.0",
47-
"espree": "^11.1.0",
46+
"@eslint/json": "^1.2.0",
47+
"espree": "^11.2.0",
4848
"espurify": "^3.2.0",
4949
"micro-spelling-correcter": "^1.1.1",
5050
"resolve-from": "^5.0.0"
5151
},
5252
"devDependencies": {
53-
"@typescript-eslint/parser": "^8.54.0",
54-
"ava": "^7.0.0",
53+
"@typescript-eslint/parser": "^8.59.4",
54+
"ava": "^8.0.1",
5555
"c8": "^11.0.0",
5656
"chalk": "^5.6.2",
57-
"eslint": "^10.0.0",
57+
"eslint": "^10.4.0",
5858
"eslint-ava-rule-tester": "^5.0.1",
59-
"eslint-doc-generator": "^3.0.2",
60-
"eslint-plugin-eslint-plugin": "^7.3.0",
59+
"eslint-doc-generator": "^3.6.0",
60+
"eslint-plugin-eslint-plugin": "^7.3.3",
6161
"execa": "^9.6.1",
6262
"npm-run-all": "^4.1.5",
6363
"outdent": "^0.8.0",
6464
"pify": "^6.1.0",
65-
"typescript": "^5.9.3",
66-
"xo": "^1.2.3"
65+
"typescript": "^6.0.3",
66+
"xo": "^2.0.2"
6767
},
6868
"peerDependencies": {
6969
"eslint": ">=10"

rules/assertion-arguments.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const MESSAGE_ID_OUT_OF_ORDER = 'out-of-order';
1717
const MESSAGE_ID_PLAN_NOT_INTEGER = 'plan-not-integer';
1818
const MESSAGE_ID_REGEX_FIRST = 'regex-first-argument';
1919

20-
const errorNamePattern = /^(?:[A-Z][a-z\d]*)*Error$/;
20+
const errorNamePattern = /^(?:[A-Z][a-z\d]*)*Error$/v;
2121

2222
const expectedNbArguments = {
2323
assert: {

rules/failing-test-url.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import util from '../util.js';
33

44
const MESSAGE_ID = 'failing-test-url';
55

6-
const urlPattern = /https?:\/\/\S+/;
6+
const urlPattern = /https?:\/\/\S+/v;
77

88
const create = context => {
99
const ava = createAvaRule(context.sourceCode);

rules/no-commented-tests.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import util from '../util.js';
33

44
const MESSAGE_ID = 'no-commented-tests';
55

6-
const commentedTestPattern = /^\s*\*?\s*(?:test|serial)\s*(?:\.\s*\w+\s*)*\(/;
6+
const commentedTestPattern = /^\s*\*?\s*(?:test|serial)\s*(?:\.\s*\w+\s*)*\(/v;
77

88
const create = context => {
99
const ava = createAvaRule(context.sourceCode);

rules/no-duplicate-modifiers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const create = context => {
1717
return;
1818
}
1919

20-
const testModifiers = util.getTestModifiers(node).sort(sortByName);
20+
const testModifiers = util.getTestModifiers(node).toSorted(sortByName);
2121

2222
if (testModifiers.length === 0) {
2323
return;

rules/no-import-test-files.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const create = context => {
4343
if (fs.statSync(resolvedPath).isDirectory()) {
4444
resolvedPath = path.join(resolvedPath, 'index');
4545
}
46-
} catch {}
46+
} catch {} // eslint-disable-line @stylistic/curly-newline
4747

4848
const {isTest} = avaHelper.classifyImport(resolvedPath);
4949
if (isTest) {

rules/no-invalid-modifier-chain.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ function getFixedChain(modifierNames) {
8080

8181
// Deduplicate and sort by canonical order
8282
const fixedChain = [...new Set(modifierNames)]
83-
.sort((a, b) => modifierOrder.get(a) - modifierOrder.get(b))
83+
.toSorted((a, b) => modifierOrder.get(a) - modifierOrder.get(b))
8484
.join('.');
8585

8686
return validChains.has(fixedChain) ? fixedChain : undefined;
@@ -97,7 +97,7 @@ function getSuggestions(modifierNames) {
9797
for (const removed of unique) {
9898
const remaining = unique.filter(name => name !== removed);
9999
const chain = remaining
100-
.sort((a, b) => modifierOrder.get(a) - modifierOrder.get(b))
100+
.toSorted((a, b) => modifierOrder.get(a) - modifierOrder.get(b))
101101
.join('.');
102102

103103
if (validChains.has(chain)) {

rules/test-title-format.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const create = context => {
88

99
let titleRegExp;
1010
if (context.options[0]?.format) {
11-
titleRegExp = new RegExp(context.options[0].format);
11+
titleRegExp = new RegExp(context.options[0].format, 'v');
1212
} else {
1313
return {};
1414
}

test/package.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ test.before(async () => {
1212
});
1313

1414
const testSorted = (t, actualOrder, sourceName) => {
15-
const sortedOrder = [...actualOrder].sort();
15+
const sortedOrder = actualOrder.toSorted();
1616

1717
for (const [wantedIndex, name] of sortedOrder.entries()) {
1818
const actualIndex = actualOrder.indexOf(name);

0 commit comments

Comments
 (0)