diff --git a/.eslintrc.js b/.eslintrc.js index ac2e363f4e13..d852a75216f9 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -53,7 +53,6 @@ module.exports = { 'deprecation/deprecation': 'error', // TODO(#7338): Investigate enabling these soon ✨ - '@typescript-eslint/consistent-indexed-object-style': 'off', '@typescript-eslint/no-unnecessary-condition': 'off', '@typescript-eslint/no-dynamic-delete': 'off', '@typescript-eslint/prefer-nullish-coalescing': 'off', diff --git a/.github/workflows/a11y-alt-bot.yml b/.github/workflows/a11y-alt-bot.yml new file mode 100644 index 000000000000..926720c80153 --- /dev/null +++ b/.github/workflows/a11y-alt-bot.yml @@ -0,0 +1,25 @@ +name: Accessibility-alt-text-bot +on: + issues: + types: [opened, edited] + pull_request: + types: [opened, edited] + issue_comment: + types: [created, edited] + discussion: + types: [created, edited] + discussion_comment: + types: [created, edited] + +permissions: + issues: write + pull-requests: write + discussions: write + +jobs: + accessibility_alt_text_bot: + name: Check alt text is set on images + runs-on: ubuntu-latest + steps: + - name: Get action 'github/accessibility-alt-text-bot' + uses: github/accessibility-alt-text-bot@v1.4.0 diff --git a/.gitignore b/.gitignore index d3dbc7cdd6aa..cd2f6495f7bf 100644 --- a/.gitignore +++ b/.gitignore @@ -89,10 +89,11 @@ packages/types/src/generated/**/*.ts # Yarn 3 .pnp.* .yarn/* +packages/**/.yarn !.yarn/patches !.yarn/plugins !.yarn/releases !.yarn/sdks !.yarn/versions -.nx/cache \ No newline at end of file +.nx/cache diff --git a/.yarn/patches/@microsoft-api-extractor-npm-7.38.0-955f1e0725.patch b/.yarn/patches/@microsoft-api-extractor-npm-7.38.0-955f1e0725.patch new file mode 100644 index 000000000000..4a88d8663c34 --- /dev/null +++ b/.yarn/patches/@microsoft-api-extractor-npm-7.38.0-955f1e0725.patch @@ -0,0 +1,46 @@ +diff --git a/lib/analyzer/ExportAnalyzer.js b/lib/analyzer/ExportAnalyzer.js +index 51f31b4f2f253d82adc9594faa58d8dc031957e0..1fddac54b08665f5a5a717fef740613ae921cb7a 100644 +--- a/lib/analyzer/ExportAnalyzer.js ++++ b/lib/analyzer/ExportAnalyzer.js +@@ -193,7 +193,7 @@ class ExportAnalyzer { + const mode = specifier && ts.isStringLiteralLike(specifier) + ? TypeScriptInternals_1.TypeScriptInternals.getModeForUsageLocation(importOrExportDeclaration.getSourceFile(), specifier) + : undefined; +- const resolvedModule = TypeScriptInternals_1.TypeScriptInternals.getResolvedModule(importOrExportDeclaration.getSourceFile(), moduleSpecifier, mode); ++ const resolvedModule = TypeScriptInternals_1.TypeScriptInternals.getResolvedModule(this._program, importOrExportDeclaration.getSourceFile(), moduleSpecifier, mode); + if (resolvedModule === undefined) { + // The TS compiler API `getResolvedModule` cannot resolve ambient modules. Thus, to match API Extractor's + // previous behavior, simply treat all ambient modules as external. This bug is tracked by +@@ -666,7 +666,7 @@ class ExportAnalyzer { + ts.isStringLiteralLike(importOrExportDeclaration.moduleSpecifier) + ? TypeScriptInternals_1.TypeScriptInternals.getModeForUsageLocation(importOrExportDeclaration.getSourceFile(), importOrExportDeclaration.moduleSpecifier) + : undefined; +- const resolvedModule = TypeScriptInternals_1.TypeScriptInternals.getResolvedModule(importOrExportDeclaration.getSourceFile(), moduleSpecifier, mode); ++ const resolvedModule = TypeScriptInternals_1.TypeScriptInternals.getResolvedModule(this._program, importOrExportDeclaration.getSourceFile(), moduleSpecifier, mode); + if (resolvedModule === undefined) { + // Encountered in https://github.com/microsoft/rushstack/issues/1914. + // +diff --git a/lib/analyzer/TypeScriptInternals.js b/lib/analyzer/TypeScriptInternals.js +index ff13db7709ccf502fe202337869d4024431636c9..217c36b0303c3bf9871edabcd48fbf6e09f18561 100644 +--- a/lib/analyzer/TypeScriptInternals.js ++++ b/lib/analyzer/TypeScriptInternals.js +@@ -84,10 +84,16 @@ class TypeScriptInternals { + * Retrieves the (cached) module resolution information for a module name that was exported from a SourceFile. + * The compiler populates this cache as part of analyzing the source file. + */ +- static getResolvedModule(sourceFile, moduleNameText, mode) { ++ static getResolvedModule(program, sourceFile, moduleNameText, mode) { + // Compiler internal: +- // https://github.com/microsoft/TypeScript/blob/v4.7.2/src/compiler/utilities.ts#L161 +- return ts.getResolvedModule(sourceFile, moduleNameText, mode); ++ // https://github.com/microsoft/TypeScript/blob/v5.3-beta/src/compiler/types.ts#L4678 ++ const result = program.getResolvedModule( ++ sourceFile, ++ moduleNameText, ++ mode ++ ); ++ return result?.resolvedModule; ++ + } + /** + * Gets the mode required for module resolution required with the addition of Node16/nodenext diff --git a/.yarn/patches/react-split-pane-npm-0.1.92-93dbf51dff.patch b/.yarn/patches/react-split-pane-npm-0.1.92-93dbf51dff.patch deleted file mode 100644 index 33aeafadbde9..000000000000 --- a/.yarn/patches/react-split-pane-npm-0.1.92-93dbf51dff.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/index.d.ts b/index.d.ts -index d116f54d6da12d24b48e24ff3636c9066059aa58..20a132e2a8a2bf0b023af87699d6b0703c9b1a1a 100644 ---- a/index.d.ts -+++ b/index.d.ts -@@ -6,6 +6,7 @@ export type Split = 'vertical' | 'horizontal'; - - export type SplitPaneProps = { - allowResize?: boolean; -+ children?: React.ReactNode; - className?: string; - primary?: 'first' | 'second'; - minSize?: Size; diff --git a/.yarn/patches/typescript-npm-5.2.2-01717e9f84.patch b/.yarn/patches/typescript-npm-5.3.0-beta-33b1e90865.patch similarity index 91% rename from .yarn/patches/typescript-npm-5.2.2-01717e9f84.patch rename to .yarn/patches/typescript-npm-5.3.0-beta-33b1e90865.patch index 1dda4af6420d..f4c3ff9cb1d0 100644 --- a/.yarn/patches/typescript-npm-5.2.2-01717e9f84.patch +++ b/.yarn/patches/typescript-npm-5.3.0-beta-33b1e90865.patch @@ -1,8 +1,8 @@ diff --git a/lib/typescript.d.ts b/lib/typescript.d.ts -index ead6d07d8fb2af6aa74b790c9fd947f1062f6df4..f8dad7f06e74d7cfccfcd8fc9c5c7038a7fe4164 100644 +index d785077fd9e4eb5959c0badb857358fad09d4d3f..54f71344b098e8d46acd8dd77638c60d505bb996 100644 --- a/lib/typescript.d.ts +++ b/lib/typescript.d.ts -@@ -371,8 +371,8 @@ declare namespace ts { +@@ -4491,8 +4491,8 @@ declare namespace ts { JSDocFunctionType = 324, JSDocVariadicType = 325, JSDocNamepathType = 326, @@ -12,7 +12,7 @@ index ead6d07d8fb2af6aa74b790c9fd947f1062f6df4..f8dad7f06e74d7cfccfcd8fc9c5c7038 JSDocComment = 327, JSDocText = 328, JSDocTypeLiteral = 329, -@@ -738,6 +738,8 @@ declare namespace ts { +@@ -5066,6 +5066,8 @@ declare namespace ts { readonly name: PropertyName; readonly questionToken?: QuestionToken; readonly type?: TypeNode; @@ -21,7 +21,7 @@ index ead6d07d8fb2af6aa74b790c9fd947f1062f6df4..f8dad7f06e74d7cfccfcd8fc9c5c7038 } interface PropertyDeclaration extends ClassElement, JSDocContainer { readonly kind: SyntaxKind.PropertyDeclaration; -@@ -763,6 +765,10 @@ declare namespace ts { +@@ -5091,6 +5093,10 @@ declare namespace ts { readonly parent: ObjectLiteralExpression; readonly name: PropertyName; readonly initializer: Expression; @@ -32,7 +32,7 @@ index ead6d07d8fb2af6aa74b790c9fd947f1062f6df4..f8dad7f06e74d7cfccfcd8fc9c5c7038 } interface ShorthandPropertyAssignment extends ObjectLiteralElement, JSDocContainer { readonly kind: SyntaxKind.ShorthandPropertyAssignment; -@@ -770,6 +776,12 @@ declare namespace ts { +@@ -5098,6 +5104,12 @@ declare namespace ts { readonly name: Identifier; readonly equalsToken?: EqualsToken; readonly objectAssignmentInitializer?: Expression; @@ -45,7 +45,7 @@ index ead6d07d8fb2af6aa74b790c9fd947f1062f6df4..f8dad7f06e74d7cfccfcd8fc9c5c7038 } interface SpreadAssignment extends ObjectLiteralElement, JSDocContainer { readonly kind: SyntaxKind.SpreadAssignment; -@@ -892,6 +904,8 @@ declare namespace ts { +@@ -5222,6 +5234,8 @@ declare namespace ts { } interface FunctionTypeNode extends FunctionOrConstructorTypeNodeBase, LocalsContainer { readonly kind: SyntaxKind.FunctionType; @@ -54,7 +54,7 @@ index ead6d07d8fb2af6aa74b790c9fd947f1062f6df4..f8dad7f06e74d7cfccfcd8fc9c5c7038 } interface ConstructorTypeNode extends FunctionOrConstructorTypeNodeBase, LocalsContainer { readonly kind: SyntaxKind.ConstructorType; -@@ -4584,7 +4598,13 @@ declare namespace ts { +@@ -8978,7 +8992,13 @@ declare namespace ts { function symbolName(symbol: Symbol): string; function getNameOfJSDocTypedef(declaration: JSDocTypedefTag): Identifier | PrivateIdentifier | undefined; function getNameOfDeclaration(declaration: Declaration | Expression | undefined): DeclarationName | undefined; @@ -68,7 +68,7 @@ index ead6d07d8fb2af6aa74b790c9fd947f1062f6df4..f8dad7f06e74d7cfccfcd8fc9c5c7038 function getModifiers(node: HasModifiers): readonly Modifier[] | undefined; /** * Gets the JSDoc parameter tags for the node if present. -@@ -5110,7 +5130,13 @@ declare namespace ts { +@@ -9508,7 +9528,13 @@ declare namespace ts { function isModuleName(node: Node): node is ModuleName; function isBinaryOperatorToken(node: Node): node is BinaryOperatorToken; function setTextRange(range: T, location: TextRange | undefined): T; diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f13e3782ab5..f8dfe952e826 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,31 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [6.11.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.10.0...v6.11.0) (2023-11-13) + + +### Bug Fixes + +* **eslint-plugin:** [explicit-function-return-type] support JSX attributes in `allowTypedFunctionExpressions` ([#7553](https://github.com/typescript-eslint/typescript-eslint/issues/7553)) ([be2777c](https://github.com/typescript-eslint/typescript-eslint/commit/be2777c5338669836d786f9a7806f499fd566dcd)) +* **eslint-plugin:** [no-unnecessary-qualifier] handle nested namespace id ([#7883](https://github.com/typescript-eslint/typescript-eslint/issues/7883)) ([a668f5b](https://github.com/typescript-eslint/typescript-eslint/commit/a668f5b10e7b1570c732312ad9ccab3431459c1b)) + + +### Features + +* add `no-unsafe-unary-minus` rule ([#7390](https://github.com/typescript-eslint/typescript-eslint/issues/7390)) ([c4709c2](https://github.com/typescript-eslint/typescript-eslint/commit/c4709c2861f8ea4e18c289218a75224d6bb76193)) +* add types for flat config files ([#7273](https://github.com/typescript-eslint/typescript-eslint/issues/7273)) ([66cd0c0](https://github.com/typescript-eslint/typescript-eslint/commit/66cd0c0535e5de1b46ba337919a9a92748d2b0a6)) +* allow typescript@5.3.0-RC as devDependency ([#7821](https://github.com/typescript-eslint/typescript-eslint/issues/7821)) ([b6c40b4](https://github.com/typescript-eslint/typescript-eslint/commit/b6c40b42b68d5567c7468030ee45b9b84bec4c4d)) +* **eslint-plugin:** no-unsafe-enum-comparison handles switch cases ([#7898](https://github.com/typescript-eslint/typescript-eslint/issues/7898)) ([72cb9e4](https://github.com/typescript-eslint/typescript-eslint/commit/72cb9e4ed397d35a8d8838d27dedbace6122179c)) +* **typescript-estree:** skip `isTTY` version check if user passes `loggerFn` on unsupported TypeScript version warning ([#7739](https://github.com/typescript-eslint/typescript-eslint/issues/7739)) ([9656e13](https://github.com/typescript-eslint/typescript-eslint/commit/9656e135e78d9346d326d0c78ba772a5596c1812)) +* **utils:** add ESLint `CodePath` selector types ([#7551](https://github.com/typescript-eslint/typescript-eslint/issues/7551)) ([99a026f](https://github.com/typescript-eslint/typescript-eslint/commit/99a026fe41b4b169914352fe66e7d5d687b300bf)) +* **utils:** update types to reflect `RuleContext` and `SourceCode` changes and deprecations ([#7812](https://github.com/typescript-eslint/typescript-eslint/issues/7812)) ([b73d8b2](https://github.com/typescript-eslint/typescript-eslint/commit/b73d8b21dea9c6697a68039ffba848d21b04402c)) + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + + + + + # [6.10.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.9.1...v6.10.0) (2023-11-06) diff --git a/lerna.json b/lerna.json index 83ce1bc6c4ba..9d359d755350 100644 --- a/lerna.json +++ b/lerna.json @@ -1,6 +1,6 @@ { "$schema": "node_modules/lerna/schemas/lerna-schema.json", - "version": "6.10.0", + "version": "6.11.0", "npmClient": "yarn", "stream": true, "command": { diff --git a/nx.json b/nx.json index d6b33ff1d95d..d04bbf02db28 100644 --- a/nx.json +++ b/nx.json @@ -25,11 +25,24 @@ ], "cache": true }, - "package": { - "cache": true - }, - "prebuild": { - "cache": true + "@nx/jest:jest": { + "inputs": [ + "default", + "{workspaceRoot}/jest.config.js", + "{workspaceRoot}/jest.config.base.js" + ], + "outputs": ["{projectRoot}/coverage"], + "cache": true, + "options": { + "jestConfig": "{projectRoot}/jest.config.js", + "passWithNoTests": true + }, + "configurations": { + "ci": { + "ci": true, + "codeCoverage": true + } + } } }, "namedInputs": { diff --git a/package.json b/package.json index 04333e4a16a6..ce6dcc971128 100644 --- a/package.json +++ b/package.json @@ -4,11 +4,11 @@ "workspaces": { "packages": [ "packages/*" - ], - "nohoist": [ - "**/html-minifier-terser" ] }, + "installConfig": { + "hoistingLimits": "workspaces" + }, "contributors": [ "James Henry ", "Nicholas C. Zakas", @@ -59,9 +59,9 @@ "@babel/eslint-parser": "^7.22.7", "@babel/parser": "^7.22.7", "@babel/types": "^7.22.5", - "@nx/eslint": "17.0.2", - "@nx/jest": "17.0.2", - "@nx/workspace": "17.0.2", + "@nx/eslint": "17.1.1", + "@nx/jest": "17.1.1", + "@nx/workspace": "17.1.1", "@prettier/sync": "^0.3.0", "@swc/core": "^1.3.68", "@swc/jest": "^0.2.26", @@ -105,7 +105,7 @@ "markdownlint-cli": "^0.37.0", "ncp": "^2.0.0", "netlify": "^13.1.9", - "nx": "17.0.2", + "nx": "17.1.1", "prettier": "3.0.3", "pretty-format": "^29.6.2", "raw-loader": "^4.0.2", @@ -114,12 +114,13 @@ "ts-node": "10.7.0", "tslint": "^6.1.3", "tsx": "^3.12.7", - "typescript": ">=4.3.5 <5.3.0" + "typescript": ">=4.3.5 <5.4.0" }, "resolutions": { "@jest/create-cache-key-function": "^29", "@jest/reporters": "^29", "@jest/test-result": "^29", + "@microsoft/api-extractor@^7.38.0": "patch:@microsoft/api-extractor@npm%3A7.38.0#./.yarn/patches/@microsoft-api-extractor-npm-7.38.0-955f1e0725.patch", "@swc/core-android-arm-eabi": "link:./tools/dummypkg", "@swc/core-android-arm64": "link:./tools/dummypkg", "@swc/core-freebsd-x64": "link:./tools/dummypkg", @@ -140,7 +141,7 @@ "pretty-format": "^29", "react-split-pane@^0.1.92": "patch:react-split-pane@npm%3A0.1.92#./.yarn/patches/react-split-pane-npm-0.1.92-93dbf51dff.patch", "tsx": "^3.12.7", - "typescript": "patch:typescript@npm%3A5.2.2#./.yarn/patches/typescript-npm-5.2.2-01717e9f84.patch" + "typescript": "patch:typescript@npm%3A5.3.0-beta#./.yarn/patches/typescript-npm-5.3.0-beta-33b1e90865.patch" }, "packageManager": "yarn@3.6.4" } diff --git a/packages/ast-spec/CHANGELOG.md b/packages/ast-spec/CHANGELOG.md index 107e5119574e..b94a94a65de2 100644 --- a/packages/ast-spec/CHANGELOG.md +++ b/packages/ast-spec/CHANGELOG.md @@ -3,6 +3,19 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [6.11.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.10.0...v6.11.0) (2023-11-13) + + +### Features + +* allow typescript@5.3.0-RC as devDependency ([#7821](https://github.com/typescript-eslint/typescript-eslint/issues/7821)) ([b6c40b4](https://github.com/typescript-eslint/typescript-eslint/commit/b6c40b42b68d5567c7468030ee45b9b84bec4c4d)) + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + + + + + # [6.10.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.9.1...v6.10.0) (2023-11-06) **Note:** Version bump only for package @typescript-eslint/ast-spec diff --git a/packages/ast-spec/package.json b/packages/ast-spec/package.json index cdab601c4b10..82068b3ef7c9 100644 --- a/packages/ast-spec/package.json +++ b/packages/ast-spec/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/ast-spec", - "version": "6.10.0", + "version": "6.11.0", "description": "Complete specification for the TypeScript-ESTree AST", "private": true, "keywords": [ @@ -47,7 +47,7 @@ "@babel/core": "*", "@babel/eslint-parser": "*", "@babel/parser": "*", - "@microsoft/api-extractor": "^7.36.1", + "@microsoft/api-extractor": "^7.38.0", "glob": "*", "jest": "29.7.0", "jest-diff": "^29.6.2", diff --git a/packages/ast-spec/src/declaration/ExportAllDeclaration/fixtures/assertion/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/declaration/ExportAllDeclaration/fixtures/assertion/snapshots/1-TSESTree-AST.shot index cfc3aa2ff7c5..d4d3be0f79a8 100644 --- a/packages/ast-spec/src/declaration/ExportAllDeclaration/fixtures/assertion/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/declaration/ExportAllDeclaration/fixtures/assertion/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ExportAllDeclaration { type: "ExportAllDeclaration", - assertions: [ + attributes: [ ImportAttribute { type: "ImportAttribute", key: Identifier { diff --git a/packages/ast-spec/src/declaration/ExportAllDeclaration/fixtures/assertion/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/declaration/ExportAllDeclaration/fixtures/assertion/snapshots/5-AST-Alignment-AST.shot index 73bad658c9a9..9a60939d18ae 100644 --- a/packages/ast-spec/src/declaration/ExportAllDeclaration/fixtures/assertion/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/declaration/ExportAllDeclaration/fixtures/assertion/snapshots/5-AST-Alignment-AST.shot @@ -10,7 +10,8 @@ exports[`AST Fixtures declaration ExportAllDeclaration assertion AST Alignment - body: Array [ ExportAllDeclaration { type: 'ExportAllDeclaration', - assertions: Array [ +- attributes: Array [ ++ assertions: Array [ ImportAttribute { type: 'ImportAttribute', key: Identifier { diff --git a/packages/ast-spec/src/declaration/ExportAllDeclaration/fixtures/kind-type/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/declaration/ExportAllDeclaration/fixtures/kind-type/snapshots/1-TSESTree-AST.shot index 4ca39e1413a6..eb9e16881832 100644 --- a/packages/ast-spec/src/declaration/ExportAllDeclaration/fixtures/kind-type/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/declaration/ExportAllDeclaration/fixtures/kind-type/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ExportAllDeclaration { type: "ExportAllDeclaration", - assertions: [], + attributes: [], exported: Identifier { type: "Identifier", decorators: [], diff --git a/packages/ast-spec/src/declaration/ExportAllDeclaration/fixtures/kind-type/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/declaration/ExportAllDeclaration/fixtures/kind-type/snapshots/5-AST-Alignment-AST.shot index 35ef7eeb190b..dbcf1bf3b120 100644 --- a/packages/ast-spec/src/declaration/ExportAllDeclaration/fixtures/kind-type/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/declaration/ExportAllDeclaration/fixtures/kind-type/snapshots/5-AST-Alignment-AST.shot @@ -10,7 +10,8 @@ exports[`AST Fixtures declaration ExportAllDeclaration kind-type AST Alignment - body: Array [ ExportAllDeclaration { type: 'ExportAllDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], exported: Identifier { type: 'Identifier', - decorators: Array [], diff --git a/packages/ast-spec/src/declaration/ExportAllDeclaration/fixtures/named/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/declaration/ExportAllDeclaration/fixtures/named/snapshots/1-TSESTree-AST.shot index 0e45eb9b9ff3..84025787ab1b 100644 --- a/packages/ast-spec/src/declaration/ExportAllDeclaration/fixtures/named/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/declaration/ExportAllDeclaration/fixtures/named/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ExportAllDeclaration { type: "ExportAllDeclaration", - assertions: [], + attributes: [], exported: Identifier { type: "Identifier", decorators: [], diff --git a/packages/ast-spec/src/declaration/ExportAllDeclaration/fixtures/named/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/declaration/ExportAllDeclaration/fixtures/named/snapshots/5-AST-Alignment-AST.shot index 195370c94fce..33aaeac35077 100644 --- a/packages/ast-spec/src/declaration/ExportAllDeclaration/fixtures/named/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/declaration/ExportAllDeclaration/fixtures/named/snapshots/5-AST-Alignment-AST.shot @@ -10,7 +10,8 @@ exports[`AST Fixtures declaration ExportAllDeclaration named AST Alignment - AST body: Array [ ExportAllDeclaration { type: 'ExportAllDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], exported: Identifier { type: 'Identifier', - decorators: Array [], diff --git a/packages/ast-spec/src/declaration/ExportAllDeclaration/fixtures/type-kind/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/declaration/ExportAllDeclaration/fixtures/type-kind/snapshots/1-TSESTree-AST.shot index f027390217e8..007669444c16 100644 --- a/packages/ast-spec/src/declaration/ExportAllDeclaration/fixtures/type-kind/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/declaration/ExportAllDeclaration/fixtures/type-kind/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ExportAllDeclaration { type: "ExportAllDeclaration", - assertions: [], + attributes: [], exported: null, exportKind: "type", source: Literal { diff --git a/packages/ast-spec/src/declaration/ExportAllDeclaration/fixtures/type-kind/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/declaration/ExportAllDeclaration/fixtures/type-kind/snapshots/5-AST-Alignment-AST.shot index 50686a548344..235265f72d95 100644 --- a/packages/ast-spec/src/declaration/ExportAllDeclaration/fixtures/type-kind/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/declaration/ExportAllDeclaration/fixtures/type-kind/snapshots/5-AST-Alignment-AST.shot @@ -10,7 +10,8 @@ exports[`AST Fixtures declaration ExportAllDeclaration type-kind AST Alignment - body: Array [ ExportAllDeclaration { type: 'ExportAllDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], exported: null, exportKind: 'type', source: Literal { diff --git a/packages/ast-spec/src/declaration/ExportAllDeclaration/fixtures/unnamed/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/declaration/ExportAllDeclaration/fixtures/unnamed/snapshots/1-TSESTree-AST.shot index e7e2e4c8e244..c64ca9e8dd99 100644 --- a/packages/ast-spec/src/declaration/ExportAllDeclaration/fixtures/unnamed/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/declaration/ExportAllDeclaration/fixtures/unnamed/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ExportAllDeclaration { type: "ExportAllDeclaration", - assertions: [], + attributes: [], exported: null, exportKind: "value", source: Literal { diff --git a/packages/ast-spec/src/declaration/ExportAllDeclaration/fixtures/unnamed/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/declaration/ExportAllDeclaration/fixtures/unnamed/snapshots/5-AST-Alignment-AST.shot index 351bb72f34fb..e9283193a2ce 100644 --- a/packages/ast-spec/src/declaration/ExportAllDeclaration/fixtures/unnamed/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/declaration/ExportAllDeclaration/fixtures/unnamed/snapshots/5-AST-Alignment-AST.shot @@ -2,5 +2,43 @@ exports[`AST Fixtures declaration ExportAllDeclaration unnamed AST Alignment - AST 1`] = ` "Snapshot Diff: -Compared values have no visual difference." +- TSESTree ++ Babel + + Program { + type: 'Program', + body: Array [ + ExportAllDeclaration { + type: 'ExportAllDeclaration', +- attributes: Array [], ++ assertions: Array [], + exported: null, + exportKind: 'value', + source: Literal { + type: 'Literal', + raw: '\\'my-module\\'', + value: 'my-module', + + range: [14, 25], + loc: { + start: { column: 14, line: 1 }, + end: { column: 25, line: 1 }, + }, + }, + + range: [0, 26], + loc: { + start: { column: 0, line: 1 }, + end: { column: 26, line: 1 }, + }, + }, + ], + sourceType: 'module', + + range: [0, 27], + loc: { + start: { column: 0, line: 1 }, + end: { column: 0, line: 2 }, + }, + }" `; diff --git a/packages/ast-spec/src/declaration/ExportAllDeclaration/spec.ts b/packages/ast-spec/src/declaration/ExportAllDeclaration/spec.ts index 168f7b40b611..550e8da2ec50 100644 --- a/packages/ast-spec/src/declaration/ExportAllDeclaration/spec.ts +++ b/packages/ast-spec/src/declaration/ExportAllDeclaration/spec.ts @@ -12,8 +12,16 @@ export interface ExportAllDeclaration extends BaseNode { * ``` * export * from 'mod' assert { type: 'json' }; * ``` + * @deprecated -- Replaced with {@link `attributes`}. */ assertions: ImportAttribute[]; + /** + * The attributes declared for the export. + * ``` + * export * from 'mod' assert { type: 'json' }; + * ``` + */ + attributes: ImportAttribute[]; /** * The name for the exported items. `null` if no name is assigned. */ diff --git a/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/aliased/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/aliased/snapshots/1-TSESTree-AST.shot index 4b9ea6313a38..1b2d074fc6ef 100644 --- a/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/aliased/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/aliased/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ExportNamedDeclaration { type: "ExportNamedDeclaration", - assertions: [], + attributes: [], declaration: null, exportKind: "value", source: null, diff --git a/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/aliased/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/aliased/snapshots/5-AST-Alignment-AST.shot index 81487c9bfc10..1fd302c11434 100644 --- a/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/aliased/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/aliased/snapshots/5-AST-Alignment-AST.shot @@ -10,7 +10,8 @@ exports[`AST Fixtures declaration ExportNamedDeclaration aliased AST Alignment - body: Array [ ExportNamedDeclaration { type: 'ExportNamedDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], declaration: null, exportKind: 'value', source: null, diff --git a/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/class/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/class/snapshots/1-TSESTree-AST.shot index f5bf7d6c3a98..05582ecc396d 100644 --- a/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/class/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/class/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ExportNamedDeclaration { type: "ExportNamedDeclaration", - assertions: [], + attributes: [], declaration: ClassDeclaration { type: "ClassDeclaration", abstract: false, diff --git a/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/class/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/class/snapshots/5-AST-Alignment-AST.shot index 1e08010d64dd..bff52ed5d3c8 100644 --- a/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/class/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/class/snapshots/5-AST-Alignment-AST.shot @@ -10,7 +10,8 @@ exports[`AST Fixtures declaration ExportNamedDeclaration class AST Alignment - A body: Array [ ExportNamedDeclaration { type: 'ExportNamedDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], declaration: ClassDeclaration { type: 'ClassDeclaration', - abstract: false, diff --git a/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/declare-function/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/declare-function/snapshots/1-TSESTree-AST.shot index 47339e03ec4c..684107198101 100644 --- a/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/declare-function/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/declare-function/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ExportNamedDeclaration { type: "ExportNamedDeclaration", - assertions: [], + attributes: [], declaration: TSDeclareFunction { type: "TSDeclareFunction", async: false, diff --git a/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/declare-function/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/declare-function/snapshots/5-AST-Alignment-AST.shot index b1623c4968c0..bf0e8adefb7c 100644 --- a/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/declare-function/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/declare-function/snapshots/5-AST-Alignment-AST.shot @@ -10,7 +10,8 @@ exports[`AST Fixtures declaration ExportNamedDeclaration declare-function AST Al body: Array [ ExportNamedDeclaration { type: 'ExportNamedDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], declaration: TSDeclareFunction { type: 'TSDeclareFunction', async: false, diff --git a/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/enum/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/enum/snapshots/1-TSESTree-AST.shot index 8f25a46494f8..f3dff0f70ee9 100644 --- a/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/enum/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/enum/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ExportNamedDeclaration { type: "ExportNamedDeclaration", - assertions: [], + attributes: [], declaration: TSEnumDeclaration { type: "TSEnumDeclaration", const: false, diff --git a/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/enum/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/enum/snapshots/5-AST-Alignment-AST.shot index cba00ad04c18..0f83a6c9f506 100644 --- a/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/enum/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/enum/snapshots/5-AST-Alignment-AST.shot @@ -10,7 +10,8 @@ exports[`AST Fixtures declaration ExportNamedDeclaration enum AST Alignment - AS body: Array [ ExportNamedDeclaration { type: 'ExportNamedDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], declaration: TSEnumDeclaration { type: 'TSEnumDeclaration', - const: false, diff --git a/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/function-declaration/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/function-declaration/snapshots/1-TSESTree-AST.shot index ba60ee6c0a84..5624b4ea1603 100644 --- a/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/function-declaration/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/function-declaration/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ExportNamedDeclaration { type: "ExportNamedDeclaration", - assertions: [], + attributes: [], declaration: FunctionDeclaration { type: "FunctionDeclaration", async: false, diff --git a/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/function-declaration/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/function-declaration/snapshots/5-AST-Alignment-AST.shot index 31a4f289f309..1a351f581130 100644 --- a/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/function-declaration/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/function-declaration/snapshots/5-AST-Alignment-AST.shot @@ -10,7 +10,8 @@ exports[`AST Fixtures declaration ExportNamedDeclaration function-declaration AS body: Array [ ExportNamedDeclaration { type: 'ExportNamedDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], declaration: FunctionDeclaration { type: 'FunctionDeclaration', async: false, diff --git a/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/identifier-braced/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/identifier-braced/snapshots/1-TSESTree-AST.shot index 72b482685c12..d9f0a0177742 100644 --- a/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/identifier-braced/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/identifier-braced/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ExportNamedDeclaration { type: "ExportNamedDeclaration", - assertions: [], + attributes: [], declaration: null, exportKind: "value", source: null, diff --git a/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/identifier-braced/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/identifier-braced/snapshots/5-AST-Alignment-AST.shot index d17b88c8cc63..5336bc5c7c63 100644 --- a/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/identifier-braced/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/identifier-braced/snapshots/5-AST-Alignment-AST.shot @@ -10,7 +10,8 @@ exports[`AST Fixtures declaration ExportNamedDeclaration identifier-braced AST A body: Array [ ExportNamedDeclaration { type: 'ExportNamedDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], declaration: null, exportKind: 'value', source: null, diff --git a/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/identifier-many/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/identifier-many/snapshots/1-TSESTree-AST.shot index cf88a1a29c46..8892a61581c0 100644 --- a/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/identifier-many/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/identifier-many/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ExportNamedDeclaration { type: "ExportNamedDeclaration", - assertions: [], + attributes: [], declaration: null, exportKind: "value", source: null, diff --git a/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/identifier-many/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/identifier-many/snapshots/5-AST-Alignment-AST.shot index 19de4d0f7c2e..00294e85963b 100644 --- a/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/identifier-many/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/identifier-many/snapshots/5-AST-Alignment-AST.shot @@ -10,7 +10,8 @@ exports[`AST Fixtures declaration ExportNamedDeclaration identifier-many AST Ali body: Array [ ExportNamedDeclaration { type: 'ExportNamedDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], declaration: null, exportKind: 'value', source: null, diff --git a/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/interface/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/interface/snapshots/1-TSESTree-AST.shot index 490d6d7493d9..b4d3be7eb870 100644 --- a/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/interface/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/interface/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ExportNamedDeclaration { type: "ExportNamedDeclaration", - assertions: [], + attributes: [], declaration: TSInterfaceDeclaration { type: "TSInterfaceDeclaration", body: TSInterfaceBody { diff --git a/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/interface/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/interface/snapshots/5-AST-Alignment-AST.shot index 4a6ef4e90d4a..2655b20df128 100644 --- a/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/interface/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/interface/snapshots/5-AST-Alignment-AST.shot @@ -10,7 +10,8 @@ exports[`AST Fixtures declaration ExportNamedDeclaration interface AST Alignment body: Array [ ExportNamedDeclaration { type: 'ExportNamedDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], declaration: TSInterfaceDeclaration { type: 'TSInterfaceDeclaration', body: TSInterfaceBody { diff --git a/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/namespace/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/namespace/snapshots/1-TSESTree-AST.shot index 073273fe601b..f5e926919ff9 100644 --- a/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/namespace/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/namespace/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ExportNamedDeclaration { type: "ExportNamedDeclaration", - assertions: [], + attributes: [], declaration: TSModuleDeclaration { type: "TSModuleDeclaration", body: TSModuleBlock { diff --git a/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/namespace/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/namespace/snapshots/5-AST-Alignment-AST.shot index f2293b94d195..b6e7fae5973b 100644 --- a/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/namespace/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/namespace/snapshots/5-AST-Alignment-AST.shot @@ -10,7 +10,8 @@ exports[`AST Fixtures declaration ExportNamedDeclaration namespace AST Alignment body: Array [ ExportNamedDeclaration { type: 'ExportNamedDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], declaration: TSModuleDeclaration { type: 'TSModuleDeclaration', body: TSModuleBlock { diff --git a/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/type-alias/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/type-alias/snapshots/1-TSESTree-AST.shot index a5080b151db7..b18cd2895fda 100644 --- a/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/type-alias/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/type-alias/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ExportNamedDeclaration { type: "ExportNamedDeclaration", - assertions: [], + attributes: [], declaration: TSTypeAliasDeclaration { type: "TSTypeAliasDeclaration", declare: false, diff --git a/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/type-alias/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/type-alias/snapshots/5-AST-Alignment-AST.shot index 896628c64828..24c9430be9d8 100644 --- a/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/type-alias/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/type-alias/snapshots/5-AST-Alignment-AST.shot @@ -10,7 +10,8 @@ exports[`AST Fixtures declaration ExportNamedDeclaration type-alias AST Alignmen body: Array [ ExportNamedDeclaration { type: 'ExportNamedDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], declaration: TSTypeAliasDeclaration { type: 'TSTypeAliasDeclaration', - declare: false, diff --git a/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/variable-declaration/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/variable-declaration/snapshots/1-TSESTree-AST.shot index 92f70fe2850f..17fb53820f57 100644 --- a/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/variable-declaration/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/variable-declaration/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ExportNamedDeclaration { type: "ExportNamedDeclaration", - assertions: [], + attributes: [], declaration: VariableDeclaration { type: "VariableDeclaration", declarations: [ diff --git a/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/variable-declaration/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/variable-declaration/snapshots/5-AST-Alignment-AST.shot index b265b8c947b4..1514cd42b5d0 100644 --- a/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/variable-declaration/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/declaration/ExportNamedDeclaration/fixtures/variable-declaration/snapshots/5-AST-Alignment-AST.shot @@ -10,7 +10,8 @@ exports[`AST Fixtures declaration ExportNamedDeclaration variable-declaration AS body: Array [ ExportNamedDeclaration { type: 'ExportNamedDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], declaration: VariableDeclaration { type: 'VariableDeclaration', declarations: Array [ diff --git a/packages/ast-spec/src/declaration/ExportNamedDeclaration/spec.ts b/packages/ast-spec/src/declaration/ExportNamedDeclaration/spec.ts index b9b158eddb48..c71ed8b07ae6 100644 --- a/packages/ast-spec/src/declaration/ExportNamedDeclaration/spec.ts +++ b/packages/ast-spec/src/declaration/ExportNamedDeclaration/spec.ts @@ -14,8 +14,17 @@ interface ExportNamedDeclarationBase extends BaseNode { * export { foo } from 'mod' assert { type: 'json' }; * ``` * This will be an empty array if `source` is `null` + * @deprecated Replaced with {@link `attributes`}. */ assertions: ImportAttribute[]; + /** + * The attributes declared for the export. + * ``` + * export { foo } from 'mod' assert { type: 'json' }; + * ``` + * This will be an empty array if `source` is `null` + */ + attributes: ImportAttribute[]; /** * The exported declaration. * ``` @@ -44,8 +53,15 @@ interface ExportNamedDeclarationBase extends BaseNode { export interface ExportNamedDeclarationWithoutSourceWithMultiple extends ExportNamedDeclarationBase { - // this will always be empty array + /** + * This will always be an empty array. + * @deprecated Replaced with {@link `attributes`}. + */ assertions: ImportAttribute[]; + /** + * This will always be an empty array. + */ + attributes: ImportAttribute[]; declaration: null; source: null; specifiers: ExportSpecifier[]; @@ -53,17 +69,32 @@ export interface ExportNamedDeclarationWithoutSourceWithMultiple export interface ExportNamedDeclarationWithoutSourceWithSingle extends ExportNamedDeclarationBase { - // this will always be empty array + /** + * This will always be an empty array. + * @deprecated Replaced with {@link `attributes`}. + */ assertions: ImportAttribute[]; + /** + * This will always be an empty array. + */ + attributes: ImportAttribute[]; declaration: NamedExportDeclarations; source: null; - // this will always be empty array + // This will always be an empty array. specifiers: ExportSpecifier[]; } export interface ExportNamedDeclarationWithSource extends ExportNamedDeclarationBase { + /** + * This will always be an empty array. + * @deprecated Replaced with {@link `attributes`}. + */ assertions: ImportAttribute[]; + /** + * This will always be an empty array. + */ + attributes: ImportAttribute[]; declaration: null; source: StringLiteral; specifiers: ExportSpecifier[]; diff --git a/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/assertion/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/assertion/snapshots/1-TSESTree-AST.shot index c47958900194..c112b9bf9ffb 100644 --- a/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/assertion/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/assertion/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ImportDeclaration { type: "ImportDeclaration", - assertions: [ + attributes: [ ImportAttribute { type: "ImportAttribute", key: Identifier { diff --git a/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/assertion/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/assertion/snapshots/5-AST-Alignment-AST.shot index 96cbf1acd91e..0d9ee4b2c0cf 100644 --- a/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/assertion/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/assertion/snapshots/5-AST-Alignment-AST.shot @@ -10,7 +10,8 @@ exports[`AST Fixtures declaration ImportDeclaration assertion AST Alignment - AS body: Array [ ImportDeclaration { type: 'ImportDeclaration', - assertions: Array [ +- attributes: Array [ ++ assertions: Array [ ImportAttribute { type: 'ImportAttribute', key: Identifier { diff --git a/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/default-and-named-many/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/default-and-named-many/snapshots/1-TSESTree-AST.shot index 8b38359c0e5a..d8d73d809e3e 100644 --- a/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/default-and-named-many/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/default-and-named-many/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ImportDeclaration { type: "ImportDeclaration", - assertions: [], + attributes: [], importKind: "value", source: Literal { type: "Literal", diff --git a/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/default-and-named-many/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/default-and-named-many/snapshots/5-AST-Alignment-AST.shot index c6194ed42716..81c23f7e0c95 100644 --- a/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/default-and-named-many/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/default-and-named-many/snapshots/5-AST-Alignment-AST.shot @@ -10,7 +10,8 @@ exports[`AST Fixtures declaration ImportDeclaration default-and-named-many AST A body: Array [ ImportDeclaration { type: 'ImportDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], importKind: 'value', source: Literal { type: 'Literal', diff --git a/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/default-and-named-none/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/default-and-named-none/snapshots/1-TSESTree-AST.shot index bed5bd1289cb..3283817bac22 100644 --- a/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/default-and-named-none/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/default-and-named-none/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ImportDeclaration { type: "ImportDeclaration", - assertions: [], + attributes: [], importKind: "value", source: Literal { type: "Literal", diff --git a/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/default-and-named-none/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/default-and-named-none/snapshots/5-AST-Alignment-AST.shot index 7d7acd1e28b1..1bf088426158 100644 --- a/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/default-and-named-none/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/default-and-named-none/snapshots/5-AST-Alignment-AST.shot @@ -10,7 +10,8 @@ exports[`AST Fixtures declaration ImportDeclaration default-and-named-none AST A body: Array [ ImportDeclaration { type: 'ImportDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], importKind: 'value', source: Literal { type: 'Literal', diff --git a/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/default-and-named-one/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/default-and-named-one/snapshots/1-TSESTree-AST.shot index f54adf1db18c..d4b801ba1a58 100644 --- a/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/default-and-named-one/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/default-and-named-one/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ImportDeclaration { type: "ImportDeclaration", - assertions: [], + attributes: [], importKind: "value", source: Literal { type: "Literal", diff --git a/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/default-and-named-one/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/default-and-named-one/snapshots/5-AST-Alignment-AST.shot index 5457bc7111eb..ed408e5d8643 100644 --- a/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/default-and-named-one/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/default-and-named-one/snapshots/5-AST-Alignment-AST.shot @@ -10,7 +10,8 @@ exports[`AST Fixtures declaration ImportDeclaration default-and-named-one AST Al body: Array [ ImportDeclaration { type: 'ImportDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], importKind: 'value', source: Literal { type: 'Literal', diff --git a/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/default-and-namespace/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/default-and-namespace/snapshots/1-TSESTree-AST.shot index ab716a4e00fd..f4f243232bbf 100644 --- a/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/default-and-namespace/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/default-and-namespace/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ImportDeclaration { type: "ImportDeclaration", - assertions: [], + attributes: [], importKind: "value", source: Literal { type: "Literal", diff --git a/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/default-and-namespace/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/default-and-namespace/snapshots/5-AST-Alignment-AST.shot index 622ac6c755bf..81fe9c5df57d 100644 --- a/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/default-and-namespace/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/default-and-namespace/snapshots/5-AST-Alignment-AST.shot @@ -10,7 +10,8 @@ exports[`AST Fixtures declaration ImportDeclaration default-and-namespace AST Al body: Array [ ImportDeclaration { type: 'ImportDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], importKind: 'value', source: Literal { type: 'Literal', diff --git a/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/default/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/default/snapshots/1-TSESTree-AST.shot index 50127e55882a..0cd95609cb32 100644 --- a/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/default/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/default/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ImportDeclaration { type: "ImportDeclaration", - assertions: [], + attributes: [], importKind: "value", source: Literal { type: "Literal", diff --git a/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/default/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/default/snapshots/5-AST-Alignment-AST.shot index 4bbe4eb94800..1e180527e932 100644 --- a/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/default/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/default/snapshots/5-AST-Alignment-AST.shot @@ -10,7 +10,8 @@ exports[`AST Fixtures declaration ImportDeclaration default AST Alignment - AST body: Array [ ImportDeclaration { type: 'ImportDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], importKind: 'value', source: Literal { type: 'Literal', diff --git a/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/named-many/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/named-many/snapshots/1-TSESTree-AST.shot index 38a4b893dcc1..c1c0e430a676 100644 --- a/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/named-many/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/named-many/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ImportDeclaration { type: "ImportDeclaration", - assertions: [], + attributes: [], importKind: "value", source: Literal { type: "Literal", diff --git a/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/named-many/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/named-many/snapshots/5-AST-Alignment-AST.shot index 43e854741994..ca6533d7e034 100644 --- a/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/named-many/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/named-many/snapshots/5-AST-Alignment-AST.shot @@ -10,7 +10,8 @@ exports[`AST Fixtures declaration ImportDeclaration named-many AST Alignment - A body: Array [ ImportDeclaration { type: 'ImportDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], importKind: 'value', source: Literal { type: 'Literal', diff --git a/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/named-none/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/named-none/snapshots/1-TSESTree-AST.shot index bb80f4408ac2..bfb4b8933ad3 100644 --- a/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/named-none/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/named-none/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ImportDeclaration { type: "ImportDeclaration", - assertions: [], + attributes: [], importKind: "value", source: Literal { type: "Literal", diff --git a/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/named-none/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/named-none/snapshots/5-AST-Alignment-AST.shot index aa52a0d98d1c..ae715084a6c2 100644 --- a/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/named-none/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/named-none/snapshots/5-AST-Alignment-AST.shot @@ -2,5 +2,43 @@ exports[`AST Fixtures declaration ImportDeclaration named-none AST Alignment - AST 1`] = ` "Snapshot Diff: -Compared values have no visual difference." +- TSESTree ++ Babel + + Program { + type: 'Program', + body: Array [ + ImportDeclaration { + type: 'ImportDeclaration', +- attributes: Array [], ++ assertions: Array [], + importKind: 'value', + source: Literal { + type: 'Literal', + raw: '\\'mod\\'', + value: 'mod', + + range: [15, 20], + loc: { + start: { column: 15, line: 1 }, + end: { column: 20, line: 1 }, + }, + }, + specifiers: Array [], + + range: [0, 21], + loc: { + start: { column: 0, line: 1 }, + end: { column: 21, line: 1 }, + }, + }, + ], + sourceType: 'module', + + range: [0, 22], + loc: { + start: { column: 0, line: 1 }, + end: { column: 0, line: 2 }, + }, + }" `; diff --git a/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/named-one/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/named-one/snapshots/1-TSESTree-AST.shot index 1bf7774ca11a..1e892187a4a0 100644 --- a/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/named-one/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/named-one/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ImportDeclaration { type: "ImportDeclaration", - assertions: [], + attributes: [], importKind: "value", source: Literal { type: "Literal", diff --git a/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/named-one/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/named-one/snapshots/5-AST-Alignment-AST.shot index d9cd9c7eb25d..2412206ff2a2 100644 --- a/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/named-one/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/named-one/snapshots/5-AST-Alignment-AST.shot @@ -10,7 +10,8 @@ exports[`AST Fixtures declaration ImportDeclaration named-one AST Alignment - AS body: Array [ ImportDeclaration { type: 'ImportDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], importKind: 'value', source: Literal { type: 'Literal', diff --git a/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/side-effect/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/side-effect/snapshots/1-TSESTree-AST.shot index 33f9a8b9175c..ffe99921f25c 100644 --- a/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/side-effect/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/side-effect/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ImportDeclaration { type: "ImportDeclaration", - assertions: [], + attributes: [], importKind: "value", source: Literal { type: "Literal", diff --git a/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/side-effect/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/side-effect/snapshots/5-AST-Alignment-AST.shot index 2fa96b2dc1ca..8db8df898690 100644 --- a/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/side-effect/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/declaration/ImportDeclaration/fixtures/side-effect/snapshots/5-AST-Alignment-AST.shot @@ -2,5 +2,43 @@ exports[`AST Fixtures declaration ImportDeclaration side-effect AST Alignment - AST 1`] = ` "Snapshot Diff: -Compared values have no visual difference." +- TSESTree ++ Babel + + Program { + type: 'Program', + body: Array [ + ImportDeclaration { + type: 'ImportDeclaration', +- attributes: Array [], ++ assertions: Array [], + importKind: 'value', + source: Literal { + type: 'Literal', + raw: '\\'mod\\'', + value: 'mod', + + range: [7, 12], + loc: { + start: { column: 7, line: 1 }, + end: { column: 12, line: 1 }, + }, + }, + specifiers: Array [], + + range: [0, 13], + loc: { + start: { column: 0, line: 1 }, + end: { column: 13, line: 1 }, + }, + }, + ], + sourceType: 'module', + + range: [0, 14], + loc: { + start: { column: 0, line: 1 }, + end: { column: 0, line: 2 }, + }, + }" `; diff --git a/packages/ast-spec/src/declaration/ImportDeclaration/spec.ts b/packages/ast-spec/src/declaration/ImportDeclaration/spec.ts index 389af77f87a1..a9d49a75d4c8 100644 --- a/packages/ast-spec/src/declaration/ImportDeclaration/spec.ts +++ b/packages/ast-spec/src/declaration/ImportDeclaration/spec.ts @@ -12,8 +12,16 @@ export interface ImportDeclaration extends BaseNode { * ``` * import * from 'mod' assert { type: 'json' }; * ``` + * @deprecated -- Replaced with {@link `attributes`}. */ assertions: ImportAttribute[]; + /** + * The attributes declared for the export. + * ``` + * import * from 'mod' with { type: 'json' }; + * ``` + */ + attributes: ImportAttribute[]; /** * The kind of the import. */ diff --git a/packages/ast-spec/src/declaration/TSModuleDeclaration/fixtures/namespace-nested-once-export/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/declaration/TSModuleDeclaration/fixtures/namespace-nested-once-export/snapshots/1-TSESTree-AST.shot index d8b2ef582c99..908af8690a98 100644 --- a/packages/ast-spec/src/declaration/TSModuleDeclaration/fixtures/namespace-nested-once-export/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/declaration/TSModuleDeclaration/fixtures/namespace-nested-once-export/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ExportNamedDeclaration { type: "ExportNamedDeclaration", - assertions: [], + attributes: [], declaration: TSModuleDeclaration { type: "TSModuleDeclaration", body: TSModuleBlock { diff --git a/packages/ast-spec/src/declaration/TSModuleDeclaration/fixtures/namespace-nested-once-export/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/declaration/TSModuleDeclaration/fixtures/namespace-nested-once-export/snapshots/5-AST-Alignment-AST.shot index 84f061a5ebde..12815a82d507 100644 --- a/packages/ast-spec/src/declaration/TSModuleDeclaration/fixtures/namespace-nested-once-export/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/declaration/TSModuleDeclaration/fixtures/namespace-nested-once-export/snapshots/5-AST-Alignment-AST.shot @@ -10,13 +10,19 @@ exports[`AST Fixtures declaration TSModuleDeclaration namespace-nested-once-expo body: Array [ ExportNamedDeclaration { type: 'ExportNamedDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], declaration: TSModuleDeclaration { type: 'TSModuleDeclaration', - body: TSModuleBlock { - type: 'TSModuleBlock', - body: Array [], -- ++ body: TSModuleDeclaration { ++ type: 'TSModuleDeclaration', ++ body: TSModuleBlock { ++ type: 'TSModuleBlock', ++ body: Array [], + - range: [25, 27], - loc: { - start: { column: 25, line: 1 }, @@ -32,12 +38,7 @@ exports[`AST Fixtures declaration TSModuleDeclaration namespace-nested-once-expo - decorators: Array [], - name: 'abd', - optional: false, -+ body: TSModuleDeclaration { -+ type: 'TSModuleDeclaration', -+ body: TSModuleBlock { -+ type: 'TSModuleBlock', -+ body: Array [], - +- - range: [17, 20], + range: [25, 27], loc: { diff --git a/packages/ast-spec/src/declaration/TSModuleDeclaration/fixtures/namespace-nested-twice-export-declare/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/declaration/TSModuleDeclaration/fixtures/namespace-nested-twice-export-declare/snapshots/1-TSESTree-AST.shot index d725dc2ec655..f8a545ccce4f 100644 --- a/packages/ast-spec/src/declaration/TSModuleDeclaration/fixtures/namespace-nested-twice-export-declare/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/declaration/TSModuleDeclaration/fixtures/namespace-nested-twice-export-declare/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ExportNamedDeclaration { type: "ExportNamedDeclaration", - assertions: [], + attributes: [], declaration: TSModuleDeclaration { type: "TSModuleDeclaration", body: TSModuleBlock { diff --git a/packages/ast-spec/src/declaration/TSModuleDeclaration/fixtures/namespace-nested-twice-export-declare/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/declaration/TSModuleDeclaration/fixtures/namespace-nested-twice-export-declare/snapshots/5-AST-Alignment-AST.shot index dc9a53f795df..ff8cdfd1b197 100644 --- a/packages/ast-spec/src/declaration/TSModuleDeclaration/fixtures/namespace-nested-twice-export-declare/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/declaration/TSModuleDeclaration/fixtures/namespace-nested-twice-export-declare/snapshots/5-AST-Alignment-AST.shot @@ -10,13 +10,21 @@ exports[`AST Fixtures declaration TSModuleDeclaration namespace-nested-twice-exp body: Array [ ExportNamedDeclaration { type: 'ExportNamedDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], declaration: TSModuleDeclaration { type: 'TSModuleDeclaration', - body: TSModuleBlock { - type: 'TSModuleBlock', - body: Array [], -- ++ body: TSModuleDeclaration { ++ type: 'TSModuleDeclaration', ++ body: TSModuleDeclaration { ++ type: 'TSModuleDeclaration', ++ body: TSModuleBlock { ++ type: 'TSModuleBlock', ++ body: Array [], + - range: [37, 39], - loc: { - start: { column: 37, line: 1 }, @@ -34,14 +42,7 @@ exports[`AST Fixtures declaration TSModuleDeclaration namespace-nested-twice-exp - decorators: Array [], - name: 'abc', - optional: false, -+ body: TSModuleDeclaration { -+ type: 'TSModuleDeclaration', -+ body: TSModuleDeclaration { -+ type: 'TSModuleDeclaration', -+ body: TSModuleBlock { -+ type: 'TSModuleBlock', -+ body: Array [], - +- - range: [25, 28], + range: [37, 39], loc: { diff --git a/packages/ast-spec/src/declaration/TSModuleDeclaration/fixtures/namespace-nested-twice-export/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/declaration/TSModuleDeclaration/fixtures/namespace-nested-twice-export/snapshots/1-TSESTree-AST.shot index 2446e9b95087..112dd814b91f 100644 --- a/packages/ast-spec/src/declaration/TSModuleDeclaration/fixtures/namespace-nested-twice-export/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/declaration/TSModuleDeclaration/fixtures/namespace-nested-twice-export/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ExportNamedDeclaration { type: "ExportNamedDeclaration", - assertions: [], + attributes: [], declaration: TSModuleDeclaration { type: "TSModuleDeclaration", body: TSModuleBlock { diff --git a/packages/ast-spec/src/declaration/TSModuleDeclaration/fixtures/namespace-nested-twice-export/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/declaration/TSModuleDeclaration/fixtures/namespace-nested-twice-export/snapshots/5-AST-Alignment-AST.shot index 26c9b1396134..2f3bcf0ef68c 100644 --- a/packages/ast-spec/src/declaration/TSModuleDeclaration/fixtures/namespace-nested-twice-export/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/declaration/TSModuleDeclaration/fixtures/namespace-nested-twice-export/snapshots/5-AST-Alignment-AST.shot @@ -10,13 +10,21 @@ exports[`AST Fixtures declaration TSModuleDeclaration namespace-nested-twice-exp body: Array [ ExportNamedDeclaration { type: 'ExportNamedDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], declaration: TSModuleDeclaration { type: 'TSModuleDeclaration', - body: TSModuleBlock { - type: 'TSModuleBlock', - body: Array [], -- ++ body: TSModuleDeclaration { ++ type: 'TSModuleDeclaration', ++ body: TSModuleDeclaration { ++ type: 'TSModuleDeclaration', ++ body: TSModuleBlock { ++ type: 'TSModuleBlock', ++ body: Array [], + - range: [29, 31], - loc: { - start: { column: 29, line: 1 }, @@ -34,14 +42,7 @@ exports[`AST Fixtures declaration TSModuleDeclaration namespace-nested-twice-exp - decorators: Array [], - name: 'abc', - optional: false, -+ body: TSModuleDeclaration { -+ type: 'TSModuleDeclaration', -+ body: TSModuleDeclaration { -+ type: 'TSModuleDeclaration', -+ body: TSModuleBlock { -+ type: 'TSModuleBlock', -+ body: Array [], - +- - range: [17, 20], + range: [29, 31], loc: { diff --git a/packages/ast-spec/src/declaration/VariableDeclaration/spec.ts b/packages/ast-spec/src/declaration/VariableDeclaration/spec.ts index 726af07ea093..23a04b683248 100644 --- a/packages/ast-spec/src/declaration/VariableDeclaration/spec.ts +++ b/packages/ast-spec/src/declaration/VariableDeclaration/spec.ts @@ -36,7 +36,7 @@ export interface LetOrConstOrVarDeclaration extends BaseNode { kind: 'const' | 'let' | 'var'; } -export interface UsingInNomalConextDeclaration extends BaseNode { +export interface UsingInNormalContextDeclaration extends BaseNode { type: AST_NODE_TYPES.VariableDeclaration; /** * The variables declared by this declaration. @@ -91,6 +91,6 @@ export interface UsingInForOfDeclaration extends BaseNode { export type UsingDeclaration = | UsingInForOfDeclaration - | UsingInNomalConextDeclaration; + | UsingInNormalContextDeclaration; export type VariableDeclaration = LetOrConstOrVarDeclaration | UsingDeclaration; diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/abstract-class-with-abstract-method/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/abstract-class-with-abstract-method/snapshots/1-TSESTree-AST.shot index d9de87c19aa4..6a7d0db18ea8 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/abstract-class-with-abstract-method/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/abstract-class-with-abstract-method/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ExportNamedDeclaration { type: "ExportNamedDeclaration", - assertions: [], + attributes: [], declaration: ClassDeclaration { type: "ClassDeclaration", abstract: true, diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/abstract-class-with-abstract-method/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/abstract-class-with-abstract-method/snapshots/5-AST-Alignment-AST.shot index 0ab1de91b9ec..84f4b6858206 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/abstract-class-with-abstract-method/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/abstract-class-with-abstract-method/snapshots/5-AST-Alignment-AST.shot @@ -10,7 +10,8 @@ exports[`AST Fixtures legacy-fixtures basics abstract-class-with-abstract-method body: Array [ ExportNamedDeclaration { type: 'ExportNamedDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], declaration: ClassDeclaration { type: 'ClassDeclaration', abstract: true, @@ -84,21 +85,21 @@ exports[`AST Fixtures legacy-fixtures basics abstract-class-with-abstract-method loc: { start: { column: 34, line: 4 }, end: { column: 42, line: 4 }, -- }, -- }, + }, + }, - typeName: Identifier { - type: 'Identifier', - decorators: Array [], - name: 'Promise', - optional: false, -- + - range: [139, 146], - loc: { - start: { column: 27, line: 4 }, - end: { column: 34, line: 4 }, - }, - }, - +- }, +- }, +- range: [139, 154], loc: { start: { column: 27, line: 4 }, diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/abstract-class-with-optional-method/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/abstract-class-with-optional-method/snapshots/1-TSESTree-AST.shot index 391e52d7197a..751453c23535 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/abstract-class-with-optional-method/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/abstract-class-with-optional-method/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ExportNamedDeclaration { type: "ExportNamedDeclaration", - assertions: [], + attributes: [], declaration: ClassDeclaration { type: "ClassDeclaration", abstract: true, diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/abstract-class-with-optional-method/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/abstract-class-with-optional-method/snapshots/5-AST-Alignment-AST.shot index b706fb052fb7..f53e867eede8 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/abstract-class-with-optional-method/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/abstract-class-with-optional-method/snapshots/5-AST-Alignment-AST.shot @@ -10,7 +10,8 @@ exports[`AST Fixtures legacy-fixtures basics abstract-class-with-optional-method body: Array [ ExportNamedDeclaration { type: 'ExportNamedDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], declaration: ClassDeclaration { type: 'ClassDeclaration', abstract: true, @@ -81,21 +82,21 @@ exports[`AST Fixtures legacy-fixtures basics abstract-class-with-optional-method loc: { start: { column: 26, line: 4 }, end: { column: 34, line: 4 }, - }, - }, +- }, +- }, - typeName: Identifier { - type: 'Identifier', - decorators: Array [], - name: 'Promise', - optional: false, - +- - range: [131, 138], - loc: { - start: { column: 19, line: 4 }, - end: { column: 26, line: 4 }, -- }, -- }, -- + }, + }, + range: [131, 146], loc: { start: { column: 19, line: 4 }, diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-all-with-import-assertions/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-all-with-import-assertions/snapshots/1-TSESTree-AST.shot index 370da1994725..99ffa472f88b 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-all-with-import-assertions/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-all-with-import-assertions/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ExportAllDeclaration { type: "ExportAllDeclaration", - assertions: [ + attributes: [ ImportAttribute { type: "ImportAttribute", key: Identifier { diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-all-with-import-assertions/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-all-with-import-assertions/snapshots/5-AST-Alignment-AST.shot index 58f3e3de323b..a18ffe53a772 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-all-with-import-assertions/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-all-with-import-assertions/snapshots/5-AST-Alignment-AST.shot @@ -10,7 +10,8 @@ exports[`AST Fixtures legacy-fixtures basics export-all-with-import-assertions A body: Array [ ExportAllDeclaration { type: 'ExportAllDeclaration', - assertions: Array [ +- attributes: Array [ ++ assertions: Array [ ImportAttribute { type: 'ImportAttribute', key: Identifier { diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-declare-const-named-enum/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-declare-const-named-enum/snapshots/1-TSESTree-AST.shot index f1169f5926c4..edf76ad24aee 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-declare-const-named-enum/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-declare-const-named-enum/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ExportNamedDeclaration { type: "ExportNamedDeclaration", - assertions: [], + attributes: [], declaration: TSEnumDeclaration { type: "TSEnumDeclaration", const: true, diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-declare-const-named-enum/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-declare-const-named-enum/snapshots/5-AST-Alignment-AST.shot index b3b73fdb4019..1795c3300259 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-declare-const-named-enum/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-declare-const-named-enum/snapshots/5-AST-Alignment-AST.shot @@ -10,7 +10,8 @@ exports[`AST Fixtures legacy-fixtures basics export-declare-const-named-enum AST body: Array [ ExportNamedDeclaration { type: 'ExportNamedDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], declaration: TSEnumDeclaration { type: 'TSEnumDeclaration', const: true, diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-declare-named-enum/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-declare-named-enum/snapshots/1-TSESTree-AST.shot index 3b057de32f42..14b710bbca7d 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-declare-named-enum/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-declare-named-enum/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ExportNamedDeclaration { type: "ExportNamedDeclaration", - assertions: [], + attributes: [], declaration: TSEnumDeclaration { type: "TSEnumDeclaration", const: false, diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-declare-named-enum/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-declare-named-enum/snapshots/5-AST-Alignment-AST.shot index 2d768bbf61bc..90b208e7ad14 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-declare-named-enum/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-declare-named-enum/snapshots/5-AST-Alignment-AST.shot @@ -10,7 +10,8 @@ exports[`AST Fixtures legacy-fixtures basics export-declare-named-enum AST Align body: Array [ ExportNamedDeclaration { type: 'ExportNamedDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], declaration: TSEnumDeclaration { type: 'TSEnumDeclaration', - const: false, diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-named-class-with-generic/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-named-class-with-generic/snapshots/1-TSESTree-AST.shot index 937557783dae..417f75275351 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-named-class-with-generic/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-named-class-with-generic/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ExportNamedDeclaration { type: "ExportNamedDeclaration", - assertions: [], + attributes: [], declaration: ClassDeclaration { type: "ClassDeclaration", abstract: false, diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-named-class-with-generic/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-named-class-with-generic/snapshots/5-AST-Alignment-AST.shot index cd249e319cc3..503617607ae3 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-named-class-with-generic/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-named-class-with-generic/snapshots/5-AST-Alignment-AST.shot @@ -10,7 +10,8 @@ exports[`AST Fixtures legacy-fixtures basics export-named-class-with-generic AST body: Array [ ExportNamedDeclaration { type: 'ExportNamedDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], declaration: ClassDeclaration { type: 'ClassDeclaration', - abstract: false, diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-named-class-with-multiple-generics/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-named-class-with-multiple-generics/snapshots/1-TSESTree-AST.shot index efc242f4dfdf..d0229b3fda0c 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-named-class-with-multiple-generics/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-named-class-with-multiple-generics/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ExportNamedDeclaration { type: "ExportNamedDeclaration", - assertions: [], + attributes: [], declaration: ClassDeclaration { type: "ClassDeclaration", abstract: false, diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-named-class-with-multiple-generics/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-named-class-with-multiple-generics/snapshots/5-AST-Alignment-AST.shot index 122e2a3401f4..46b3b24b50c6 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-named-class-with-multiple-generics/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-named-class-with-multiple-generics/snapshots/5-AST-Alignment-AST.shot @@ -10,7 +10,8 @@ exports[`AST Fixtures legacy-fixtures basics export-named-class-with-multiple-ge body: Array [ ExportNamedDeclaration { type: 'ExportNamedDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], declaration: ClassDeclaration { type: 'ClassDeclaration', - abstract: false, diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-named-enum/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-named-enum/snapshots/1-TSESTree-AST.shot index cb3489f2b02c..7126562753f5 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-named-enum/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-named-enum/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ExportNamedDeclaration { type: "ExportNamedDeclaration", - assertions: [], + attributes: [], declaration: TSEnumDeclaration { type: "TSEnumDeclaration", const: false, diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-named-enum/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-named-enum/snapshots/5-AST-Alignment-AST.shot index 1471fe301277..020aebc7f3d0 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-named-enum/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-named-enum/snapshots/5-AST-Alignment-AST.shot @@ -10,7 +10,8 @@ exports[`AST Fixtures legacy-fixtures basics export-named-enum AST Alignment - A body: Array [ ExportNamedDeclaration { type: 'ExportNamedDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], declaration: TSEnumDeclaration { type: 'TSEnumDeclaration', - const: false, diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-star-as-ns-from/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-star-as-ns-from/snapshots/1-TSESTree-AST.shot index 20335c1996f3..7a216b2b6f85 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-star-as-ns-from/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-star-as-ns-from/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ExportAllDeclaration { type: "ExportAllDeclaration", - assertions: [], + attributes: [], exported: Identifier { type: "Identifier", decorators: [], diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-star-as-ns-from/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-star-as-ns-from/snapshots/5-AST-Alignment-AST.shot index e6b5545d6af4..12c0722a78d5 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-star-as-ns-from/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-star-as-ns-from/snapshots/5-AST-Alignment-AST.shot @@ -10,7 +10,8 @@ exports[`AST Fixtures legacy-fixtures basics export-star-as-ns-from AST Alignmen body: Array [ ExportAllDeclaration { type: 'ExportAllDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], exported: Identifier { type: 'Identifier', - decorators: Array [], diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-type-as/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-type-as/snapshots/1-TSESTree-AST.shot index afa8b1708821..0ba289175e4e 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-type-as/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-type-as/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ExportNamedDeclaration { type: "ExportNamedDeclaration", - assertions: [], + attributes: [], declaration: null, exportKind: "type", source: null, diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-type-as/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-type-as/snapshots/5-AST-Alignment-AST.shot index c9dea6f3214b..7804541d7ef0 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-type-as/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-type-as/snapshots/5-AST-Alignment-AST.shot @@ -10,7 +10,8 @@ exports[`AST Fixtures legacy-fixtures basics export-type-as AST Alignment - AST body: Array [ ExportNamedDeclaration { type: 'ExportNamedDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], declaration: null, exportKind: 'type', source: null, diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-type-from-as/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-type-from-as/snapshots/1-TSESTree-AST.shot index ddf7996e773e..84051a627fd0 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-type-from-as/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-type-from-as/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ExportNamedDeclaration { type: "ExportNamedDeclaration", - assertions: [], + attributes: [], declaration: null, exportKind: "type", source: Literal { diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-type-from-as/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-type-from-as/snapshots/5-AST-Alignment-AST.shot index 0192033c1684..e15bd85ed1ce 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-type-from-as/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-type-from-as/snapshots/5-AST-Alignment-AST.shot @@ -10,7 +10,8 @@ exports[`AST Fixtures legacy-fixtures basics export-type-from-as AST Alignment - body: Array [ ExportNamedDeclaration { type: 'ExportNamedDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], declaration: null, exportKind: 'type', source: Literal { diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-type-from/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-type-from/snapshots/1-TSESTree-AST.shot index 4c12ca941c00..b6b36a784a7b 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-type-from/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-type-from/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ExportNamedDeclaration { type: "ExportNamedDeclaration", - assertions: [], + attributes: [], declaration: null, exportKind: "type", source: Literal { diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-type-from/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-type-from/snapshots/5-AST-Alignment-AST.shot index 47d6b2af6f20..b6a224ee204f 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-type-from/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-type-from/snapshots/5-AST-Alignment-AST.shot @@ -10,7 +10,8 @@ exports[`AST Fixtures legacy-fixtures basics export-type-from AST Alignment - AS body: Array [ ExportNamedDeclaration { type: 'ExportNamedDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], declaration: null, exportKind: 'type', source: Literal { diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-type-star-from/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-type-star-from/snapshots/1-TSESTree-AST.shot index 62fbec4b35e7..f0bf16edebdb 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-type-star-from/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-type-star-from/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ExportAllDeclaration { type: "ExportAllDeclaration", - assertions: [], + attributes: [], exported: null, exportKind: "type", source: Literal { diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-type-star-from/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-type-star-from/snapshots/5-AST-Alignment-AST.shot index b14dfbca2018..b8adf9144ef2 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-type-star-from/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-type-star-from/snapshots/5-AST-Alignment-AST.shot @@ -10,7 +10,8 @@ exports[`AST Fixtures legacy-fixtures basics export-type-star-from AST Alignment body: Array [ ExportAllDeclaration { type: 'ExportAllDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], exported: null, exportKind: 'type', source: Literal { diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-type/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-type/snapshots/1-TSESTree-AST.shot index 017fb0f7bed7..a561b76d785f 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-type/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-type/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ExportNamedDeclaration { type: "ExportNamedDeclaration", - assertions: [], + attributes: [], declaration: null, exportKind: "type", source: null, diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-type/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-type/snapshots/5-AST-Alignment-AST.shot index b34ddb187f67..689870ae13dd 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-type/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/export-type/snapshots/5-AST-Alignment-AST.shot @@ -10,7 +10,8 @@ exports[`AST Fixtures legacy-fixtures basics export-type AST Alignment - AST 1`] body: Array [ ExportNamedDeclaration { type: 'ExportNamedDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], declaration: null, exportKind: 'type', source: null, diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/function-overloads/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/function-overloads/snapshots/1-TSESTree-AST.shot index 7472805c4261..f204c446014e 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/function-overloads/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/function-overloads/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ExportNamedDeclaration { type: "ExportNamedDeclaration", - assertions: [], + attributes: [], declaration: TSDeclareFunction { type: "TSDeclareFunction", async: false, @@ -94,7 +94,7 @@ Program { }, ExportNamedDeclaration { type: "ExportNamedDeclaration", - assertions: [], + attributes: [], declaration: TSDeclareFunction { type: "TSDeclareFunction", async: false, @@ -182,7 +182,7 @@ Program { }, ExportNamedDeclaration { type: "ExportNamedDeclaration", - assertions: [], + attributes: [], declaration: FunctionDeclaration { type: "FunctionDeclaration", async: false, diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/function-overloads/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/function-overloads/snapshots/5-AST-Alignment-AST.shot index 4af306c530cd..02138458e0e9 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/function-overloads/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/function-overloads/snapshots/5-AST-Alignment-AST.shot @@ -10,7 +10,8 @@ exports[`AST Fixtures legacy-fixtures basics function-overloads AST Alignment - body: Array [ ExportNamedDeclaration { type: 'ExportNamedDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], declaration: TSDeclareFunction { type: 'TSDeclareFunction', async: false, @@ -98,7 +99,8 @@ exports[`AST Fixtures legacy-fixtures basics function-overloads AST Alignment - }, ExportNamedDeclaration { type: 'ExportNamedDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], declaration: TSDeclareFunction { type: 'TSDeclareFunction', async: false, @@ -186,7 +188,8 @@ exports[`AST Fixtures legacy-fixtures basics function-overloads AST Alignment - }, ExportNamedDeclaration { type: 'ExportNamedDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], declaration: FunctionDeclaration { type: 'FunctionDeclaration', async: false, diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-export-equal-declaration/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-export-equal-declaration/snapshots/1-TSESTree-AST.shot index 0d8da7b441ea..4722f5861cbf 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-export-equal-declaration/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-export-equal-declaration/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ExportNamedDeclaration { type: "ExportNamedDeclaration", - assertions: [], + attributes: [], declaration: TSImportEqualsDeclaration { type: "TSImportEqualsDeclaration", id: Identifier { diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-export-equal-declaration/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-export-equal-declaration/snapshots/5-AST-Alignment-AST.shot index 51f7701bb765..82160c4219bb 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-export-equal-declaration/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-export-equal-declaration/snapshots/5-AST-Alignment-AST.shot @@ -10,7 +10,7 @@ exports[`AST Fixtures legacy-fixtures basics import-export-equal-declaration AST body: Array [ - ExportNamedDeclaration { - type: 'ExportNamedDeclaration', -- assertions: Array [], +- attributes: Array [], - declaration: TSImportEqualsDeclaration { - type: 'TSImportEqualsDeclaration', - id: Identifier { diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-export-equal-type-declaration/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-export-equal-type-declaration/snapshots/1-TSESTree-AST.shot index a518cab77f4b..25194988c45e 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-export-equal-type-declaration/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-export-equal-type-declaration/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ExportNamedDeclaration { type: "ExportNamedDeclaration", - assertions: [], + attributes: [], declaration: TSImportEqualsDeclaration { type: "TSImportEqualsDeclaration", id: Identifier { diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-export-equal-type-declaration/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-export-equal-type-declaration/snapshots/5-AST-Alignment-AST.shot index da9c9aa685e1..6682e4bc9bb8 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-export-equal-type-declaration/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-export-equal-type-declaration/snapshots/5-AST-Alignment-AST.shot @@ -10,7 +10,7 @@ exports[`AST Fixtures legacy-fixtures basics import-export-equal-type-declaratio body: Array [ - ExportNamedDeclaration { - type: 'ExportNamedDeclaration', -- assertions: Array [], +- attributes: Array [], - declaration: TSImportEqualsDeclaration { - type: 'TSImportEqualsDeclaration', - id: Identifier { diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-type-default/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-type-default/snapshots/1-TSESTree-AST.shot index 4388729bbf12..fabd5b888204 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-type-default/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-type-default/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ImportDeclaration { type: "ImportDeclaration", - assertions: [], + attributes: [], importKind: "type", source: Literal { type: "Literal", diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-type-default/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-type-default/snapshots/5-AST-Alignment-AST.shot index 5775e847e8a1..11207f69de9a 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-type-default/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-type-default/snapshots/5-AST-Alignment-AST.shot @@ -10,7 +10,8 @@ exports[`AST Fixtures legacy-fixtures basics import-type-default AST Alignment - body: Array [ ImportDeclaration { type: 'ImportDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], importKind: 'type', source: Literal { type: 'Literal', diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-type-empty/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-type-empty/snapshots/1-TSESTree-AST.shot index ee238f4d3eb7..27974dbc3715 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-type-empty/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-type-empty/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ImportDeclaration { type: "ImportDeclaration", - assertions: [], + attributes: [], importKind: "value", source: Literal { type: "Literal", diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-type-empty/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-type-empty/snapshots/5-AST-Alignment-AST.shot index bf6a7ff82093..c101526f93e8 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-type-empty/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-type-empty/snapshots/5-AST-Alignment-AST.shot @@ -10,7 +10,8 @@ exports[`AST Fixtures legacy-fixtures basics import-type-empty AST Alignment - A body: Array [ ImportDeclaration { type: 'ImportDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], importKind: 'value', source: Literal { type: 'Literal', diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-type-named-as/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-type-named-as/snapshots/1-TSESTree-AST.shot index 3331ec4e3a45..cf83d4e329ca 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-type-named-as/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-type-named-as/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ImportDeclaration { type: "ImportDeclaration", - assertions: [], + attributes: [], importKind: "type", source: Literal { type: "Literal", diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-type-named-as/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-type-named-as/snapshots/5-AST-Alignment-AST.shot index 61bb15fad45a..aba7f40265da 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-type-named-as/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-type-named-as/snapshots/5-AST-Alignment-AST.shot @@ -10,7 +10,8 @@ exports[`AST Fixtures legacy-fixtures basics import-type-named-as AST Alignment body: Array [ ImportDeclaration { type: 'ImportDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], importKind: 'type', source: Literal { type: 'Literal', diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-type-named/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-type-named/snapshots/1-TSESTree-AST.shot index c9cf66adce7a..68fc033a6e1d 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-type-named/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-type-named/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ImportDeclaration { type: "ImportDeclaration", - assertions: [], + attributes: [], importKind: "type", source: Literal { type: "Literal", diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-type-named/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-type-named/snapshots/5-AST-Alignment-AST.shot index 3f0bb385ba5a..a3d88acabc28 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-type-named/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-type-named/snapshots/5-AST-Alignment-AST.shot @@ -10,7 +10,8 @@ exports[`AST Fixtures legacy-fixtures basics import-type-named AST Alignment - A body: Array [ ImportDeclaration { type: 'ImportDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], importKind: 'type', source: Literal { type: 'Literal', diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-type-star-as-ns/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-type-star-as-ns/snapshots/1-TSESTree-AST.shot index 539671c284e3..fbac125e1d1b 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-type-star-as-ns/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-type-star-as-ns/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ImportDeclaration { type: "ImportDeclaration", - assertions: [], + attributes: [], importKind: "type", source: Literal { type: "Literal", diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-type-star-as-ns/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-type-star-as-ns/snapshots/5-AST-Alignment-AST.shot index 91d204bd4e34..dfa2b73002a6 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-type-star-as-ns/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-type-star-as-ns/snapshots/5-AST-Alignment-AST.shot @@ -10,7 +10,8 @@ exports[`AST Fixtures legacy-fixtures basics import-type-star-as-ns AST Alignmen body: Array [ ImportDeclaration { type: 'ImportDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], importKind: 'type', source: Literal { type: 'Literal', diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-with-import-assertions/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-with-import-assertions/snapshots/1-TSESTree-AST.shot index fa59b2d01631..6f9d9a18ceb1 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-with-import-assertions/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-with-import-assertions/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ImportDeclaration { type: "ImportDeclaration", - assertions: [ + attributes: [ ImportAttribute { type: "ImportAttribute", key: Identifier { diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-with-import-assertions/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-with-import-assertions/snapshots/5-AST-Alignment-AST.shot index d14ea9b30584..5716eb4c304d 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-with-import-assertions/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/import-with-import-assertions/snapshots/5-AST-Alignment-AST.shot @@ -10,7 +10,8 @@ exports[`AST Fixtures legacy-fixtures basics import-with-import-assertions AST A body: Array [ ImportDeclaration { type: 'ImportDeclaration', - assertions: Array [ +- attributes: Array [ ++ assertions: Array [ ImportAttribute { type: 'ImportAttribute', key: Identifier { diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/keyword-variables/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/keyword-variables/snapshots/1-TSESTree-AST.shot index 807baaad82cb..7b8a4b6f27aa 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/keyword-variables/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/keyword-variables/snapshots/1-TSESTree-AST.shot @@ -1443,7 +1443,7 @@ Program { }, ImportDeclaration { type: "ImportDeclaration", - assertions: [], + attributes: [], importKind: "value", source: Literal { type: "Literal", diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/keyword-variables/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/keyword-variables/snapshots/5-AST-Alignment-AST.shot index 49b73e6d19bb..161c119a17a0 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/keyword-variables/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/keyword-variables/snapshots/5-AST-Alignment-AST.shot @@ -1447,7 +1447,8 @@ exports[`AST Fixtures legacy-fixtures basics keyword-variables AST Alignment - A }, ImportDeclaration { type: 'ImportDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], importKind: 'value', source: Literal { type: 'Literal', diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/type-alias-declaration-export-function-type/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/type-alias-declaration-export-function-type/snapshots/1-TSESTree-AST.shot index a08cd544ed36..813fd7730f2c 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/type-alias-declaration-export-function-type/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/type-alias-declaration-export-function-type/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ExportNamedDeclaration { type: "ExportNamedDeclaration", - assertions: [], + attributes: [], declaration: TSTypeAliasDeclaration { type: "TSTypeAliasDeclaration", declare: false, diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/type-alias-declaration-export-function-type/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/type-alias-declaration-export-function-type/snapshots/5-AST-Alignment-AST.shot index 616277e27e35..66dbfdf747ed 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/type-alias-declaration-export-function-type/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/type-alias-declaration-export-function-type/snapshots/5-AST-Alignment-AST.shot @@ -10,7 +10,8 @@ exports[`AST Fixtures legacy-fixtures basics type-alias-declaration-export-funct body: Array [ ExportNamedDeclaration { type: 'ExportNamedDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], declaration: TSTypeAliasDeclaration { type: 'TSTypeAliasDeclaration', - declare: false, diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/type-alias-declaration-export-object-type/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/type-alias-declaration-export-object-type/snapshots/1-TSESTree-AST.shot index de0e8827cce7..2a5e8e2afe2c 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/type-alias-declaration-export-object-type/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/type-alias-declaration-export-object-type/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ExportNamedDeclaration { type: "ExportNamedDeclaration", - assertions: [], + attributes: [], declaration: TSTypeAliasDeclaration { type: "TSTypeAliasDeclaration", declare: false, diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/type-alias-declaration-export-object-type/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/type-alias-declaration-export-object-type/snapshots/5-AST-Alignment-AST.shot index 9f9b094633b9..44068bbaddb3 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/type-alias-declaration-export-object-type/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/type-alias-declaration-export-object-type/snapshots/5-AST-Alignment-AST.shot @@ -10,7 +10,8 @@ exports[`AST Fixtures legacy-fixtures basics type-alias-declaration-export-objec body: Array [ ExportNamedDeclaration { type: 'ExportNamedDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], declaration: TSTypeAliasDeclaration { type: 'TSTypeAliasDeclaration', - declare: false, diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/type-alias-declaration-export/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/type-alias-declaration-export/snapshots/1-TSESTree-AST.shot index ffe2ae38c04d..238c66e660ee 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/type-alias-declaration-export/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/type-alias-declaration-export/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ExportNamedDeclaration { type: "ExportNamedDeclaration", - assertions: [], + attributes: [], declaration: TSTypeAliasDeclaration { type: "TSTypeAliasDeclaration", declare: false, diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/type-alias-declaration-export/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/type-alias-declaration-export/snapshots/5-AST-Alignment-AST.shot index a36c1ee31daa..435fa5a767f0 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/type-alias-declaration-export/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/type-alias-declaration-export/snapshots/5-AST-Alignment-AST.shot @@ -10,7 +10,8 @@ exports[`AST Fixtures legacy-fixtures basics type-alias-declaration-export AST A body: Array [ ExportNamedDeclaration { type: 'ExportNamedDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], declaration: TSTypeAliasDeclaration { type: 'TSTypeAliasDeclaration', - declare: false, diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/type-only-export-specifiers/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/type-only-export-specifiers/snapshots/1-TSESTree-AST.shot index 256b304a02d0..efc42fbfc7c4 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/type-only-export-specifiers/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/type-only-export-specifiers/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ExportNamedDeclaration { type: "ExportNamedDeclaration", - assertions: [], + attributes: [], declaration: null, exportKind: "value", source: Literal { diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/type-only-export-specifiers/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/type-only-export-specifiers/snapshots/5-AST-Alignment-AST.shot index 0371377d04ca..189f9140bbb1 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/type-only-export-specifiers/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/type-only-export-specifiers/snapshots/5-AST-Alignment-AST.shot @@ -10,7 +10,8 @@ exports[`AST Fixtures legacy-fixtures basics type-only-export-specifiers AST Ali body: Array [ ExportNamedDeclaration { type: 'ExportNamedDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], declaration: null, exportKind: 'value', source: Literal { diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/type-only-import-specifiers/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/type-only-import-specifiers/snapshots/1-TSESTree-AST.shot index 6c6b075e4345..82aea11224da 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/type-only-import-specifiers/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/type-only-import-specifiers/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ImportDeclaration { type: "ImportDeclaration", - assertions: [], + attributes: [], importKind: "value", source: Literal { type: "Literal", diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/type-only-import-specifiers/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/type-only-import-specifiers/snapshots/5-AST-Alignment-AST.shot index 313e18bc7f90..48020406f92a 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/type-only-import-specifiers/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/type-only-import-specifiers/snapshots/5-AST-Alignment-AST.shot @@ -10,7 +10,8 @@ exports[`AST Fixtures legacy-fixtures basics type-only-import-specifiers AST Ali body: Array [ ImportDeclaration { type: 'ImportDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], importKind: 'value', source: Literal { type: 'Literal', diff --git a/packages/ast-spec/src/legacy-fixtures/class-decorators/fixtures/export-named-class-decorator/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/legacy-fixtures/class-decorators/fixtures/export-named-class-decorator/snapshots/1-TSESTree-AST.shot index 290ff765aedc..6d8bbf6a43f5 100644 --- a/packages/ast-spec/src/legacy-fixtures/class-decorators/fixtures/export-named-class-decorator/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/class-decorators/fixtures/export-named-class-decorator/snapshots/1-TSESTree-AST.shot @@ -6,7 +6,7 @@ Program { body: [ ExportNamedDeclaration { type: "ExportNamedDeclaration", - assertions: [], + attributes: [], declaration: ClassDeclaration { type: "ClassDeclaration", abstract: false, diff --git a/packages/ast-spec/src/legacy-fixtures/class-decorators/fixtures/export-named-class-decorator/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/legacy-fixtures/class-decorators/fixtures/export-named-class-decorator/snapshots/5-AST-Alignment-AST.shot index d0ef16bd7f44..04deb9723b84 100644 --- a/packages/ast-spec/src/legacy-fixtures/class-decorators/fixtures/export-named-class-decorator/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/class-decorators/fixtures/export-named-class-decorator/snapshots/5-AST-Alignment-AST.shot @@ -10,7 +10,8 @@ exports[`AST Fixtures legacy-fixtures class-decorators export-named-class-decora body: Array [ ExportNamedDeclaration { type: 'ExportNamedDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], declaration: ClassDeclaration { type: 'ClassDeclaration', - abstract: false, diff --git a/packages/ast-spec/src/legacy-fixtures/namespaces-and-modules/fixtures/ambient-module-declaration-with-import/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/legacy-fixtures/namespaces-and-modules/fixtures/ambient-module-declaration-with-import/snapshots/1-TSESTree-AST.shot index 85106e819d04..f551e4c8f54e 100644 --- a/packages/ast-spec/src/legacy-fixtures/namespaces-and-modules/fixtures/ambient-module-declaration-with-import/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/namespaces-and-modules/fixtures/ambient-module-declaration-with-import/snapshots/1-TSESTree-AST.shot @@ -11,7 +11,7 @@ Program { body: [ ImportDeclaration { type: "ImportDeclaration", - assertions: [], + attributes: [], importKind: "value", source: Literal { type: "Literal", diff --git a/packages/ast-spec/src/legacy-fixtures/namespaces-and-modules/fixtures/ambient-module-declaration-with-import/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/legacy-fixtures/namespaces-and-modules/fixtures/ambient-module-declaration-with-import/snapshots/5-AST-Alignment-AST.shot index c77ae1fc5efb..557394087d16 100644 --- a/packages/ast-spec/src/legacy-fixtures/namespaces-and-modules/fixtures/ambient-module-declaration-with-import/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/namespaces-and-modules/fixtures/ambient-module-declaration-with-import/snapshots/5-AST-Alignment-AST.shot @@ -15,7 +15,8 @@ exports[`AST Fixtures legacy-fixtures namespaces-and-modules ambient-module-decl body: Array [ ImportDeclaration { type: 'ImportDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], importKind: 'value', source: Literal { type: 'Literal', diff --git a/packages/ast-spec/src/legacy-fixtures/namespaces-and-modules/fixtures/declare-namespace-with-exported-function/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/legacy-fixtures/namespaces-and-modules/fixtures/declare-namespace-with-exported-function/snapshots/1-TSESTree-AST.shot index bc1ef7402cc8..71b0cca8c72d 100644 --- a/packages/ast-spec/src/legacy-fixtures/namespaces-and-modules/fixtures/declare-namespace-with-exported-function/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/namespaces-and-modules/fixtures/declare-namespace-with-exported-function/snapshots/1-TSESTree-AST.shot @@ -11,7 +11,7 @@ Program { body: [ ExportNamedDeclaration { type: "ExportNamedDeclaration", - assertions: [], + attributes: [], declaration: TSDeclareFunction { type: "TSDeclareFunction", async: false, diff --git a/packages/ast-spec/src/legacy-fixtures/namespaces-and-modules/fixtures/declare-namespace-with-exported-function/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/legacy-fixtures/namespaces-and-modules/fixtures/declare-namespace-with-exported-function/snapshots/5-AST-Alignment-AST.shot index 8732ff7462b1..56e2aae4505f 100644 --- a/packages/ast-spec/src/legacy-fixtures/namespaces-and-modules/fixtures/declare-namespace-with-exported-function/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/namespaces-and-modules/fixtures/declare-namespace-with-exported-function/snapshots/5-AST-Alignment-AST.shot @@ -15,7 +15,8 @@ exports[`AST Fixtures legacy-fixtures namespaces-and-modules declare-namespace-w body: Array [ ExportNamedDeclaration { type: 'ExportNamedDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], declaration: TSDeclareFunction { type: 'TSDeclareFunction', async: false, @@ -106,14 +107,14 @@ exports[`AST Fixtures legacy-fixtures namespaces-and-modules declare-namespace-w - decorators: Array [], - name: 'Selection', - optional: false, - +- - range: [140, 149], - loc: { - start: { column: 44, line: 4 }, - end: { column: 53, line: 4 }, - }, - }, -- + range: [140, 154], loc: { start: { column: 44, line: 4 }, diff --git a/packages/ast-spec/src/legacy-fixtures/namespaces-and-modules/fixtures/nested-internal-module/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/legacy-fixtures/namespaces-and-modules/fixtures/nested-internal-module/snapshots/1-TSESTree-AST.shot index c4a8a3d48712..b7872a30a1c1 100644 --- a/packages/ast-spec/src/legacy-fixtures/namespaces-and-modules/fixtures/nested-internal-module/snapshots/1-TSESTree-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/namespaces-and-modules/fixtures/nested-internal-module/snapshots/1-TSESTree-AST.shot @@ -11,7 +11,7 @@ Program { body: [ ExportNamedDeclaration { type: "ExportNamedDeclaration", - assertions: [], + attributes: [], declaration: VariableDeclaration { type: "VariableDeclaration", declarations: [ @@ -70,7 +70,7 @@ Program { }, ExportNamedDeclaration { type: "ExportNamedDeclaration", - assertions: [], + attributes: [], declaration: ClassDeclaration { type: "ClassDeclaration", abstract: false, @@ -261,7 +261,7 @@ Program { }, ExportNamedDeclaration { type: "ExportNamedDeclaration", - assertions: [], + attributes: [], declaration: TSModuleDeclaration { type: "TSModuleDeclaration", body: TSModuleBlock { @@ -269,7 +269,7 @@ Program { body: [ ExportNamedDeclaration { type: "ExportNamedDeclaration", - assertions: [], + attributes: [], declaration: TSInterfaceDeclaration { type: "TSInterfaceDeclaration", body: TSInterfaceBody { diff --git a/packages/ast-spec/src/legacy-fixtures/namespaces-and-modules/fixtures/nested-internal-module/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/legacy-fixtures/namespaces-and-modules/fixtures/nested-internal-module/snapshots/5-AST-Alignment-AST.shot index f54c0978f19e..e757d3cad1be 100644 --- a/packages/ast-spec/src/legacy-fixtures/namespaces-and-modules/fixtures/nested-internal-module/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/namespaces-and-modules/fixtures/nested-internal-module/snapshots/5-AST-Alignment-AST.shot @@ -15,7 +15,8 @@ exports[`AST Fixtures legacy-fixtures namespaces-and-modules nested-internal-mod body: Array [ ExportNamedDeclaration { type: 'ExportNamedDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], declaration: VariableDeclaration { type: 'VariableDeclaration', declarations: Array [ @@ -74,7 +75,8 @@ exports[`AST Fixtures legacy-fixtures namespaces-and-modules nested-internal-mod }, ExportNamedDeclaration { type: 'ExportNamedDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], declaration: ClassDeclaration { type: 'ClassDeclaration', - abstract: false, @@ -265,7 +267,8 @@ exports[`AST Fixtures legacy-fixtures namespaces-and-modules nested-internal-mod }, ExportNamedDeclaration { type: 'ExportNamedDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], declaration: TSModuleDeclaration { type: 'TSModuleDeclaration', body: TSModuleBlock { @@ -273,7 +276,8 @@ exports[`AST Fixtures legacy-fixtures namespaces-and-modules nested-internal-mod body: Array [ ExportNamedDeclaration { type: 'ExportNamedDeclaration', - assertions: Array [], +- attributes: Array [], ++ assertions: Array [], declaration: TSInterfaceDeclaration { type: 'TSInterfaceDeclaration', body: TSInterfaceBody { diff --git a/packages/ast-spec/tests/fixtures-with-differences-ast.shot b/packages/ast-spec/tests/fixtures-with-differences-ast.shot index d566a5a5ddc0..a41c223827df 100644 --- a/packages/ast-spec/tests/fixtures-with-differences-ast.shot +++ b/packages/ast-spec/tests/fixtures-with-differences-ast.shot @@ -19,6 +19,7 @@ exports[`AST Fixtures List fixtures with AST differences 1`] = ` "declaration/ExportAllDeclaration/fixtures/kind-type/fixture.ts", "declaration/ExportAllDeclaration/fixtures/named/fixture.ts", "declaration/ExportAllDeclaration/fixtures/type-kind/fixture.ts", + "declaration/ExportAllDeclaration/fixtures/unnamed/fixture.ts", "declaration/ExportDefaultDeclaration/fixtures/anonymous-class/fixture.ts", "declaration/ExportDefaultDeclaration/fixtures/anonymous-function/fixture.ts", "declaration/ExportDefaultDeclaration/fixtures/class-expression/fixture.ts", @@ -52,7 +53,9 @@ exports[`AST Fixtures List fixtures with AST differences 1`] = ` "declaration/ImportDeclaration/fixtures/default-and-namespace/fixture.ts", "declaration/ImportDeclaration/fixtures/default/fixture.ts", "declaration/ImportDeclaration/fixtures/named-many/fixture.ts", + "declaration/ImportDeclaration/fixtures/named-none/fixture.ts", "declaration/ImportDeclaration/fixtures/named-one/fixture.ts", + "declaration/ImportDeclaration/fixtures/side-effect/fixture.ts", "declaration/TSDeclareFunction/fixtures/empty/fixture.ts", "declaration/TSDeclareFunction/fixtures/generator/fixture.ts", "declaration/TSDeclareFunction/fixtures/param-many/fixture.ts", diff --git a/packages/eslint-plugin-internal/CHANGELOG.md b/packages/eslint-plugin-internal/CHANGELOG.md index c6e91639b7b0..c49d622c9da2 100644 --- a/packages/eslint-plugin-internal/CHANGELOG.md +++ b/packages/eslint-plugin-internal/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [6.11.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.10.0...v6.11.0) (2023-11-13) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + + + + + # [6.10.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.9.1...v6.10.0) (2023-11-06) **Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal diff --git a/packages/eslint-plugin-internal/package.json b/packages/eslint-plugin-internal/package.json index 91c31a041556..d8eeb4013396 100644 --- a/packages/eslint-plugin-internal/package.json +++ b/packages/eslint-plugin-internal/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin-internal", - "version": "6.10.0", + "version": "6.11.0", "private": true, "main": "dist/index.js", "scripts": { @@ -14,10 +14,10 @@ }, "dependencies": { "@prettier/sync": "*", - "@typescript-eslint/rule-tester": "6.10.0", - "@typescript-eslint/scope-manager": "6.10.0", - "@typescript-eslint/type-utils": "6.10.0", - "@typescript-eslint/utils": "6.10.0", + "@typescript-eslint/rule-tester": "6.11.0", + "@typescript-eslint/scope-manager": "6.11.0", + "@typescript-eslint/type-utils": "6.11.0", + "@typescript-eslint/utils": "6.11.0", "prettier": "^3.0.3" }, "devDependencies": { diff --git a/packages/eslint-plugin-internal/src/rules/no-poorly-typed-ts-props.ts b/packages/eslint-plugin-internal/src/rules/no-poorly-typed-ts-props.ts index 7b34aa0fd260..1d07e54351b4 100644 --- a/packages/eslint-plugin-internal/src/rules/no-poorly-typed-ts-props.ts +++ b/packages/eslint-plugin-internal/src/rules/no-poorly-typed-ts-props.ts @@ -11,11 +11,6 @@ This rule simply warns against using them, as using them will likely introduce t */ const BANNED_PROPERTIES = [ - // { - // type: 'Node', - // property: 'parent', - // fixWith: null, - // }, { type: 'Symbol', property: 'declarations', @@ -87,10 +82,6 @@ export default createRule({ messageId: 'suggestedFix', data: banned, fix(fixer): TSESLint.RuleFix | null { - if (banned.fixWith == null) { - return null; - } - return fixer.replaceText(node.property, banned.fixWith); }, }, diff --git a/packages/eslint-plugin-internal/src/rules/plugin-test-formatting.ts b/packages/eslint-plugin-internal/src/rules/plugin-test-formatting.ts index f55b9e96950c..7656fa4ccf5c 100644 --- a/packages/eslint-plugin-internal/src/rules/plugin-test-formatting.ts +++ b/packages/eslint-plugin-internal/src/rules/plugin-test-formatting.ts @@ -2,6 +2,7 @@ import prettier from '@prettier/sync'; import { getContextualType } from '@typescript-eslint/type-utils'; import type { TSESTree } from '@typescript-eslint/utils'; import { AST_NODE_TYPES, ESLintUtils } from '@typescript-eslint/utils'; +import { getSourceCode } from '@typescript-eslint/utils/eslint-utils'; import { createRule } from '../util'; @@ -147,7 +148,7 @@ export default createRule({ }, ], create(context, [{ formatWithPrettier }]) { - const sourceCode = context.getSourceCode(); + const sourceCode = getSourceCode(context); const services = ESLintUtils.getParserServices(context); const checker = services.program.getTypeChecker(); diff --git a/packages/eslint-plugin-internal/src/rules/prefer-ast-types-enum.ts b/packages/eslint-plugin-internal/src/rules/prefer-ast-types-enum.ts index e042f328614e..9e97e44d2536 100755 --- a/packages/eslint-plugin-internal/src/rules/prefer-ast-types-enum.ts +++ b/packages/eslint-plugin-internal/src/rules/prefer-ast-types-enum.ts @@ -40,8 +40,8 @@ export default createRule({ return { Literal(node: TSESTree.Literal): void { if ( - node.parent?.type === AST_NODE_TYPES.TSEnumMember && - node.parent.parent?.type === AST_NODE_TYPES.TSEnumDeclaration && + node.parent.type === AST_NODE_TYPES.TSEnumMember && + node.parent.parent.type === AST_NODE_TYPES.TSEnumDeclaration && ['AST_NODE_TYPES', 'AST_TOKEN_TYPES', 'DefinitionType'].includes( node.parent.parent.id.name, ) diff --git a/packages/eslint-plugin-tslint/CHANGELOG.md b/packages/eslint-plugin-tslint/CHANGELOG.md index 4edb2010d682..9f7cea93adcb 100644 --- a/packages/eslint-plugin-tslint/CHANGELOG.md +++ b/packages/eslint-plugin-tslint/CHANGELOG.md @@ -3,6 +3,19 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [6.11.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.10.0...v6.11.0) (2023-11-13) + + +### Features + +* add types for flat config files ([#7273](https://github.com/typescript-eslint/typescript-eslint/issues/7273)) ([66cd0c0](https://github.com/typescript-eslint/typescript-eslint/commit/66cd0c0535e5de1b46ba337919a9a92748d2b0a6)) + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + + + + + # [6.10.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.9.1...v6.10.0) (2023-11-06) **Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint diff --git a/packages/eslint-plugin-tslint/package.json b/packages/eslint-plugin-tslint/package.json index 8d0bbe44c98e..3c4f739cf2f5 100644 --- a/packages/eslint-plugin-tslint/package.json +++ b/packages/eslint-plugin-tslint/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin-tslint", - "version": "6.10.0", + "version": "6.11.0", "main": "dist/index.js", "typings": "src/index.ts", "description": "ESLint plugin that wraps a TSLint configuration and lints the whole source using TSLint", @@ -46,7 +46,7 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/utils": "6.10.0" + "@typescript-eslint/utils": "6.11.0" }, "peerDependencies": { "eslint": "^7.0.0 || ^8.0.0", @@ -55,7 +55,7 @@ }, "devDependencies": { "@types/lodash": "*", - "@typescript-eslint/parser": "6.10.0", + "@typescript-eslint/parser": "6.11.0", "jest": "29.7.0", "prettier": "^3.0.3", "rimraf": "*" diff --git a/packages/eslint-plugin-tslint/src/rules/config.ts b/packages/eslint-plugin-tslint/src/rules/config.ts index 23b7558b80fb..69af1244d3c7 100644 --- a/packages/eslint-plugin-tslint/src/rules/config.ts +++ b/packages/eslint-plugin-tslint/src/rules/config.ts @@ -1,4 +1,9 @@ import { ESLintUtils } from '@typescript-eslint/utils'; +import { + getCwd, + getFilename, + getSourceCode, +} from '@typescript-eslint/utils/eslint-utils'; import path from 'path'; import type { RuleSeverity } from 'tslint'; import { Configuration } from 'tslint'; @@ -119,8 +124,8 @@ export default createRule({ context, [{ rules: tslintRules, rulesDirectory: tslintRulesDirectory, lintFile }], ) { - const fileName = path.resolve(context.getCwd(), context.getFilename()); - const sourceCode = context.getSourceCode().text; + const fileName = path.resolve(getCwd(context), getFilename(context)); + const sourceCode = getSourceCode(context).text; const services = ESLintUtils.getParserServices(context); const program = services.program; @@ -146,7 +151,7 @@ export default createRule({ /** * Format the TSLint results for ESLint */ - if (result.failures?.length) { + if (result.failures.length) { result.failures.forEach(failure => { const start = failure.getStartPosition().getLineAndCharacter(); const end = failure.getEndPosition().getLineAndCharacter(); diff --git a/packages/eslint-plugin-tslint/tests/index.spec.ts b/packages/eslint-plugin-tslint/tests/index.spec.ts index 238cc3185062..59f84be30770 100644 --- a/packages/eslint-plugin-tslint/tests/index.spec.ts +++ b/packages/eslint-plugin-tslint/tests/index.spec.ts @@ -3,6 +3,8 @@ import { TSESLint } from '@typescript-eslint/utils'; import { readFileSync } from 'fs'; import path = require('path'); +import type { ClassicConfig } from '@typescript-eslint/utils/ts-eslint'; + import type { Options } from '../src/rules/config'; import rule from '../src/rules/config'; @@ -165,7 +167,7 @@ ruleTester.run('tslint/config', rule, { }); describe('tslint/error', () => { - function testOutput(code: string, config: TSESLint.Linter.Config): void { + function testOutput(code: string, config: ClassicConfig.Config): void { const linter = new TSESLint.Linter(); linter.defineRule('tslint/config', rule); linter.defineParser('@typescript-eslint/parser', parser); diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index bade07b433b9..7977e11db1e0 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/CHANGELOG.md @@ -3,6 +3,29 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [6.11.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.10.0...v6.11.0) (2023-11-13) + + +### Bug Fixes + +* **eslint-plugin:** [explicit-function-return-type] support JSX attributes in `allowTypedFunctionExpressions` ([#7553](https://github.com/typescript-eslint/typescript-eslint/issues/7553)) ([be2777c](https://github.com/typescript-eslint/typescript-eslint/commit/be2777c5338669836d786f9a7806f499fd566dcd)) +* **eslint-plugin:** [no-unnecessary-qualifier] handle nested namespace id ([#7883](https://github.com/typescript-eslint/typescript-eslint/issues/7883)) ([a668f5b](https://github.com/typescript-eslint/typescript-eslint/commit/a668f5b10e7b1570c732312ad9ccab3431459c1b)) + + +### Features + +* add `no-unsafe-unary-minus` rule ([#7390](https://github.com/typescript-eslint/typescript-eslint/issues/7390)) ([c4709c2](https://github.com/typescript-eslint/typescript-eslint/commit/c4709c2861f8ea4e18c289218a75224d6bb76193)) +* add types for flat config files ([#7273](https://github.com/typescript-eslint/typescript-eslint/issues/7273)) ([66cd0c0](https://github.com/typescript-eslint/typescript-eslint/commit/66cd0c0535e5de1b46ba337919a9a92748d2b0a6)) +* allow typescript@5.3.0-RC as devDependency ([#7821](https://github.com/typescript-eslint/typescript-eslint/issues/7821)) ([b6c40b4](https://github.com/typescript-eslint/typescript-eslint/commit/b6c40b42b68d5567c7468030ee45b9b84bec4c4d)) +* **eslint-plugin:** no-unsafe-enum-comparison handles switch cases ([#7898](https://github.com/typescript-eslint/typescript-eslint/issues/7898)) ([72cb9e4](https://github.com/typescript-eslint/typescript-eslint/commit/72cb9e4ed397d35a8d8838d27dedbace6122179c)) +* **utils:** add ESLint `CodePath` selector types ([#7551](https://github.com/typescript-eslint/typescript-eslint/issues/7551)) ([99a026f](https://github.com/typescript-eslint/typescript-eslint/commit/99a026fe41b4b169914352fe66e7d5d687b300bf)) + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + + + + + # [6.10.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.9.1...v6.10.0) (2023-11-06) diff --git a/packages/eslint-plugin/docs/rules/explicit-function-return-type.md b/packages/eslint-plugin/docs/rules/explicit-function-return-type.md index 3332f1d77ef0..6aa1e6213145 100644 --- a/packages/eslint-plugin/docs/rules/explicit-function-return-type.md +++ b/packages/eslint-plugin/docs/rules/explicit-function-return-type.md @@ -172,6 +172,10 @@ functionWithObjectArg({ return 1; }, }); + +const Comp: FC = () => { + return