chore(deps): update typescript-eslint to v8.44.1 (#17931)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: fisker <lionkay@gmail.com>
This commit is contained in:
1 parent
74744dc568
commit
808505e904
10 files changed
+686
-119
No files matched your search
+4
-4
@@ -40,8 +40,8 @@
|
||||
"@prettier/cli": "0.9.0",
|
||||
"@prettier/html-tags": "1.1.0",
|
||||
"@prettier/parse-srcset": "3.1.0",
|
||||
"@typescript-eslint/typescript-estree": "8.44.0",
|
||||
"@typescript-eslint/visitor-keys": "8.44.0",
|
||||
"@typescript-eslint/typescript-estree": "8.44.1",
|
||||
"@typescript-eslint/visitor-keys": "8.44.1",
|
||||
"acorn": "8.15.0",
|
||||
"acorn-jsx": "5.3.2",
|
||||
"angular-estree-parser": "13.0.2",
|
||||
@@ -117,8 +117,8 @@
|
||||
"@eslint/js": "9.35.0",
|
||||
"@stylistic/eslint-plugin": "5.3.1",
|
||||
"@types/estree": "1.0.8",
|
||||
"@typescript-eslint/eslint-plugin": "8.44.0",
|
||||
"@typescript-eslint/parser": "8.44.0",
|
||||
"@typescript-eslint/eslint-plugin": "8.44.1",
|
||||
"@typescript-eslint/parser": "8.44.1",
|
||||
"browserslist": "4.26.2",
|
||||
"browserslist-to-esbuild": "2.1.1",
|
||||
"buffer": "6.0.3",
|
||||
|
||||
@@ -201,7 +201,6 @@ const allowedReasonCodes = new Set([
|
||||
"OptionalBindingPattern",
|
||||
"DeclareClassFieldHasInitializer",
|
||||
"TypeImportCannotSpecifyDefaultAndNamed",
|
||||
"ConstructorClassField",
|
||||
|
||||
"VarRedeclaration",
|
||||
"InvalidPrivateFieldResolution",
|
||||
|
||||
+547
@@ -0,0 +1,547 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`snippet: #0 [acorn] format 1`] = `
|
||||
"Classes can't have a field named 'constructor' (2:3)
|
||||
1 | class Foo {
|
||||
> 2 | constructor
|
||||
| ^
|
||||
3 | }
|
||||
Cause: Classes can't have a field named 'constructor' (2:2)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [babel] format 1`] = `
|
||||
"Classes may not have a field named 'constructor'. (2:3)
|
||||
1 | class Foo {
|
||||
> 2 | constructor
|
||||
| ^
|
||||
3 | }
|
||||
Cause: Classes may not have a field named 'constructor'. (2:2)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [babel-ts] format 1`] = `
|
||||
"Classes may not have a field named 'constructor'. (2:3)
|
||||
1 | class Foo {
|
||||
> 2 | constructor
|
||||
| ^
|
||||
3 | }
|
||||
Cause: Classes may not have a field named 'constructor'. (2:2)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [babel-ts] format 2`] = `
|
||||
"Classes may not have a field named 'constructor'. (2:3)
|
||||
1 | abstract class Foo {
|
||||
> 2 | constructor
|
||||
| ^
|
||||
3 | }
|
||||
Cause: Classes may not have a field named 'constructor'. (2:2)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [espree] format 1`] = `
|
||||
"Classes can't have a field named 'constructor' (2:3)
|
||||
1 | class Foo {
|
||||
> 2 | constructor
|
||||
| ^
|
||||
3 | }
|
||||
Cause: Classes can't have a field named 'constructor'"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [flow] format 1`] = `
|
||||
"Classes may not have fields named \`constructor\`. (2:3)
|
||||
1 | class Foo {
|
||||
> 2 | constructor
|
||||
| ^^^^^^^^^^^
|
||||
3 | }"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [hermes] format 1`] = `
|
||||
"invalid class property name (2:2)
|
||||
1 | class Foo {
|
||||
> 2 | constructor
|
||||
| ^
|
||||
3 | }
|
||||
Cause: invalid class property name (2:2)
|
||||
constructor
|
||||
^~~~~~~~~~~"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [meriyah] format 1`] = `
|
||||
"Classes may not have a field called constructor (3:1)
|
||||
1 | class Foo {
|
||||
2 | constructor
|
||||
> 3 | }
|
||||
| ^
|
||||
Cause: [3:0-3:1]: Classes may not have a field called constructor"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [typescript] format 1`] = `
|
||||
"'(' expected. (3:1)
|
||||
1 | class Foo {
|
||||
2 | constructor
|
||||
> 3 | }
|
||||
| ^
|
||||
Cause: '(' expected."
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 [typescript] format 2`] = `
|
||||
"'(' expected. (3:1)
|
||||
1 | abstract class Foo {
|
||||
2 | constructor
|
||||
> 3 | }
|
||||
| ^
|
||||
Cause: '(' expected."
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [acorn] format 1`] = `
|
||||
"Classes can't have a field named 'constructor' (2:3)
|
||||
1 | class Foo {
|
||||
> 2 | 'constructor'
|
||||
| ^
|
||||
3 | }
|
||||
Cause: Classes can't have a field named 'constructor' (2:2)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [babel] format 1`] = `
|
||||
"Classes may not have a field named 'constructor'. (2:3)
|
||||
1 | class Foo {
|
||||
> 2 | 'constructor'
|
||||
| ^
|
||||
3 | }
|
||||
Cause: Classes may not have a field named 'constructor'. (2:2)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [babel-ts] format 1`] = `
|
||||
"Classes may not have a field named 'constructor'. (2:3)
|
||||
1 | class Foo {
|
||||
> 2 | 'constructor'
|
||||
| ^
|
||||
3 | }
|
||||
Cause: Classes may not have a field named 'constructor'. (2:2)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [babel-ts] format 2`] = `
|
||||
"Classes may not have a field named 'constructor'. (2:3)
|
||||
1 | abstract class Foo {
|
||||
> 2 | 'constructor'
|
||||
| ^
|
||||
3 | }
|
||||
Cause: Classes may not have a field named 'constructor'. (2:2)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [espree] format 1`] = `
|
||||
"Classes can't have a field named 'constructor' (2:3)
|
||||
1 | class Foo {
|
||||
> 2 | 'constructor'
|
||||
| ^
|
||||
3 | }
|
||||
Cause: Classes can't have a field named 'constructor'"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [flow] format 1`] = `
|
||||
"Classes may not have fields named \`constructor\`. (2:3)
|
||||
1 | class Foo {
|
||||
> 2 | 'constructor'
|
||||
| ^^^^^^^^^^^^^
|
||||
3 | }"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [hermes] format 1`] = `
|
||||
"invalid class property name (2:2)
|
||||
1 | class Foo {
|
||||
> 2 | 'constructor'
|
||||
| ^
|
||||
3 | }
|
||||
Cause: invalid class property name (2:2)
|
||||
'constructor'
|
||||
^~~~~~~~~~~~~"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [meriyah] format 1`] = `
|
||||
"Classes may not have a field called constructor (3:1)
|
||||
1 | class Foo {
|
||||
2 | 'constructor'
|
||||
> 3 | }
|
||||
| ^
|
||||
Cause: [3:0-3:1]: Classes may not have a field called constructor"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [typescript] format 1`] = `
|
||||
"Classes may not have a field named 'constructor'. (2:3)
|
||||
1 | class Foo {
|
||||
> 2 | 'constructor'
|
||||
| ^^^^^^^^^^^^^
|
||||
3 | }
|
||||
Cause: Classes may not have a field named 'constructor'."
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 [typescript] format 2`] = `
|
||||
"Classes may not have a field named 'constructor'. (2:3)
|
||||
1 | abstract class Foo {
|
||||
> 2 | 'constructor'
|
||||
| ^^^^^^^^^^^^^
|
||||
3 | }
|
||||
Cause: Classes may not have a field named 'constructor'."
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [acorn] format 1`] = `
|
||||
"Classes can't have a field named 'constructor' (2:3)
|
||||
1 | class Foo {
|
||||
> 2 | 'constructor'
|
||||
| ^
|
||||
3 | }
|
||||
Cause: Classes can't have a field named 'constructor' (2:2)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [babel] format 1`] = `
|
||||
"Classes may not have a field named 'constructor'. (2:3)
|
||||
1 | class Foo {
|
||||
> 2 | 'constructor'
|
||||
| ^
|
||||
3 | }
|
||||
Cause: Classes may not have a field named 'constructor'. (2:2)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [babel-ts] format 1`] = `
|
||||
"Classes may not have a field named 'constructor'. (2:3)
|
||||
1 | class Foo {
|
||||
> 2 | 'constructor'
|
||||
| ^
|
||||
3 | }
|
||||
Cause: Classes may not have a field named 'constructor'. (2:2)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [babel-ts] format 2`] = `
|
||||
"Classes may not have a field named 'constructor'. (2:3)
|
||||
1 | abstract class Foo {
|
||||
> 2 | 'constructor'
|
||||
| ^
|
||||
3 | }
|
||||
Cause: Classes may not have a field named 'constructor'. (2:2)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [espree] format 1`] = `
|
||||
"Classes can't have a field named 'constructor' (2:3)
|
||||
1 | class Foo {
|
||||
> 2 | 'constructor'
|
||||
| ^
|
||||
3 | }
|
||||
Cause: Classes can't have a field named 'constructor'"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [flow] format 1`] = `
|
||||
"Classes may not have fields named \`constructor\`. (2:3)
|
||||
1 | class Foo {
|
||||
> 2 | 'constructor'
|
||||
| ^^^^^^^^^^^^^
|
||||
3 | }"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [hermes] format 1`] = `
|
||||
"invalid class property name (2:2)
|
||||
1 | class Foo {
|
||||
> 2 | 'constructor'
|
||||
| ^
|
||||
3 | }
|
||||
Cause: invalid class property name (2:2)
|
||||
'constructor'
|
||||
^~~~~~~~~~~~~"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [meriyah] format 1`] = `
|
||||
"Classes may not have a field called constructor (3:1)
|
||||
1 | class Foo {
|
||||
2 | 'constructor'
|
||||
> 3 | }
|
||||
| ^
|
||||
Cause: [3:0-3:1]: Classes may not have a field called constructor"
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [typescript] format 1`] = `
|
||||
"Classes may not have a field named 'constructor'. (2:3)
|
||||
1 | class Foo {
|
||||
> 2 | 'constructor'
|
||||
| ^^^^^^^^^^^^^
|
||||
3 | }
|
||||
Cause: Classes may not have a field named 'constructor'."
|
||||
`;
|
||||
|
||||
exports[`snippet: #2 [typescript] format 2`] = `
|
||||
"Classes may not have a field named 'constructor'. (2:3)
|
||||
1 | abstract class Foo {
|
||||
> 2 | 'constructor'
|
||||
| ^^^^^^^^^^^^^
|
||||
3 | }
|
||||
Cause: Classes may not have a field named 'constructor'."
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [acorn] format 1`] = `
|
||||
"Unexpected token (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor 'constructor'
|
||||
| ^
|
||||
3 | }
|
||||
Cause: Unexpected token (2:11)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [babel] format 1`] = `
|
||||
"Classes may not have a field named 'constructor'. (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor 'constructor'
|
||||
| ^
|
||||
3 | }
|
||||
Cause: Classes may not have a field named 'constructor'. (2:11)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [babel-ts] format 1`] = `
|
||||
"Classes may not have a field named 'constructor'. (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor 'constructor'
|
||||
| ^
|
||||
3 | }
|
||||
Cause: Classes may not have a field named 'constructor'. (2:11)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [babel-ts] format 2`] = `
|
||||
"Classes may not have a field named 'constructor'. (2:12)
|
||||
1 | abstract class Foo {
|
||||
> 2 | accessor 'constructor'
|
||||
| ^
|
||||
3 | }
|
||||
Cause: Classes may not have a field named 'constructor'. (2:11)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [espree] format 1`] = `
|
||||
"Unexpected token 'constructor' (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor 'constructor'
|
||||
| ^
|
||||
3 | }
|
||||
Cause: Unexpected token 'constructor'"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [flow] format 1`] = `
|
||||
"Unexpected string, expected the token \`(\` (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor 'constructor'
|
||||
| ^^^^^^^^^^^^^
|
||||
3 | }"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [hermes] format 1`] = `
|
||||
"';' expected after class property (2:11)
|
||||
1 | class Foo {
|
||||
> 2 | accessor 'constructor'
|
||||
| ^
|
||||
3 | }
|
||||
Cause: ';' expected after class property (2:11)
|
||||
accessor 'constructor'
|
||||
~~~~~~~~~^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [meriyah] format 1`] = `
|
||||
"Classes may not have a field called constructor (3:1)
|
||||
1 | class Foo {
|
||||
2 | accessor 'constructor'
|
||||
> 3 | }
|
||||
| ^
|
||||
Cause: [3:0-3:1]: Classes may not have a field called constructor"
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [typescript] format 1`] = `
|
||||
"Classes may not have a field named 'constructor'. (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor 'constructor'
|
||||
| ^^^^^^^^^^^^^
|
||||
3 | }
|
||||
Cause: Classes may not have a field named 'constructor'."
|
||||
`;
|
||||
|
||||
exports[`snippet: #3 [typescript] format 2`] = `
|
||||
"Classes may not have a field named 'constructor'. (2:12)
|
||||
1 | abstract class Foo {
|
||||
> 2 | accessor 'constructor'
|
||||
| ^^^^^^^^^^^^^
|
||||
3 | }
|
||||
Cause: Classes may not have a field named 'constructor'."
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [acorn] format 1`] = `
|
||||
"Unexpected token (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor 'constructor'
|
||||
| ^
|
||||
3 | }
|
||||
Cause: Unexpected token (2:11)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [babel] format 1`] = `
|
||||
"Classes may not have a field named 'constructor'. (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor 'constructor'
|
||||
| ^
|
||||
3 | }
|
||||
Cause: Classes may not have a field named 'constructor'. (2:11)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [babel-ts] format 1`] = `
|
||||
"Classes may not have a field named 'constructor'. (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor 'constructor'
|
||||
| ^
|
||||
3 | }
|
||||
Cause: Classes may not have a field named 'constructor'. (2:11)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [babel-ts] format 2`] = `
|
||||
"Classes may not have a field named 'constructor'. (2:12)
|
||||
1 | abstract class Foo {
|
||||
> 2 | accessor 'constructor'
|
||||
| ^
|
||||
3 | }
|
||||
Cause: Classes may not have a field named 'constructor'. (2:11)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [espree] format 1`] = `
|
||||
"Unexpected token 'constructor' (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor 'constructor'
|
||||
| ^
|
||||
3 | }
|
||||
Cause: Unexpected token 'constructor'"
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [flow] format 1`] = `
|
||||
"Unexpected string, expected the token \`(\` (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor 'constructor'
|
||||
| ^^^^^^^^^^^^^
|
||||
3 | }"
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [hermes] format 1`] = `
|
||||
"';' expected after class property (2:11)
|
||||
1 | class Foo {
|
||||
> 2 | accessor 'constructor'
|
||||
| ^
|
||||
3 | }
|
||||
Cause: ';' expected after class property (2:11)
|
||||
accessor 'constructor'
|
||||
~~~~~~~~~^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [meriyah] format 1`] = `
|
||||
"Classes may not have a field called constructor (3:1)
|
||||
1 | class Foo {
|
||||
2 | accessor 'constructor'
|
||||
> 3 | }
|
||||
| ^
|
||||
Cause: [3:0-3:1]: Classes may not have a field called constructor"
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [typescript] format 1`] = `
|
||||
"Classes may not have a field named 'constructor'. (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor 'constructor'
|
||||
| ^^^^^^^^^^^^^
|
||||
3 | }
|
||||
Cause: Classes may not have a field named 'constructor'."
|
||||
`;
|
||||
|
||||
exports[`snippet: #4 [typescript] format 2`] = `
|
||||
"Classes may not have a field named 'constructor'. (2:12)
|
||||
1 | abstract class Foo {
|
||||
> 2 | accessor 'constructor'
|
||||
| ^^^^^^^^^^^^^
|
||||
3 | }
|
||||
Cause: Classes may not have a field named 'constructor'."
|
||||
`;
|
||||
|
||||
exports[`snippet: #5 [acorn] format 1`] = `
|
||||
"Unexpected token (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor constructor
|
||||
| ^
|
||||
3 | }
|
||||
Cause: Unexpected token (2:11)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #5 [babel] format 1`] = `
|
||||
"Classes may not have a field named 'constructor'. (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor constructor
|
||||
| ^
|
||||
3 | }
|
||||
Cause: Classes may not have a field named 'constructor'. (2:11)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #5 [babel-ts] format 1`] = `
|
||||
"Classes may not have a field named 'constructor'. (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor constructor
|
||||
| ^
|
||||
3 | }
|
||||
Cause: Classes may not have a field named 'constructor'. (2:11)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #5 [babel-ts] format 2`] = `
|
||||
"Classes may not have a field named 'constructor'. (2:12)
|
||||
1 | abstract class Foo {
|
||||
> 2 | accessor constructor
|
||||
| ^
|
||||
3 | }
|
||||
Cause: Classes may not have a field named 'constructor'. (2:11)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #5 [espree] format 1`] = `
|
||||
"Unexpected token constructor (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor constructor
|
||||
| ^
|
||||
3 | }
|
||||
Cause: Unexpected token constructor"
|
||||
`;
|
||||
|
||||
exports[`snippet: #5 [flow] format 1`] = `
|
||||
"Unexpected identifier, expected the token \`(\` (2:12)
|
||||
1 | class Foo {
|
||||
> 2 | accessor constructor
|
||||
| ^^^^^^^^^^^
|
||||
3 | }"
|
||||
`;
|
||||
|
||||
exports[`snippet: #5 [hermes] format 1`] = `
|
||||
"';' expected after class property (2:11)
|
||||
1 | class Foo {
|
||||
> 2 | accessor constructor
|
||||
| ^
|
||||
3 | }
|
||||
Cause: ';' expected after class property (2:11)
|
||||
accessor constructor
|
||||
~~~~~~~~~^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #5 [meriyah] format 1`] = `
|
||||
"Classes may not have a field called constructor (3:1)
|
||||
1 | class Foo {
|
||||
2 | accessor constructor
|
||||
> 3 | }
|
||||
| ^
|
||||
Cause: [3:0-3:1]: Classes may not have a field called constructor"
|
||||
`;
|
||||
|
||||
exports[`snippet: #5 [typescript] format 1`] = `
|
||||
"'(' expected. (3:1)
|
||||
1 | class Foo {
|
||||
2 | accessor constructor
|
||||
> 3 | }
|
||||
| ^
|
||||
Cause: '(' expected."
|
||||
`;
|
||||
|
||||
exports[`snippet: #5 [typescript] format 2`] = `
|
||||
"'(' expected. (3:1)
|
||||
1 | abstract class Foo {
|
||||
2 | accessor constructor
|
||||
> 3 | }
|
||||
| ^
|
||||
Cause: '(' expected."
|
||||
`;
|
||||
@@ -0,0 +1,66 @@
|
||||
import { outdent } from "outdent";
|
||||
|
||||
const cases = [
|
||||
outdent`
|
||||
class Foo {
|
||||
constructor
|
||||
}
|
||||
`,
|
||||
outdent`
|
||||
class Foo {
|
||||
'construct\u{6f}r'
|
||||
}
|
||||
`,
|
||||
outdent`
|
||||
class Foo {
|
||||
'constructor'
|
||||
}
|
||||
`,
|
||||
outdent`
|
||||
class Foo {
|
||||
accessor 'construct\u{6f}r'
|
||||
}
|
||||
`,
|
||||
outdent`
|
||||
class Foo {
|
||||
accessor 'constructor'
|
||||
}
|
||||
`,
|
||||
outdent`
|
||||
class Foo {
|
||||
accessor constructor
|
||||
}
|
||||
`,
|
||||
];
|
||||
|
||||
runFormatTest(
|
||||
{
|
||||
importMeta: import.meta,
|
||||
snippets: cases,
|
||||
},
|
||||
[
|
||||
"babel",
|
||||
"acorn",
|
||||
"espree",
|
||||
"meriyah",
|
||||
"typescript",
|
||||
"babel-ts",
|
||||
// https://github.com/oxc-project/oxc/issues/14014
|
||||
// "oxc",
|
||||
// "oxc-ts",
|
||||
"flow",
|
||||
"hermes",
|
||||
],
|
||||
);
|
||||
|
||||
runFormatTest(
|
||||
{
|
||||
importMeta: import.meta,
|
||||
snippets: cases.map((code) => `abstract ${code}`),
|
||||
},
|
||||
[
|
||||
"typescript",
|
||||
"babel-ts",
|
||||
// "oxc-ts",
|
||||
],
|
||||
);
|
||||
@@ -31,26 +31,6 @@ class Component extends React.Component<Props, State> {}
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`constructor-field-override.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel-flow"]
|
||||
printWidth: 80
|
||||
| printWidth
|
||||
=====================================input======================================
|
||||
// https://github.com/prettier/prettier/issues/1481
|
||||
class Foo {
|
||||
constructor: () => this;
|
||||
}
|
||||
|
||||
=====================================output=====================================
|
||||
// https://github.com/prettier/prettier/issues/1481
|
||||
class Foo {
|
||||
constructor: () => this;
|
||||
}
|
||||
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`functions.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel-flow"]
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
// https://github.com/prettier/prettier/issues/1481
|
||||
class Foo {
|
||||
constructor: () => this;
|
||||
}
|
||||
@@ -34,17 +34,6 @@ abstract class Bar {
|
||||
================================================================================
|
||||
`;
|
||||
|
||||
exports[`constructor.ts [oxc-ts] format 1`] = `
|
||||
"Classes can't have a field named 'constructor' (8:5)
|
||||
6 |
|
||||
7 | class A {
|
||||
> 8 | 'constructor': typeof A
|
||||
| ^^^^^^^^^^^^^
|
||||
9 | static Foo() {
|
||||
10 | return new A()
|
||||
11 | }"
|
||||
`;
|
||||
|
||||
exports[`constructor.ts format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["typescript"]
|
||||
@@ -58,7 +47,6 @@ class F {constructor(public a: number) {}}
|
||||
class G {constructor(readonly a: number) {}}
|
||||
|
||||
class A {
|
||||
'constructor': typeof A
|
||||
static Foo() {
|
||||
return new A()
|
||||
}
|
||||
@@ -83,7 +71,6 @@ class G {
|
||||
}
|
||||
|
||||
class A {
|
||||
"constructor": typeof A;
|
||||
static Foo() {
|
||||
return new A();
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ class F {constructor(public a: number) {}}
|
||||
class G {constructor(readonly a: number) {}}
|
||||
|
||||
class A {
|
||||
'constructor': typeof A
|
||||
static Foo() {
|
||||
return new A()
|
||||
}
|
||||
|
||||
@@ -1,8 +1 @@
|
||||
runFormatTest(import.meta, ["typescript"], {
|
||||
errors: {
|
||||
"oxc-ts": [
|
||||
// TODO: Ask typescript-eslint to throw
|
||||
"constructor.ts",
|
||||
],
|
||||
},
|
||||
});
|
||||
runFormatTest(import.meta, ["typescript"]);
|
||||
@@ -2502,106 +2502,106 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@typescript-eslint/eslint-plugin@npm:8.44.0":
|
||||
version: 8.44.0
|
||||
resolution: "@typescript-eslint/eslint-plugin@npm:8.44.0"
|
||||
"@typescript-eslint/eslint-plugin@npm:8.44.1":
|
||||
version: 8.44.1
|
||||
resolution: "@typescript-eslint/eslint-plugin@npm:8.44.1"
|
||||
dependencies:
|
||||
"@eslint-community/regexpp": "npm:^4.10.0"
|
||||
"@typescript-eslint/scope-manager": "npm:8.44.0"
|
||||
"@typescript-eslint/type-utils": "npm:8.44.0"
|
||||
"@typescript-eslint/utils": "npm:8.44.0"
|
||||
"@typescript-eslint/visitor-keys": "npm:8.44.0"
|
||||
"@typescript-eslint/scope-manager": "npm:8.44.1"
|
||||
"@typescript-eslint/type-utils": "npm:8.44.1"
|
||||
"@typescript-eslint/utils": "npm:8.44.1"
|
||||
"@typescript-eslint/visitor-keys": "npm:8.44.1"
|
||||
graphemer: "npm:^1.4.0"
|
||||
ignore: "npm:^7.0.0"
|
||||
natural-compare: "npm:^1.4.0"
|
||||
ts-api-utils: "npm:^2.1.0"
|
||||
peerDependencies:
|
||||
"@typescript-eslint/parser": ^8.44.0
|
||||
"@typescript-eslint/parser": ^8.44.1
|
||||
eslint: ^8.57.0 || ^9.0.0
|
||||
typescript: ">=4.8.4 <6.0.0"
|
||||
checksum: 10/38d0491d96740d1c9f412b0ee1a8a24ed132433347e52810b030e331b27a846b2c70a8424b5684e7ccd7a7ed231e336dd40a0642f5014409ed28e84561fd0757
|
||||
checksum: 10/e0f69d1d24bbf63c3f2937f85b49994eae907656b01bc9d3563f096750add1085c4b15953b82b750b0da2b8444850558a8bf0d5bcfb8f0410dfd628f4245dc11
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@typescript-eslint/parser@npm:8.44.0":
|
||||
version: 8.44.0
|
||||
resolution: "@typescript-eslint/parser@npm:8.44.0"
|
||||
"@typescript-eslint/parser@npm:8.44.1":
|
||||
version: 8.44.1
|
||||
resolution: "@typescript-eslint/parser@npm:8.44.1"
|
||||
dependencies:
|
||||
"@typescript-eslint/scope-manager": "npm:8.44.0"
|
||||
"@typescript-eslint/types": "npm:8.44.0"
|
||||
"@typescript-eslint/typescript-estree": "npm:8.44.0"
|
||||
"@typescript-eslint/visitor-keys": "npm:8.44.0"
|
||||
"@typescript-eslint/scope-manager": "npm:8.44.1"
|
||||
"@typescript-eslint/types": "npm:8.44.1"
|
||||
"@typescript-eslint/typescript-estree": "npm:8.44.1"
|
||||
"@typescript-eslint/visitor-keys": "npm:8.44.1"
|
||||
debug: "npm:^4.3.4"
|
||||
peerDependencies:
|
||||
eslint: ^8.57.0 || ^9.0.0
|
||||
typescript: ">=4.8.4 <6.0.0"
|
||||
checksum: 10/8c7ddabf46a94877e3af9b029c5e65cc99ec2983ee14842eea7e8ebccc0e24f589cdf7d2ca63ece87284ea7a4d9d622a22452ac5c66cb6ebda1b91b438e20979
|
||||
checksum: 10/ff5048c36d9fde27a03f64f3c4ad4739370fde1d744fa7bd1e08280601bd9adfe64c740789fd2adede54dd212a005c59bf1c06c68d05f57b7028332838ed28f8
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@typescript-eslint/project-service@npm:8.44.0":
|
||||
version: 8.44.0
|
||||
resolution: "@typescript-eslint/project-service@npm:8.44.0"
|
||||
"@typescript-eslint/project-service@npm:8.44.1":
|
||||
version: 8.44.1
|
||||
resolution: "@typescript-eslint/project-service@npm:8.44.1"
|
||||
dependencies:
|
||||
"@typescript-eslint/tsconfig-utils": "npm:^8.44.0"
|
||||
"@typescript-eslint/types": "npm:^8.44.0"
|
||||
"@typescript-eslint/tsconfig-utils": "npm:^8.44.1"
|
||||
"@typescript-eslint/types": "npm:^8.44.1"
|
||||
debug: "npm:^4.3.4"
|
||||
peerDependencies:
|
||||
typescript: ">=4.8.4 <6.0.0"
|
||||
checksum: 10/400b4981e6f6bd323592df7803383c0f223256f76b4876c03c2e8fa5e9470ce90a6a39555f759a391ba87bbf79add800eadf42ba06acf0732407a225790722de
|
||||
checksum: 10/4b74d9d1c113b2637b6d65c790bfd2fa15ab1061fe77e68519c3b1939f4b0ee9e15d621ffc946ae2ef457289e830ddea879553868d5c7ff1af4904d7842792e0
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@typescript-eslint/scope-manager@npm:8.44.0, @typescript-eslint/scope-manager@npm:^8.43.0":
|
||||
version: 8.44.0
|
||||
resolution: "@typescript-eslint/scope-manager@npm:8.44.0"
|
||||
"@typescript-eslint/scope-manager@npm:8.44.1, @typescript-eslint/scope-manager@npm:^8.43.0":
|
||||
version: 8.44.1
|
||||
resolution: "@typescript-eslint/scope-manager@npm:8.44.1"
|
||||
dependencies:
|
||||
"@typescript-eslint/types": "npm:8.44.0"
|
||||
"@typescript-eslint/visitor-keys": "npm:8.44.0"
|
||||
checksum: 10/5dae4a838637df522f0f71d2df238b5fd5045a374cd036e7485d39fc1b20dd1151185463c8fc35441b12c747b795c88b429a5e229fc9449ae7b15d6e7e1b6caf
|
||||
"@typescript-eslint/types": "npm:8.44.1"
|
||||
"@typescript-eslint/visitor-keys": "npm:8.44.1"
|
||||
checksum: 10/f731becce1f79b3add939417e31c7ae38c9150d73de5dec4141376cc64e1bb69f8d6b9f2072f8f442995a1e30eab57fd73c1a4b87220e19abb0f210e2c123096
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@typescript-eslint/tsconfig-utils@npm:8.44.0, @typescript-eslint/tsconfig-utils@npm:^8.44.0":
|
||||
version: 8.44.0
|
||||
resolution: "@typescript-eslint/tsconfig-utils@npm:8.44.0"
|
||||
"@typescript-eslint/tsconfig-utils@npm:8.44.1, @typescript-eslint/tsconfig-utils@npm:^8.44.1":
|
||||
version: 8.44.1
|
||||
resolution: "@typescript-eslint/tsconfig-utils@npm:8.44.1"
|
||||
peerDependencies:
|
||||
typescript: ">=4.8.4 <6.0.0"
|
||||
checksum: 10/c8535d481d7cda5c846d5b74b7cde7a98b636a558b45510820840dcb9928575c4f3d26b3c021fd7e47b782c6d9a73e9a8adf29191548406ac4b02e1a1dce928f
|
||||
checksum: 10/942d4bb9ec3d0f1f6c7fe0dc0fef2ae83a12b43ff3537fbd74007d0c9b80f166db2e5fa2f422f0b10ade348e330204dc70fc50e235ee66dc13ba488ac1490778
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@typescript-eslint/type-utils@npm:8.44.0, @typescript-eslint/type-utils@npm:^8.0.0, @typescript-eslint/type-utils@npm:^8.43.0":
|
||||
version: 8.44.0
|
||||
resolution: "@typescript-eslint/type-utils@npm:8.44.0"
|
||||
"@typescript-eslint/type-utils@npm:8.44.1, @typescript-eslint/type-utils@npm:^8.0.0, @typescript-eslint/type-utils@npm:^8.43.0":
|
||||
version: 8.44.1
|
||||
resolution: "@typescript-eslint/type-utils@npm:8.44.1"
|
||||
dependencies:
|
||||
"@typescript-eslint/types": "npm:8.44.0"
|
||||
"@typescript-eslint/typescript-estree": "npm:8.44.0"
|
||||
"@typescript-eslint/utils": "npm:8.44.0"
|
||||
"@typescript-eslint/types": "npm:8.44.1"
|
||||
"@typescript-eslint/typescript-estree": "npm:8.44.1"
|
||||
"@typescript-eslint/utils": "npm:8.44.1"
|
||||
debug: "npm:^4.3.4"
|
||||
ts-api-utils: "npm:^2.1.0"
|
||||
peerDependencies:
|
||||
eslint: ^8.57.0 || ^9.0.0
|
||||
typescript: ">=4.8.4 <6.0.0"
|
||||
checksum: 10/513c6d371922c60522a44a659ca99d3c9978b61781a27831fb60f522190c387f2c48f4759614483fb904953a0c1391fd0a9e2027e30ab1eebfea49f404f1a560
|
||||
checksum: 10/696747b2a048c281d8cfe74b3f61b7af2e7fa371e9afa58de6d6b49ad7cfa2577d52ddd66fe8b243d2d039b489b6db07bf18a746b14004456c8405842276aa92
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@typescript-eslint/types@npm:8.44.0, @typescript-eslint/types@npm:^8.41.0, @typescript-eslint/types@npm:^8.43.0, @typescript-eslint/types@npm:^8.44.0":
|
||||
version: 8.44.0
|
||||
resolution: "@typescript-eslint/types@npm:8.44.0"
|
||||
checksum: 10/9e28c95feb0d3b9ae83117a8b3db43db4e9a5d2fcbf8fd0c6e231e0ae604fe894b6725642fe3234733e81e32bec6f03b270d8a27d4258c0ee0b44a8bd8685756
|
||||
"@typescript-eslint/types@npm:8.44.1, @typescript-eslint/types@npm:^8.41.0, @typescript-eslint/types@npm:^8.43.0, @typescript-eslint/types@npm:^8.44.1":
|
||||
version: 8.44.1
|
||||
resolution: "@typescript-eslint/types@npm:8.44.1"
|
||||
checksum: 10/acebff929b2c64254c430fff54d8d135c9f47bcc20062fd3e52f64952b0ef973db9582812025f5314940889ae4c4a8798726a477b94fbda31881109687567528
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@typescript-eslint/typescript-estree@npm:8.44.0, @typescript-eslint/typescript-estree@npm:^8.43.0":
|
||||
version: 8.44.0
|
||||
resolution: "@typescript-eslint/typescript-estree@npm:8.44.0"
|
||||
"@typescript-eslint/typescript-estree@npm:8.44.1, @typescript-eslint/typescript-estree@npm:^8.43.0":
|
||||
version: 8.44.1
|
||||
resolution: "@typescript-eslint/typescript-estree@npm:8.44.1"
|
||||
dependencies:
|
||||
"@typescript-eslint/project-service": "npm:8.44.0"
|
||||
"@typescript-eslint/tsconfig-utils": "npm:8.44.0"
|
||||
"@typescript-eslint/types": "npm:8.44.0"
|
||||
"@typescript-eslint/visitor-keys": "npm:8.44.0"
|
||||
"@typescript-eslint/project-service": "npm:8.44.1"
|
||||
"@typescript-eslint/tsconfig-utils": "npm:8.44.1"
|
||||
"@typescript-eslint/types": "npm:8.44.1"
|
||||
"@typescript-eslint/visitor-keys": "npm:8.44.1"
|
||||
debug: "npm:^4.3.4"
|
||||
fast-glob: "npm:^3.3.2"
|
||||
is-glob: "npm:^4.0.3"
|
||||
@@ -2610,32 +2610,32 @@ __metadata:
|
||||
ts-api-utils: "npm:^2.1.0"
|
||||
peerDependencies:
|
||||
typescript: ">=4.8.4 <6.0.0"
|
||||
checksum: 10/e2e579b15c49e0ef6d2da9d06105ff2c995c785b1bb6cc0a11aa124c1bcc6435ee8897a9d9d6346951a8cc329b8af6410bc982dc5e55272b9af650b11daa536a
|
||||
checksum: 10/b7b4d177e9339c978a090f1ec23c3f58316845b1cfc4f80a59f481d748b19078ab2cf4fe2d3aa063ad3dc556ea678289e2a9f61e12d7beaeb2bb681599b7481b
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@typescript-eslint/utils@npm:8.44.0, @typescript-eslint/utils@npm:^8.0.0, @typescript-eslint/utils@npm:^8.43.0":
|
||||
version: 8.44.0
|
||||
resolution: "@typescript-eslint/utils@npm:8.44.0"
|
||||
"@typescript-eslint/utils@npm:8.44.1, @typescript-eslint/utils@npm:^8.0.0, @typescript-eslint/utils@npm:^8.43.0":
|
||||
version: 8.44.1
|
||||
resolution: "@typescript-eslint/utils@npm:8.44.1"
|
||||
dependencies:
|
||||
"@eslint-community/eslint-utils": "npm:^4.7.0"
|
||||
"@typescript-eslint/scope-manager": "npm:8.44.0"
|
||||
"@typescript-eslint/types": "npm:8.44.0"
|
||||
"@typescript-eslint/typescript-estree": "npm:8.44.0"
|
||||
"@typescript-eslint/scope-manager": "npm:8.44.1"
|
||||
"@typescript-eslint/types": "npm:8.44.1"
|
||||
"@typescript-eslint/typescript-estree": "npm:8.44.1"
|
||||
peerDependencies:
|
||||
eslint: ^8.57.0 || ^9.0.0
|
||||
typescript: ">=4.8.4 <6.0.0"
|
||||
checksum: 10/436e21e3d01e2f6f70fea1d3175de6836f72aa52220c6482c871e5b72f845215db46a8e58e5ab83a197326559d075afb61bedabacbdaa96a243a18f43ac5d6cb
|
||||
checksum: 10/d7757d400a14bd69272da5e32dc61893ec958a9776b2436e2980d7e638164c88edb4b56c5faff6cf8ea61b1fd8a3f6c78ad4f7fc5c4e7d217d960e08039f7c40
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@typescript-eslint/visitor-keys@npm:8.44.0":
|
||||
version: 8.44.0
|
||||
resolution: "@typescript-eslint/visitor-keys@npm:8.44.0"
|
||||
"@typescript-eslint/visitor-keys@npm:8.44.1":
|
||||
version: 8.44.1
|
||||
resolution: "@typescript-eslint/visitor-keys@npm:8.44.1"
|
||||
dependencies:
|
||||
"@typescript-eslint/types": "npm:8.44.0"
|
||||
"@typescript-eslint/types": "npm:8.44.1"
|
||||
eslint-visitor-keys: "npm:^4.2.1"
|
||||
checksum: 10/09b008b14f46ea14bb5076632745dd527982f231830141a3c789ed0cd3d7bced7340a0ccfb40c640b765de42c267202db83072587144791df4806bd68233596c
|
||||
checksum: 10/040f57906265d9ba5ec2230e728eea87bf6af9e0d345017de9e5b05211469457d838435f8b776354b403dad7b2c4527b68863c4ab6750f2668731dd2a3b8f9e8
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -7540,10 +7540,10 @@ __metadata:
|
||||
"@prettier/parse-srcset": "npm:3.1.0"
|
||||
"@stylistic/eslint-plugin": "npm:5.3.1"
|
||||
"@types/estree": "npm:1.0.8"
|
||||
"@typescript-eslint/eslint-plugin": "npm:8.44.0"
|
||||
"@typescript-eslint/parser": "npm:8.44.0"
|
||||
"@typescript-eslint/typescript-estree": "npm:8.44.0"
|
||||
"@typescript-eslint/visitor-keys": "npm:8.44.0"
|
||||
"@typescript-eslint/eslint-plugin": "npm:8.44.1"
|
||||
"@typescript-eslint/parser": "npm:8.44.1"
|
||||
"@typescript-eslint/typescript-estree": "npm:8.44.1"
|
||||
"@typescript-eslint/visitor-keys": "npm:8.44.1"
|
||||
acorn: "npm:8.15.0"
|
||||
acorn-jsx: "npm:5.3.2"
|
||||
angular-estree-parser: "npm:13.0.2"
|
||||
|
||||
Reference in new issue
Block a user