Update typescript-eslint to v8.65.0 (#19675)
Co-authored-by: fisker <lionkay@gmail.com> # Conflicts: # tests/format/js/deferred-import-evaluation/__snapshots__/format.test.js.snap # tests/format/js/deferred-import-evaluation/format.test.js
This commit is contained in:
1 parent
73d2efc2c6
commit
ec3f1c7bd7
10 files changed
+535
-196
No files matched your search
+4
-4
@@ -53,8 +53,8 @@
|
||||
"@prettier/html-event-attributes": "0.0.2",
|
||||
"@prettier/html-tags": "2.2.0",
|
||||
"@prettier/parse-srcset": "3.1.0",
|
||||
"@typescript-eslint/typescript-estree": "8.64.0",
|
||||
"@typescript-eslint/visitor-keys": "8.64.0",
|
||||
"@typescript-eslint/typescript-estree": "8.65.0",
|
||||
"@typescript-eslint/visitor-keys": "8.65.0",
|
||||
"acorn": "8.17.0",
|
||||
"acorn-jsx": "5.3.2",
|
||||
"angular-estree-parser": "15.5.0",
|
||||
@@ -139,8 +139,8 @@
|
||||
"@eslint/js": "10.0.1",
|
||||
"@stylistic/eslint-plugin": "5.10.0",
|
||||
"@types/jsesc": "3.0.3",
|
||||
"@typescript-eslint/eslint-plugin": "8.64.0",
|
||||
"@typescript-eslint/parser": "8.64.0",
|
||||
"@typescript-eslint/eslint-plugin": "8.65.0",
|
||||
"@typescript-eslint/parser": "8.65.0",
|
||||
"@yuku-parser/wasm": "0.7.0",
|
||||
"base64-arraybuffer-es6": "3.1.0",
|
||||
"browserslist": "4.28.6",
|
||||
|
||||
@@ -385,7 +385,7 @@ const pluginFiles = [
|
||||
},
|
||||
{
|
||||
file: "@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.js",
|
||||
text: "export const warnAboutTSVersion = () => {};",
|
||||
text: "export const handleUnsupportedTSVersion = () => {};",
|
||||
},
|
||||
{
|
||||
file: "@typescript-eslint/typescript-estree/dist/version-check.js",
|
||||
|
||||
@@ -26,6 +26,7 @@ const baseParseOptions = {
|
||||
project: false,
|
||||
jsDocParsingMode: "none",
|
||||
suppressDeprecatedPropertyWarnings: process.env.NODE_ENV === "production",
|
||||
onUnsupportedTypeScriptVersion: "ignore",
|
||||
};
|
||||
|
||||
function createParseError(error) {
|
||||
|
||||
+353
@@ -0,0 +1,353 @@
|
||||
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||
|
||||
exports[`no-default.js format[acorn] 1`] = `
|
||||
"Unexpected token (1:14)
|
||||
> 1 | import defer x from "x";
|
||||
| ^
|
||||
2 |
|
||||
Cause: Unexpected token (1:13)"
|
||||
`;
|
||||
|
||||
exports[`no-default.js format[babel] 1`] = `
|
||||
"Only \`import defer * as x from "./module"\` is valid. (1:14)
|
||||
> 1 | import defer x from "x";
|
||||
| ^
|
||||
2 |
|
||||
Cause: Only \`import defer * as x from "./module"\` is valid. (1:13)"
|
||||
`;
|
||||
|
||||
exports[`no-default.js format[babel-ts] 1`] = `
|
||||
"Only \`import defer * as x from "./module"\` is valid. (1:14)
|
||||
> 1 | import defer x from "x";
|
||||
| ^
|
||||
2 |
|
||||
Cause: Only \`import defer * as x from "./module"\` is valid. (1:13)"
|
||||
`;
|
||||
|
||||
exports[`no-default.js format[espree] 1`] = `
|
||||
"Unexpected token x (1:14)
|
||||
> 1 | import defer x from "x";
|
||||
| ^
|
||||
2 |
|
||||
Cause: Unexpected token x"
|
||||
`;
|
||||
|
||||
exports[`no-default.js format[flow] 1`] = `
|
||||
"Unexpected identifier, expected the keyword \`from\` (1:14)
|
||||
> 1 | import defer x from "x";
|
||||
| ^
|
||||
2 |
|
||||
Cause: Unexpected identifier, expected the keyword \`from\` (1:13)"
|
||||
`;
|
||||
|
||||
exports[`no-default.js format[hermes] 1`] = `
|
||||
"'from' expected (1:14)
|
||||
> 1 | import defer x from "x";
|
||||
| ^
|
||||
2 |
|
||||
Cause: 'from' expected (1:13)
|
||||
import defer x from "x";
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`no-default.js format[meriyah] 1`] = `
|
||||
"Expected 'from' (1:14)
|
||||
> 1 | import defer x from "x";
|
||||
| ^
|
||||
2 |
|
||||
Cause: [1:13-1:14]: Expected 'from'"
|
||||
`;
|
||||
|
||||
exports[`no-default.js format[oxc] 1`] = `
|
||||
"Default imports are not allowed in a deferred import. (1:8)
|
||||
> 1 | import defer x from "x";
|
||||
| ^^^^^
|
||||
2 |"
|
||||
`;
|
||||
|
||||
exports[`no-default.js format[oxc-ts] 1`] = `
|
||||
"Default imports are not allowed in a deferred import. (1:8)
|
||||
> 1 | import defer x from "x";
|
||||
| ^^^^^
|
||||
2 |"
|
||||
`;
|
||||
|
||||
exports[`no-default.js format[typescript] 1`] = `
|
||||
"Default imports are not allowed in a deferred import. (1:8)
|
||||
> 1 | import defer x from "x";
|
||||
| ^^^^^^^
|
||||
2 |
|
||||
Cause: Default imports are not allowed in a deferred import."
|
||||
`;
|
||||
|
||||
exports[`no-default.js format[yuku] 1`] = `
|
||||
"'import defer' only supports a namespace import (1:8)
|
||||
> 1 | import defer x from "x";
|
||||
| ^^^^^
|
||||
2 |"
|
||||
`;
|
||||
|
||||
exports[`no-default.js format[yuku-ts] 1`] = `
|
||||
"'import defer' only supports a namespace import (1:8)
|
||||
> 1 | import defer x from "x";
|
||||
| ^^^^^
|
||||
2 |"
|
||||
`;
|
||||
|
||||
exports[`no-named.js format[acorn] 1`] = `
|
||||
"Unexpected token (1:14)
|
||||
> 1 | import defer { x } from "x";
|
||||
| ^
|
||||
2 |
|
||||
Cause: Unexpected token (1:13)"
|
||||
`;
|
||||
|
||||
exports[`no-named.js format[babel] 1`] = `
|
||||
"Only \`import defer * as x from "./module"\` is valid. (1:16)
|
||||
> 1 | import defer { x } from "x";
|
||||
| ^
|
||||
2 |
|
||||
Cause: Only \`import defer * as x from "./module"\` is valid. (1:15)"
|
||||
`;
|
||||
|
||||
exports[`no-named.js format[babel-ts] 1`] = `
|
||||
"Only \`import defer * as x from "./module"\` is valid. (1:16)
|
||||
> 1 | import defer { x } from "x";
|
||||
| ^
|
||||
2 |
|
||||
Cause: Only \`import defer * as x from "./module"\` is valid. (1:15)"
|
||||
`;
|
||||
|
||||
exports[`no-named.js format[espree] 1`] = `
|
||||
"Unexpected token { (1:14)
|
||||
> 1 | import defer { x } from "x";
|
||||
| ^
|
||||
2 |
|
||||
Cause: Unexpected token {"
|
||||
`;
|
||||
|
||||
exports[`no-named.js format[flow] 1`] = `
|
||||
"Unexpected token \`{\`, expected the keyword \`from\` (1:14)
|
||||
> 1 | import defer { x } from "x";
|
||||
| ^
|
||||
2 |
|
||||
Cause: Unexpected token \`{\`, expected the keyword \`from\` (1:13)"
|
||||
`;
|
||||
|
||||
exports[`no-named.js format[hermes] 1`] = `
|
||||
"'from' expected (1:14)
|
||||
> 1 | import defer { x } from "x";
|
||||
| ^
|
||||
2 |
|
||||
Cause: 'from' expected (1:13)
|
||||
import defer { x } from "x";
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`no-named.js format[meriyah] 1`] = `
|
||||
"Expected 'from' (1:14)
|
||||
> 1 | import defer { x } from "x";
|
||||
| ^
|
||||
2 |
|
||||
Cause: [1:13-1:14]: Expected 'from'"
|
||||
`;
|
||||
|
||||
exports[`no-named.js format[oxc] 1`] = `
|
||||
"Named imports are not allowed in a deferred import. (1:8)
|
||||
> 1 | import defer { x } from "x";
|
||||
| ^^^^^
|
||||
2 |"
|
||||
`;
|
||||
|
||||
exports[`no-named.js format[oxc-ts] 1`] = `
|
||||
"Named imports are not allowed in a deferred import. (1:8)
|
||||
> 1 | import defer { x } from "x";
|
||||
| ^^^^^
|
||||
2 |"
|
||||
`;
|
||||
|
||||
exports[`no-named.js format[typescript] 1`] = `
|
||||
"Named imports are not allowed in a deferred import. (1:8)
|
||||
> 1 | import defer { x } from "x";
|
||||
| ^^^^^^^^^^^
|
||||
2 |
|
||||
Cause: Named imports are not allowed in a deferred import."
|
||||
`;
|
||||
|
||||
exports[`no-named.js format[yuku] 1`] = `
|
||||
"Expected 'from' after import clause, but found '{' (1:14)
|
||||
> 1 | import defer { x } from "x";
|
||||
| ^
|
||||
2 |"
|
||||
`;
|
||||
|
||||
exports[`no-named.js format[yuku-ts] 1`] = `
|
||||
"Expected 'from' after import clause, but found '{' (1:14)
|
||||
> 1 | import defer { x } from "x";
|
||||
| ^
|
||||
2 |"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 format[acorn] 1`] = `
|
||||
"Unexpected token (1:14)
|
||||
> 1 | import defer { x } from "x";
|
||||
| ^
|
||||
Cause: Unexpected token (1:13)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 format[babel] 1`] = `
|
||||
"Only \`import defer * as x from "./module"\` is valid. (1:16)
|
||||
> 1 | import defer { x } from "x";
|
||||
| ^
|
||||
Cause: Only \`import defer * as x from "./module"\` is valid. (1:15)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 format[babel-ts] 1`] = `
|
||||
"Only \`import defer * as x from "./module"\` is valid. (1:16)
|
||||
> 1 | import defer { x } from "x";
|
||||
| ^
|
||||
Cause: Only \`import defer * as x from "./module"\` is valid. (1:15)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 format[espree] 1`] = `
|
||||
"Unexpected token { (1:14)
|
||||
> 1 | import defer { x } from "x";
|
||||
| ^
|
||||
Cause: Unexpected token {"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 format[flow] 1`] = `
|
||||
"Unexpected token \`{\`, expected the keyword \`from\` (1:14)
|
||||
> 1 | import defer { x } from "x";
|
||||
| ^
|
||||
Cause: Unexpected token \`{\`, expected the keyword \`from\` (1:13)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 format[hermes] 1`] = `
|
||||
"'from' expected (1:14)
|
||||
> 1 | import defer { x } from "x";
|
||||
| ^
|
||||
Cause: 'from' expected (1:13)
|
||||
import defer { x } from "x";
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 format[meriyah] 1`] = `
|
||||
"Expected 'from' (1:14)
|
||||
> 1 | import defer { x } from "x";
|
||||
| ^
|
||||
Cause: [1:13-1:14]: Expected 'from'"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 format[oxc] 1`] = `
|
||||
"Named imports are not allowed in a deferred import. (1:8)
|
||||
> 1 | import defer { x } from "x";
|
||||
| ^^^^^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 format[oxc-ts] 1`] = `
|
||||
"Named imports are not allowed in a deferred import. (1:8)
|
||||
> 1 | import defer { x } from "x";
|
||||
| ^^^^^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 format[typescript] 1`] = `
|
||||
"Named imports are not allowed in a deferred import. (1:8)
|
||||
> 1 | import defer { x } from "x";
|
||||
| ^^^^^^^^^^^
|
||||
Cause: Named imports are not allowed in a deferred import."
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 format[yuku] 1`] = `
|
||||
"Expected 'from' after import clause, but found '{' (1:14)
|
||||
> 1 | import defer { x } from "x";
|
||||
| ^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #0 format[yuku-ts] 1`] = `
|
||||
"Expected 'from' after import clause, but found '{' (1:14)
|
||||
> 1 | import defer { x } from "x";
|
||||
| ^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 format[acorn] 1`] = `
|
||||
"Unexpected token (1:14)
|
||||
> 1 | import defer x from "x";
|
||||
| ^
|
||||
Cause: Unexpected token (1:13)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 format[babel] 1`] = `
|
||||
"Only \`import defer * as x from "./module"\` is valid. (1:14)
|
||||
> 1 | import defer x from "x";
|
||||
| ^
|
||||
Cause: Only \`import defer * as x from "./module"\` is valid. (1:13)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 format[babel-ts] 1`] = `
|
||||
"Only \`import defer * as x from "./module"\` is valid. (1:14)
|
||||
> 1 | import defer x from "x";
|
||||
| ^
|
||||
Cause: Only \`import defer * as x from "./module"\` is valid. (1:13)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 format[espree] 1`] = `
|
||||
"Unexpected token x (1:14)
|
||||
> 1 | import defer x from "x";
|
||||
| ^
|
||||
Cause: Unexpected token x"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 format[flow] 1`] = `
|
||||
"Unexpected identifier, expected the keyword \`from\` (1:14)
|
||||
> 1 | import defer x from "x";
|
||||
| ^
|
||||
Cause: Unexpected identifier, expected the keyword \`from\` (1:13)"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 format[hermes] 1`] = `
|
||||
"'from' expected (1:14)
|
||||
> 1 | import defer x from "x";
|
||||
| ^
|
||||
Cause: 'from' expected (1:13)
|
||||
import defer x from "x";
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 format[meriyah] 1`] = `
|
||||
"Expected 'from' (1:14)
|
||||
> 1 | import defer x from "x";
|
||||
| ^
|
||||
Cause: [1:13-1:14]: Expected 'from'"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 format[oxc] 1`] = `
|
||||
"Default imports are not allowed in a deferred import. (1:8)
|
||||
> 1 | import defer x from "x";
|
||||
| ^^^^^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 format[oxc-ts] 1`] = `
|
||||
"Default imports are not allowed in a deferred import. (1:8)
|
||||
> 1 | import defer x from "x";
|
||||
| ^^^^^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 format[typescript] 1`] = `
|
||||
"Default imports are not allowed in a deferred import. (1:8)
|
||||
> 1 | import defer x from "x";
|
||||
| ^^^^^^^
|
||||
Cause: Default imports are not allowed in a deferred import."
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 format[yuku] 1`] = `
|
||||
"'import defer' only supports a namespace import (1:8)
|
||||
> 1 | import defer x from "x";
|
||||
| ^^^^^"
|
||||
`;
|
||||
|
||||
exports[`snippet: #1 format[yuku-ts] 1`] = `
|
||||
"'import defer' only supports a namespace import (1:8)
|
||||
> 1 | import defer x from "x";
|
||||
| ^^^^^"
|
||||
`;
|
||||
@@ -0,0 +1,20 @@
|
||||
runFormatTest(
|
||||
{
|
||||
importMeta: import.meta,
|
||||
snippets: ['import defer { x } from "x";', 'import defer x from "x";'],
|
||||
},
|
||||
[
|
||||
"babel",
|
||||
"acorn",
|
||||
"espree",
|
||||
"meriyah",
|
||||
"typescript",
|
||||
"babel-ts",
|
||||
"oxc",
|
||||
"oxc-ts",
|
||||
"yuku",
|
||||
"yuku-ts",
|
||||
"flow",
|
||||
"hermes",
|
||||
],
|
||||
);
|
||||
File renamed without changes.
File renamed without changes.
@@ -2,7 +2,7 @@
|
||||
|
||||
exports[`dynamic-import.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel"]
|
||||
parsers: ["babel", "typescript", "flow"]
|
||||
printWidth: 80 (default) |
|
||||
=====================================input======================================
|
||||
import.defer("foo");
|
||||
@@ -29,6 +29,27 @@ exports[`dynamic-import.js format[espree] 1`] = `
|
||||
Cause: The only valid meta property for import is 'import.meta'"
|
||||
`;
|
||||
|
||||
exports[`dynamic-import.js format[flow] 1`] = `
|
||||
"Unexpected identifier, expected the identifier \`meta\` (1:8)
|
||||
> 1 | import.defer("foo");
|
||||
| ^
|
||||
2 |
|
||||
Cause: Unexpected identifier, expected the identifier \`meta\` (1:7)"
|
||||
`;
|
||||
|
||||
exports[`dynamic-import.js format[hermes] 1`] = `
|
||||
"'meta' expected in member expression (1:8)
|
||||
> 1 | import.defer("foo");
|
||||
| ^
|
||||
2 |
|
||||
Cause: 'meta' expected in member expression (1:7)
|
||||
import.defer("foo");
|
||||
^~~~~
|
||||
note: start of member expression (1:0)
|
||||
import.defer("foo");
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`dynamic-import.js format[meriyah] 1`] = `
|
||||
"The only valid meta property for import is 'import.meta' (1:8)
|
||||
> 1 | import.defer("foo");
|
||||
@@ -39,7 +60,7 @@ Cause: [1:7-1:12]: The only valid meta property for import is 'import.meta'"
|
||||
|
||||
exports[`dynamic-import-attributes-expression.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel"]
|
||||
parsers: ["babel", "typescript", "flow"]
|
||||
printWidth: 80 (default) |
|
||||
=====================================input======================================
|
||||
import.defer("x", { with: { attr: "val" } });
|
||||
@@ -66,6 +87,27 @@ exports[`dynamic-import-attributes-expression.js format[espree] 1`] = `
|
||||
Cause: The only valid meta property for import is 'import.meta'"
|
||||
`;
|
||||
|
||||
exports[`dynamic-import-attributes-expression.js format[flow] 1`] = `
|
||||
"Unexpected identifier, expected the identifier \`meta\` (1:8)
|
||||
> 1 | import.defer("x", { with: { attr: "val" } });
|
||||
| ^
|
||||
2 |
|
||||
Cause: Unexpected identifier, expected the identifier \`meta\` (1:7)"
|
||||
`;
|
||||
|
||||
exports[`dynamic-import-attributes-expression.js format[hermes] 1`] = `
|
||||
"'meta' expected in member expression (1:8)
|
||||
> 1 | import.defer("x", { with: { attr: "val" } });
|
||||
| ^
|
||||
2 |
|
||||
Cause: 'meta' expected in member expression (1:7)
|
||||
import.defer("x", { with: { attr: "val" } });
|
||||
^~~~~
|
||||
note: start of member expression (1:0)
|
||||
import.defer("x", { with: { attr: "val" } });
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`dynamic-import-attributes-expression.js format[meriyah] 1`] = `
|
||||
"The only valid meta property for import is 'import.meta' (1:8)
|
||||
> 1 | import.defer("x", { with: { attr: "val" } });
|
||||
@@ -76,7 +118,7 @@ Cause: [1:7-1:12]: The only valid meta property for import is 'import.meta'"
|
||||
|
||||
exports[`import-defer.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel"]
|
||||
parsers: ["babel", "typescript", "flow"]
|
||||
printWidth: 80 (default) |
|
||||
=====================================input======================================
|
||||
import defer * as ns from "x";
|
||||
@@ -103,6 +145,24 @@ exports[`import-defer.js format[espree] 1`] = `
|
||||
Cause: Unexpected token *"
|
||||
`;
|
||||
|
||||
exports[`import-defer.js format[flow] 1`] = `
|
||||
"Unexpected token \`*\`, expected the keyword \`from\` (1:14)
|
||||
> 1 | import defer * as ns from "x";
|
||||
| ^
|
||||
2 |
|
||||
Cause: Unexpected token \`*\`, expected the keyword \`from\` (1:13)"
|
||||
`;
|
||||
|
||||
exports[`import-defer.js format[hermes] 1`] = `
|
||||
"'from' expected (1:14)
|
||||
> 1 | import defer * as ns from "x";
|
||||
| ^
|
||||
2 |
|
||||
Cause: 'from' expected (1:13)
|
||||
import defer * as ns from "x";
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`import-defer.js format[meriyah] 1`] = `
|
||||
"Expected 'from' (1:14)
|
||||
> 1 | import defer * as ns from "x";
|
||||
@@ -113,7 +173,7 @@ Cause: [1:13-1:14]: Expected 'from'"
|
||||
|
||||
exports[`import-defer-attributes-declaration.js format 1`] = `
|
||||
====================================options=====================================
|
||||
parsers: ["babel"]
|
||||
parsers: ["babel", "typescript", "flow"]
|
||||
printWidth: 80 (default) |
|
||||
=====================================input======================================
|
||||
import defer * as ns from "x" with { attr: "val" };
|
||||
@@ -140,6 +200,24 @@ exports[`import-defer-attributes-declaration.js format[espree] 1`] = `
|
||||
Cause: Unexpected token *"
|
||||
`;
|
||||
|
||||
exports[`import-defer-attributes-declaration.js format[flow] 1`] = `
|
||||
"Unexpected token \`*\`, expected the keyword \`from\` (1:14)
|
||||
> 1 | import defer * as ns from "x" with { attr: "val" };
|
||||
| ^
|
||||
2 |
|
||||
Cause: Unexpected token \`*\`, expected the keyword \`from\` (1:13)"
|
||||
`;
|
||||
|
||||
exports[`import-defer-attributes-declaration.js format[hermes] 1`] = `
|
||||
"'from' expected (1:14)
|
||||
> 1 | import defer * as ns from "x" with { attr: "val" };
|
||||
| ^
|
||||
2 |
|
||||
Cause: 'from' expected (1:13)
|
||||
import defer * as ns from "x" with { attr: "val" };
|
||||
^"
|
||||
`;
|
||||
|
||||
exports[`import-defer-attributes-declaration.js format[meriyah] 1`] = `
|
||||
"Expected 'from' (1:14)
|
||||
> 1 | import defer * as ns from "x" with { attr: "val" };
|
||||
@@ -147,111 +225,3 @@ exports[`import-defer-attributes-declaration.js format[meriyah] 1`] = `
|
||||
2 |
|
||||
Cause: [1:13-1:14]: Expected 'from'"
|
||||
`;
|
||||
|
||||
exports[`no-default.js format[__babel_estree] 1`] = `
|
||||
"Only \`import defer * as x from "./module"\` is valid. (1:14)
|
||||
> 1 | import defer x from "x";
|
||||
| ^
|
||||
2 |
|
||||
Cause: Only \`import defer * as x from "./module"\` is valid. (1:13)"
|
||||
`;
|
||||
|
||||
exports[`no-default.js format[acorn] 1`] = `
|
||||
"Unexpected token (1:14)
|
||||
> 1 | import defer x from "x";
|
||||
| ^
|
||||
2 |
|
||||
Cause: Unexpected token (1:13)"
|
||||
`;
|
||||
|
||||
exports[`no-default.js format[babel] 1`] = `
|
||||
"Only \`import defer * as x from "./module"\` is valid. (1:14)
|
||||
> 1 | import defer x from "x";
|
||||
| ^
|
||||
2 |
|
||||
Cause: Only \`import defer * as x from "./module"\` is valid. (1:13)"
|
||||
`;
|
||||
|
||||
exports[`no-default.js format[espree] 1`] = `
|
||||
"Unexpected token x (1:14)
|
||||
> 1 | import defer x from "x";
|
||||
| ^
|
||||
2 |
|
||||
Cause: Unexpected token x"
|
||||
`;
|
||||
|
||||
exports[`no-default.js format[meriyah] 1`] = `
|
||||
"Expected 'from' (1:14)
|
||||
> 1 | import defer x from "x";
|
||||
| ^
|
||||
2 |
|
||||
Cause: [1:13-1:14]: Expected 'from'"
|
||||
`;
|
||||
|
||||
exports[`no-default.js format[oxc] 1`] = `
|
||||
"Default imports are not allowed in a deferred import. (1:8)
|
||||
> 1 | import defer x from "x";
|
||||
| ^^^^^
|
||||
2 |"
|
||||
`;
|
||||
|
||||
exports[`no-default.js format[yuku] 1`] = `
|
||||
"'import defer' only supports a namespace import (1:8)
|
||||
> 1 | import defer x from "x";
|
||||
| ^^^^^
|
||||
2 |"
|
||||
`;
|
||||
|
||||
exports[`no-named.js format[__babel_estree] 1`] = `
|
||||
"Only \`import defer * as x from "./module"\` is valid. (1:16)
|
||||
> 1 | import defer { x } from "x";
|
||||
| ^
|
||||
2 |
|
||||
Cause: Only \`import defer * as x from "./module"\` is valid. (1:15)"
|
||||
`;
|
||||
|
||||
exports[`no-named.js format[acorn] 1`] = `
|
||||
"Unexpected token (1:14)
|
||||
> 1 | import defer { x } from "x";
|
||||
| ^
|
||||
2 |
|
||||
Cause: Unexpected token (1:13)"
|
||||
`;
|
||||
|
||||
exports[`no-named.js format[babel] 1`] = `
|
||||
"Only \`import defer * as x from "./module"\` is valid. (1:16)
|
||||
> 1 | import defer { x } from "x";
|
||||
| ^
|
||||
2 |
|
||||
Cause: Only \`import defer * as x from "./module"\` is valid. (1:15)"
|
||||
`;
|
||||
|
||||
exports[`no-named.js format[espree] 1`] = `
|
||||
"Unexpected token { (1:14)
|
||||
> 1 | import defer { x } from "x";
|
||||
| ^
|
||||
2 |
|
||||
Cause: Unexpected token {"
|
||||
`;
|
||||
|
||||
exports[`no-named.js format[meriyah] 1`] = `
|
||||
"Expected 'from' (1:14)
|
||||
> 1 | import defer { x } from "x";
|
||||
| ^
|
||||
2 |
|
||||
Cause: [1:13-1:14]: Expected 'from'"
|
||||
`;
|
||||
|
||||
exports[`no-named.js format[oxc] 1`] = `
|
||||
"Named imports are not allowed in a deferred import. (1:8)
|
||||
> 1 | import defer { x } from "x";
|
||||
| ^^^^^
|
||||
2 |"
|
||||
`;
|
||||
|
||||
exports[`no-named.js format[yuku] 1`] = `
|
||||
"Expected 'from' after import clause, but found '{' (1:14)
|
||||
> 1 | import defer { x } from "x";
|
||||
| ^
|
||||
2 |"
|
||||
`;
|
||||
@@ -4,18 +4,13 @@ const importDeferTests = [
|
||||
"dynamic-import.js",
|
||||
"dynamic-import-attributes-expression.js",
|
||||
];
|
||||
const invalidSyntaxTests = ["no-default.js", "no-named.js"];
|
||||
|
||||
runFormatTest(import.meta, ["babel"], {
|
||||
runFormatTest(import.meta, ["babel", "typescript", "flow"], {
|
||||
errors: {
|
||||
acorn: [...importDeferTests, ...invalidSyntaxTests],
|
||||
espree: [...importDeferTests, ...invalidSyntaxTests],
|
||||
meriyah: [...importDeferTests, ...invalidSyntaxTests],
|
||||
oxc: invalidSyntaxTests,
|
||||
"oxc-ts": invalidSyntaxTests,
|
||||
yuku: invalidSyntaxTests,
|
||||
"yuku-ts": invalidSyntaxTests,
|
||||
babel: invalidSyntaxTests,
|
||||
__babel_estree: invalidSyntaxTests,
|
||||
acorn: importDeferTests,
|
||||
espree: importDeferTests,
|
||||
meriyah: importDeferTests,
|
||||
flow: importDeferTests,
|
||||
hermes: importDeferTests,
|
||||
},
|
||||
});
|
||||
@@ -2752,105 +2752,105 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@typescript-eslint/eslint-plugin@npm:8.64.0":
|
||||
version: 8.64.0
|
||||
resolution: "@typescript-eslint/eslint-plugin@npm:8.64.0"
|
||||
"@typescript-eslint/eslint-plugin@npm:8.65.0":
|
||||
version: 8.65.0
|
||||
resolution: "@typescript-eslint/eslint-plugin@npm:8.65.0"
|
||||
dependencies:
|
||||
"@eslint-community/regexpp": "npm:^4.12.2"
|
||||
"@typescript-eslint/scope-manager": "npm:8.64.0"
|
||||
"@typescript-eslint/type-utils": "npm:8.64.0"
|
||||
"@typescript-eslint/utils": "npm:8.64.0"
|
||||
"@typescript-eslint/visitor-keys": "npm:8.64.0"
|
||||
"@typescript-eslint/scope-manager": "npm:8.65.0"
|
||||
"@typescript-eslint/type-utils": "npm:8.65.0"
|
||||
"@typescript-eslint/utils": "npm:8.65.0"
|
||||
"@typescript-eslint/visitor-keys": "npm:8.65.0"
|
||||
ignore: "npm:^7.0.5"
|
||||
natural-compare: "npm:^1.4.0"
|
||||
ts-api-utils: "npm:^2.5.0"
|
||||
peerDependencies:
|
||||
"@typescript-eslint/parser": ^8.64.0
|
||||
"@typescript-eslint/parser": ^8.65.0
|
||||
eslint: ^8.57.0 || ^9.0.0 || ^10.0.0
|
||||
typescript: ">=4.8.4 <6.1.0"
|
||||
checksum: 10/ec7cbcb44968386a4b9aff9272ce6b75bdcc7f398db5f2d07a21854baf0364ca33c74268c0e19d21386c6b87b9358b141df7bef3d26e4e4e7a9eb5f8f394dc75
|
||||
checksum: 10/20b1e5fd0c01d450c345750582e4911affef8ba934b2b78953ff593102d2a01f21c5f6469e13239fdd6a0e30152d6122906e7623f53aa8c937c6faae9407be47
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@typescript-eslint/parser@npm:8.64.0":
|
||||
version: 8.64.0
|
||||
resolution: "@typescript-eslint/parser@npm:8.64.0"
|
||||
"@typescript-eslint/parser@npm:8.65.0":
|
||||
version: 8.65.0
|
||||
resolution: "@typescript-eslint/parser@npm:8.65.0"
|
||||
dependencies:
|
||||
"@typescript-eslint/scope-manager": "npm:8.64.0"
|
||||
"@typescript-eslint/types": "npm:8.64.0"
|
||||
"@typescript-eslint/typescript-estree": "npm:8.64.0"
|
||||
"@typescript-eslint/visitor-keys": "npm:8.64.0"
|
||||
"@typescript-eslint/scope-manager": "npm:8.65.0"
|
||||
"@typescript-eslint/types": "npm:8.65.0"
|
||||
"@typescript-eslint/typescript-estree": "npm:8.65.0"
|
||||
"@typescript-eslint/visitor-keys": "npm:8.65.0"
|
||||
debug: "npm:^4.4.3"
|
||||
peerDependencies:
|
||||
eslint: ^8.57.0 || ^9.0.0 || ^10.0.0
|
||||
typescript: ">=4.8.4 <6.1.0"
|
||||
checksum: 10/7239b16a6ca6bb1764ad04bc1eb46997336541d049fcffb4966ef404fbb02324b2b33aed50c2b976359ec8d3c97b90668cfd6aa9177228b4b799152f01a3904a
|
||||
checksum: 10/55f68666953c02c8adae35a46076848da6456181b1849a28ec836a5866ca37b902f475fb4c32ba7aa3a6a7e5d66828df8859edec297da09181fb937aeea30f8e
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@typescript-eslint/project-service@npm:8.64.0":
|
||||
version: 8.64.0
|
||||
resolution: "@typescript-eslint/project-service@npm:8.64.0"
|
||||
"@typescript-eslint/project-service@npm:8.65.0":
|
||||
version: 8.65.0
|
||||
resolution: "@typescript-eslint/project-service@npm:8.65.0"
|
||||
dependencies:
|
||||
"@typescript-eslint/tsconfig-utils": "npm:^8.64.0"
|
||||
"@typescript-eslint/types": "npm:^8.64.0"
|
||||
"@typescript-eslint/tsconfig-utils": "npm:^8.65.0"
|
||||
"@typescript-eslint/types": "npm:^8.65.0"
|
||||
debug: "npm:^4.4.3"
|
||||
peerDependencies:
|
||||
typescript: ">=4.8.4 <6.1.0"
|
||||
checksum: 10/511b9a8f1dcb32c99003cab9791309056ac6e889fe46227600deb743e869a63b3e78d7d2d3ef1bf65b2d5e574b73add3040fbef4c0f94aed587368aaea149559
|
||||
checksum: 10/915662449a66d90f03661a805f7c62a5efaa8f7887671272e08b684b41edab51a9021f47aac4d78001a0f87960e8587adc037424d56f13de883e0ce699e7ca55
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@typescript-eslint/scope-manager@npm:8.64.0":
|
||||
version: 8.64.0
|
||||
resolution: "@typescript-eslint/scope-manager@npm:8.64.0"
|
||||
"@typescript-eslint/scope-manager@npm:8.65.0":
|
||||
version: 8.65.0
|
||||
resolution: "@typescript-eslint/scope-manager@npm:8.65.0"
|
||||
dependencies:
|
||||
"@typescript-eslint/types": "npm:8.64.0"
|
||||
"@typescript-eslint/visitor-keys": "npm:8.64.0"
|
||||
checksum: 10/3c72c4915cee19d632ddc7491c3a4668dd04aa8bcb112fde8ac10aea2cc0364aaa8439d9939d0c62a7b4159fc22f4ced7cba3a77df4422b21d76497068f08076
|
||||
"@typescript-eslint/types": "npm:8.65.0"
|
||||
"@typescript-eslint/visitor-keys": "npm:8.65.0"
|
||||
checksum: 10/038e208c907aa45fe5bb7168e1dccf89c1fc6678d1715a9c04f4b332d4e79ab719b5b43a4e0c2d5a183ea863813ff59fda040b2717fe5517468453af6b99a50a
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@typescript-eslint/tsconfig-utils@npm:8.64.0, @typescript-eslint/tsconfig-utils@npm:^8.64.0":
|
||||
version: 8.64.0
|
||||
resolution: "@typescript-eslint/tsconfig-utils@npm:8.64.0"
|
||||
"@typescript-eslint/tsconfig-utils@npm:8.65.0, @typescript-eslint/tsconfig-utils@npm:^8.65.0":
|
||||
version: 8.65.0
|
||||
resolution: "@typescript-eslint/tsconfig-utils@npm:8.65.0"
|
||||
peerDependencies:
|
||||
typescript: ">=4.8.4 <6.1.0"
|
||||
checksum: 10/905469c5067a9a2d18d065848c6497081ab787b22a9d7c06499f4bb593b7d67f9fb17e7861a114c46626555853cc52d4542db5311c8dc7cd138e45461a73e589
|
||||
checksum: 10/f88253a4df1d599a1bebeeb403611538485e22c52213f2f2b9c435bde8ebce64645d6bb985c900b01ef221032835fcd4f6fea4b94d178220c18de5d93af905c4
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@typescript-eslint/type-utils@npm:8.64.0":
|
||||
version: 8.64.0
|
||||
resolution: "@typescript-eslint/type-utils@npm:8.64.0"
|
||||
"@typescript-eslint/type-utils@npm:8.65.0":
|
||||
version: 8.65.0
|
||||
resolution: "@typescript-eslint/type-utils@npm:8.65.0"
|
||||
dependencies:
|
||||
"@typescript-eslint/types": "npm:8.64.0"
|
||||
"@typescript-eslint/typescript-estree": "npm:8.64.0"
|
||||
"@typescript-eslint/utils": "npm:8.64.0"
|
||||
"@typescript-eslint/types": "npm:8.65.0"
|
||||
"@typescript-eslint/typescript-estree": "npm:8.65.0"
|
||||
"@typescript-eslint/utils": "npm:8.65.0"
|
||||
debug: "npm:^4.4.3"
|
||||
ts-api-utils: "npm:^2.5.0"
|
||||
peerDependencies:
|
||||
eslint: ^8.57.0 || ^9.0.0 || ^10.0.0
|
||||
typescript: ">=4.8.4 <6.1.0"
|
||||
checksum: 10/7ab1fd8c0d292c0155cf137d316b1618681eca0fe4cf446a05d909de41311ec6bb64fed82513e822063a962508d5b3e615fb0155a4a565d6b9c6cb81d06a5cd2
|
||||
checksum: 10/d52e0c341c9731d8f3bfd2f475bbcd5a5632434e11fc39e8e21acb706145bedb8c6c1998b8ced73e132b43179dd95f2c318effc36c9a1dd61f14546b07b25852
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@typescript-eslint/types@npm:8.64.0, @typescript-eslint/types@npm:^8.56.0, @typescript-eslint/types@npm:^8.64.0":
|
||||
version: 8.64.0
|
||||
resolution: "@typescript-eslint/types@npm:8.64.0"
|
||||
checksum: 10/b8951c00ce9b9702f3201f017354774ea5f39c30c2b6f815cb50d91f53f61c325e30f548329daf731d5169d752095cf102da54b754fb202bcfb619faa56fa9f4
|
||||
"@typescript-eslint/types@npm:8.65.0, @typescript-eslint/types@npm:^8.56.0, @typescript-eslint/types@npm:^8.65.0":
|
||||
version: 8.65.0
|
||||
resolution: "@typescript-eslint/types@npm:8.65.0"
|
||||
checksum: 10/a6fc10a733adbb98bbb9c312c8d99791e1a2fd3efef5c2a5b51da1c166aac3db4427c30bf32059808abe305a289f820bf610683914e897baeb18315af6a1d16c
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@typescript-eslint/typescript-estree@npm:8.64.0":
|
||||
version: 8.64.0
|
||||
resolution: "@typescript-eslint/typescript-estree@npm:8.64.0"
|
||||
"@typescript-eslint/typescript-estree@npm:8.65.0":
|
||||
version: 8.65.0
|
||||
resolution: "@typescript-eslint/typescript-estree@npm:8.65.0"
|
||||
dependencies:
|
||||
"@typescript-eslint/project-service": "npm:8.64.0"
|
||||
"@typescript-eslint/tsconfig-utils": "npm:8.64.0"
|
||||
"@typescript-eslint/types": "npm:8.64.0"
|
||||
"@typescript-eslint/visitor-keys": "npm:8.64.0"
|
||||
"@typescript-eslint/project-service": "npm:8.65.0"
|
||||
"@typescript-eslint/tsconfig-utils": "npm:8.65.0"
|
||||
"@typescript-eslint/types": "npm:8.65.0"
|
||||
"@typescript-eslint/visitor-keys": "npm:8.65.0"
|
||||
debug: "npm:^4.4.3"
|
||||
minimatch: "npm:^10.2.2"
|
||||
semver: "npm:^7.7.3"
|
||||
@@ -2858,32 +2858,32 @@ __metadata:
|
||||
ts-api-utils: "npm:^2.5.0"
|
||||
peerDependencies:
|
||||
typescript: ">=4.8.4 <6.1.0"
|
||||
checksum: 10/833101d25e820d1d0e317dfc9beca985b3c87e5458b20ed002c86c2d425667aa506f756f1759b54f724033effb529266f836f912c460ee662f347fb43dded6ed
|
||||
checksum: 10/711fdb5eff67ff34437c56a1a661b16a2e1d6bcd96c9f96196c4242b8d4ddaea8e835ca8badd340c703e043d8dfe8cfca90b32eca60069a4f1d2880afdb670fb
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@typescript-eslint/utils@npm:8.64.0, @typescript-eslint/utils@npm:^8.0.0":
|
||||
version: 8.64.0
|
||||
resolution: "@typescript-eslint/utils@npm:8.64.0"
|
||||
"@typescript-eslint/utils@npm:8.65.0, @typescript-eslint/utils@npm:^8.0.0":
|
||||
version: 8.65.0
|
||||
resolution: "@typescript-eslint/utils@npm:8.65.0"
|
||||
dependencies:
|
||||
"@eslint-community/eslint-utils": "npm:^4.9.1"
|
||||
"@typescript-eslint/scope-manager": "npm:8.64.0"
|
||||
"@typescript-eslint/types": "npm:8.64.0"
|
||||
"@typescript-eslint/typescript-estree": "npm:8.64.0"
|
||||
"@typescript-eslint/scope-manager": "npm:8.65.0"
|
||||
"@typescript-eslint/types": "npm:8.65.0"
|
||||
"@typescript-eslint/typescript-estree": "npm:8.65.0"
|
||||
peerDependencies:
|
||||
eslint: ^8.57.0 || ^9.0.0 || ^10.0.0
|
||||
typescript: ">=4.8.4 <6.1.0"
|
||||
checksum: 10/ff7e5374bd6ef60d7df723e6440468e3a5d4879d1d9876e322904319a1f1d2f98d858fc9b9169dbbd7ee0786a07102a058f13e2b6c16d1bf9aae9eb836a258a3
|
||||
checksum: 10/c1dcd555b58aef1e066164978335e521809acac36b56bd6a6dae62cffae80f3ea5f43527506be76dfef0fe3d4c8382a24355a28867c4904b0a7729691ba45656
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@typescript-eslint/visitor-keys@npm:8.64.0":
|
||||
version: 8.64.0
|
||||
resolution: "@typescript-eslint/visitor-keys@npm:8.64.0"
|
||||
"@typescript-eslint/visitor-keys@npm:8.65.0":
|
||||
version: 8.65.0
|
||||
resolution: "@typescript-eslint/visitor-keys@npm:8.65.0"
|
||||
dependencies:
|
||||
"@typescript-eslint/types": "npm:8.64.0"
|
||||
"@typescript-eslint/types": "npm:8.65.0"
|
||||
eslint-visitor-keys: "npm:^5.0.0"
|
||||
checksum: 10/d149be4ac0e67c51097cdb7335d8e2d29b9dc0de173961c5cc550e938a00a3af28b1f8ecd7ad832fcfe489d1b11e36fdd394b6ea92115a7558123562e31a704f
|
||||
checksum: 10/e7f86d21f0bf03ca7cff9fa9428aab98620564d15fb06c9f56a294c13cee324624d42f9115f3d76fbad92266220479cca334b5c66562f885da5c4d2bda3d87b3
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -8326,10 +8326,10 @@ __metadata:
|
||||
"@prettier/parse-srcset": "npm:3.1.0"
|
||||
"@stylistic/eslint-plugin": "npm:5.10.0"
|
||||
"@types/jsesc": "npm:3.0.3"
|
||||
"@typescript-eslint/eslint-plugin": "npm:8.64.0"
|
||||
"@typescript-eslint/parser": "npm:8.64.0"
|
||||
"@typescript-eslint/typescript-estree": "npm:8.64.0"
|
||||
"@typescript-eslint/visitor-keys": "npm:8.64.0"
|
||||
"@typescript-eslint/eslint-plugin": "npm:8.65.0"
|
||||
"@typescript-eslint/parser": "npm:8.65.0"
|
||||
"@typescript-eslint/typescript-estree": "npm:8.65.0"
|
||||
"@typescript-eslint/visitor-keys": "npm:8.65.0"
|
||||
"@yuku-parser/wasm": "npm:0.7.0"
|
||||
acorn: "npm:8.17.0"
|
||||
acorn-jsx: "npm:5.3.2"
|
||||
|
||||
Reference in new issue
Block a user