Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd90cc59

Browse files
chore: update eslint version internally to latest (typescript-eslint#10244)
Co-authored-by: Brad Zacher <brad.zacher@gmail.com>
1 parent5bd4c0a commitd90cc59

File tree

9 files changed

+278
-72
lines changed

9 files changed

+278
-72
lines changed

‎.github/renovate.json5

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
'ajv',
1212
// ESM only so we can't go higher until we natively run ESM internally.
1313
'globby',
14-
// Blocked until we enable ESLint v9 locally in our own PR (#9119).
15-
'eslint',
1614
// ESM only so we can't go higher until we natively run ESM internally.
1715
'execa',
1816
],

‎package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
"cross-fetch":"^4.0.0",
9393
"cspell":"^8.15.2",
9494
"downlevel-dts":">=0.11.0",
95-
"eslint":"^9.3.0",
95+
"eslint":"^9.13.0",
9696
"eslint-plugin-eslint-comments":"^3.2.0",
9797
"eslint-plugin-eslint-plugin":"^6.2.0",
9898
"eslint-plugin-import":"^2.29.1",
@@ -137,7 +137,6 @@
137137
"@types/estree":"link:./tools/dummypkg",
138138
"@types/node":"^20.0.0",
139139
"@types/react":"^18.2.14",
140-
"eslint":"^9",
141140
"eslint-plugin-eslint-plugin@^5.5.0":"patch:eslint-plugin-eslint-plugin@npm%3A5.5.1#./.yarn/patches/eslint-plugin-eslint-plugin-npm-5.5.1-4206c2506d.patch",
142141
"eslint-visitor-keys":"^3.4.1",
143142
"jest-config":"^29",

‎packages/eslint-plugin/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
"ajv":"^6.12.6",
8181
"cross-env":"^7.0.3",
8282
"cross-fetch":"*",
83-
"eslint":"*",
83+
"eslint":"^9.13.0",
8484
"jest":"29.7.0",
8585
"jest-specific-snapshot":"^8.0.0",
8686
"json-schema":"*",

‎packages/eslint-plugin/tests/rules/no-useless-constructor.test.ts

Lines changed: 147 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@ import rule from '../../src/rules/no-useless-constructor';
55

66
construleTester=newRuleTester();
77

8-
consterror={
9-
messageId:'noUselessConstructor'asconst,
10-
type:AST_NODE_TYPES.MethodDefinition,
11-
};
12-
138
ruleTester.run('no-useless-constructor',rule,{
149
valid:[
1510
'class A {}',
@@ -214,13 +209,30 @@ class A extends Object {
214209
`,
215210
],
216211
invalid:[
212+
/* eslint-disable @typescript-eslint/no-unnecessary-template-expression -- trailing whitespace */
213+
217214
{
218215
code:`
219216
class A {
220217
constructor() {}
221218
}
222219
`,
223-
errors:[error],
220+
errors:[
221+
{
222+
messageId:'noUselessConstructor',
223+
suggestions:[
224+
{
225+
messageId:'removeConstructor',
226+
output:`
227+
class A {
228+
${' '}
229+
}
230+
`,
231+
},
232+
],
233+
type:AST_NODE_TYPES.MethodDefinition,
234+
},
235+
],
224236
},
225237
{
226238
code:`
@@ -230,7 +242,22 @@ class A extends B {
230242
}
231243
}
232244
`,
233-
errors:[error],
245+
errors:[
246+
{
247+
messageId:'noUselessConstructor',
248+
suggestions:[
249+
{
250+
messageId:'removeConstructor',
251+
output:`
252+
class A extends B {
253+
${' '}
254+
}
255+
`,
256+
},
257+
],
258+
type:AST_NODE_TYPES.MethodDefinition,
259+
},
260+
],
234261
},
235262
{
236263
code:`
@@ -240,7 +267,22 @@ class A extends B {
240267
}
241268
}
242269
`,
243-
errors:[error],
270+
errors:[
271+
{
272+
messageId:'noUselessConstructor',
273+
suggestions:[
274+
{
275+
messageId:'removeConstructor',
276+
output:`
277+
class A extends B {
278+
${' '}
279+
}
280+
`,
281+
},
282+
],
283+
type:AST_NODE_TYPES.MethodDefinition,
284+
},
285+
],
244286
},
245287
{
246288
code:`
@@ -250,7 +292,22 @@ class A extends B {
250292
}
251293
}
252294
`,
253-
errors:[error],
295+
errors:[
296+
{
297+
messageId:'noUselessConstructor',
298+
suggestions:[
299+
{
300+
messageId:'removeConstructor',
301+
output:`
302+
class A extends B {
303+
${' '}
304+
}
305+
`,
306+
},
307+
],
308+
type:AST_NODE_TYPES.MethodDefinition,
309+
},
310+
],
254311
},
255312
{
256313
code:`
@@ -260,7 +317,22 @@ class A extends B {
260317
}
261318
}
262319
`,
263-
errors:[error],
320+
errors:[
321+
{
322+
messageId:'noUselessConstructor',
323+
suggestions:[
324+
{
325+
messageId:'removeConstructor',
326+
output:`
327+
class A extends B {
328+
${' '}
329+
}
330+
`,
331+
},
332+
],
333+
type:AST_NODE_TYPES.MethodDefinition,
334+
},
335+
],
264336
},
265337
{
266338
code:`
@@ -270,7 +342,22 @@ class A extends B.C {
270342
}
271343
}
272344
`,
273-
errors:[error],
345+
errors:[
346+
{
347+
messageId:'noUselessConstructor',
348+
suggestions:[
349+
{
350+
messageId:'removeConstructor',
351+
output:`
352+
class A extends B.C {
353+
${' '}
354+
}
355+
`,
356+
},
357+
],
358+
type:AST_NODE_TYPES.MethodDefinition,
359+
},
360+
],
274361
},
275362
{
276363
code:`
@@ -280,7 +367,22 @@ class A extends B {
280367
}
281368
}
282369
`,
283-
errors:[error],
370+
errors:[
371+
{
372+
messageId:'noUselessConstructor',
373+
suggestions:[
374+
{
375+
messageId:'removeConstructor',
376+
output:`
377+
class A extends B {
378+
${' '}
379+
}
380+
`,
381+
},
382+
],
383+
type:AST_NODE_TYPES.MethodDefinition,
384+
},
385+
],
284386
},
285387
{
286388
code:`
@@ -290,15 +392,46 @@ class A extends B {
290392
}
291393
}
292394
`,
293-
errors:[error],
395+
errors:[
396+
{
397+
messageId:'noUselessConstructor',
398+
suggestions:[
399+
{
400+
messageId:'removeConstructor',
401+
output:`
402+
class A extends B {
403+
${' '}
404+
}
405+
`,
406+
},
407+
],
408+
type:AST_NODE_TYPES.MethodDefinition,
409+
},
410+
],
294411
},
295412
{
296413
code:`
297414
class A {
298415
public constructor() {}
299416
}
300417
`,
301-
errors:[error],
418+
errors:[
419+
{
420+
messageId:'noUselessConstructor',
421+
suggestions:[
422+
{
423+
messageId:'removeConstructor',
424+
output:`
425+
class A {
426+
${' '}
427+
}
428+
`,
429+
},
430+
],
431+
type:AST_NODE_TYPES.MethodDefinition,
432+
},
433+
],
302434
},
435+
/* eslint-enable @typescript-eslint/no-unnecessary-template-expression */
303436
],
304437
});

‎packages/eslint-plugin/tests/schema-snapshots/no-restricted-imports.shot

Lines changed: 5 additions & 2 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎packages/eslint-plugin/typings/eslint-rules.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ declare module 'eslint/lib/rules/no-useless-constructor' {
404404
importtype{TSESLint,TSESTree}from'@typescript-eslint/utils';
405405

406406
construle:TSESLint.RuleModule<
407-
'noUselessConstructor',
407+
'noUselessConstructor'|'removeConstructor',
408408
[],
409409
unknown,
410410
{

‎packages/website-eslint/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"@typescript-eslint/typescript-estree":"workspace:*",
3030
"@typescript-eslint/visitor-keys":"workspace:*",
3131
"esbuild":"~0.24.0",
32-
"eslint":"*",
32+
"eslint":"^9.13.0",
3333
"esquery":"*",
3434
"prettier":"^3.2.5",
3535
"tsx":"*"

‎packages/website/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"@uiw/react-shields":"2.0.1",
2828
"clsx":"^2.1.0",
2929
"docusaurus-plugin-typedoc":"^1.0.1",
30-
"eslint":"*",
30+
"eslint":"^9.13.0",
3131
"json5":"^2.2.3",
3232
"konamimojisplosion":"^0.5.2",
3333
"lz-string":"^1.5.0",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp