diff --git a/.eslintrc.js b/.eslintrc.js index 81f745d3824..7380b874d88 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -214,7 +214,6 @@ module.exports = { 'jest/no-alias-methods': 'error', 'jest/no-identical-title': 'error', 'jest/no-jasmine-globals': 'error', - 'jest/no-jest-import': 'error', 'jest/no-test-prefixes': 'error', 'jest/no-done-callback': 'error', 'jest/no-test-return-statement': 'error', diff --git a/CHANGELOG.md b/CHANGELOG.md index 7fbfc4bba22..6d651f565a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,45 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [5.48.2](https://github.com/typescript-eslint/typescript-eslint/compare/v5.48.1...v5.48.2) (2023-01-16) + +**Note:** Version bump only for package @typescript-eslint/typescript-eslint + + + + + +## [5.48.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.48.0...v5.48.1) (2023-01-09) + +**Note:** Version bump only for package @typescript-eslint/typescript-eslint + + + + + +# [5.48.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.47.1...v5.48.0) (2023-01-02) + +### Bug Fixes + +- **website:** fix typo ([#6285](https://github.com/typescript-eslint/typescript-eslint/issues/6285)) ([3f8d105](https://github.com/typescript-eslint/typescript-eslint/commit/3f8d105e9ee500428774b498083c4bc02bfd81b8)) + +### Features + +- **eslint-plugin:** specify which method is unbound and added test case ([#6281](https://github.com/typescript-eslint/typescript-eslint/issues/6281)) ([cf3ffdd](https://github.com/typescript-eslint/typescript-eslint/commit/cf3ffdd49aceb734ce18dc44ed6a11f7701f178e)) + +## [5.47.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.47.0...v5.47.1) (2022-12-26) + +### Bug Fixes + +- **ast-spec:** correct some incorrect ast types ([#6257](https://github.com/typescript-eslint/typescript-eslint/issues/6257)) ([0f3f645](https://github.com/typescript-eslint/typescript-eslint/commit/0f3f64571ea5d938081b1a9f3fd1495765201700)) +- **eslint-plugin:** [member-ordering] correctly invert optionalityOrder ([#6256](https://github.com/typescript-eslint/typescript-eslint/issues/6256)) ([ccd45d4](https://github.com/typescript-eslint/typescript-eslint/commit/ccd45d4a998946b7be1161f8c8216bc458e50b4e)) + +# [5.47.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.46.1...v5.47.0) (2022-12-19) + +### Features + +- **eslint-plugin:** [no-floating-promises] add suggestion fixer to add an 'await' ([#5943](https://github.com/typescript-eslint/typescript-eslint/issues/5943)) ([9e35ef9](https://github.com/typescript-eslint/typescript-eslint/commit/9e35ef9af3ec51ab2dd49336699f3a94528bb4b1)) + ## [5.46.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.46.0...v5.46.1) (2022-12-12) **Note:** Version bump only for package @typescript-eslint/typescript-eslint diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 2dcd4d3f847..b1c6bfe4f0d 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -71,23 +71,16 @@ Thanks goes to these wonderful people:
Niles Salter

Pavel Birukov
-
Shahar Dawn Or
+
Shahar "Dawn" Or

kmin-jeong
-
James Garbutt
+
koooge
-
Jonathan Delgado
-
Philipp A.
-
Pig Fang
-
Tadhg McDonald-Jensen
-
Thomas den Hollander
- - -
Tim Kraut
+
thomas michael wallace
+
Juan GarcĂ­a
+
Daniel Nixon

Yasar Siddiqui

Yusuke Tanaka
-
zz
- diff --git a/docs/linting/CONFIGURATIONS.mdx b/docs/linting/CONFIGURATIONS.mdx index a620083fa71..aec668a16dd 100644 --- a/docs/linting/CONFIGURATIONS.mdx +++ b/docs/linting/CONFIGURATIONS.mdx @@ -128,7 +128,7 @@ Additionally, it enables rules that promote using the more modern constructs Typ This config is automatically included if you use any of the recommended configurations. -See [`configs/eslint-recommended.ts``](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/src/configs/eslint-recommended.ts) for the exact contents of this config. +See [`configs/eslint-recommended.ts`](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/src/configs/eslint-recommended.ts) for the exact contents of this config. ## Suggesting Configuration Changes diff --git a/docs/linting/Troubleshooting.md b/docs/linting/Troubleshooting.md index f1aff9346bb..67e4316608f 100644 --- a/docs/linting/Troubleshooting.md +++ b/docs/linting/Troubleshooting.md @@ -248,73 +248,4 @@ Rules such as [`no-unsafe-argument`](https://typescript-eslint.io/rules/no-unsaf ## My linting feels really slow -As mentioned in the [type-aware linting doc](./Typed_Linting.md), if you're using type-aware linting, your lint times should be roughly the same as your build times. - -If you're experiencing times much slower than that, then there are a few common culprits. - -### Wide includes in your `tsconfig` - -When using type-aware linting, you provide us with one or more tsconfigs. -We then will pre-parse all files so that full and complete type information is available. - -If you provide very wide globs in your `include` (such as `**/*`), it can cause many more files than you expect to be included in this pre-parse. -Additionally, if you provide no `include` in your tsconfig, then it is the same as providing the widest glob. - -Wide globs can cause TypeScript to parse things like build artifacts, which can heavily impact performance. -Always ensure you provide globs targeted at the folders you are specifically wanting to lint. - -### Wide includes in your ESLint options - -Specifying `tsconfig.json` paths in your ESLint commands is also likely to cause much more disk IO than expected. -Instead of globs that use `**` to recursively check all folders, prefer paths that use a single `*` at a time. - -```diff -- eslint --parser-options project:./**/tsconfig.json -+ eslint --parser-options project:./packages/*/tsconfig.json -``` - -See [Glob pattern in parser's option "project" slows down linting](https://github.com/typescript-eslint/typescript-eslint/issues/2611) for more details. - -### `eslint-plugin-prettier` - -This plugin surfaces prettier formatting problems at lint time, helping to ensure your code is always formatted. -However this comes at a quite a large cost - in order to figure out if there is a difference, it has to do a prettier format on every file being linted. -This means that each file will be parsed twice - once by ESLint, and once by Prettier. -This can add up for large codebases. - -Instead of using this plugin, we recommend using prettier's `--list-different` flag to detect if a file has not been correctly formatted. -For example, our CI is setup to run the following command automatically, which blocks PRs that have not been formatted: - -```bash npm2yarn -npm run prettier --list-different \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" -``` - -### `eslint-plugin-import` - -This is another great plugin that we use ourselves in this project. -However there are a few rules which can cause your lints to be really slow, because they cause the plugin to do its own parsing, and file tracking. -This double parsing adds up for large codebases. - -There are many rules that do single file static analysis, but we provide the following recommendations. - -We recommend you do not use the following rules, as TypeScript provides the same checks as part of standard type checking: - -- `import/named` -- `import/namespace` -- `import/default` -- `import/no-named-as-default-member` - -The following rules do not have equivalent checks in TypeScript, so we recommend that you only run them at CI/push time, to lessen the local performance burden. - -- `import/no-named-as-default` -- `import/no-cycle` -- `import/no-unused-modules` -- `import/no-deprecated` - -### The `indent` / `@typescript-eslint/indent` rules - -This rule helps ensure your codebase follows a consistent indentation pattern. -However this involves a _lot_ of computations across every single token in a file. -Across a large codebase, these can add up, and severely impact performance. - -We recommend not using this rule, and instead using a tool like [`prettier`](https://www.npmjs.com/package/prettier) to enforce a standardized formatting. +If you think you're having issues with performance, see our [Performance Troubleshooting documentation](./troubleshooting/Performance.md). diff --git a/docs/linting/troubleshooting/FORMATTING.md b/docs/linting/troubleshooting/Formatting.md similarity index 64% rename from docs/linting/troubleshooting/FORMATTING.md rename to docs/linting/troubleshooting/Formatting.md index 47ff57c3b45..14c9d102dd0 100644 --- a/docs/linting/troubleshooting/FORMATTING.md +++ b/docs/linting/troubleshooting/Formatting.md @@ -6,6 +6,17 @@ title: What About Formatting? We strongly recommend against using ESLint for formatting. We strongly recommend using [Prettier](https://prettier.io), [dprint](https://dprint.dev), or an equivalent instead. +## ESLint Core and Formatting + +Per [ESLint's 2020 Changes to Rule Policies blog post](https://eslint.org/blog/2020/05/changes-to-rules-policies#what-are-the-changes): + +> Stylistic rules are frozen - we won't be adding any more options to stylistic rules. +> We've learned that there's no way to satisfy everyone's personal preferences, and most of the rules already have a lot of difficult-to-understand options. +> Stylistic rules are those related to spacing, conventions, and generally anything that does not highlight an error or a better way to do something. + +We support the ESLint team's decision and backing logic to move away from stylistic rules. +With the exception of bug fixes, no new formatting-related pull requests will be accepted into typescript-eslint. + ## Formatters vs. Linters **Formatters** are tools that verify and correct whitespace issues in code, such as spacing and newlines. @@ -16,13 +27,18 @@ Linters often take seconds or more to run because they apply many logical rules ### Problems with Using Linters as Formatters -Linters apply much more work than formatters -- often including potentially multiple rounds of rule fixers. -That generally makes them run orders of magnitude slower. +Linters are designed to run in a parse, check, report, fix cycle. This means that there is a lot of intermediate work that needs to be done before a linter can fix a formatting issue with your code. + +Additionally linters typically run each rule isolated from one another. This has several problems with it such as: -Additionally, modern formatters such as Prettier are architected in a way that applies formatting to all code regardless of original formatting. -Linters typically run on a rule-by-rule basis, typically resulting in many edge cases and missed coverage in formatting. +- any two lint rules can't share config meaning one lint rule's fixer might introduce a violation of another lint rule's fixer (eg one lint rule might use the incorrect indentation character). +- lint rule fixers can conflict (apply to the same code range), forcing the linter to perform an additional cycle to attempt to apply a fixer to a clean set of code. -### Suggested Usage +These problems cause a linter to be much slower and, more importantly, much less consistent and less able to handle edge-cases than a purpose-built formatter. + +Modern formatters such as Prettier are architected in a way that applies formatting to all code regardless of original formatting which helps them be more consistent. + +### Suggested Usage - Prettier We recommend using [`eslint-config-prettier`](https://github.com/prettier/eslint-config-prettier) to disable formatting rules in your ESLint configuration. You can then configure your formatter separately from ESLint. @@ -43,13 +59,4 @@ module.exports = { }; ``` -## ESLint Core and Formatting - -Per [ESLint's 2020 Changes to Rule Policies blog post](https://eslint.org/blog/2020/05/changes-to-rules-policies#what-are-the-changes): - -> Stylistic rules are frozen - we won't be adding any more options to stylistic rules. -> We've learned that there's no way to satisfy everyone's personal preferences, and most of the rules already have a lot of difficult-to-understand options. -> Stylistic rules are those related to spacing, conventions, and generally anything that does not highlight an error or a better way to do something. - -We support the ESLint team's decision and backing logic to move away from stylistic rules. -With the exception of bug fixes, no new formatting-related pull requests will be accepted into typescript-eslint. +Note that even if you don't use `prettier`, you can use `eslint-config-prettier` as it exclusively turns **off** all formatting rules. diff --git a/docs/linting/troubleshooting/Performance.md b/docs/linting/troubleshooting/Performance.md new file mode 100644 index 00000000000..6f696a7a05f --- /dev/null +++ b/docs/linting/troubleshooting/Performance.md @@ -0,0 +1,150 @@ +--- +id: performance-troubleshooting +title: Performance Troubleshooting +--- + +As mentioned in the [type-aware linting doc](../Typed_Linting.md), if you're using type-aware linting, your lint times should be roughly the same as your build times. + +If you're experiencing times much slower than that, then there are a few common culprits. + +## Wide includes in your `tsconfig` + +When using type-aware linting, you provide us with one or more tsconfigs. +We then will pre-parse all files so that full and complete type information is available. + +If you provide very wide globs in your `include` (such as `**/*`), it can cause many more files than you expect to be included in this pre-parse. +Additionally, if you provide no `include` in your tsconfig, then it is the same as providing the widest glob. + +Wide globs can cause TypeScript to parse things like build artifacts, which can heavily impact performance. +Always ensure you provide globs targeted at the folders you are specifically wanting to lint. + +## Wide includes in your ESLint options + +Specifying `tsconfig.json` paths in your ESLint commands is also likely to cause much more disk IO than expected. +Instead of globs that use `**` to recursively check all folders, prefer paths that use a single `*` at a time. + +```js title=".eslintrc.js" +module.exports = { + extends: [ + 'eslint:recommended', + 'plugin:@typescript-eslint/recommended', + 'plugin:@typescript-eslint/recommended-requiring-type-checking', + ], + parser: '@typescript-eslint/parser', + parserOptions: { + tsconfigRootDir: __dirname, + // Remove this line + project: ['./**/tsconfig.json'], + // Add this line + project: ['./packages/*/tsconfig.json'], + }, + plugins: ['@typescript-eslint'], + root: true, +}; +``` + +See [Glob pattern in parser's option "project" slows down linting](https://github.com/typescript-eslint/typescript-eslint/issues/2611) for more details. + +## The `indent` / `@typescript-eslint/indent` rules + +This rule helps ensure your codebase follows a consistent indentation pattern. +However this involves a _lot_ of computations across every single token in a file. +Across a large codebase, these can add up, and severely impact performance. + +We recommend not using this rule, and instead using a tool like [`prettier`](https://www.npmjs.com/package/prettier) to enforce a standardized formatting. + +See our [documentation on formatting](./Formatting.md) for more information. + +## `eslint-plugin-prettier` + +This plugin surfaces prettier formatting problems at lint time, helping to ensure your code is always formatted. +However this comes at a quite a large cost - in order to figure out if there is a difference, it has to do a prettier format on every file being linted. +This means that each file will be parsed twice - once by ESLint, and once by Prettier. +This can add up for large codebases. + +Instead of using this plugin, we recommend using prettier's `--list-different` flag to detect if a file has not been correctly formatted. +For example, our CI is setup to run the following command automatically, which blocks PRs that have not been formatted: + +```bash npm2yarn +npm run prettier --list-different \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" +``` + +## `eslint-plugin-import` + +This is another great plugin that we use ourselves in this project. +However there are a few rules which can cause your lints to be really slow, because they cause the plugin to do its own parsing, and file tracking. +This double parsing adds up for large codebases. + +There are many rules that do single file static analysis, but we provide the following recommendations. + +We recommend you do not use the following rules, as TypeScript provides the same checks as part of standard type checking: + +- `import/named` +- `import/namespace` +- `import/default` +- `import/no-named-as-default-member` + +The following rules do not have equivalent checks in TypeScript, so we recommend that you only run them at CI/push time, to lessen the local performance burden. + +- `import/no-named-as-default` +- `import/no-cycle` +- `import/no-unused-modules` +- `import/no-deprecated` + +### `import/extensions` + +#### Enforcing extensions are used + +If you want to enforce file extensions are always used and you're **NOT** using `moduleResolution` `node16` or `nodenext`, then there's not really a good alternative for you, and you should continue using the `import/extensions` lint rule. + +If you want to enforce file extensions are always used and you **ARE** using `moduleResolution` `node16` or `nodenext`, then you don't need to use the lint rule at all because TypeScript will automatically enforce that you include extensions! + +#### Enforcing extensions are not used + +On the surface `import/extensions` seems like it should be fast for this use case, however the rule isn't just a pure AST-check - it has to resolve modules on disk so that it doesn't false positive on cases where you are importing modules with an extension as part of their name (eg `foo.js` resolves to `node_modules/foo.js/index.js`, so the `.js` is required). This disk lookup is costly and thus makes the rule slow. + +If your project doesn't use any `npm` packages with a file extension in their name, nor do you name your files with two extensions (like `bar.js.ts`), then this extra cost probably isn't worth it, and you can use a much simpler check using the [`no-restricted-syntax`](https://eslint.org/docs/latest/rules/no-restricted-syntax) lint rule. + +The below config is several orders of magnitude faster than `import/extensions` as it does not do disk lookups, however it will false-positive on cases like the aforementioned `foo.js` module. + +```js +function banImportExtension(extension) { + const message = `Unexpected use of file extension (.${extension}) in import`; + const literalAttributeMatcher = `Literal[value=/\\.${extension}$/]`; + return [ + { + // import foo from 'bar.js'; + selector: `ImportDeclaration > ${literalAttributeMatcher}.source`, + message, + }, + { + // const foo = import('bar.js'); + selector: `ImportExpression > ${literalAttributeMatcher}.source`, + message, + }, + { + // type Foo = typeof import('bar.js'); + selector: `TSImportType > TSLiteralType > ${literalAttributeMatcher}`, + message, + }, + { + // const foo = require('foo.js'); + selector: `CallExpression[callee.name = "require"] > ${literalAttributeMatcher}.arguments`, + message, + }, + ]; +} + +module.exports = { + // ... other config ... + rules: { + 'no-restricted-syntax': [ + 'error', + ...banImportExtension('js'), + ...banImportExtension('jsx'), + ...banImportExtension('ts'), + ...banImportExtension('tsx'), + ], + }, +}; +``` diff --git a/docs/maintenance/VERSIONING.md b/docs/maintenance/VERSIONING.md index 4f617ad987c..b7e91123415 100644 --- a/docs/maintenance/VERSIONING.md +++ b/docs/maintenance/VERSIONING.md @@ -58,9 +58,9 @@ See: [`@typescript-eslint/parser`](./packages/parser/ TODO JOSH) and [`@typescri ### ESLint -We endeavour to support the latest stable ESLint versions as soon as possible after the release. +> The version range of ESLint currently supported is `^6.0.0 || ^7.0.0 || ^8.0.0`. -See the value of `eslint` declared in `@typescript-eslint/eslint-plugin`'s [package.json](./packages/eslint-plugin/package.json). +These versions are what we test against. ### Node diff --git a/lerna.json b/lerna.json index 05ae3263abc..d9674ac9fb9 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "5.46.1", + "version": "5.48.2", "npmClient": "yarn", "useWorkspaces": true, "stream": true diff --git a/package.json b/package.json index 1636910d3ed..5e7169881da 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "@babel/code-frame": "^7.18.6", "@babel/core": "^7.20.2", "@babel/eslint-parser": "^7.19.1", - "@babel/parser": "^7.20.3", + "@babel/parser": "^7.20.7", "@babel/types": "^7.20.2", "@nrwl/nx-cloud": "15.0.2", "@nrwl/jest": "15.3.2", @@ -85,8 +85,8 @@ "eslint-plugin-eslint-comments": "^3.2.0", "eslint-plugin-eslint-plugin": "^5.0.1", "eslint-plugin-import": "^2.26.0", - "eslint-plugin-jest": "^26.1.5", - "eslint-plugin-simple-import-sort": "^8.0.0", + "eslint-plugin-jest": "^27.0.0", + "eslint-plugin-simple-import-sort": "^9.0.0", "execa": "5.1.1", "glob": "^8.0.1", "husky": "^8.0.1", @@ -94,16 +94,16 @@ "jest-diff": "^29.0.3", "jest-snapshot": "^29.0.3", "jest-specific-snapshot": "^7.0.0", - "lerna": "6.1.0", + "lerna": "6.4.1", "lint-staged": "^13.0.0", "make-dir": "^3.1.0", - "markdownlint-cli": "^0.32.0", + "markdownlint-cli": "^0.33.0", "ncp": "^2.0.0", "nx": "15.3.2", "patch-package": "^6.4.7", - "prettier": "2.8.0", + "prettier": "2.8.1", "pretty-format": "^29.0.3", - "rimraf": "^3.0.2", + "rimraf": "^4.0.0", "tmp": "^0.2.1", "ts-node": "^10.7.0", "tslint": "^6.1.3", diff --git a/packages/ast-spec/CHANGELOG.md b/packages/ast-spec/CHANGELOG.md index 8b8f051a142..7568a697270 100644 --- a/packages/ast-spec/CHANGELOG.md +++ b/packages/ast-spec/CHANGELOG.md @@ -3,6 +3,36 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [5.48.2](https://github.com/typescript-eslint/typescript-eslint/compare/v5.48.1...v5.48.2) (2023-01-16) + +**Note:** Version bump only for package @typescript-eslint/ast-spec + + + + + +## [5.48.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.48.0...v5.48.1) (2023-01-09) + +**Note:** Version bump only for package @typescript-eslint/ast-spec + + + + + +# [5.48.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.47.1...v5.48.0) (2023-01-02) + +**Note:** Version bump only for package @typescript-eslint/ast-spec + +## [5.47.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.47.0...v5.47.1) (2022-12-26) + +### Bug Fixes + +- **ast-spec:** correct some incorrect ast types ([#6257](https://github.com/typescript-eslint/typescript-eslint/issues/6257)) ([0f3f645](https://github.com/typescript-eslint/typescript-eslint/commit/0f3f64571ea5d938081b1a9f3fd1495765201700)) + +# [5.47.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.46.1...v5.47.0) (2022-12-19) + +**Note:** Version bump only for package @typescript-eslint/ast-spec + ## [5.46.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.46.0...v5.46.1) (2022-12-12) **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 4df878e4ac3..78f431f6656 100644 --- a/packages/ast-spec/package.json +++ b/packages/ast-spec/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/ast-spec", - "version": "5.46.1", + "version": "5.48.2", "description": "Complete specification for the TypeScript-ESTree AST", "private": true, "keywords": [ diff --git a/packages/ast-spec/src/element/AccessorProperty/fixtures/_error_/modifier-declare/snapshots/1-TSESTree-Error.shot b/packages/ast-spec/src/element/AccessorProperty/fixtures/_error_/modifier-declare/snapshots/1-TSESTree-Error.shot deleted file mode 100644 index e9efe0512eb..00000000000 --- a/packages/ast-spec/src/element/AccessorProperty/fixtures/_error_/modifier-declare/snapshots/1-TSESTree-Error.shot +++ /dev/null @@ -1,3 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`AST Fixtures element AccessorProperty _error_ modifier-declare TSESTree - Error 1`] = `"NO ERROR"`; diff --git a/packages/ast-spec/src/element/AccessorProperty/fixtures/_error_/modifier-declare/snapshots/2-Babel-Error.shot b/packages/ast-spec/src/element/AccessorProperty/fixtures/_error_/modifier-declare/snapshots/2-Babel-Error.shot deleted file mode 100644 index 7d44c5a9712..00000000000 --- a/packages/ast-spec/src/element/AccessorProperty/fixtures/_error_/modifier-declare/snapshots/2-Babel-Error.shot +++ /dev/null @@ -1,3 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`AST Fixtures element AccessorProperty _error_ modifier-declare Babel - Error 1`] = `[SyntaxError: Missing semicolon. (2:22)]`; diff --git a/packages/ast-spec/src/element/AccessorProperty/fixtures/_error_/modifier-declare/snapshots/3-Alignment-Error.shot b/packages/ast-spec/src/element/AccessorProperty/fixtures/_error_/modifier-declare/snapshots/3-Alignment-Error.shot deleted file mode 100644 index a6fbd60e31c..00000000000 --- a/packages/ast-spec/src/element/AccessorProperty/fixtures/_error_/modifier-declare/snapshots/3-Alignment-Error.shot +++ /dev/null @@ -1,3 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`AST Fixtures element AccessorProperty _error_ modifier-declare Error Alignment 1`] = `"Babel errored but TSESTree didn't"`; diff --git a/packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-abstract-with-value/config.ts b/packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-abstract-with-value/config.ts deleted file mode 100644 index 61e0e137a0e..00000000000 --- a/packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-abstract-with-value/config.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - expectBabelToNotSupport: 'https://github.com/babel/babel/issues/15205', -} satisfies ASTFixtureConfig; diff --git a/packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-abstract-with-value/snapshots/3-Babel-AST.shot b/packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-abstract-with-value/snapshots/3-Babel-AST.shot new file mode 100644 index 00000000000..147bdd6cb25 --- /dev/null +++ b/packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-abstract-with-value/snapshots/3-Babel-AST.shot @@ -0,0 +1,99 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures element AccessorProperty modifier-abstract-with-value Babel - AST 1`] = ` +Program { + type: "Program", + body: Array [ + ClassDeclaration { + type: "ClassDeclaration", + abstract: true, + body: ClassBody { + type: "ClassBody", + body: Array [ + ClassAccessorProperty { + type: "ClassAccessorProperty", + abstract: true, + computed: false, + key: Identifier { + type: "Identifier", + name: "foo", + + range: [41, 44], + loc: { + start: { column: 20, line: 2 }, + end: { column: 23, line: 2 }, + }, + }, + static: false, + typeAnnotation: TSTypeAnnotation { + type: "TSTypeAnnotation", + typeAnnotation: TSNumberKeyword { + type: "TSNumberKeyword", + + range: [46, 52], + loc: { + start: { column: 25, line: 2 }, + end: { column: 31, line: 2 }, + }, + }, + + range: [44, 52], + loc: { + start: { column: 23, line: 2 }, + end: { column: 31, line: 2 }, + }, + }, + value: Literal { + type: "Literal", + raw: "1", + value: 1, + + range: [55, 56], + loc: { + start: { column: 34, line: 2 }, + end: { column: 35, line: 2 }, + }, + }, + + range: [23, 57], + loc: { + start: { column: 2, line: 2 }, + end: { column: 36, line: 2 }, + }, + }, + ], + + range: [19, 59], + loc: { + start: { column: 19, line: 1 }, + end: { column: 1, line: 3 }, + }, + }, + id: Identifier { + type: "Identifier", + name: "Foo", + + range: [15, 18], + loc: { + start: { column: 15, line: 1 }, + end: { column: 18, line: 1 }, + }, + }, + superClass: null, + + range: [0, 59], + loc: { + start: { column: 0, line: 1 }, + end: { column: 1, line: 3 }, + }, + }, + ], + sourceType: "script", + + range: [0, 60], + loc: { + start: { column: 0, line: 1 }, + end: { column: 0, line: 4 }, + }, +} +`; diff --git a/packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-abstract-with-value/snapshots/4-Babel-Tokens.shot b/packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-abstract-with-value/snapshots/4-Babel-Tokens.shot new file mode 100644 index 00000000000..1d49b0c7ad1 --- /dev/null +++ b/packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-abstract-with-value/snapshots/4-Babel-Tokens.shot @@ -0,0 +1,136 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures element AccessorProperty modifier-abstract-with-value Babel - Tokens 1`] = ` +Array [ + Identifier { + type: "Identifier", + value: "abstract", + + range: [0, 8], + loc: { + start: { column: 0, line: 1 }, + end: { column: 8, line: 1 }, + }, + }, + Keyword { + type: "Keyword", + value: "class", + + range: [9, 14], + loc: { + start: { column: 9, line: 1 }, + end: { column: 14, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "Foo", + + range: [15, 18], + loc: { + start: { column: 15, line: 1 }, + end: { column: 18, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "{", + + range: [19, 20], + loc: { + start: { column: 19, line: 1 }, + end: { column: 20, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "abstract", + + range: [23, 31], + loc: { + start: { column: 2, line: 2 }, + end: { column: 10, line: 2 }, + }, + }, + Identifier { + type: "Identifier", + value: "accessor", + + range: [32, 40], + loc: { + start: { column: 11, line: 2 }, + end: { column: 19, line: 2 }, + }, + }, + Identifier { + type: "Identifier", + value: "foo", + + range: [41, 44], + loc: { + start: { column: 20, line: 2 }, + end: { column: 23, line: 2 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ":", + + range: [44, 45], + loc: { + start: { column: 23, line: 2 }, + end: { column: 24, line: 2 }, + }, + }, + Identifier { + type: "Identifier", + value: "number", + + range: [46, 52], + loc: { + start: { column: 25, line: 2 }, + end: { column: 31, line: 2 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "=", + + range: [53, 54], + loc: { + start: { column: 32, line: 2 }, + end: { column: 33, line: 2 }, + }, + }, + Numeric { + type: "Numeric", + value: "1", + + range: [55, 56], + loc: { + start: { column: 34, line: 2 }, + end: { column: 35, line: 2 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ";", + + range: [56, 57], + loc: { + start: { column: 35, line: 2 }, + end: { column: 36, line: 2 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "}", + + range: [58, 59], + loc: { + start: { column: 0, line: 3 }, + end: { column: 1, line: 3 }, + }, + }, +] +`; diff --git a/packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-abstract-with-value/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-abstract-with-value/snapshots/5-AST-Alignment-AST.shot new file mode 100644 index 00000000000..27b36ea8b18 --- /dev/null +++ b/packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-abstract-with-value/snapshots/5-AST-Alignment-AST.shot @@ -0,0 +1,108 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures element AccessorProperty modifier-abstract-with-value AST Alignment - AST 1`] = ` +"Snapshot Diff: +- TSESTree ++ Babel + + Program { + type: 'Program', + body: Array [ + ClassDeclaration { + type: 'ClassDeclaration', + abstract: true, + body: ClassBody { + type: 'ClassBody', + body: Array [ +- TSAbstractAccessorProperty { +- type: 'TSAbstractAccessorProperty', ++ ClassAccessorProperty { ++ type: 'ClassAccessorProperty', ++ abstract: true, + computed: false, +- declare: false, + key: Identifier { + type: 'Identifier', + name: 'foo', + + range: [41, 44], + loc: { + start: { column: 20, line: 2 }, + end: { column: 23, line: 2 }, + }, + }, +- override: false, + static: false, + typeAnnotation: TSTypeAnnotation { + type: 'TSTypeAnnotation', + typeAnnotation: TSNumberKeyword { + type: 'TSNumberKeyword', + + range: [46, 52], + loc: { + start: { column: 25, line: 2 }, + end: { column: 31, line: 2 }, + }, + }, + + range: [44, 52], + loc: { + start: { column: 23, line: 2 }, + end: { column: 31, line: 2 }, + }, + }, +- value: null, ++ value: Literal { ++ type: 'Literal', ++ raw: '1', ++ value: 1, ++ ++ range: [55, 56], ++ loc: { ++ start: { column: 34, line: 2 }, ++ end: { column: 35, line: 2 }, ++ }, ++ }, + + range: [23, 57], + loc: { + start: { column: 2, line: 2 }, + end: { column: 36, line: 2 }, + }, + }, + ], + + range: [19, 59], + loc: { + start: { column: 19, line: 1 }, + end: { column: 1, line: 3 }, + }, + }, + id: Identifier { + type: 'Identifier', + name: 'Foo', + + range: [15, 18], + loc: { + start: { column: 15, line: 1 }, + end: { column: 18, line: 1 }, + }, + }, + superClass: null, + + range: [0, 59], + loc: { + start: { column: 0, line: 1 }, + end: { column: 1, line: 3 }, + }, + }, + ], + sourceType: 'script', + + range: [0, 60], + loc: { + start: { column: 0, line: 1 }, + end: { column: 0, line: 4 }, + }, + }" +`; diff --git a/packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-abstract/snapshots/3-Babel-Error.shot b/packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-abstract-with-value/snapshots/6-AST-Alignment-Tokens.shot similarity index 50% rename from packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-abstract/snapshots/3-Babel-Error.shot rename to packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-abstract-with-value/snapshots/6-AST-Alignment-Tokens.shot index 6f975b3a497..fd832b249e4 100644 --- a/packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-abstract/snapshots/3-Babel-Error.shot +++ b/packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-abstract-with-value/snapshots/6-AST-Alignment-Tokens.shot @@ -1,3 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`AST Fixtures element AccessorProperty modifier-abstract Babel - Error 1`] = `[SyntaxError: Missing semicolon. (2:23)]`; +exports[`AST Fixtures element AccessorProperty modifier-abstract-with-value AST Alignment - Token 1`] = ` +"Snapshot Diff: +Compared values have no visual difference." +`; diff --git a/packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-abstract/config.ts b/packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-abstract/config.ts deleted file mode 100644 index 61e0e137a0e..00000000000 --- a/packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-abstract/config.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - expectBabelToNotSupport: 'https://github.com/babel/babel/issues/15205', -} satisfies ASTFixtureConfig; diff --git a/packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-abstract/snapshots/3-Babel-AST.shot b/packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-abstract/snapshots/3-Babel-AST.shot new file mode 100644 index 00000000000..6423ad41435 --- /dev/null +++ b/packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-abstract/snapshots/3-Babel-AST.shot @@ -0,0 +1,89 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures element AccessorProperty modifier-abstract Babel - AST 1`] = ` +Program { + type: "Program", + body: Array [ + ClassDeclaration { + type: "ClassDeclaration", + abstract: true, + body: ClassBody { + type: "ClassBody", + body: Array [ + ClassAccessorProperty { + type: "ClassAccessorProperty", + abstract: true, + computed: false, + key: Identifier { + type: "Identifier", + name: "foo", + + range: [41, 44], + loc: { + start: { column: 20, line: 2 }, + end: { column: 23, line: 2 }, + }, + }, + static: false, + typeAnnotation: TSTypeAnnotation { + type: "TSTypeAnnotation", + typeAnnotation: TSNumberKeyword { + type: "TSNumberKeyword", + + range: [46, 52], + loc: { + start: { column: 25, line: 2 }, + end: { column: 31, line: 2 }, + }, + }, + + range: [44, 52], + loc: { + start: { column: 23, line: 2 }, + end: { column: 31, line: 2 }, + }, + }, + value: null, + + range: [23, 53], + loc: { + start: { column: 2, line: 2 }, + end: { column: 32, line: 2 }, + }, + }, + ], + + range: [19, 55], + loc: { + start: { column: 19, line: 1 }, + end: { column: 1, line: 3 }, + }, + }, + id: Identifier { + type: "Identifier", + name: "Foo", + + range: [15, 18], + loc: { + start: { column: 15, line: 1 }, + end: { column: 18, line: 1 }, + }, + }, + superClass: null, + + range: [0, 55], + loc: { + start: { column: 0, line: 1 }, + end: { column: 1, line: 3 }, + }, + }, + ], + sourceType: "script", + + range: [0, 56], + loc: { + start: { column: 0, line: 1 }, + end: { column: 0, line: 4 }, + }, +} +`; diff --git a/packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-abstract/snapshots/4-Babel-Tokens.shot b/packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-abstract/snapshots/4-Babel-Tokens.shot new file mode 100644 index 00000000000..41f02a22191 --- /dev/null +++ b/packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-abstract/snapshots/4-Babel-Tokens.shot @@ -0,0 +1,116 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures element AccessorProperty modifier-abstract Babel - Tokens 1`] = ` +Array [ + Identifier { + type: "Identifier", + value: "abstract", + + range: [0, 8], + loc: { + start: { column: 0, line: 1 }, + end: { column: 8, line: 1 }, + }, + }, + Keyword { + type: "Keyword", + value: "class", + + range: [9, 14], + loc: { + start: { column: 9, line: 1 }, + end: { column: 14, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "Foo", + + range: [15, 18], + loc: { + start: { column: 15, line: 1 }, + end: { column: 18, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "{", + + range: [19, 20], + loc: { + start: { column: 19, line: 1 }, + end: { column: 20, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "abstract", + + range: [23, 31], + loc: { + start: { column: 2, line: 2 }, + end: { column: 10, line: 2 }, + }, + }, + Identifier { + type: "Identifier", + value: "accessor", + + range: [32, 40], + loc: { + start: { column: 11, line: 2 }, + end: { column: 19, line: 2 }, + }, + }, + Identifier { + type: "Identifier", + value: "foo", + + range: [41, 44], + loc: { + start: { column: 20, line: 2 }, + end: { column: 23, line: 2 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ":", + + range: [44, 45], + loc: { + start: { column: 23, line: 2 }, + end: { column: 24, line: 2 }, + }, + }, + Identifier { + type: "Identifier", + value: "number", + + range: [46, 52], + loc: { + start: { column: 25, line: 2 }, + end: { column: 31, line: 2 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ";", + + range: [52, 53], + loc: { + start: { column: 31, line: 2 }, + end: { column: 32, line: 2 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "}", + + range: [54, 55], + loc: { + start: { column: 0, line: 3 }, + end: { column: 1, line: 3 }, + }, + }, +] +`; diff --git a/packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-abstract/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-abstract/snapshots/5-AST-Alignment-AST.shot new file mode 100644 index 00000000000..cecb46eb91f --- /dev/null +++ b/packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-abstract/snapshots/5-AST-Alignment-AST.shot @@ -0,0 +1,97 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures element AccessorProperty modifier-abstract AST Alignment - AST 1`] = ` +"Snapshot Diff: +- TSESTree ++ Babel + + Program { + type: 'Program', + body: Array [ + ClassDeclaration { + type: 'ClassDeclaration', + abstract: true, + body: ClassBody { + type: 'ClassBody', + body: Array [ +- TSAbstractAccessorProperty { +- type: 'TSAbstractAccessorProperty', ++ ClassAccessorProperty { ++ type: 'ClassAccessorProperty', ++ abstract: true, + computed: false, +- declare: false, + key: Identifier { + type: 'Identifier', + name: 'foo', + + range: [41, 44], + loc: { + start: { column: 20, line: 2 }, + end: { column: 23, line: 2 }, + }, + }, +- override: false, + static: false, + typeAnnotation: TSTypeAnnotation { + type: 'TSTypeAnnotation', + typeAnnotation: TSNumberKeyword { + type: 'TSNumberKeyword', + + range: [46, 52], + loc: { + start: { column: 25, line: 2 }, + end: { column: 31, line: 2 }, + }, + }, + + range: [44, 52], + loc: { + start: { column: 23, line: 2 }, + end: { column: 31, line: 2 }, + }, + }, + value: null, + + range: [23, 53], + loc: { + start: { column: 2, line: 2 }, + end: { column: 32, line: 2 }, + }, + }, + ], + + range: [19, 55], + loc: { + start: { column: 19, line: 1 }, + end: { column: 1, line: 3 }, + }, + }, + id: Identifier { + type: 'Identifier', + name: 'Foo', + + range: [15, 18], + loc: { + start: { column: 15, line: 1 }, + end: { column: 18, line: 1 }, + }, + }, + superClass: null, + + range: [0, 55], + loc: { + start: { column: 0, line: 1 }, + end: { column: 1, line: 3 }, + }, + }, + ], + sourceType: 'script', + + range: [0, 56], + loc: { + start: { column: 0, line: 1 }, + end: { column: 0, line: 4 }, + }, + }" +`; diff --git a/packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-abstract-with-value/snapshots/3-Babel-Error.shot b/packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-abstract/snapshots/6-AST-Alignment-Tokens.shot similarity index 53% rename from packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-abstract-with-value/snapshots/3-Babel-Error.shot rename to packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-abstract/snapshots/6-AST-Alignment-Tokens.shot index c49a847cd3a..8d5295e9c35 100644 --- a/packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-abstract-with-value/snapshots/3-Babel-Error.shot +++ b/packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-abstract/snapshots/6-AST-Alignment-Tokens.shot @@ -1,3 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`AST Fixtures element AccessorProperty modifier-abstract-with-value Babel - Error 1`] = `[SyntaxError: Missing semicolon. (2:23)]`; +exports[`AST Fixtures element AccessorProperty modifier-abstract AST Alignment - Token 1`] = ` +"Snapshot Diff: +Compared values have no visual difference." +`; diff --git a/packages/ast-spec/src/element/AccessorProperty/fixtures/_error_/modifier-declare/fixture.ts b/packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-declare/fixture.ts similarity index 100% rename from packages/ast-spec/src/element/AccessorProperty/fixtures/_error_/modifier-declare/fixture.ts rename to packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-declare/fixture.ts diff --git a/packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-declare/snapshots/1-TSESTree-AST.shot b/packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-declare/snapshots/1-TSESTree-AST.shot new file mode 100644 index 00000000000..0b61be5984a --- /dev/null +++ b/packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-declare/snapshots/1-TSESTree-AST.shot @@ -0,0 +1,89 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures element AccessorProperty modifier-declare TSESTree - AST 1`] = ` +Program { + type: "Program", + body: Array [ + ClassDeclaration { + type: "ClassDeclaration", + body: ClassBody { + type: "ClassBody", + body: Array [ + AccessorProperty { + type: "AccessorProperty", + computed: false, + declare: true, + key: Identifier { + type: "Identifier", + name: "foo", + + range: [31, 34], + loc: { + start: { column: 19, line: 2 }, + end: { column: 22, line: 2 }, + }, + }, + override: false, + static: false, + typeAnnotation: TSTypeAnnotation { + type: "TSTypeAnnotation", + typeAnnotation: TSNumberKeyword { + type: "TSNumberKeyword", + + range: [36, 42], + loc: { + start: { column: 24, line: 2 }, + end: { column: 30, line: 2 }, + }, + }, + + range: [34, 42], + loc: { + start: { column: 22, line: 2 }, + end: { column: 30, line: 2 }, + }, + }, + value: null, + + range: [14, 43], + loc: { + start: { column: 2, line: 2 }, + end: { column: 31, line: 2 }, + }, + }, + ], + + range: [10, 45], + loc: { + start: { column: 10, line: 1 }, + end: { column: 1, line: 3 }, + }, + }, + id: Identifier { + type: "Identifier", + name: "Foo", + + range: [6, 9], + loc: { + start: { column: 6, line: 1 }, + end: { column: 9, line: 1 }, + }, + }, + superClass: null, + + range: [0, 45], + loc: { + start: { column: 0, line: 1 }, + end: { column: 1, line: 3 }, + }, + }, + ], + sourceType: "script", + + range: [0, 46], + loc: { + start: { column: 0, line: 1 }, + end: { column: 0, line: 4 }, + }, +} +`; diff --git a/packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-declare/snapshots/2-TSESTree-Tokens.shot b/packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-declare/snapshots/2-TSESTree-Tokens.shot new file mode 100644 index 00000000000..c9f1a1a1da8 --- /dev/null +++ b/packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-declare/snapshots/2-TSESTree-Tokens.shot @@ -0,0 +1,106 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures element AccessorProperty modifier-declare TSESTree - Tokens 1`] = ` +Array [ + Keyword { + type: "Keyword", + value: "class", + + range: [0, 5], + loc: { + start: { column: 0, line: 1 }, + end: { column: 5, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "Foo", + + range: [6, 9], + loc: { + start: { column: 6, line: 1 }, + end: { column: 9, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "{", + + range: [10, 11], + loc: { + start: { column: 10, line: 1 }, + end: { column: 11, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "declare", + + range: [14, 21], + loc: { + start: { column: 2, line: 2 }, + end: { column: 9, line: 2 }, + }, + }, + Identifier { + type: "Identifier", + value: "accessor", + + range: [22, 30], + loc: { + start: { column: 10, line: 2 }, + end: { column: 18, line: 2 }, + }, + }, + Identifier { + type: "Identifier", + value: "foo", + + range: [31, 34], + loc: { + start: { column: 19, line: 2 }, + end: { column: 22, line: 2 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ":", + + range: [34, 35], + loc: { + start: { column: 22, line: 2 }, + end: { column: 23, line: 2 }, + }, + }, + Identifier { + type: "Identifier", + value: "number", + + range: [36, 42], + loc: { + start: { column: 24, line: 2 }, + end: { column: 30, line: 2 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ";", + + range: [42, 43], + loc: { + start: { column: 30, line: 2 }, + end: { column: 31, line: 2 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "}", + + range: [44, 45], + loc: { + start: { column: 0, line: 3 }, + end: { column: 1, line: 3 }, + }, + }, +] +`; diff --git a/packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-declare/snapshots/3-Babel-AST.shot b/packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-declare/snapshots/3-Babel-AST.shot new file mode 100644 index 00000000000..057e8de958a --- /dev/null +++ b/packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-declare/snapshots/3-Babel-AST.shot @@ -0,0 +1,88 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures element AccessorProperty modifier-declare Babel - AST 1`] = ` +Program { + type: "Program", + body: Array [ + ClassDeclaration { + type: "ClassDeclaration", + body: ClassBody { + type: "ClassBody", + body: Array [ + ClassAccessorProperty { + type: "ClassAccessorProperty", + computed: false, + declare: true, + key: Identifier { + type: "Identifier", + name: "foo", + + range: [31, 34], + loc: { + start: { column: 19, line: 2 }, + end: { column: 22, line: 2 }, + }, + }, + static: false, + typeAnnotation: TSTypeAnnotation { + type: "TSTypeAnnotation", + typeAnnotation: TSNumberKeyword { + type: "TSNumberKeyword", + + range: [36, 42], + loc: { + start: { column: 24, line: 2 }, + end: { column: 30, line: 2 }, + }, + }, + + range: [34, 42], + loc: { + start: { column: 22, line: 2 }, + end: { column: 30, line: 2 }, + }, + }, + value: null, + + range: [14, 43], + loc: { + start: { column: 2, line: 2 }, + end: { column: 31, line: 2 }, + }, + }, + ], + + range: [10, 45], + loc: { + start: { column: 10, line: 1 }, + end: { column: 1, line: 3 }, + }, + }, + id: Identifier { + type: "Identifier", + name: "Foo", + + range: [6, 9], + loc: { + start: { column: 6, line: 1 }, + end: { column: 9, line: 1 }, + }, + }, + superClass: null, + + range: [0, 45], + loc: { + start: { column: 0, line: 1 }, + end: { column: 1, line: 3 }, + }, + }, + ], + sourceType: "script", + + range: [0, 46], + loc: { + start: { column: 0, line: 1 }, + end: { column: 0, line: 4 }, + }, +} +`; diff --git a/packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-declare/snapshots/4-Babel-Tokens.shot b/packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-declare/snapshots/4-Babel-Tokens.shot new file mode 100644 index 00000000000..991730e68ff --- /dev/null +++ b/packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-declare/snapshots/4-Babel-Tokens.shot @@ -0,0 +1,106 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures element AccessorProperty modifier-declare Babel - Tokens 1`] = ` +Array [ + Keyword { + type: "Keyword", + value: "class", + + range: [0, 5], + loc: { + start: { column: 0, line: 1 }, + end: { column: 5, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "Foo", + + range: [6, 9], + loc: { + start: { column: 6, line: 1 }, + end: { column: 9, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "{", + + range: [10, 11], + loc: { + start: { column: 10, line: 1 }, + end: { column: 11, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "declare", + + range: [14, 21], + loc: { + start: { column: 2, line: 2 }, + end: { column: 9, line: 2 }, + }, + }, + Identifier { + type: "Identifier", + value: "accessor", + + range: [22, 30], + loc: { + start: { column: 10, line: 2 }, + end: { column: 18, line: 2 }, + }, + }, + Identifier { + type: "Identifier", + value: "foo", + + range: [31, 34], + loc: { + start: { column: 19, line: 2 }, + end: { column: 22, line: 2 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ":", + + range: [34, 35], + loc: { + start: { column: 22, line: 2 }, + end: { column: 23, line: 2 }, + }, + }, + Identifier { + type: "Identifier", + value: "number", + + range: [36, 42], + loc: { + start: { column: 24, line: 2 }, + end: { column: 30, line: 2 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ";", + + range: [42, 43], + loc: { + start: { column: 30, line: 2 }, + end: { column: 31, line: 2 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "}", + + range: [44, 45], + loc: { + start: { column: 0, line: 3 }, + end: { column: 1, line: 3 }, + }, + }, +] +`; diff --git a/packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-declare/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-declare/snapshots/5-AST-Alignment-AST.shot new file mode 100644 index 00000000000..76e4314a3c6 --- /dev/null +++ b/packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-declare/snapshots/5-AST-Alignment-AST.shot @@ -0,0 +1,95 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures element AccessorProperty modifier-declare AST Alignment - AST 1`] = ` +"Snapshot Diff: +- TSESTree ++ Babel + + Program { + type: 'Program', + body: Array [ + ClassDeclaration { + type: 'ClassDeclaration', + body: ClassBody { + type: 'ClassBody', + body: Array [ +- AccessorProperty { +- type: 'AccessorProperty', ++ ClassAccessorProperty { ++ type: 'ClassAccessorProperty', + computed: false, + declare: true, + key: Identifier { + type: 'Identifier', + name: 'foo', + + range: [31, 34], + loc: { + start: { column: 19, line: 2 }, + end: { column: 22, line: 2 }, + }, + }, +- override: false, + static: false, + typeAnnotation: TSTypeAnnotation { + type: 'TSTypeAnnotation', + typeAnnotation: TSNumberKeyword { + type: 'TSNumberKeyword', + + range: [36, 42], + loc: { + start: { column: 24, line: 2 }, + end: { column: 30, line: 2 }, + }, + }, + + range: [34, 42], + loc: { + start: { column: 22, line: 2 }, + end: { column: 30, line: 2 }, + }, + }, + value: null, + + range: [14, 43], + loc: { + start: { column: 2, line: 2 }, + end: { column: 31, line: 2 }, + }, + }, + ], + + range: [10, 45], + loc: { + start: { column: 10, line: 1 }, + end: { column: 1, line: 3 }, + }, + }, + id: Identifier { + type: 'Identifier', + name: 'Foo', + + range: [6, 9], + loc: { + start: { column: 6, line: 1 }, + end: { column: 9, line: 1 }, + }, + }, + superClass: null, + + range: [0, 45], + loc: { + start: { column: 0, line: 1 }, + end: { column: 1, line: 3 }, + }, + }, + ], + sourceType: 'script', + + range: [0, 46], + loc: { + start: { column: 0, line: 1 }, + end: { column: 0, line: 4 }, + }, + }" +`; diff --git a/packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-declare/snapshots/6-AST-Alignment-Tokens.shot b/packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-declare/snapshots/6-AST-Alignment-Tokens.shot new file mode 100644 index 00000000000..491288c619b --- /dev/null +++ b/packages/ast-spec/src/element/AccessorProperty/fixtures/modifier-declare/snapshots/6-AST-Alignment-Tokens.shot @@ -0,0 +1,6 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures element AccessorProperty modifier-declare AST Alignment - Token 1`] = ` +"Snapshot Diff: +Compared values have no visual difference." +`; diff --git a/packages/ast-spec/src/element/AccessorProperty/fixtures/with-annotation-no-value/config.ts b/packages/ast-spec/src/element/AccessorProperty/fixtures/with-annotation-no-value/config.ts deleted file mode 100644 index 61e0e137a0e..00000000000 --- a/packages/ast-spec/src/element/AccessorProperty/fixtures/with-annotation-no-value/config.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - expectBabelToNotSupport: 'https://github.com/babel/babel/issues/15205', -} satisfies ASTFixtureConfig; diff --git a/packages/ast-spec/src/element/AccessorProperty/fixtures/with-annotation-no-value/snapshots/3-Babel-AST.shot b/packages/ast-spec/src/element/AccessorProperty/fixtures/with-annotation-no-value/snapshots/3-Babel-AST.shot new file mode 100644 index 00000000000..b1451f6ef4d --- /dev/null +++ b/packages/ast-spec/src/element/AccessorProperty/fixtures/with-annotation-no-value/snapshots/3-Babel-AST.shot @@ -0,0 +1,87 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures element AccessorProperty with-annotation-no-value Babel - AST 1`] = ` +Program { + type: "Program", + body: Array [ + ClassDeclaration { + type: "ClassDeclaration", + body: ClassBody { + type: "ClassBody", + body: Array [ + ClassAccessorProperty { + type: "ClassAccessorProperty", + computed: false, + key: Identifier { + type: "Identifier", + name: "prop", + + range: [23, 27], + loc: { + start: { column: 11, line: 2 }, + end: { column: 15, line: 2 }, + }, + }, + static: false, + typeAnnotation: TSTypeAnnotation { + type: "TSTypeAnnotation", + typeAnnotation: TSStringKeyword { + type: "TSStringKeyword", + + range: [29, 35], + loc: { + start: { column: 17, line: 2 }, + end: { column: 23, line: 2 }, + }, + }, + + range: [27, 35], + loc: { + start: { column: 15, line: 2 }, + end: { column: 23, line: 2 }, + }, + }, + value: null, + + range: [14, 36], + loc: { + start: { column: 2, line: 2 }, + end: { column: 24, line: 2 }, + }, + }, + ], + + range: [10, 38], + loc: { + start: { column: 10, line: 1 }, + end: { column: 1, line: 3 }, + }, + }, + id: Identifier { + type: "Identifier", + name: "Foo", + + range: [6, 9], + loc: { + start: { column: 6, line: 1 }, + end: { column: 9, line: 1 }, + }, + }, + superClass: null, + + range: [0, 38], + loc: { + start: { column: 0, line: 1 }, + end: { column: 1, line: 3 }, + }, + }, + ], + sourceType: "script", + + range: [0, 39], + loc: { + start: { column: 0, line: 1 }, + end: { column: 0, line: 4 }, + }, +} +`; diff --git a/packages/ast-spec/src/element/AccessorProperty/fixtures/with-annotation-no-value/snapshots/4-Babel-Tokens.shot b/packages/ast-spec/src/element/AccessorProperty/fixtures/with-annotation-no-value/snapshots/4-Babel-Tokens.shot new file mode 100644 index 00000000000..3c588981ba1 --- /dev/null +++ b/packages/ast-spec/src/element/AccessorProperty/fixtures/with-annotation-no-value/snapshots/4-Babel-Tokens.shot @@ -0,0 +1,96 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures element AccessorProperty with-annotation-no-value Babel - Tokens 1`] = ` +Array [ + Keyword { + type: "Keyword", + value: "class", + + range: [0, 5], + loc: { + start: { column: 0, line: 1 }, + end: { column: 5, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "Foo", + + range: [6, 9], + loc: { + start: { column: 6, line: 1 }, + end: { column: 9, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "{", + + range: [10, 11], + loc: { + start: { column: 10, line: 1 }, + end: { column: 11, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "accessor", + + range: [14, 22], + loc: { + start: { column: 2, line: 2 }, + end: { column: 10, line: 2 }, + }, + }, + Identifier { + type: "Identifier", + value: "prop", + + range: [23, 27], + loc: { + start: { column: 11, line: 2 }, + end: { column: 15, line: 2 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ":", + + range: [27, 28], + loc: { + start: { column: 15, line: 2 }, + end: { column: 16, line: 2 }, + }, + }, + Identifier { + type: "Identifier", + value: "string", + + range: [29, 35], + loc: { + start: { column: 17, line: 2 }, + end: { column: 23, line: 2 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ";", + + range: [35, 36], + loc: { + start: { column: 23, line: 2 }, + end: { column: 24, line: 2 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "}", + + range: [37, 38], + loc: { + start: { column: 0, line: 3 }, + end: { column: 1, line: 3 }, + }, + }, +] +`; diff --git a/packages/ast-spec/src/element/AccessorProperty/fixtures/with-annotation-no-value/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/element/AccessorProperty/fixtures/with-annotation-no-value/snapshots/5-AST-Alignment-AST.shot new file mode 100644 index 00000000000..d5ff97f0998 --- /dev/null +++ b/packages/ast-spec/src/element/AccessorProperty/fixtures/with-annotation-no-value/snapshots/5-AST-Alignment-AST.shot @@ -0,0 +1,95 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures element AccessorProperty with-annotation-no-value AST Alignment - AST 1`] = ` +"Snapshot Diff: +- TSESTree ++ Babel + + Program { + type: 'Program', + body: Array [ + ClassDeclaration { + type: 'ClassDeclaration', + body: ClassBody { + type: 'ClassBody', + body: Array [ +- AccessorProperty { +- type: 'AccessorProperty', ++ ClassAccessorProperty { ++ type: 'ClassAccessorProperty', + computed: false, +- declare: false, + key: Identifier { + type: 'Identifier', + name: 'prop', + + range: [23, 27], + loc: { + start: { column: 11, line: 2 }, + end: { column: 15, line: 2 }, + }, + }, +- override: false, + static: false, + typeAnnotation: TSTypeAnnotation { + type: 'TSTypeAnnotation', + typeAnnotation: TSStringKeyword { + type: 'TSStringKeyword', + + range: [29, 35], + loc: { + start: { column: 17, line: 2 }, + end: { column: 23, line: 2 }, + }, + }, + + range: [27, 35], + loc: { + start: { column: 15, line: 2 }, + end: { column: 23, line: 2 }, + }, + }, + value: null, + + range: [14, 36], + loc: { + start: { column: 2, line: 2 }, + end: { column: 24, line: 2 }, + }, + }, + ], + + range: [10, 38], + loc: { + start: { column: 10, line: 1 }, + end: { column: 1, line: 3 }, + }, + }, + id: Identifier { + type: 'Identifier', + name: 'Foo', + + range: [6, 9], + loc: { + start: { column: 6, line: 1 }, + end: { column: 9, line: 1 }, + }, + }, + superClass: null, + + range: [0, 38], + loc: { + start: { column: 0, line: 1 }, + end: { column: 1, line: 3 }, + }, + }, + ], + sourceType: 'script', + + range: [0, 39], + loc: { + start: { column: 0, line: 1 }, + end: { column: 0, line: 4 }, + }, + }" +`; diff --git a/packages/ast-spec/src/element/AccessorProperty/fixtures/with-annotation-no-value/snapshots/3-Babel-Error.shot b/packages/ast-spec/src/element/AccessorProperty/fixtures/with-annotation-no-value/snapshots/6-AST-Alignment-Tokens.shot similarity index 51% rename from packages/ast-spec/src/element/AccessorProperty/fixtures/with-annotation-no-value/snapshots/3-Babel-Error.shot rename to packages/ast-spec/src/element/AccessorProperty/fixtures/with-annotation-no-value/snapshots/6-AST-Alignment-Tokens.shot index 95932fa9389..285c4824154 100644 --- a/packages/ast-spec/src/element/AccessorProperty/fixtures/with-annotation-no-value/snapshots/3-Babel-Error.shot +++ b/packages/ast-spec/src/element/AccessorProperty/fixtures/with-annotation-no-value/snapshots/6-AST-Alignment-Tokens.shot @@ -1,3 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`AST Fixtures element AccessorProperty with-annotation-no-value Babel - Error 1`] = `[SyntaxError: Missing semicolon. (2:15)]`; +exports[`AST Fixtures element AccessorProperty with-annotation-no-value AST Alignment - Token 1`] = ` +"Snapshot Diff: +Compared values have no visual difference." +`; diff --git a/packages/ast-spec/src/element/AccessorProperty/fixtures/with-annotation-with-value/config.ts b/packages/ast-spec/src/element/AccessorProperty/fixtures/with-annotation-with-value/config.ts deleted file mode 100644 index 61e0e137a0e..00000000000 --- a/packages/ast-spec/src/element/AccessorProperty/fixtures/with-annotation-with-value/config.ts +++ /dev/null @@ -1,3 +0,0 @@ -export default { - expectBabelToNotSupport: 'https://github.com/babel/babel/issues/15205', -} satisfies ASTFixtureConfig; diff --git a/packages/ast-spec/src/element/AccessorProperty/fixtures/with-annotation-with-value/snapshots/3-Babel-AST.shot b/packages/ast-spec/src/element/AccessorProperty/fixtures/with-annotation-with-value/snapshots/3-Babel-AST.shot new file mode 100644 index 00000000000..dbe2364b124 --- /dev/null +++ b/packages/ast-spec/src/element/AccessorProperty/fixtures/with-annotation-with-value/snapshots/3-Babel-AST.shot @@ -0,0 +1,97 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures element AccessorProperty with-annotation-with-value Babel - AST 1`] = ` +Program { + type: "Program", + body: Array [ + ClassDeclaration { + type: "ClassDeclaration", + body: ClassBody { + type: "ClassBody", + body: Array [ + ClassAccessorProperty { + type: "ClassAccessorProperty", + computed: false, + key: Identifier { + type: "Identifier", + name: "prop", + + range: [23, 27], + loc: { + start: { column: 11, line: 2 }, + end: { column: 15, line: 2 }, + }, + }, + static: false, + typeAnnotation: TSTypeAnnotation { + type: "TSTypeAnnotation", + typeAnnotation: TSStringKeyword { + type: "TSStringKeyword", + + range: [29, 35], + loc: { + start: { column: 17, line: 2 }, + end: { column: 23, line: 2 }, + }, + }, + + range: [27, 35], + loc: { + start: { column: 15, line: 2 }, + end: { column: 23, line: 2 }, + }, + }, + value: Literal { + type: "Literal", + raw: "'str'", + value: "str", + + range: [38, 43], + loc: { + start: { column: 26, line: 2 }, + end: { column: 31, line: 2 }, + }, + }, + + range: [14, 44], + loc: { + start: { column: 2, line: 2 }, + end: { column: 32, line: 2 }, + }, + }, + ], + + range: [10, 46], + loc: { + start: { column: 10, line: 1 }, + end: { column: 1, line: 3 }, + }, + }, + id: Identifier { + type: "Identifier", + name: "Foo", + + range: [6, 9], + loc: { + start: { column: 6, line: 1 }, + end: { column: 9, line: 1 }, + }, + }, + superClass: null, + + range: [0, 46], + loc: { + start: { column: 0, line: 1 }, + end: { column: 1, line: 3 }, + }, + }, + ], + sourceType: "script", + + range: [0, 47], + loc: { + start: { column: 0, line: 1 }, + end: { column: 0, line: 4 }, + }, +} +`; diff --git a/packages/ast-spec/src/element/AccessorProperty/fixtures/with-annotation-with-value/snapshots/4-Babel-Tokens.shot b/packages/ast-spec/src/element/AccessorProperty/fixtures/with-annotation-with-value/snapshots/4-Babel-Tokens.shot new file mode 100644 index 00000000000..d8a82e4c1bb --- /dev/null +++ b/packages/ast-spec/src/element/AccessorProperty/fixtures/with-annotation-with-value/snapshots/4-Babel-Tokens.shot @@ -0,0 +1,116 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures element AccessorProperty with-annotation-with-value Babel - Tokens 1`] = ` +Array [ + Keyword { + type: "Keyword", + value: "class", + + range: [0, 5], + loc: { + start: { column: 0, line: 1 }, + end: { column: 5, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "Foo", + + range: [6, 9], + loc: { + start: { column: 6, line: 1 }, + end: { column: 9, line: 1 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "{", + + range: [10, 11], + loc: { + start: { column: 10, line: 1 }, + end: { column: 11, line: 1 }, + }, + }, + Identifier { + type: "Identifier", + value: "accessor", + + range: [14, 22], + loc: { + start: { column: 2, line: 2 }, + end: { column: 10, line: 2 }, + }, + }, + Identifier { + type: "Identifier", + value: "prop", + + range: [23, 27], + loc: { + start: { column: 11, line: 2 }, + end: { column: 15, line: 2 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ":", + + range: [27, 28], + loc: { + start: { column: 15, line: 2 }, + end: { column: 16, line: 2 }, + }, + }, + Identifier { + type: "Identifier", + value: "string", + + range: [29, 35], + loc: { + start: { column: 17, line: 2 }, + end: { column: 23, line: 2 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "=", + + range: [36, 37], + loc: { + start: { column: 24, line: 2 }, + end: { column: 25, line: 2 }, + }, + }, + String { + type: "String", + value: "'str'", + + range: [38, 43], + loc: { + start: { column: 26, line: 2 }, + end: { column: 31, line: 2 }, + }, + }, + Punctuator { + type: "Punctuator", + value: ";", + + range: [43, 44], + loc: { + start: { column: 31, line: 2 }, + end: { column: 32, line: 2 }, + }, + }, + Punctuator { + type: "Punctuator", + value: "}", + + range: [45, 46], + loc: { + start: { column: 0, line: 3 }, + end: { column: 1, line: 3 }, + }, + }, +] +`; diff --git a/packages/ast-spec/src/element/AccessorProperty/fixtures/with-annotation-with-value/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/element/AccessorProperty/fixtures/with-annotation-with-value/snapshots/5-AST-Alignment-AST.shot new file mode 100644 index 00000000000..0e95b7b4620 --- /dev/null +++ b/packages/ast-spec/src/element/AccessorProperty/fixtures/with-annotation-with-value/snapshots/5-AST-Alignment-AST.shot @@ -0,0 +1,105 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`AST Fixtures element AccessorProperty with-annotation-with-value AST Alignment - AST 1`] = ` +"Snapshot Diff: +- TSESTree ++ Babel + + Program { + type: 'Program', + body: Array [ + ClassDeclaration { + type: 'ClassDeclaration', + body: ClassBody { + type: 'ClassBody', + body: Array [ +- AccessorProperty { +- type: 'AccessorProperty', ++ ClassAccessorProperty { ++ type: 'ClassAccessorProperty', + computed: false, +- declare: false, + key: Identifier { + type: 'Identifier', + name: 'prop', + + range: [23, 27], + loc: { + start: { column: 11, line: 2 }, + end: { column: 15, line: 2 }, + }, + }, +- override: false, + static: false, + typeAnnotation: TSTypeAnnotation { + type: 'TSTypeAnnotation', + typeAnnotation: TSStringKeyword { + type: 'TSStringKeyword', + + range: [29, 35], + loc: { + start: { column: 17, line: 2 }, + end: { column: 23, line: 2 }, + }, + }, + + range: [27, 35], + loc: { + start: { column: 15, line: 2 }, + end: { column: 23, line: 2 }, + }, + }, + value: Literal { + type: 'Literal', + raw: '\\\\'str\\\\'', + value: 'str', + + range: [38, 43], + loc: { + start: { column: 26, line: 2 }, + end: { column: 31, line: 2 }, + }, + }, + + range: [14, 44], + loc: { + start: { column: 2, line: 2 }, + end: { column: 32, line: 2 }, + }, + }, + ], + + range: [10, 46], + loc: { + start: { column: 10, line: 1 }, + end: { column: 1, line: 3 }, + }, + }, + id: Identifier { + type: 'Identifier', + name: 'Foo', + + range: [6, 9], + loc: { + start: { column: 6, line: 1 }, + end: { column: 9, line: 1 }, + }, + }, + superClass: null, + + range: [0, 46], + loc: { + start: { column: 0, line: 1 }, + end: { column: 1, line: 3 }, + }, + }, + ], + sourceType: 'script', + + range: [0, 47], + loc: { + start: { column: 0, line: 1 }, + end: { column: 0, line: 4 }, + }, + }" +`; diff --git a/packages/ast-spec/src/element/AccessorProperty/fixtures/with-annotation-with-value/snapshots/3-Babel-Error.shot b/packages/ast-spec/src/element/AccessorProperty/fixtures/with-annotation-with-value/snapshots/6-AST-Alignment-Tokens.shot similarity index 51% rename from packages/ast-spec/src/element/AccessorProperty/fixtures/with-annotation-with-value/snapshots/3-Babel-Error.shot rename to packages/ast-spec/src/element/AccessorProperty/fixtures/with-annotation-with-value/snapshots/6-AST-Alignment-Tokens.shot index 58104f64f7b..2d68aa8d59a 100644 --- a/packages/ast-spec/src/element/AccessorProperty/fixtures/with-annotation-with-value/snapshots/3-Babel-Error.shot +++ b/packages/ast-spec/src/element/AccessorProperty/fixtures/with-annotation-with-value/snapshots/6-AST-Alignment-Tokens.shot @@ -1,3 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`AST Fixtures element AccessorProperty with-annotation-with-value Babel - Error 1`] = `[SyntaxError: Missing semicolon. (2:15)]`; +exports[`AST Fixtures element AccessorProperty with-annotation-with-value AST Alignment - Token 1`] = ` +"Snapshot Diff: +Compared values have no visual difference." +`; diff --git a/packages/ast-spec/src/expression/ArrayExpression/spec.ts b/packages/ast-spec/src/expression/ArrayExpression/spec.ts index 7dc07e30952..3dccf5c6ab8 100644 --- a/packages/ast-spec/src/expression/ArrayExpression/spec.ts +++ b/packages/ast-spec/src/expression/ArrayExpression/spec.ts @@ -5,5 +5,8 @@ import type { Expression } from '../../unions/Expression'; export interface ArrayExpression extends BaseNode { type: AST_NODE_TYPES.ArrayExpression; - elements: (Expression | SpreadElement)[]; + /** + * an element will be `null` in the case of a sparse array: `[1, ,3]` + */ + elements: (Expression | SpreadElement | null)[]; } diff --git a/packages/ast-spec/src/expression/MemberExpression/spec.ts b/packages/ast-spec/src/expression/MemberExpression/spec.ts index 260574cc59f..a0a7cc65a33 100644 --- a/packages/ast-spec/src/expression/MemberExpression/spec.ts +++ b/packages/ast-spec/src/expression/MemberExpression/spec.ts @@ -2,11 +2,10 @@ import type { AST_NODE_TYPES } from '../../ast-node-types'; import type { BaseNode } from '../../base/BaseNode'; import type { PrivateIdentifier } from '../../special/PrivateIdentifier/spec'; import type { Expression } from '../../unions/Expression'; -import type { LeftHandSideExpression } from '../../unions/LeftHandSideExpression'; import type { Identifier } from '../Identifier/spec'; interface MemberExpressionBase extends BaseNode { - object: LeftHandSideExpression; + object: Expression; property: Expression | Identifier | PrivateIdentifier; computed: boolean; optional: boolean; diff --git a/packages/ast-spec/src/unions/ObjectLiteralElement.ts b/packages/ast-spec/src/unions/ObjectLiteralElement.ts index d7575c80c1b..e6ac567c63e 100644 --- a/packages/ast-spec/src/unions/ObjectLiteralElement.ts +++ b/packages/ast-spec/src/unions/ObjectLiteralElement.ts @@ -1,8 +1,7 @@ -import type { MethodDefinition } from '../element/MethodDefinition/spec'; import type { Property } from '../element/Property/spec'; import type { SpreadElement } from '../element/SpreadElement/spec'; -export type ObjectLiteralElement = MethodDefinition | Property | SpreadElement; +export type ObjectLiteralElement = Property | SpreadElement; // TODO - breaking change remove this export type ObjectLiteralElementLike = ObjectLiteralElement; diff --git a/packages/ast-spec/tests/fixtures-with-differences-ast.shot b/packages/ast-spec/tests/fixtures-with-differences-ast.shot index e6ea1804e84..233fc7f4f95 100644 --- a/packages/ast-spec/tests/fixtures-with-differences-ast.shot +++ b/packages/ast-spec/tests/fixtures-with-differences-ast.shot @@ -29,6 +29,9 @@ Set { "element/AccessorProperty/fixtures/key-computed-string/fixture.ts", "element/AccessorProperty/fixtures/key-private/fixture.ts", "element/AccessorProperty/fixtures/key-string/fixture.ts", + "element/AccessorProperty/fixtures/modifier-abstract-with-value/fixture.ts", + "element/AccessorProperty/fixtures/modifier-abstract/fixture.ts", + "element/AccessorProperty/fixtures/modifier-declare/fixture.ts", "element/AccessorProperty/fixtures/modifier-override/fixture.ts", "element/AccessorProperty/fixtures/modifier-private/fixture.ts", "element/AccessorProperty/fixtures/modifier-protected/fixture.ts", @@ -37,6 +40,8 @@ Set { "element/AccessorProperty/fixtures/modifier-static/fixture.ts", "element/AccessorProperty/fixtures/no-annotation-no-value/fixture.ts", "element/AccessorProperty/fixtures/no-annotation-with-value/fixture.ts", + "element/AccessorProperty/fixtures/with-annotation-no-value/fixture.ts", + "element/AccessorProperty/fixtures/with-annotation-with-value/fixture.ts", "expression/TSSatisfiesExpression/fixtures/arrow-func-with-parentheses/fixture.ts", } `; diff --git a/packages/ast-spec/tests/fixtures-with-differences-errors.shot b/packages/ast-spec/tests/fixtures-with-differences-errors.shot index 68799952497..ad9289156df 100644 --- a/packages/ast-spec/tests/fixtures-with-differences-errors.shot +++ b/packages/ast-spec/tests/fixtures-with-differences-errors.shot @@ -21,7 +21,6 @@ Object { "declaration/TSInterfaceDeclaration/fixtures/_error_/non-identifier-extends/fixture.ts", "declaration/TSTypeAliasDeclaration/fixtures/_error_/missing-type-parameter/fixture.ts", "declaration/VariableDeclaration/fixtures/_error_/missing-id-without-value/fixture.ts", - "element/AccessorProperty/fixtures/_error_/modifier-declare/fixture.ts", "element/AccessorProperty/fixtures/_error_/modifier-override-with-no-extends/fixture.ts", }, "TSESTree errored but Babel didn't": Set { diff --git a/packages/ast-spec/tests/fixtures-without-babel-support.shot b/packages/ast-spec/tests/fixtures-without-babel-support.shot index a4022f6319b..0ecfffa63d0 100644 --- a/packages/ast-spec/tests/fixtures-without-babel-support.shot +++ b/packages/ast-spec/tests/fixtures-without-babel-support.shot @@ -1,10 +1,3 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`AST Fixtures List fixtures we expect babel to not support 1`] = ` -Map { - "element/AccessorProperty/fixtures/modifier-abstract-with-value/fixture.ts" => "https://github.com/babel/babel/issues/15205", - "element/AccessorProperty/fixtures/modifier-abstract/fixture.ts" => "https://github.com/babel/babel/issues/15205", - "element/AccessorProperty/fixtures/with-annotation-no-value/fixture.ts" => "https://github.com/babel/babel/issues/15205", - "element/AccessorProperty/fixtures/with-annotation-with-value/fixture.ts" => "https://github.com/babel/babel/issues/15205", -} -`; +exports[`AST Fixtures List fixtures we expect babel to not support 1`] = `Map {}`; diff --git a/packages/eslint-plugin-internal/CHANGELOG.md b/packages/eslint-plugin-internal/CHANGELOG.md index 84d3ba16372..3068aa41637 100644 --- a/packages/eslint-plugin-internal/CHANGELOG.md +++ b/packages/eslint-plugin-internal/CHANGELOG.md @@ -3,6 +3,36 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [5.48.2](https://github.com/typescript-eslint/typescript-eslint/compare/v5.48.1...v5.48.2) (2023-01-16) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal + + + + + +## [5.48.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.48.0...v5.48.1) (2023-01-09) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal + + + + + +# [5.48.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.47.1...v5.48.0) (2023-01-02) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal + +## [5.47.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.47.0...v5.47.1) (2022-12-26) + +### Bug Fixes + +- **ast-spec:** correct some incorrect ast types ([#6257](https://github.com/typescript-eslint/typescript-eslint/issues/6257)) ([0f3f645](https://github.com/typescript-eslint/typescript-eslint/commit/0f3f64571ea5d938081b1a9f3fd1495765201700)) + +# [5.47.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.46.1...v5.47.0) (2022-12-19) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal + ## [5.46.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.46.0...v5.46.1) (2022-12-12) **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 1d3a61a74ea..5834211a3ea 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": "5.46.1", + "version": "5.48.2", "private": true, "main": "dist/index.js", "scripts": { @@ -14,9 +14,9 @@ }, "dependencies": { "@types/prettier": "*", - "@typescript-eslint/scope-manager": "5.46.1", - "@typescript-eslint/type-utils": "5.46.1", - "@typescript-eslint/utils": "5.46.1", + "@typescript-eslint/scope-manager": "5.48.2", + "@typescript-eslint/type-utils": "5.48.2", + "@typescript-eslint/utils": "5.48.2", "prettier": "*" } } 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 f86d4946836..313a32eea5b 100644 --- a/packages/eslint-plugin-internal/src/rules/plugin-test-formatting.ts +++ b/packages/eslint-plugin-internal/src/rules/plugin-test-formatting.ts @@ -197,8 +197,11 @@ export default createRule({ } } - function checkExpression(node: TSESTree.Node, isErrorTest: boolean): void { - switch (node.type) { + function checkExpression( + node: TSESTree.Node | null, + isErrorTest: boolean, + ): void { + switch (node?.type) { case AST_NODE_TYPES.Literal: checkLiteral(node, isErrorTest); break; @@ -478,7 +481,7 @@ export default createRule({ function checkValidTest(tests: TSESTree.ArrayExpression): void { for (const test of tests.elements) { - switch (test.type) { + switch (test?.type) { case AST_NODE_TYPES.ObjectExpression: // delegate object-style tests to the invalid checker checkInvalidTest(test, false); @@ -546,7 +549,7 @@ export default createRule({ case 'invalid': for (const element of prop.value.elements) { - if (element.type === AST_NODE_TYPES.ObjectExpression) { + if (element?.type === AST_NODE_TYPES.ObjectExpression) { checkInvalidTest(element); } } @@ -575,7 +578,7 @@ export default createRule({ } for (const errorElement of testProp.value.elements) { - if (errorElement.type !== AST_NODE_TYPES.ObjectExpression) { + if (errorElement?.type !== AST_NODE_TYPES.ObjectExpression) { continue; } diff --git a/packages/eslint-plugin-tslint/CHANGELOG.md b/packages/eslint-plugin-tslint/CHANGELOG.md index 037d1977639..a471d56c790 100644 --- a/packages/eslint-plugin-tslint/CHANGELOG.md +++ b/packages/eslint-plugin-tslint/CHANGELOG.md @@ -3,6 +3,34 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [5.48.2](https://github.com/typescript-eslint/typescript-eslint/compare/v5.48.1...v5.48.2) (2023-01-16) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint + + + + + +## [5.48.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.48.0...v5.48.1) (2023-01-09) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint + + + + + +# [5.48.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.47.1...v5.48.0) (2023-01-02) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint + +## [5.47.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.47.0...v5.47.1) (2022-12-26) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint + +# [5.47.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.46.1...v5.47.0) (2022-12-19) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint + ## [5.46.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.46.0...v5.46.1) (2022-12-12) **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 9b8b75d3d4e..e0b3e706532 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": "5.46.1", + "version": "5.48.2", "main": "dist/index.js", "typings": "src/index.ts", "description": "ESLint plugin that wraps a TSLint configuration and lints the whole source using TSLint", @@ -38,7 +38,7 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/utils": "5.46.1", + "@typescript-eslint/utils": "5.48.2", "lodash": "^4.17.21" }, "peerDependencies": { @@ -48,6 +48,6 @@ }, "devDependencies": { "@types/lodash": "*", - "@typescript-eslint/parser": "5.46.1" + "@typescript-eslint/parser": "5.48.2" } } diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index 74ddd9d67c6..5a9330fc575 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/CHANGELOG.md @@ -3,6 +3,41 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [5.48.2](https://github.com/typescript-eslint/typescript-eslint/compare/v5.48.1...v5.48.2) (2023-01-16) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin + + + + + +## [5.48.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.48.0...v5.48.1) (2023-01-09) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin + + + + + +# [5.48.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.47.1...v5.48.0) (2023-01-02) + +### Features + +- **eslint-plugin:** specify which method is unbound and added test case ([#6281](https://github.com/typescript-eslint/typescript-eslint/issues/6281)) ([cf3ffdd](https://github.com/typescript-eslint/typescript-eslint/commit/cf3ffdd49aceb734ce18dc44ed6a11f7701f178e)) + +## [5.47.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.47.0...v5.47.1) (2022-12-26) + +### Bug Fixes + +- **ast-spec:** correct some incorrect ast types ([#6257](https://github.com/typescript-eslint/typescript-eslint/issues/6257)) ([0f3f645](https://github.com/typescript-eslint/typescript-eslint/commit/0f3f64571ea5d938081b1a9f3fd1495765201700)) +- **eslint-plugin:** [member-ordering] correctly invert optionalityOrder ([#6256](https://github.com/typescript-eslint/typescript-eslint/issues/6256)) ([ccd45d4](https://github.com/typescript-eslint/typescript-eslint/commit/ccd45d4a998946b7be1161f8c8216bc458e50b4e)) + +# [5.47.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.46.1...v5.47.0) (2022-12-19) + +### Features + +- **eslint-plugin:** [no-floating-promises] add suggestion fixer to add an 'await' ([#5943](https://github.com/typescript-eslint/typescript-eslint/issues/5943)) ([9e35ef9](https://github.com/typescript-eslint/typescript-eslint/commit/9e35ef9af3ec51ab2dd49336699f3a94528bb4b1)) + ## [5.46.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.46.0...v5.46.1) (2022-12-12) **Note:** Version bump only for package @typescript-eslint/eslint-plugin diff --git a/packages/eslint-plugin/docs/rules/naming-convention.md b/packages/eslint-plugin/docs/rules/naming-convention.md index f5922ba3653..ab0405592c4 100644 --- a/packages/eslint-plugin/docs/rules/naming-convention.md +++ b/packages/eslint-plugin/docs/rules/naming-convention.md @@ -159,7 +159,7 @@ If these are provided, the identifier must start with one of the provided values - Accepts one or array of selectors to define an option block that applies to one or multiple selectors. - For example, if you provide `{ selector: ['function', 'variable'] }`, then it will apply the same option to variable and function nodes. - See [Allowed Selectors, Modifiers and Types](#allowed-selectors-modifiers-and-types) below for the complete list of allowed selectors. -- `modifiers` allows you to specify which modifiers to granularly apply to, such as the accessibility (`private`/`protected`/`public`), or if the thing is `static`, etc. +- `modifiers` allows you to specify which modifiers to granularly apply to, such as the accessibility (`#private`/`private`/`protected`/`public`), or if the thing is `static`, etc. - The name must match _all_ of the modifiers. - For example, if you provide `{ modifiers: ['private','readonly','static'] }`, then it will only match something that is `private static readonly`, and something that is just `private` will not match. - The following `modifiers` are allowed: @@ -172,6 +172,7 @@ If these are provided, the identifier must start with one of the provided values - `requiresQuotes` - matches any name that requires quotes as it is not a valid identifier (i.e. has a space, a dash, etc in it). - `public` - matches any member that is either explicitly declared as `public`, or has no visibility modifier (i.e. implicitly public). - `abstract`,`override`,`private`,`protected`,`readonly`,`static` - matches any member explicitly declared with the given modifier. + - `#private` - matches any member with a private identifier (an identifier that starts with `#`) - `async` - matches any method, function, or function variable which is async via the `async` keyword (e.g. does not match functions that return promises without using `async` keyword) - `types` allows you to specify which types to match. This option supports simple, primitive types only (`array`,`boolean`,`function`,`number`,`string`). - The name must match _one_ of the types. @@ -204,7 +205,7 @@ Individual Selectors match specific, well-defined sets. There is no overlap betw - Allowed `modifiers`: `destructured`, `unused`. - Allowed `types`: `boolean`, `string`, `number`, `function`, `array`. - `classProperty` - matches any class property. Does not match properties that have direct function expression or arrow function expression values. - - Allowed `modifiers`: `abstract`, `override`, `private`, `protected`, `public`, `readonly`, `requiresQuotes`, `static`. + - Allowed `modifiers`: `abstract`, `override`, `#private`, `private`, `protected`, `public`, `readonly`, `requiresQuotes`, `static`. - Allowed `types`: `array`, `boolean`, `function`, `number`, `string`. - `objectLiteralProperty` - matches any object literal property. Does not match properties that have direct function expression or arrow function expression values. - Allowed `modifiers`: `public`, `requiresQuotes`. @@ -216,7 +217,7 @@ Individual Selectors match specific, well-defined sets. There is no overlap betw - Allowed `modifiers`: `private`, `protected`, `public`, `readonly`. - Allowed `types`: `array`, `boolean`, `function`, `number`, `string`. - `classMethod` - matches any class method. Also matches properties that have direct function expression or arrow function expression values. Does not match accessors. - - Allowed `modifiers`: `abstract`, `async`, `override`, `private`, `protected`, `public`, `requiresQuotes`, `static`. + - Allowed `modifiers`: `abstract`, `async`, `override`, `#private`, `private`, `protected`, `public`, `requiresQuotes`, `static`. - Allowed `types`: none. - `objectLiteralMethod` - matches any object literal method. Also matches properties that have direct function expression or arrow function expression values. Does not match accessors. - Allowed `modifiers`: `async`, `public`, `requiresQuotes`. @@ -257,16 +258,16 @@ Group Selectors are provided for convenience, and essentially bundle up sets of - Allowed `modifiers`: `async`, `unused`. - Allowed `types`: none. - `memberLike` - matches the same as `accessor`, `enumMember`, `method`, `parameterProperty`, `property`. - - Allowed `modifiers`: `abstract`, `async`, `override`, `private`, `protected`, `public`, `readonly`, `requiresQuotes`, `static`. + - Allowed `modifiers`: `abstract`, `async`, `override`, `#private`, `private`, `protected`, `public`, `readonly`, `requiresQuotes`, `static`. - Allowed `types`: none. - `typeLike` - matches the same as `class`, `enum`, `interface`, `typeAlias`, `typeParameter`. - Allowed `modifiers`: `abstract`, `unused`. - Allowed `types`: none. - `property` - matches the same as `classProperty`, `objectLiteralProperty`, `typeProperty`. - - Allowed `modifiers`: `abstract`, `async`, `override`, `private`, `protected`, `public`, `readonly`, `requiresQuotes`, `static`. + - Allowed `modifiers`: `abstract`, `async`, `override`, `#private`, `private`, `protected`, `public`, `readonly`, `requiresQuotes`, `static`. - Allowed `types`: `array`, `boolean`, `function`, `number`, `string`. - `method` - matches the same as `classMethod`, `objectLiteralMethod`, `typeMethod`. - - Allowed `modifiers`: `abstract`, `async`, `override`, `private`, `protected`, `public`, `readonly`, `requiresQuotes`, `static`. + - Allowed `modifiers`: `abstract`, `async`, `override`, `#private`, `private`, `protected`, `public`, `readonly`, `requiresQuotes`, `static`. - Allowed `types`: none. ## FAQ diff --git a/packages/eslint-plugin/docs/rules/unified-signatures.md b/packages/eslint-plugin/docs/rules/unified-signatures.md index 5736561d2ff..609eb3a7bb5 100644 --- a/packages/eslint-plugin/docs/rules/unified-signatures.md +++ b/packages/eslint-plugin/docs/rules/unified-signatures.md @@ -38,6 +38,13 @@ function x(x: number | string): void; function y(...x: number[]): void; ``` +```ts +// This rule won't check overload signatures with different rest parameter types. +// See https://github.com/microsoft/TypeScript/issues/5077 +function f(...a: number[]): void; +function f(...a: string[]): void; +``` + ## Options ### `ignoreDifferentlyNamedParameters` @@ -53,11 +60,6 @@ function f(a: number): void; function f(a: string): void; ``` -```ts -function f(...a: number[]): void; -function f(...b: string[]): void; -``` - ### ✅ Correct ```ts @@ -65,9 +67,4 @@ function f(a: number): void; function f(b: string): void; ``` -```ts -function f(...a: number[]): void; -function f(...a: string[]): void; -``` - ## Options diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 5cdd4cb8c63..cb11188c221 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin", - "version": "5.46.1", + "version": "5.48.2", "description": "TypeScript plugin for ESLint", "keywords": [ "eslint", @@ -44,9 +44,9 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/scope-manager": "5.46.1", - "@typescript-eslint/type-utils": "5.46.1", - "@typescript-eslint/utils": "5.46.1", + "@typescript-eslint/scope-manager": "5.48.2", + "@typescript-eslint/type-utils": "5.48.2", + "@typescript-eslint/utils": "5.48.2", "debug": "^4.3.4", "ignore": "^5.2.0", "natural-compare-lite": "^1.4.0", diff --git a/packages/eslint-plugin/src/rules/consistent-type-exports.ts b/packages/eslint-plugin/src/rules/consistent-type-exports.ts index 54364054690..bb9e0c36e4a 100644 --- a/packages/eslint-plugin/src/rules/consistent-type-exports.ts +++ b/packages/eslint-plugin/src/rules/consistent-type-exports.ts @@ -1,8 +1,4 @@ -import type { - ParserServices, - TSESLint, - TSESTree, -} from '@typescript-eslint/utils'; +import type { TSESLint, TSESTree } from '@typescript-eslint/utils'; import { AST_NODE_TYPES } from '@typescript-eslint/utils'; import { SymbolFlags } from 'typescript'; @@ -75,6 +71,28 @@ export default util.createRule({ const sourceExportsMap: { [key: string]: SourceExports } = {}; const parserServices = util.getParserServices(context); + /** + * Helper for identifying if an export specifier resolves to a + * JavaScript value or a TypeScript type. + * + * @returns True/false if is a type or not, or undefined if the specifier + * can't be resolved. + */ + function isSpecifierTypeBased( + specifier: TSESTree.ExportSpecifier, + ): boolean | undefined { + const checker = parserServices.program.getTypeChecker(); + const node = parserServices.esTreeNodeToTSNodeMap.get(specifier.exported); + const symbol = checker.getSymbolAtLocation(node); + const aliasedSymbol = checker.getAliasedSymbol(symbol!); + + if (!aliasedSymbol || aliasedSymbol.escapedName === 'unknown') { + return undefined; + } + + return !(aliasedSymbol.flags & SymbolFlags.Value); + } + return { ExportNamedDeclaration(node: TSESTree.ExportNamedDeclaration): void { // Coerce the source into a string for use as a lookup entry. @@ -112,7 +130,7 @@ export default util.createRule({ continue; } - const isTypeBased = isSpecifierTypeBased(parserServices, specifier); + const isTypeBased = isSpecifierTypeBased(specifier); if (isTypeBased === true) { typeBasedSpecifiers.push(specifier); @@ -199,29 +217,6 @@ export default util.createRule({ }, }); -/** - * Helper for identifying if an export specifier resolves to a - * JavaScript value or a TypeScript type. - * - * @returns True/false if is a type or not, or undefined if the specifier - * can't be resolved. - */ -function isSpecifierTypeBased( - parserServices: ParserServices, - specifier: TSESTree.ExportSpecifier, -): boolean | undefined { - const checker = parserServices.program.getTypeChecker(); - const node = parserServices.esTreeNodeToTSNodeMap.get(specifier.exported); - const symbol = checker.getSymbolAtLocation(node); - const aliasedSymbol = checker.getAliasedSymbol(symbol!); - - if (!aliasedSymbol || aliasedSymbol.escapedName === 'unknown') { - return undefined; - } - - return !(aliasedSymbol.flags & SymbolFlags.Value); -} - /** * Inserts "type" into an export. * diff --git a/packages/eslint-plugin/src/rules/member-ordering.ts b/packages/eslint-plugin/src/rules/member-ordering.ts index 87022f16f4f..81e0ae6484e 100644 --- a/packages/eslint-plugin/src/rules/member-ordering.ts +++ b/packages/eslint-plugin/src/rules/member-ordering.ts @@ -781,7 +781,7 @@ export default util.createRule({ data: { member: getMemberName(member, context.getSourceCode()), optionalOrRequired: - optionalityOrder === 'optional-first' ? 'required' : 'optional', + optionalityOrder === 'required-first' ? 'required' : 'optional', }, }); @@ -790,7 +790,7 @@ export default util.createRule({ // have the correct optionality if ( isMemberOptional(members[0]) !== - (optionalityOrder === 'required-first') + (optionalityOrder === 'optional-first') ) { report(members[0]); return false; diff --git a/packages/eslint-plugin/src/rules/naming-convention-utils/enums.ts b/packages/eslint-plugin/src/rules/naming-convention-utils/enums.ts index bc2547ffa3f..02900ab1d8b 100644 --- a/packages/eslint-plugin/src/rules/naming-convention-utils/enums.ts +++ b/packages/eslint-plugin/src/rules/naming-convention-utils/enums.ts @@ -91,32 +91,33 @@ enum Modifiers { public = 1 << 3, protected = 1 << 4, private = 1 << 5, - abstract = 1 << 6, + '#private' = 1 << 6, + abstract = 1 << 7, // destructured variable - destructured = 1 << 7, + destructured = 1 << 8, // variables declared in the top-level scope - global = 1 << 8, + global = 1 << 9, // things that are exported - exported = 1 << 9, + exported = 1 << 10, // things that are unused - unused = 1 << 10, + unused = 1 << 11, // properties that require quoting - requiresQuotes = 1 << 11, + requiresQuotes = 1 << 12, // class members that are overridden - override = 1 << 12, + override = 1 << 13, // class methods, object function properties, or functions that are async via the `async` keyword - async = 1 << 13, + async = 1 << 14, // make sure TypeModifiers starts at Modifiers + 1 or else sorting won't work } type ModifiersString = keyof typeof Modifiers; enum TypeModifiers { - boolean = 1 << 12, - string = 1 << 13, - number = 1 << 14, - function = 1 << 15, - array = 1 << 16, + boolean = 1 << 15, + string = 1 << 16, + number = 1 << 17, + function = 1 << 18, + array = 1 << 19, } type TypeModifiersString = keyof typeof TypeModifiers; diff --git a/packages/eslint-plugin/src/rules/naming-convention-utils/schema.ts b/packages/eslint-plugin/src/rules/naming-convention-utils/schema.ts index 179b6dd7f43..ff91d2e156d 100644 --- a/packages/eslint-plugin/src/rules/naming-convention-utils/schema.ts +++ b/packages/eslint-plugin/src/rules/naming-convention-utils/schema.ts @@ -190,6 +190,7 @@ const SCHEMA: JSONSchema.JSONSchema4 = { ...selectorSchema('memberLike', false, [ 'abstract', 'private', + '#private', 'protected', 'public', 'readonly', @@ -201,6 +202,7 @@ const SCHEMA: JSONSchema.JSONSchema4 = { ...selectorSchema('classProperty', true, [ 'abstract', 'private', + '#private', 'protected', 'public', 'readonly', @@ -226,6 +228,7 @@ const SCHEMA: JSONSchema.JSONSchema4 = { ...selectorSchema('property', true, [ 'abstract', 'private', + '#private', 'protected', 'public', 'readonly', @@ -238,6 +241,7 @@ const SCHEMA: JSONSchema.JSONSchema4 = { ...selectorSchema('classMethod', false, [ 'abstract', 'private', + '#private', 'protected', 'public', 'requiresQuotes', @@ -254,6 +258,7 @@ const SCHEMA: JSONSchema.JSONSchema4 = { ...selectorSchema('method', false, [ 'abstract', 'private', + '#private', 'protected', 'public', 'requiresQuotes', diff --git a/packages/eslint-plugin/src/rules/naming-convention.ts b/packages/eslint-plugin/src/rules/naming-convention.ts index 05f3dd0f2a6..d44c94acbe6 100644 --- a/packages/eslint-plugin/src/rules/naming-convention.ts +++ b/packages/eslint-plugin/src/rules/naming-convention.ts @@ -90,10 +90,8 @@ export default util.createRule({ const validators = parseOptions(context); - // getParserServices(context, false) -- dirty hack to work around the docs checker test... - const compilerOptions = util - .getParserServices(context, true) - .program.getCompilerOptions(); + const compilerOptions = + util.getParserServices(context, true).program?.getCompilerOptions() ?? {}; function handleMember( validator: ValidatorFunction | null, node: @@ -127,7 +125,9 @@ export default util.createRule({ | TSESTree.TSParameterProperty, ): Set { const modifiers = new Set(); - if (node.accessibility) { + if ('key' in node && node.key.type === AST_NODE_TYPES.PrivateIdentifier) { + modifiers.add(Modifiers['#private']); + } else if (node.accessibility) { modifiers.add(Modifiers[node.accessibility]); } else { modifiers.add(Modifiers.public); diff --git a/packages/eslint-plugin/src/rules/no-unnecessary-condition.ts b/packages/eslint-plugin/src/rules/no-unnecessary-condition.ts index 030ed4fe188..5a6872f5748 100644 --- a/packages/eslint-plugin/src/rules/no-unnecessary-condition.ts +++ b/packages/eslint-plugin/src/rules/no-unnecessary-condition.ts @@ -568,9 +568,7 @@ export default createRule({ return false; } - function isOptionableExpression( - node: TSESTree.LeftHandSideExpression, - ): boolean { + function isOptionableExpression(node: TSESTree.Expression): boolean { const type = getNodeType(node); const isOwnNullable = node.type === AST_NODE_TYPES.MemberExpression diff --git a/packages/eslint-plugin/src/rules/prefer-string-starts-ends-with.ts b/packages/eslint-plugin/src/rules/prefer-string-starts-ends-with.ts index f0949acd16c..31a570652dc 100644 --- a/packages/eslint-plugin/src/rules/prefer-string-starts-ends-with.ts +++ b/packages/eslint-plugin/src/rules/prefer-string-starts-ends-with.ts @@ -47,7 +47,7 @@ export default createRule({ * Check if a given node is a string. * @param node The node to check. */ - function isStringType(node: TSESTree.LeftHandSideExpression): boolean { + function isStringType(node: TSESTree.Expression): boolean { const objectType = typeChecker.getTypeAtLocation( service.esTreeNodeToTSNodeMap.get(node), ); diff --git a/packages/eslint-plugin/src/rules/require-array-sort-compare.ts b/packages/eslint-plugin/src/rules/require-array-sort-compare.ts index b7b57e46705..713a9e51d6e 100644 --- a/packages/eslint-plugin/src/rules/require-array-sort-compare.ts +++ b/packages/eslint-plugin/src/rules/require-array-sort-compare.ts @@ -50,7 +50,7 @@ export default util.createRule({ * Check if a given node is an array which all elements are string. * @param node */ - function isStringArrayNode(node: TSESTree.LeftHandSideExpression): boolean { + function isStringArrayNode(node: TSESTree.Expression): boolean { const type = checker.getTypeAtLocation( service.esTreeNodeToTSNodeMap.get(node), ); diff --git a/packages/eslint-plugin/src/rules/unbound-method.ts b/packages/eslint-plugin/src/rules/unbound-method.ts index c95a7fd35e1..6741f4df09f 100644 --- a/packages/eslint-plugin/src/rules/unbound-method.ts +++ b/packages/eslint-plugin/src/rules/unbound-method.ts @@ -241,7 +241,7 @@ export default util.createRule({ } checkMethodAndReport( - node, + property.key, initTypes.getProperty(property.key.name), ); } diff --git a/packages/eslint-plugin/tests/docs.test.ts b/packages/eslint-plugin/tests/docs.test.ts index c42fe1ee42d..a2bef8cac83 100644 --- a/packages/eslint-plugin/tests/docs.test.ts +++ b/packages/eslint-plugin/tests/docs.test.ts @@ -120,6 +120,10 @@ describe('Validating rule docs', () => { }); describe('Validating rule metadata', () => { + const rulesThatRequireTypeInformationInAWayThatsHardToDetect = new Set([ + // the core rule file doesn't use type information, instead it's used in `src/rules/naming-convention-utils/validator.ts` + 'naming-convention', + ]); function requiresFullTypeInformation(content: string): boolean { return /getParserServices(\(\s*[^,\s)]+)\s*(,\s*false\s*)?\)/.test(content); } @@ -135,6 +139,13 @@ describe('Validating rule metadata', () => { }); it('`requiresTypeChecking` should be set if the rule uses type information', () => { + if ( + rulesThatRequireTypeInformationInAWayThatsHardToDetect.has(ruleName) + ) { + expect(true).toEqual(rule.meta.docs?.requiresTypeChecking ?? false); + return; + } + // quick-and-dirty check to see if it uses parserServices // not perfect but should be good enough const ruleFileContents = fs.readFileSync( diff --git a/packages/eslint-plugin/tests/rules/member-ordering/member-ordering-optionalMembers.test.ts b/packages/eslint-plugin/tests/rules/member-ordering/member-ordering-optionalMembers.test.ts index 9c72fc7322a..4f7d789798d 100644 --- a/packages/eslint-plugin/tests/rules/member-ordering/member-ordering-optionalMembers.test.ts +++ b/packages/eslint-plugin/tests/rules/member-ordering/member-ordering-optionalMembers.test.ts @@ -10,7 +10,7 @@ const ruleTester = new RuleTester({ const grouped: TSESLint.RunTests = { valid: [ - // optionalityOrder - optional-first + // optionalityOrder - required-first { code: ` interface X { @@ -24,7 +24,7 @@ interface X { default: { memberTypes: 'never', order: 'alphabetically', - optionalityOrder: 'optional-first', + optionalityOrder: 'required-first', }, }, ], @@ -42,7 +42,7 @@ interface X { default: { memberTypes: 'never', order: 'as-written', - optionalityOrder: 'optional-first', + optionalityOrder: 'required-first', }, }, ], @@ -60,7 +60,7 @@ interface X { default: { memberTypes: 'never', order: 'as-written', - optionalityOrder: 'optional-first', + optionalityOrder: 'required-first', }, }, ], @@ -78,7 +78,7 @@ class X { default: { memberTypes: 'never', order: 'alphabetically', - optionalityOrder: 'optional-first', + optionalityOrder: 'required-first', }, }, ], @@ -96,7 +96,7 @@ class X { default: { memberTypes: 'never', order: 'alphabetically', - optionalityOrder: 'optional-first', + optionalityOrder: 'required-first', }, }, ], @@ -114,7 +114,7 @@ class X { default: { memberTypes: 'never', order: 'alphabetically', - optionalityOrder: 'optional-first', + optionalityOrder: 'required-first', }, }, ], @@ -132,7 +132,7 @@ class X { default: { memberTypes: 'never', order: 'alphabetically', - optionalityOrder: 'optional-first', + optionalityOrder: 'required-first', }, }, ], @@ -150,7 +150,7 @@ interface X { default: { memberTypes: 'never', order: 'alphabetically', - optionalityOrder: 'optional-first', + optionalityOrder: 'required-first', }, }, ], @@ -169,12 +169,12 @@ interface X { default: { memberTypes: 'never', order: 'alphabetically', - optionalityOrder: 'optional-first', + optionalityOrder: 'required-first', }, }, ], }, - // optionalityOrder - required-first + // optionalityOrder - optional-first { code: ` interface X { @@ -188,7 +188,7 @@ interface X { default: { memberTypes: 'never', order: 'alphabetically', - optionalityOrder: 'required-first', + optionalityOrder: 'optional-first', }, }, ], @@ -206,7 +206,7 @@ interface X { default: { memberTypes: 'never', order: 'as-written', - optionalityOrder: 'required-first', + optionalityOrder: 'optional-first', }, }, ], @@ -224,7 +224,7 @@ interface X { default: { memberTypes: 'never', order: 'as-written', - optionalityOrder: 'required-first', + optionalityOrder: 'optional-first', }, }, ], @@ -242,13 +242,13 @@ class X { default: { memberTypes: 'never', order: 'alphabetically', - optionalityOrder: 'required-first', + optionalityOrder: 'optional-first', }, }, ], }, ], - // optionalityOrder - optional-first + // optionalityOrder - required-first invalid: [ { code: ` @@ -263,12 +263,16 @@ interface X { default: { memberTypes: 'never', order: 'alphabetically', - optionalityOrder: 'optional-first', + optionalityOrder: 'required-first', }, }, ], errors: [ { + data: { + member: 'b', + beforeMember: 'd', + }, messageId: 'incorrectOrder', line: 5, column: 3, @@ -288,7 +292,7 @@ interface X { default: { memberTypes: ['call-signature', 'field', 'method'], order: 'as-written', - optionalityOrder: 'optional-first', + optionalityOrder: 'required-first', }, }, ], @@ -317,7 +321,7 @@ class X { default: { memberTypes: 'never', order: 'as-written', - optionalityOrder: 'optional-first', + optionalityOrder: 'required-first', }, }, ], @@ -333,7 +337,7 @@ class X { }, ], }, - // optionalityOrder - required-first + // optionalityOrder - optional-first { code: ` interface X { @@ -347,7 +351,7 @@ interface X { default: { memberTypes: 'never', order: 'alphabetically', - optionalityOrder: 'required-first', + optionalityOrder: 'optional-first', }, }, ], @@ -372,7 +376,7 @@ interface X { default: { memberTypes: ['call-signature', 'field', 'method'], order: 'as-written', - optionalityOrder: 'required-first', + optionalityOrder: 'optional-first', }, }, ], @@ -405,7 +409,7 @@ class Test { default: { memberTypes: 'never', order: 'as-written', - optionalityOrder: 'required-first', + optionalityOrder: 'optional-first', }, }, ], @@ -436,7 +440,7 @@ class Test { default: { memberTypes: 'never', order: 'as-written', - optionalityOrder: 'required-first', + optionalityOrder: 'optional-first', }, }, ], diff --git a/packages/eslint-plugin/tests/rules/naming-convention/naming-convention.test.ts b/packages/eslint-plugin/tests/rules/naming-convention/naming-convention.test.ts index 9917aec3cb7..b55ce321f00 100644 --- a/packages/eslint-plugin/tests/rules/naming-convention/naming-convention.test.ts +++ b/packages/eslint-plugin/tests/rules/naming-convention/naming-convention.test.ts @@ -867,6 +867,29 @@ ruleTester.run('naming-convention', rule, { }, ], }, + { + code: ` + class foo { + private someAttribute = 1; + #some_attribute = 1; + + private someMethod() {} + #some_method() {} + } + `, + parserOptions, + options: [ + { + selector: 'memberLike', + format: ['camelCase'], + }, + { + selector: ['memberLike'], + modifiers: ['#private'], + format: ['snake_case'], + }, + ], + }, ], invalid: [ { @@ -1972,5 +1995,89 @@ ruleTester.run('naming-convention', rule, { }, ], }, + { + code: ` + class foo { + private firstPrivateField = 1; + // ❌ error + private first_private_field = 1; + // ❌ error + #secondPrivateField = 1; + #second_private_field = 1; + } + `, + parserOptions, + options: [ + { + selector: 'memberLike', + format: ['camelCase'], + }, + { + selector: ['memberLike'], + modifiers: ['#private'], + format: ['snake_case'], + }, + ], + errors: [ + { + messageId: 'doesNotMatchFormat', + data: { + type: 'Class Property', + name: 'first_private_field', + formats: 'camelCase', + }, + }, + { + messageId: 'doesNotMatchFormat', + data: { + type: 'Class Property', + name: 'secondPrivateField', + formats: 'snake_case', + }, + }, + ], + }, + { + code: ` + class foo { + private firstPrivateMethod() {} + // ❌ error + private first_private_method() {} + // ❌ error + #secondPrivateMethod() {} + #second_private_method() {} + } + `, + parserOptions, + options: [ + { + selector: 'memberLike', + format: ['camelCase'], + }, + { + selector: ['memberLike'], + modifiers: ['#private'], + format: ['snake_case'], + }, + ], + errors: [ + { + messageId: 'doesNotMatchFormat', + data: { + type: 'Class Method', + name: 'first_private_method', + formats: 'camelCase', + }, + }, + { + messageId: 'doesNotMatchFormat', + data: { + type: 'Class Method', + name: 'secondPrivateMethod', + formats: 'snake_case', + }, + }, + ], + }, ], }); diff --git a/packages/eslint-plugin/tests/rules/unbound-method.test.ts b/packages/eslint-plugin/tests/rules/unbound-method.test.ts index 2105ef41e59..49b06a4ac50 100644 --- a/packages/eslint-plugin/tests/rules/unbound-method.test.ts +++ b/packages/eslint-plugin/tests/rules/unbound-method.test.ts @@ -590,5 +590,59 @@ class OtherClass extends BaseClass { }, ], }, + { + code: ` +const values = { + a() {}, + b: () => {}, +}; + +const { a, b } = values; + `, + errors: [ + { + line: 7, + column: 9, + endColumn: 10, + messageId: 'unboundWithoutThisAnnotation', + }, + ], + }, + { + code: ` +const values = { + a() {}, + b: () => {}, +}; + +const { a: c } = values; + `, + errors: [ + { + line: 7, + column: 9, + endColumn: 10, + messageId: 'unboundWithoutThisAnnotation', + }, + ], + }, + { + code: ` +const values = { + a() {}, + b: () => {}, +}; + +const { b, a } = values; + `, + errors: [ + { + line: 7, + column: 12, + endColumn: 13, + messageId: 'unboundWithoutThisAnnotation', + }, + ], + }, ], }); diff --git a/packages/experimental-utils/CHANGELOG.md b/packages/experimental-utils/CHANGELOG.md index d958d143681..e523d92e652 100644 --- a/packages/experimental-utils/CHANGELOG.md +++ b/packages/experimental-utils/CHANGELOG.md @@ -3,6 +3,34 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [5.48.2](https://github.com/typescript-eslint/typescript-eslint/compare/v5.48.1...v5.48.2) (2023-01-16) + +**Note:** Version bump only for package @typescript-eslint/experimental-utils + + + + + +## [5.48.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.48.0...v5.48.1) (2023-01-09) + +**Note:** Version bump only for package @typescript-eslint/experimental-utils + + + + + +# [5.48.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.47.1...v5.48.0) (2023-01-02) + +**Note:** Version bump only for package @typescript-eslint/experimental-utils + +## [5.47.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.47.0...v5.47.1) (2022-12-26) + +**Note:** Version bump only for package @typescript-eslint/experimental-utils + +# [5.47.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.46.1...v5.47.0) (2022-12-19) + +**Note:** Version bump only for package @typescript-eslint/experimental-utils + ## [5.46.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.46.0...v5.46.1) (2022-12-12) **Note:** Version bump only for package @typescript-eslint/experimental-utils diff --git a/packages/experimental-utils/package.json b/packages/experimental-utils/package.json index 7a75d8f6a1d..4250d7472a3 100644 --- a/packages/experimental-utils/package.json +++ b/packages/experimental-utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/experimental-utils", - "version": "5.46.1", + "version": "5.48.2", "description": "(Experimental) Utilities for working with TypeScript + ESLint together", "keywords": [ "eslint", @@ -39,7 +39,7 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/utils": "5.46.1" + "@typescript-eslint/utils": "5.48.2" }, "peerDependencies": { "eslint": "^7.0.0 || ^8.0.0" diff --git a/packages/parser/CHANGELOG.md b/packages/parser/CHANGELOG.md index ab637d405ae..d7fb9b8cf70 100644 --- a/packages/parser/CHANGELOG.md +++ b/packages/parser/CHANGELOG.md @@ -3,6 +3,34 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [5.48.2](https://github.com/typescript-eslint/typescript-eslint/compare/v5.48.1...v5.48.2) (2023-01-16) + +**Note:** Version bump only for package @typescript-eslint/parser + + + + + +## [5.48.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.48.0...v5.48.1) (2023-01-09) + +**Note:** Version bump only for package @typescript-eslint/parser + + + + + +# [5.48.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.47.1...v5.48.0) (2023-01-02) + +**Note:** Version bump only for package @typescript-eslint/parser + +## [5.47.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.47.0...v5.47.1) (2022-12-26) + +**Note:** Version bump only for package @typescript-eslint/parser + +# [5.47.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.46.1...v5.47.0) (2022-12-19) + +**Note:** Version bump only for package @typescript-eslint/parser + ## [5.46.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.46.0...v5.46.1) (2022-12-12) **Note:** Version bump only for package @typescript-eslint/parser diff --git a/packages/parser/package.json b/packages/parser/package.json index d4102ec1f6c..0f9cb1662aa 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/parser", - "version": "5.46.1", + "version": "5.48.2", "description": "An ESLint custom parser which leverages TypeScript ESTree", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -45,10 +45,10 @@ "eslint": "^7.0.0 || ^8.0.0" }, "dependencies": { - "@typescript-eslint/scope-manager": "5.46.1", - "@typescript-eslint/types": "5.46.1", - "@typescript-eslint/typescript-estree": "5.46.1", - "@typescript-eslint/visitor-keys": "5.46.1", + "@typescript-eslint/scope-manager": "5.48.2", + "@typescript-eslint/types": "5.48.2", + "@typescript-eslint/typescript-estree": "5.48.2", + "@typescript-eslint/visitor-keys": "5.48.2", "debug": "^4.3.4" }, "devDependencies": { diff --git a/packages/parser/src/index.ts b/packages/parser/src/index.ts index 928671a3c5c..12783370be9 100644 --- a/packages/parser/src/index.ts +++ b/packages/parser/src/index.ts @@ -1,6 +1,8 @@ export { parse, parseForESLint, ParserOptions } from './parser'; export { ParserServices, + ParserServicesWithTypeInformation, + ParserServicesWithoutTypeInformation, clearCaches, createProgram, } from '@typescript-eslint/typescript-estree'; diff --git a/packages/parser/src/parser.ts b/packages/parser/src/parser.ts index 03557d6f297..22a210892e9 100644 --- a/packages/parser/src/parser.ts +++ b/packages/parser/src/parser.ts @@ -126,7 +126,7 @@ function parseForESLint( ast.sourceType = options.sourceType; let emitDecoratorMetadata = options.emitDecoratorMetadata === true; - if (services.hasFullTypeInformation) { + if (services.program) { // automatically apply the options configured for the program const compilerOptions = services.program.getCompilerOptions(); if (analyzeOptions.lib == null) { diff --git a/packages/scope-manager/CHANGELOG.md b/packages/scope-manager/CHANGELOG.md index 7af02624853..da3bfbc639d 100644 --- a/packages/scope-manager/CHANGELOG.md +++ b/packages/scope-manager/CHANGELOG.md @@ -3,6 +3,34 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [5.48.2](https://github.com/typescript-eslint/typescript-eslint/compare/v5.48.1...v5.48.2) (2023-01-16) + +**Note:** Version bump only for package @typescript-eslint/scope-manager + + + + + +## [5.48.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.48.0...v5.48.1) (2023-01-09) + +**Note:** Version bump only for package @typescript-eslint/scope-manager + + + + + +# [5.48.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.47.1...v5.48.0) (2023-01-02) + +**Note:** Version bump only for package @typescript-eslint/scope-manager + +## [5.47.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.47.0...v5.47.1) (2022-12-26) + +**Note:** Version bump only for package @typescript-eslint/scope-manager + +# [5.47.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.46.1...v5.47.0) (2022-12-19) + +**Note:** Version bump only for package @typescript-eslint/scope-manager + ## [5.46.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.46.0...v5.46.1) (2022-12-12) **Note:** Version bump only for package @typescript-eslint/scope-manager diff --git a/packages/scope-manager/package.json b/packages/scope-manager/package.json index 3f9cda42e03..8b103e4d7a2 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/scope-manager", - "version": "5.46.1", + "version": "5.48.2", "description": "TypeScript scope analyser for ESLint", "keywords": [ "eslint", @@ -38,12 +38,12 @@ "typecheck": "nx typecheck" }, "dependencies": { - "@typescript-eslint/types": "5.46.1", - "@typescript-eslint/visitor-keys": "5.46.1" + "@typescript-eslint/types": "5.48.2", + "@typescript-eslint/visitor-keys": "5.48.2" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/typescript-estree": "5.46.1", + "@typescript-eslint/typescript-estree": "5.48.2", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/shared-fixtures/CHANGELOG.md b/packages/shared-fixtures/CHANGELOG.md index 8954c99d3f8..a43e040edda 100644 --- a/packages/shared-fixtures/CHANGELOG.md +++ b/packages/shared-fixtures/CHANGELOG.md @@ -3,6 +3,34 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [5.48.2](https://github.com/typescript-eslint/typescript-eslint/compare/v5.48.1...v5.48.2) (2023-01-16) + +**Note:** Version bump only for package @typescript-eslint/shared-fixtures + + + + + +## [5.48.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.48.0...v5.48.1) (2023-01-09) + +**Note:** Version bump only for package @typescript-eslint/shared-fixtures + + + + + +# [5.48.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.47.1...v5.48.0) (2023-01-02) + +**Note:** Version bump only for package @typescript-eslint/shared-fixtures + +## [5.47.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.47.0...v5.47.1) (2022-12-26) + +**Note:** Version bump only for package @typescript-eslint/shared-fixtures + +# [5.47.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.46.1...v5.47.0) (2022-12-19) + +**Note:** Version bump only for package @typescript-eslint/shared-fixtures + ## [5.46.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.46.0...v5.46.1) (2022-12-12) **Note:** Version bump only for package @typescript-eslint/shared-fixtures diff --git a/packages/shared-fixtures/package.json b/packages/shared-fixtures/package.json index fe37cc39921..dc0877b239b 100644 --- a/packages/shared-fixtures/package.json +++ b/packages/shared-fixtures/package.json @@ -1,6 +1,6 @@ { "description": "Code fixtures used to test the typescript-estree parser.", "name": "@typescript-eslint/shared-fixtures", - "version": "5.46.1", + "version": "5.48.2", "private": true } diff --git a/packages/type-utils/CHANGELOG.md b/packages/type-utils/CHANGELOG.md index 8ef63cde40c..b53e13ae8c4 100644 --- a/packages/type-utils/CHANGELOG.md +++ b/packages/type-utils/CHANGELOG.md @@ -3,6 +3,34 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [5.48.2](https://github.com/typescript-eslint/typescript-eslint/compare/v5.48.1...v5.48.2) (2023-01-16) + +**Note:** Version bump only for package @typescript-eslint/type-utils + + + + + +## [5.48.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.48.0...v5.48.1) (2023-01-09) + +**Note:** Version bump only for package @typescript-eslint/type-utils + + + + + +# [5.48.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.47.1...v5.48.0) (2023-01-02) + +**Note:** Version bump only for package @typescript-eslint/type-utils + +## [5.47.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.47.0...v5.47.1) (2022-12-26) + +**Note:** Version bump only for package @typescript-eslint/type-utils + +# [5.47.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.46.1...v5.47.0) (2022-12-19) + +**Note:** Version bump only for package @typescript-eslint/type-utils + ## [5.46.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.46.0...v5.46.1) (2022-12-12) **Note:** Version bump only for package @typescript-eslint/type-utils diff --git a/packages/type-utils/package.json b/packages/type-utils/package.json index faa209e9d7a..155a64467ad 100644 --- a/packages/type-utils/package.json +++ b/packages/type-utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/type-utils", - "version": "5.46.1", + "version": "5.48.2", "description": "Type utilities for working with TypeScript + ESLint together", "keywords": [ "eslint", @@ -39,13 +39,13 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/typescript-estree": "5.46.1", - "@typescript-eslint/utils": "5.46.1", + "@typescript-eslint/typescript-estree": "5.48.2", + "@typescript-eslint/utils": "5.48.2", "debug": "^4.3.4", "tsutils": "^3.21.0" }, "devDependencies": { - "@typescript-eslint/parser": "5.46.1", + "@typescript-eslint/parser": "5.48.2", "typescript": "*" }, "peerDependencies": { diff --git a/packages/type-utils/tests/isTypeReadonly.test.ts b/packages/type-utils/tests/isTypeReadonly.test.ts index 382091a2375..f200af13204 100644 --- a/packages/type-utils/tests/isTypeReadonly.test.ts +++ b/packages/type-utils/tests/isTypeReadonly.test.ts @@ -7,6 +7,7 @@ import { type ReadonlynessOptions, isTypeReadonly, } from '../src/isTypeReadonly'; +import { expectToHaveParserServices } from './test-utils/expectToHaveParserServices'; describe('isTypeReadonly', () => { const rootDir = path.join(__dirname, 'fixtures'); @@ -21,6 +22,7 @@ describe('isTypeReadonly', () => { filePath: path.join(rootDir, 'file.ts'), tsconfigRootDir: rootDir, }); + expectToHaveParserServices(services); const checker = services.program.getTypeChecker(); const esTreeNodeToTSNodeMap = services.esTreeNodeToTSNodeMap; diff --git a/packages/type-utils/tests/isUnsafeAssignment.test.ts b/packages/type-utils/tests/isUnsafeAssignment.test.ts index e49e25c8655..e7ba11fda28 100644 --- a/packages/type-utils/tests/isUnsafeAssignment.test.ts +++ b/packages/type-utils/tests/isUnsafeAssignment.test.ts @@ -4,6 +4,7 @@ import path from 'path'; import type * as ts from 'typescript'; import { isUnsafeAssignment } from '../src/isUnsafeAssignment'; +import { expectToHaveParserServices } from './test-utils/expectToHaveParserServices'; describe('isUnsafeAssignment', () => { const rootDir = path.join(__dirname, 'fixtures'); @@ -19,6 +20,7 @@ describe('isUnsafeAssignment', () => { filePath: path.join(rootDir, 'file.ts'), tsconfigRootDir: rootDir, }); + expectToHaveParserServices(services); const checker = services.program.getTypeChecker(); const esTreeNodeToTSNodeMap = services.esTreeNodeToTSNodeMap; diff --git a/packages/type-utils/tests/test-utils/expectToHaveParserServices.ts b/packages/type-utils/tests/test-utils/expectToHaveParserServices.ts new file mode 100644 index 00000000000..6ff95a7076b --- /dev/null +++ b/packages/type-utils/tests/test-utils/expectToHaveParserServices.ts @@ -0,0 +1,12 @@ +import type { + ParserServices, + ParserServicesWithTypeInformation, +} from '@typescript-eslint/typescript-estree'; + +export function expectToHaveParserServices( + services: ParserServices | null | undefined, +): asserts services is ParserServicesWithTypeInformation { + expect(services?.program).toBeDefined(); + expect(services?.esTreeNodeToTSNodeMap).toBeDefined(); + expect(services?.tsNodeToESTreeNodeMap).toBeDefined(); +} diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index 3350b0f5470..05fa0254117 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/CHANGELOG.md @@ -3,6 +3,34 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [5.48.2](https://github.com/typescript-eslint/typescript-eslint/compare/v5.48.1...v5.48.2) (2023-01-16) + +**Note:** Version bump only for package @typescript-eslint/types + + + + + +## [5.48.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.48.0...v5.48.1) (2023-01-09) + +**Note:** Version bump only for package @typescript-eslint/types + + + + + +# [5.48.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.47.1...v5.48.0) (2023-01-02) + +**Note:** Version bump only for package @typescript-eslint/types + +## [5.47.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.47.0...v5.47.1) (2022-12-26) + +**Note:** Version bump only for package @typescript-eslint/types + +# [5.47.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.46.1...v5.47.0) (2022-12-19) + +**Note:** Version bump only for package @typescript-eslint/types + ## [5.46.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.46.0...v5.46.1) (2022-12-12) **Note:** Version bump only for package @typescript-eslint/types diff --git a/packages/types/package.json b/packages/types/package.json index 473d4ad749f..c6e55e06233 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/types", - "version": "5.46.1", + "version": "5.48.2", "description": "Types for the TypeScript-ESTree AST spec", "keywords": [ "eslint", diff --git a/packages/typescript-estree/CHANGELOG.md b/packages/typescript-estree/CHANGELOG.md index 7c12eb686eb..fdeef706469 100644 --- a/packages/typescript-estree/CHANGELOG.md +++ b/packages/typescript-estree/CHANGELOG.md @@ -3,6 +3,36 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [5.48.2](https://github.com/typescript-eslint/typescript-eslint/compare/v5.48.1...v5.48.2) (2023-01-16) + +**Note:** Version bump only for package @typescript-eslint/typescript-estree + + + + + +## [5.48.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.48.0...v5.48.1) (2023-01-09) + +**Note:** Version bump only for package @typescript-eslint/typescript-estree + + + + + +# [5.48.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.47.1...v5.48.0) (2023-01-02) + +**Note:** Version bump only for package @typescript-eslint/typescript-estree + +## [5.47.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.47.0...v5.47.1) (2022-12-26) + +### Bug Fixes + +- **ast-spec:** correct some incorrect ast types ([#6257](https://github.com/typescript-eslint/typescript-eslint/issues/6257)) ([0f3f645](https://github.com/typescript-eslint/typescript-eslint/commit/0f3f64571ea5d938081b1a9f3fd1495765201700)) + +# [5.47.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.46.1...v5.47.0) (2022-12-19) + +**Note:** Version bump only for package @typescript-eslint/typescript-estree + ## [5.46.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.46.0...v5.46.1) (2022-12-12) **Note:** Version bump only for package @typescript-eslint/typescript-estree diff --git a/packages/typescript-estree/jest.config.js b/packages/typescript-estree/jest.config.js index 43f847a6fbf..754a2599294 100644 --- a/packages/typescript-estree/jest.config.js +++ b/packages/typescript-estree/jest.config.js @@ -5,7 +5,7 @@ module.exports = { ...require('../../jest.config.base.js'), testRegex: [ - './tests/lib/.*\\.ts$', + './tests/lib/.*\\.test\\.ts$', './tests/ast-alignment/spec\\.ts$', './tests/[^/]+\\.test\\.ts$', ], diff --git a/packages/typescript-estree/package.json b/packages/typescript-estree/package.json index a17deb244cb..64bf7006689 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/typescript-estree", - "version": "5.46.1", + "version": "5.48.2", "description": "A parser that converts TypeScript source code into an ESTree compatible form", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -42,8 +42,8 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "5.46.1", - "@typescript-eslint/visitor-keys": "5.46.1", + "@typescript-eslint/types": "5.48.2", + "@typescript-eslint/visitor-keys": "5.48.2", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -59,7 +59,7 @@ "@types/is-glob": "*", "@types/semver": "*", "@types/tmp": "*", - "@typescript-eslint/shared-fixtures": "5.46.1", + "@typescript-eslint/shared-fixtures": "5.48.2", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/typescript-estree/src/create-program/createDefaultProgram.ts b/packages/typescript-estree/src/create-program/createDefaultProgram.ts index 174783f43db..9ea0fabfd0d 100644 --- a/packages/typescript-estree/src/create-program/createDefaultProgram.ts +++ b/packages/typescript-estree/src/create-program/createDefaultProgram.ts @@ -3,7 +3,7 @@ import path from 'path'; import * as ts from 'typescript'; import type { ParseSettings } from '../parseSettings'; -import type { ASTAndProgram } from './shared'; +import type { ASTAndDefiniteProgram } from './shared'; import { createDefaultCompilerOptionsFromExtra, getModuleResolver, @@ -20,7 +20,7 @@ const log = debug('typescript-eslint:typescript-estree:createDefaultProgram'); */ function createDefaultProgram( parseSettings: ParseSettings, -): ASTAndProgram | undefined { +): ASTAndDefiniteProgram | undefined { log( 'Getting default program for: %s', parseSettings.filePath || 'unnamed file', diff --git a/packages/typescript-estree/src/create-program/createIsolatedProgram.ts b/packages/typescript-estree/src/create-program/createIsolatedProgram.ts index 58d7ec8a61a..0b6520f22aa 100644 --- a/packages/typescript-estree/src/create-program/createIsolatedProgram.ts +++ b/packages/typescript-estree/src/create-program/createIsolatedProgram.ts @@ -3,7 +3,7 @@ import * as ts from 'typescript'; import type { ParseSettings } from '../parseSettings'; import { getScriptKind } from './getScriptKind'; -import type { ASTAndProgram } from './shared'; +import type { ASTAndDefiniteProgram } from './shared'; import { createDefaultCompilerOptionsFromExtra } from './shared'; const log = debug('typescript-eslint:typescript-estree:createIsolatedProgram'); @@ -12,7 +12,9 @@ const log = debug('typescript-eslint:typescript-estree:createIsolatedProgram'); * @param code The code of the file being linted * @returns Returns a new source file and program corresponding to the linted code */ -function createIsolatedProgram(parseSettings: ParseSettings): ASTAndProgram { +function createIsolatedProgram( + parseSettings: ParseSettings, +): ASTAndDefiniteProgram { log( 'Getting isolated program in %s mode for: %s', parseSettings.jsx ? 'TSX' : 'TS', diff --git a/packages/typescript-estree/src/create-program/createProjectProgram.ts b/packages/typescript-estree/src/create-program/createProjectProgram.ts index 1feb8f42796..bd98a511c01 100644 --- a/packages/typescript-estree/src/create-program/createProjectProgram.ts +++ b/packages/typescript-estree/src/create-program/createProjectProgram.ts @@ -5,7 +5,7 @@ import * as ts from 'typescript'; import { firstDefined } from '../node-utils'; import type { ParseSettings } from '../parseSettings'; import { getWatchProgramsForProjects } from './getWatchProgramsForProjects'; -import type { ASTAndProgram } from './shared'; +import type { ASTAndDefiniteProgram } from './shared'; import { getAstFromProgram } from './shared'; const log = debug('typescript-eslint:typescript-estree:createProjectProgram'); @@ -27,7 +27,7 @@ const DEFAULT_EXTRA_FILE_EXTENSIONS = [ */ function createProjectProgram( parseSettings: ParseSettings, -): ASTAndProgram | undefined { +): ASTAndDefiniteProgram | undefined { log('Creating project program for: %s', parseSettings.filePath); const programsForProjects = getWatchProgramsForProjects(parseSettings); @@ -106,7 +106,7 @@ function createProjectProgram( `- Change ESLint's list of included files to not include this file`, `- Change ${describedSpecifiers} to include this file`, `- Create a new TSConfig that includes this file and include it in your parserOptions.project`, - `See the typescript-eslint docs for more info: https://typescript-eslint.io/linting/troubleshooting##i-get-errors-telling-me-eslint-was-configured-to-run--however-that-tsconfig-does-not--none-of-those-tsconfigs-include-this-file`, + `See the typescript-eslint docs for more info: https://typescript-eslint.io/linting/troubleshooting#i-get-errors-telling-me-eslint-was-configured-to-run--however-that-tsconfig-does-not--none-of-those-tsconfigs-include-this-file`, ); } diff --git a/packages/typescript-estree/src/create-program/createSourceFile.ts b/packages/typescript-estree/src/create-program/createSourceFile.ts index 0214802f73f..a89a364ac54 100644 --- a/packages/typescript-estree/src/create-program/createSourceFile.ts +++ b/packages/typescript-estree/src/create-program/createSourceFile.ts @@ -4,6 +4,7 @@ import * as ts from 'typescript'; import type { ParseSettings } from '../parseSettings'; import { isSourceFile } from '../source-files'; import { getScriptKind } from './getScriptKind'; +import type { ASTAndNoProgram } from './shared'; const log = debug('typescript-eslint:typescript-estree:createSourceFile'); @@ -25,4 +26,11 @@ function createSourceFile(parseSettings: ParseSettings): ts.SourceFile { ); } -export { createSourceFile }; +function createNoProgram(parseSettings: ParseSettings): ASTAndNoProgram { + return { + ast: createSourceFile(parseSettings), + program: null, + }; +} + +export { createSourceFile, createNoProgram }; diff --git a/packages/typescript-estree/src/create-program/shared.ts b/packages/typescript-estree/src/create-program/shared.ts index dd50f757dce..98c3fc01510 100644 --- a/packages/typescript-estree/src/create-program/shared.ts +++ b/packages/typescript-estree/src/create-program/shared.ts @@ -5,10 +5,15 @@ import * as ts from 'typescript'; import type { ModuleResolver } from '../parser-options'; import type { ParseSettings } from '../parseSettings'; -interface ASTAndProgram { +interface ASTAndNoProgram { + ast: ts.SourceFile; + program: null; +} +interface ASTAndDefiniteProgram { ast: ts.SourceFile; program: ts.Program; } +type ASTAndProgram = ASTAndNoProgram | ASTAndDefiniteProgram; /** * Compiler options required to avoid critical functionality issues @@ -94,7 +99,7 @@ function getExtension(fileName: string | undefined): string | null { function getAstFromProgram( currentProgram: Program, parseSettings: ParseSettings, -): ASTAndProgram | undefined { +): ASTAndDefiniteProgram | undefined { const ast = currentProgram.getSourceFile(parseSettings.filePath); // working around https://github.com/typescript-eslint/typescript-eslint/issues/1573 @@ -125,6 +130,8 @@ function getModuleResolver(moduleResolverPath: string): ModuleResolver { } export { + ASTAndDefiniteProgram, + ASTAndNoProgram, ASTAndProgram, CORE_COMPILER_OPTIONS, canonicalDirname, diff --git a/packages/typescript-estree/src/create-program/useProvidedPrograms.ts b/packages/typescript-estree/src/create-program/useProvidedPrograms.ts index fc99416faa5..96093e9a3af 100644 --- a/packages/typescript-estree/src/create-program/useProvidedPrograms.ts +++ b/packages/typescript-estree/src/create-program/useProvidedPrograms.ts @@ -4,7 +4,7 @@ import * as path from 'path'; import * as ts from 'typescript'; import type { ParseSettings } from '../parseSettings'; -import type { ASTAndProgram } from './shared'; +import type { ASTAndDefiniteProgram } from './shared'; import { CORE_COMPILER_OPTIONS, getAstFromProgram } from './shared'; const log = debug('typescript-eslint:typescript-estree:useProvidedProgram'); @@ -12,13 +12,13 @@ const log = debug('typescript-eslint:typescript-estree:useProvidedProgram'); function useProvidedPrograms( programInstances: Iterable, parseSettings: ParseSettings, -): ASTAndProgram | undefined { +): ASTAndDefiniteProgram | undefined { log( 'Retrieving ast for %s from provided program instance(s)', parseSettings.filePath, ); - let astAndProgram: ASTAndProgram | undefined; + let astAndProgram: ASTAndDefiniteProgram | undefined; for (const programInstance of programInstances) { astAndProgram = getAstFromProgram(programInstance, parseSettings); // Stop at the first applicable program instance diff --git a/packages/typescript-estree/src/index.ts b/packages/typescript-estree/src/index.ts index 7d859bc6b1c..498082385a2 100644 --- a/packages/typescript-estree/src/index.ts +++ b/packages/typescript-estree/src/index.ts @@ -7,7 +7,12 @@ export { ParseWithNodeMapsResult, clearProgramCache, } from './parser'; -export { ParserServices, TSESTreeOptions } from './parser-options'; +export { + ParserServices, + ParserServicesWithTypeInformation, + ParserServicesWithoutTypeInformation, + TSESTreeOptions, +} from './parser-options'; export { simpleTraverse } from './simple-traverse'; export * from './ts-estree'; export { clearWatchCaches as clearCaches } from './create-program/getWatchProgramsForProjects'; diff --git a/packages/typescript-estree/src/parser-options.ts b/packages/typescript-estree/src/parser-options.ts index 3ce40281f94..7258a1626a6 100644 --- a/packages/typescript-estree/src/parser-options.ts +++ b/packages/typescript-estree/src/parser-options.ts @@ -182,12 +182,21 @@ export interface ParserWeakMapESTreeToTSNode< has(key: unknown): boolean; } -export interface ParserServices { - program: ts.Program; +export interface ParserServicesNodeMaps { esTreeNodeToTSNodeMap: ParserWeakMapESTreeToTSNode; tsNodeToESTreeNodeMap: ParserWeakMap; - hasFullTypeInformation: boolean; } +export interface ParserServicesWithTypeInformation + extends ParserServicesNodeMaps { + program: ts.Program; +} +export interface ParserServicesWithoutTypeInformation + extends ParserServicesNodeMaps { + program: null; +} +export type ParserServices = + | ParserServicesWithTypeInformation + | ParserServicesWithoutTypeInformation; export interface ModuleResolver { version: 1; diff --git a/packages/typescript-estree/src/parser.ts b/packages/typescript-estree/src/parser.ts index 6e8c01a974c..084e156fe47 100644 --- a/packages/typescript-estree/src/parser.ts +++ b/packages/typescript-estree/src/parser.ts @@ -6,13 +6,20 @@ import { convertError } from './convert'; import { createDefaultProgram } from './create-program/createDefaultProgram'; import { createIsolatedProgram } from './create-program/createIsolatedProgram'; import { createProjectProgram } from './create-program/createProjectProgram'; -import { createSourceFile } from './create-program/createSourceFile'; +import { + createNoProgram, + createSourceFile, +} from './create-program/createSourceFile'; import type { ASTAndProgram, CanonicalPath } from './create-program/shared'; import { createProgramFromConfigFile, useProvidedPrograms, } from './create-program/useProvidedPrograms'; -import type { ParserServices, TSESTreeOptions } from './parser-options'; +import type { + ParserServices, + ParserServicesNodeMaps, + TSESTreeOptions, +} from './parser-options'; import type { ParseSettings } from './parseSettings'; import { createParseSettings } from './parseSettings/createParseSettings'; import { getFirstSemanticOrSyntacticError } from './semantic-or-syntactic-errors'; @@ -39,17 +46,37 @@ function getProgramAndAST( parseSettings: ParseSettings, shouldProvideParserServices: boolean, ): ASTAndProgram { - return ( - (parseSettings.programs && - useProvidedPrograms(parseSettings.programs, parseSettings)) || - (shouldProvideParserServices && createProjectProgram(parseSettings)) || - (shouldProvideParserServices && - // eslint-disable-next-line deprecation/deprecation -- will be cleaned up with the next major - parseSettings.DEPRECATED__createDefaultProgram && + if (parseSettings.programs) { + const fromProvidedPrograms = useProvidedPrograms( + parseSettings.programs, + parseSettings, + ); + if (fromProvidedPrograms) { + return fromProvidedPrograms; + } + } + + if (shouldProvideParserServices) { + const fromProjectProgram = createProjectProgram(parseSettings); + if (fromProjectProgram) { + return fromProjectProgram; + } + + // eslint-disable-next-line deprecation/deprecation -- will be cleaned up with the next major + if (parseSettings.DEPRECATED__createDefaultProgram) { // eslint-disable-next-line deprecation/deprecation -- will be cleaned up with the next major - createDefaultProgram(parseSettings)) || - createIsolatedProgram(parseSettings) - ); + const fromDefaultProgram = createDefaultProgram(parseSettings); + if (fromDefaultProgram) { + return fromDefaultProgram; + } + } + + return createIsolatedProgram(parseSettings); + } + + // no need to waste time creating a program as the caller didn't want parser services + // so we can save time and just create a lonesome source file + return createNoProgram(parseSettings); } // eslint-disable-next-line @typescript-eslint/no-empty-interface @@ -62,10 +89,9 @@ interface ParseAndGenerateServicesResult { ast: AST; services: ParserServices; } -interface ParseWithNodeMapsResult { +interface ParseWithNodeMapsResult + extends ParserServicesNodeMaps { ast: AST; - esTreeNodeToTSNodeMap: ParserServices['esTreeNodeToTSNodeMap']; - tsNodeToESTreeNodeMap: ParserServices['tsNodeToESTreeNodeMap']; } function parse( @@ -138,16 +164,6 @@ function parseAndGenerateServices( */ const parseSettings = createParseSettings(code, options); - if (typeof options !== 'undefined') { - if ( - typeof options.errorOnTypeScriptSyntacticAndSemanticIssues === - 'boolean' && - options.errorOnTypeScriptSyntacticAndSemanticIssues - ) { - parseSettings.errorOnTypeScriptSyntacticAndSemanticIssues = true; - } - } - /** * If this is a single run in which the user has not provided any existing programs but there * are programs which need to be created from the provided "project" option, @@ -184,6 +200,25 @@ function parseAndGenerateServices( const shouldProvideParserServices = parseSettings.programs != null || parseSettings.projects?.length > 0; + if (typeof options !== 'undefined') { + if ( + typeof options.errorOnTypeScriptSyntacticAndSemanticIssues === + 'boolean' && + options.errorOnTypeScriptSyntacticAndSemanticIssues + ) { + parseSettings.errorOnTypeScriptSyntacticAndSemanticIssues = true; + } + + if ( + parseSettings.errorOnTypeScriptSyntacticAndSemanticIssues && + !shouldProvideParserServices + ) { + throw new Error( + 'Cannot calculate TypeScript semantic issues without a valid project.', + ); + } + } + /** * If we are in singleRun mode but the parseAndGenerateServices() function has been called more than once for the current file, * it must mean that we are in the middle of an ESLint automated fix cycle (in which parsing can be performed up to an additional @@ -236,8 +271,10 @@ function parseAndGenerateServices( return { ast: estree as AST, services: { - hasFullTypeInformation: shouldProvideParserServices, program, + // we always return the node maps because + // (a) they don't require type info and + // (b) they can be useful when using some of TS's internal non-type-aware AST utils esTreeNodeToTSNodeMap: astMaps.esTreeNodeToTSNodeMap, tsNodeToESTreeNodeMap: astMaps.tsNodeToESTreeNodeMap, }, diff --git a/packages/typescript-estree/src/semantic-or-syntactic-errors.ts b/packages/typescript-estree/src/semantic-or-syntactic-errors.ts index af6f33918df..d5d5ce42ad9 100644 --- a/packages/typescript-estree/src/semantic-or-syntactic-errors.ts +++ b/packages/typescript-estree/src/semantic-or-syntactic-errors.ts @@ -22,18 +22,18 @@ export function getFirstSemanticOrSyntacticError( ast: SourceFile, ): SemanticOrSyntacticError | undefined { try { - const supportedSyntacticDiagnostics = whitelistSupportedDiagnostics( + const supportedSyntacticDiagnostics = allowlistSupportedDiagnostics( program.getSyntacticDiagnostics(ast), ); - if (supportedSyntacticDiagnostics.length) { + if (supportedSyntacticDiagnostics.length > 0) { return convertDiagnosticToSemanticOrSyntacticError( supportedSyntacticDiagnostics[0], ); } - const supportedSemanticDiagnostics = whitelistSupportedDiagnostics( + const supportedSemanticDiagnostics = allowlistSupportedDiagnostics( program.getSemanticDiagnostics(ast), ); - if (supportedSemanticDiagnostics.length) { + if (supportedSemanticDiagnostics.length > 0) { return convertDiagnosticToSemanticOrSyntacticError( supportedSemanticDiagnostics[0], ); @@ -57,7 +57,7 @@ export function getFirstSemanticOrSyntacticError( } } -function whitelistSupportedDiagnostics( +function allowlistSupportedDiagnostics( diagnostics: readonly (DiagnosticWithLocation | Diagnostic)[], ): readonly (DiagnosticWithLocation | Diagnostic)[] { return diagnostics.filter(diagnostic => { diff --git a/packages/typescript-estree/tests/ast-alignment/parse.ts b/packages/typescript-estree/tests/ast-alignment/parse.ts index b4d5ea1c8f9..5837090f47a 100644 --- a/packages/typescript-estree/tests/ast-alignment/parse.ts +++ b/packages/typescript-estree/tests/ast-alignment/parse.ts @@ -4,6 +4,7 @@ import type babelParser from '@babel/parser'; import type { ParserPlugin } from '@babel/parser'; import type { File } from '@babel/types'; import type { TSESTree } from '@typescript-eslint/types'; +import * as path from 'path'; import type { TSError } from '../../src/node-utils'; import type { AST } from '../../src/parser'; @@ -50,6 +51,12 @@ function parseWithBabelParser(text: string, jsx = true): File { }); } +const emptyProjectPath = path.resolve( + __dirname, + '..', + 'fixtures', + 'simpleProject', +); function parseWithTypeScriptESTree(text: string, jsx = true): AST { try { const result = parseAndGenerateServices(text, { @@ -65,6 +72,9 @@ function parseWithTypeScriptESTree(text: string, jsx = true): AST { * forgiving. */ errorOnTypeScriptSyntacticAndSemanticIssues: true, + project: [path.join(emptyProjectPath, 'tsconfig.json')], + tsconfigRootDir: emptyProjectPath, + filePath: path.join(emptyProjectPath, jsx ? 'file-jsx.tsx' : 'file.ts'), jsx, }); return result.ast; diff --git a/packages/typescript-estree/tests/fixtures/simpleProject/file-jsx.tsx b/packages/typescript-estree/tests/fixtures/simpleProject/file-jsx.tsx new file mode 100644 index 00000000000..e69de29bb2d diff --git a/packages/typescript-estree/tests/fixtures/simpleProject/tsconfig.json b/packages/typescript-estree/tests/fixtures/simpleProject/tsconfig.json index 0967ef424bc..90c5f25ad29 100644 --- a/packages/typescript-estree/tests/fixtures/simpleProject/tsconfig.json +++ b/packages/typescript-estree/tests/fixtures/simpleProject/tsconfig.json @@ -1 +1,5 @@ -{} +{ + "compilerOptions": { + "target": "ES2022" + } +} diff --git a/packages/typescript-estree/tests/lib/__snapshots__/parse.test.ts.snap b/packages/typescript-estree/tests/lib/__snapshots__/parse.test.ts.snap index 36909473930..c290b538b20 100644 --- a/packages/typescript-estree/tests/lib/__snapshots__/parse.test.ts.snap +++ b/packages/typescript-estree/tests/lib/__snapshots__/parse.test.ts.snap @@ -23,7 +23,7 @@ However, that TSConfig does not include this file. Either: - Change ESLint's list of included files to not include this file - Change that TSConfig to include this file - Create a new TSConfig that includes this file and include it in your parserOptions.project -See the typescript-eslint docs for more info: https://typescript-eslint.io/linting/troubleshooting##i-get-errors-telling-me-eslint-was-configured-to-run--however-that-tsconfig-does-not--none-of-those-tsconfigs-include-this-file" +See the typescript-eslint docs for more info: https://typescript-eslint.io/linting/troubleshooting#i-get-errors-telling-me-eslint-was-configured-to-run--however-that-tsconfig-does-not--none-of-those-tsconfigs-include-this-file" `; exports[`parseAndGenerateServices invalid file error messages "parserOptions.extraFileExtensions" is non-empty the extension matches the file isn't included 1`] = ` @@ -32,7 +32,7 @@ However, that TSConfig does not include this file. Either: - Change ESLint's list of included files to not include this file - Change that TSConfig to include this file - Create a new TSConfig that includes this file and include it in your parserOptions.project -See the typescript-eslint docs for more info: https://typescript-eslint.io/linting/troubleshooting##i-get-errors-telling-me-eslint-was-configured-to-run--however-that-tsconfig-does-not--none-of-those-tsconfigs-include-this-file" +See the typescript-eslint docs for more info: https://typescript-eslint.io/linting/troubleshooting#i-get-errors-telling-me-eslint-was-configured-to-run--however-that-tsconfig-does-not--none-of-those-tsconfigs-include-this-file" `; exports[`parseAndGenerateServices invalid file error messages project includes errors for not included files 1`] = ` @@ -41,7 +41,7 @@ However, that TSConfig does not include this file. Either: - Change ESLint's list of included files to not include this file - Change that TSConfig to include this file - Create a new TSConfig that includes this file and include it in your parserOptions.project -See the typescript-eslint docs for more info: https://typescript-eslint.io/linting/troubleshooting##i-get-errors-telling-me-eslint-was-configured-to-run--however-that-tsconfig-does-not--none-of-those-tsconfigs-include-this-file" +See the typescript-eslint docs for more info: https://typescript-eslint.io/linting/troubleshooting#i-get-errors-telling-me-eslint-was-configured-to-run--however-that-tsconfig-does-not--none-of-those-tsconfigs-include-this-file" `; exports[`parseAndGenerateServices invalid file error messages project includes errors for not included files 2`] = ` @@ -50,7 +50,7 @@ However, that TSConfig does not include this file. Either: - Change ESLint's list of included files to not include this file - Change that TSConfig to include this file - Create a new TSConfig that includes this file and include it in your parserOptions.project -See the typescript-eslint docs for more info: https://typescript-eslint.io/linting/troubleshooting##i-get-errors-telling-me-eslint-was-configured-to-run--however-that-tsconfig-does-not--none-of-those-tsconfigs-include-this-file" +See the typescript-eslint docs for more info: https://typescript-eslint.io/linting/troubleshooting#i-get-errors-telling-me-eslint-was-configured-to-run--however-that-tsconfig-does-not--none-of-those-tsconfigs-include-this-file" `; exports[`parseAndGenerateServices invalid file error messages project includes errors for not included files 3`] = ` @@ -59,7 +59,7 @@ However, that TSConfig does not include this file. Either: - Change ESLint's list of included files to not include this file - Change that TSConfig to include this file - Create a new TSConfig that includes this file and include it in your parserOptions.project -See the typescript-eslint docs for more info: https://typescript-eslint.io/linting/troubleshooting##i-get-errors-telling-me-eslint-was-configured-to-run--however-that-tsconfig-does-not--none-of-those-tsconfigs-include-this-file" +See the typescript-eslint docs for more info: https://typescript-eslint.io/linting/troubleshooting#i-get-errors-telling-me-eslint-was-configured-to-run--however-that-tsconfig-does-not--none-of-those-tsconfigs-include-this-file" `; exports[`parseAndGenerateServices invalid file error messages project includes errors for not included files 4`] = ` @@ -68,7 +68,7 @@ However, that TSConfig does not include this file. Either: - Change ESLint's list of included files to not include this file - Change that TSConfig to include this file - Create a new TSConfig that includes this file and include it in your parserOptions.project -See the typescript-eslint docs for more info: https://typescript-eslint.io/linting/troubleshooting##i-get-errors-telling-me-eslint-was-configured-to-run--however-that-tsconfig-does-not--none-of-those-tsconfigs-include-this-file" +See the typescript-eslint docs for more info: https://typescript-eslint.io/linting/troubleshooting#i-get-errors-telling-me-eslint-was-configured-to-run--however-that-tsconfig-does-not--none-of-those-tsconfigs-include-this-file" `; exports[`parseAndGenerateServices invalid project error messages throws when non of multiple projects include the file 1`] = ` @@ -79,7 +79,7 @@ However, none of those TSConfigs include this file. Either: - Change ESLint's list of included files to not include this file - Change one of those TSConfigs to include this file - Create a new TSConfig that includes this file and include it in your parserOptions.project -See the typescript-eslint docs for more info: https://typescript-eslint.io/linting/troubleshooting##i-get-errors-telling-me-eslint-was-configured-to-run--however-that-tsconfig-does-not--none-of-those-tsconfigs-include-this-file" +See the typescript-eslint docs for more info: https://typescript-eslint.io/linting/troubleshooting#i-get-errors-telling-me-eslint-was-configured-to-run--however-that-tsconfig-does-not--none-of-those-tsconfigs-include-this-file" `; exports[`parseAndGenerateServices isolated parsing should parse .js file - with JSX content - parserOptions.jsx = false 1`] = ` @@ -365,8 +365,7 @@ exports[`parseAndGenerateServices isolated parsing should parse .js file - with }, "services": { "esTreeNodeToTSNodeMap": WeakMap {}, - "hasFullTypeInformation": false, - "program": {}, + "program": "No Program", "tsNodeToESTreeNodeMap": WeakMap {}, }, } @@ -655,8 +654,7 @@ exports[`parseAndGenerateServices isolated parsing should parse .js file - with }, "services": { "esTreeNodeToTSNodeMap": WeakMap {}, - "hasFullTypeInformation": false, - "program": {}, + "program": "No Program", "tsNodeToESTreeNodeMap": WeakMap {}, }, } @@ -835,8 +833,7 @@ exports[`parseAndGenerateServices isolated parsing should parse .js file - witho }, "services": { "esTreeNodeToTSNodeMap": WeakMap {}, - "hasFullTypeInformation": false, - "program": {}, + "program": "No Program", "tsNodeToESTreeNodeMap": WeakMap {}, }, } @@ -1015,8 +1012,7 @@ exports[`parseAndGenerateServices isolated parsing should parse .js file - witho }, "services": { "esTreeNodeToTSNodeMap": WeakMap {}, - "hasFullTypeInformation": false, - "program": {}, + "program": "No Program", "tsNodeToESTreeNodeMap": WeakMap {}, }, } @@ -1234,8 +1230,7 @@ exports[`parseAndGenerateServices isolated parsing should parse .json file - wit }, "services": { "esTreeNodeToTSNodeMap": WeakMap {}, - "hasFullTypeInformation": false, - "program": {}, + "program": "No Program", "tsNodeToESTreeNodeMap": WeakMap {}, }, } @@ -1524,8 +1519,7 @@ exports[`parseAndGenerateServices isolated parsing should parse .jsx file - with }, "services": { "esTreeNodeToTSNodeMap": WeakMap {}, - "hasFullTypeInformation": false, - "program": {}, + "program": "No Program", "tsNodeToESTreeNodeMap": WeakMap {}, }, } @@ -1814,8 +1808,7 @@ exports[`parseAndGenerateServices isolated parsing should parse .jsx file - with }, "services": { "esTreeNodeToTSNodeMap": WeakMap {}, - "hasFullTypeInformation": false, - "program": {}, + "program": "No Program", "tsNodeToESTreeNodeMap": WeakMap {}, }, } @@ -1994,8 +1987,7 @@ exports[`parseAndGenerateServices isolated parsing should parse .jsx file - with }, "services": { "esTreeNodeToTSNodeMap": WeakMap {}, - "hasFullTypeInformation": false, - "program": {}, + "program": "No Program", "tsNodeToESTreeNodeMap": WeakMap {}, }, } @@ -2174,8 +2166,7 @@ exports[`parseAndGenerateServices isolated parsing should parse .jsx file - with }, "services": { "esTreeNodeToTSNodeMap": WeakMap {}, - "hasFullTypeInformation": false, - "program": {}, + "program": "No Program", "tsNodeToESTreeNodeMap": WeakMap {}, }, } @@ -2354,8 +2345,7 @@ exports[`parseAndGenerateServices isolated parsing should parse .ts file - witho }, "services": { "esTreeNodeToTSNodeMap": WeakMap {}, - "hasFullTypeInformation": false, - "program": {}, + "program": "No Program", "tsNodeToESTreeNodeMap": WeakMap {}, }, } @@ -2534,8 +2524,7 @@ exports[`parseAndGenerateServices isolated parsing should parse .ts file - witho }, "services": { "esTreeNodeToTSNodeMap": WeakMap {}, - "hasFullTypeInformation": false, - "program": {}, + "program": "No Program", "tsNodeToESTreeNodeMap": WeakMap {}, }, } @@ -2824,8 +2813,7 @@ exports[`parseAndGenerateServices isolated parsing should parse .tsx file - with }, "services": { "esTreeNodeToTSNodeMap": WeakMap {}, - "hasFullTypeInformation": false, - "program": {}, + "program": "No Program", "tsNodeToESTreeNodeMap": WeakMap {}, }, } @@ -3114,8 +3102,7 @@ exports[`parseAndGenerateServices isolated parsing should parse .tsx file - with }, "services": { "esTreeNodeToTSNodeMap": WeakMap {}, - "hasFullTypeInformation": false, - "program": {}, + "program": "No Program", "tsNodeToESTreeNodeMap": WeakMap {}, }, } @@ -3294,8 +3281,7 @@ exports[`parseAndGenerateServices isolated parsing should parse .tsx file - with }, "services": { "esTreeNodeToTSNodeMap": WeakMap {}, - "hasFullTypeInformation": false, - "program": {}, + "program": "No Program", "tsNodeToESTreeNodeMap": WeakMap {}, }, } @@ -3474,8 +3460,7 @@ exports[`parseAndGenerateServices isolated parsing should parse .tsx file - with }, "services": { "esTreeNodeToTSNodeMap": WeakMap {}, - "hasFullTypeInformation": false, - "program": {}, + "program": "No Program", "tsNodeToESTreeNodeMap": WeakMap {}, }, } @@ -3764,8 +3749,7 @@ exports[`parseAndGenerateServices isolated parsing should parse .vue file - with }, "services": { "esTreeNodeToTSNodeMap": WeakMap {}, - "hasFullTypeInformation": false, - "program": {}, + "program": "No Program", "tsNodeToESTreeNodeMap": WeakMap {}, }, } @@ -3944,8 +3928,7 @@ exports[`parseAndGenerateServices isolated parsing should parse .vue file - with }, "services": { "esTreeNodeToTSNodeMap": WeakMap {}, - "hasFullTypeInformation": false, - "program": {}, + "program": "No Program", "tsNodeToESTreeNodeMap": WeakMap {}, }, } @@ -4124,8 +4107,7 @@ exports[`parseAndGenerateServices isolated parsing should parse .vue file - with }, "services": { "esTreeNodeToTSNodeMap": WeakMap {}, - "hasFullTypeInformation": false, - "program": {}, + "program": "No Program", "tsNodeToESTreeNodeMap": WeakMap {}, }, } diff --git a/packages/typescript-estree/tests/lib/__snapshots__/semantic-diagnostics-enabled.test.ts.snap b/packages/typescript-estree/tests/lib/__snapshots__/semantic-diagnostics-enabled.test.ts.snap deleted file mode 100644 index 204da250a86..00000000000 --- a/packages/typescript-estree/tests/lib/__snapshots__/semantic-diagnostics-enabled.test.ts.snap +++ /dev/null @@ -1,2801 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/block-trailing-comment.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/comment-within-condition.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/export-default-anonymous-class.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/jsdoc-comment.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/jsx-attr-and-text-with-url.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/jsx-block-comment.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/jsx-comment-after-jsx.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/jsx-comment-after-self-closing-jsx.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/jsx-generic-with-comment-in-tag.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/jsx-tag-comment-after-prop.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/jsx-tag-comments.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/jsx-text-with-multiline-non-comment.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/jsx-text-with-url.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/jsx-with-greather-than.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/jsx-with-operators.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/line-comment-with-block-syntax.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/mix-line-and-block-comments.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/no-comment-regex.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/no-comment-template.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/surrounding-call-comments.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/surrounding-debugger-comments.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/surrounding-return-comments.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/surrounding-throw-comments.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/surrounding-while-loop-comments.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/switch-fallthrough-comment.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/switch-fallthrough-comment-in-function.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/switch-no-default-comment.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/switch-no-default-comment-in-function.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/switch-no-default-comment-in-nested-functions.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/template-string-block.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/comments/type-assertion-regression-test.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrayLiteral/array-literal-in-lhs.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrayLiteral/array-literals-in-binary-expr.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/as-param.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/as-param-with-params.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/basic.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/basic-in-binary-expression.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/block-body.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/block-body-not-object.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-dup-params.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-missing-paren.src 1`] = ` -TSError { - "column": 9, - "index": 9, - "lineNumber": 1, - "message": "';' expected.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-not-arrow.src 1`] = ` -TSError { - "column": 26, - "index": 26, - "lineNumber": 1, - "message": "Expression expected.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-numeric-param.src 1`] = ` -TSError { - "column": 5, - "index": 5, - "lineNumber": 1, - "message": "';' expected.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-numeric-param-multi.src 1`] = ` -TSError { - "column": 9, - "index": 9, - "lineNumber": 1, - "message": "';' expected.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-reverse-arrow.src 1`] = ` -TSError { - "column": 1, - "index": 1, - "lineNumber": 1, - "message": "Expression expected.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-strict-default-param-eval.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-strict-dup-params.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-strict-eval.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-strict-eval-return.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-strict-octal.src 1`] = ` -TSError { - "column": 21, - "index": 21, - "lineNumber": 1, - "message": "Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '0o0'.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-strict-param-arguments.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-strict-param-eval.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-strict-param-names.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-strict-param-no-paren-arguments.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-strict-param-no-paren-eval.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-two-lines.src 1`] = ` -TSError { - "column": 1, - "index": 12, - "lineNumber": 2, - "message": "Line terminator not permitted before arrow.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/error-wrapped-param.src 1`] = ` -TSError { - "column": 6, - "index": 6, - "lineNumber": 1, - "message": "';' expected.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/expression.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/iife.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/multiple-params.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/no-auto-return.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/not-strict-arguments.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/not-strict-eval.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/not-strict-eval-params.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/not-strict-octal.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/return-arrow-function.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/return-sequence.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/single-param.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/single-param-parens.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/arrowFunctions/single-param-return-identifier.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/basics/and-operator-array-object.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/basics/delete-expression.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/basics/do-while-statements.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/basics/identifiers-double-underscore.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/basics/instanceof.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/basics/new-with-member-expression.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/basics/new-without-parens.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/basics/or-operator-array-object.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/basics/typeof-expression.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/basics/update-expression.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/basics/void-expression.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/bigIntLiterals/binary.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/bigIntLiterals/decimal.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/bigIntLiterals/hex.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/bigIntLiterals/numeric-separator.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/bigIntLiterals/octal.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/binaryLiterals/invalid.src 1`] = ` -TSError { - "column": 4, - "index": 4, - "lineNumber": 1, - "message": "';' expected.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/binaryLiterals/lowercase.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/binaryLiterals/uppercase.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/blockBindings/const.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/blockBindings/let.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/blockBindings/let-in-switchcase.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/callExpression/call-expression-with-array.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/callExpression/call-expression-with-object.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/callExpression/mixed-expression.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/callExpression/new-expression-with-array.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/callExpression/new-expression-with-object.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-accessor-properties.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-computed-static-method.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-expression.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-method-named-prototype.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-method-named-static.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-method-named-with-space.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-one-method.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-one-method-super.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-private-identifier-accessor.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-private-identifier-field.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-private-identifier-method.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-static-method.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-static-method-named-prototype.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-static-method-named-static.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-static-methods-and-accessor-properties.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-two-computed-static-methods.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-two-methods.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-two-methods-computed-constructor.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-two-methods-semi.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-two-methods-three-semi.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-two-methods-two-semi.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-two-static-methods-named-constructor.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-with-constructor.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-with-constructor-parameters.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-with-constructor-with-space.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/class-with-no-body.src 1`] = ` -TSError { - "column": 0, - "index": 10, - "lineNumber": 2, - "message": "'{' expected.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/derived-class-assign-to-var.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/derived-class-expression.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/empty-class.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/empty-class-double-semi.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/empty-class-semi.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/empty-literal-derived-class.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/invalid-class-declaration.src 1`] = ` -TSError { - "column": 0, - "index": 0, - "lineNumber": 1, - "message": "A class declaration without the 'default' modifier must have a name.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/invalid-class-setter-declaration.src 1`] = ` -TSError { - "column": 14, - "index": 14, - "lineNumber": 1, - "message": "A 'set' accessor must have exactly one parameter.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/invalid-class-two-super-classes.src 1`] = ` -TSError { - "column": 18, - "index": 18, - "lineNumber": 1, - "message": "Classes can only extend a single class.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/named-class-expression.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/classes/named-derived-class-expression.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/commaOperator/comma-operator-conditional.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/commaOperator/comma-operator-multi.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/commaOperator/comma-operator-nested.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/commaOperator/comma-operator-return.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/commaOperator/comma-operator-simple.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/commaOperator/comma-operator-simple-nested.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/defaultParams/class-constructor.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/defaultParams/class-method.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/defaultParams/declaration.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/defaultParams/expression.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/defaultParams/method.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/defaultParams/not-all-params.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/array-member.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/array-to-array.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/array-var-undefined.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/call-expression-destruction-array.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/call-expression-destruction-object.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/class-constructor-params-array.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/class-constructor-params-defaults-array.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/class-constructor-params-defaults-object.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/class-constructor-params-object.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/class-method-params-array.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/class-method-params-defaults-array.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/class-method-params-defaults-object.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/class-method-params-object.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-array.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-array-all.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-array-longform-nested-multi.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-array-multi.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-array-nested-all.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-array-nested-multi.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-object.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-object-all.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-object-assign.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-object-longform.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-object-longform-all.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-object-longform-multi.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-object-mixed-multi.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-object-multi.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-object-nested-all.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/defaults-object-nested-multi.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/destructured-array-catch.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/destructured-object-catch.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/invalid-defaults-object-assign.src 1`] = ` -TSError { - "column": 0, - "index": 0, - "lineNumber": 1, - "message": "The left-hand side of an assignment expression must be a variable or a property access.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/named-param.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/nested-array.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/nested-object.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/object-var-named.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/object-var-undefined.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/param-defaults-array.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/param-defaults-object.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/param-defaults-object-nested.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/params-array.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/params-array-wrapped.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/params-multi-object.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/params-nested-array.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/params-nested-object.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/params-object.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/params-object-wrapped.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring/sparse-array.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-arrowFunctions/arrow-param-array.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-arrowFunctions/arrow-param-nested-array.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-arrowFunctions/arrow-param-nested-object.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-arrowFunctions/arrow-param-nested-object-named.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-arrowFunctions/arrow-param-object.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-arrowFunctions/param-defaults-array.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-arrowFunctions/param-defaults-object.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-arrowFunctions/param-defaults-object-nested.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-blockBindings/array-const-undefined.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-blockBindings/array-let-undefined.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-blockBindings/object-const-named.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-blockBindings/object-const-undefined.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-blockBindings/object-let-named.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-blockBindings/object-let-undefined.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-defaultParams/param-array.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-defaultParams/param-object.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-defaultParams/param-object-short.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-defaultParams/param-object-wrapped.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-forOf/loop.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/complex-destructured.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/destructured-array-literal.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/destructuring-param.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/error-complex-destructured-spread-first.src 1`] = ` -TSError { - "column": 1, - "index": 1, - "lineNumber": 1, - "message": "A rest element must be last in a destructuring pattern.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/invalid-not-final-array-empty.src 1`] = ` -TSError { - "column": 5, - "index": 5, - "lineNumber": 1, - "message": "A rest parameter or binding pattern may not have a trailing comma.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/multi-destructured.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/not-final-array.src 1`] = ` -TSError { - "column": 1, - "index": 1, - "lineNumber": 1, - "message": "A rest element must be last in a destructuring pattern.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/single-destructured.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/var-complex-destructured.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/var-destructured-array-literal.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/var-multi-destructured.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/destructuring-and-spread/var-single-destructured.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/directives/block.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/directives/directive-in-class.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/directives/first-expression.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/directives/function-non-strict.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/directives/non-directive-string.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/directives/non-unique-directive.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/directives/program.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/directives/program-order.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/directives/raw.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalAsyncIteration/async-generators.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalAsyncIteration/async-iterator.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalDynamicImport/dynamic-import.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalDynamicImport/error-dynamic-import-params.src 1`] = ` -TSError { - "column": 7, - "index": 7, - "lineNumber": 1, - "message": "Dynamic import requires exactly one or two arguments.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/arg-spread.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/destructuring-assign-mirror.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/function-parameter-object-spread.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/invalid-rest.src 1`] = ` -TSError { - "column": 18, - "index": 18, - "lineNumber": 1, - "message": "',' expected.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/invalid-rest-trailing-comma.src 1`] = ` -TSError { - "column": 16, - "index": 16, - "lineNumber": 1, - "message": "A rest parameter or binding pattern may not have a trailing comma.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/object-rest.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/property-spread.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/shorthand-method-args.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/shorthand-methods.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/shorthand-properties.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/single-spread.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/spread-trailing-comma.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalObjectRestSpread/two-spread.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalOptionalCatchBinding/optional-catch-binding.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/experimentalOptionalCatchBinding/optional-catch-binding-finally.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/exponentiationOperators/exponential-operators.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/for/for-empty.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/for/for-loop.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/for/for-with-coma.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/for/for-with-const.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/for/for-with-function.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/for/for-with-let.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forIn/for-in-array.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forIn/for-in-bare-nonstrict.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forIn/for-in-destruction.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forIn/for-in-destruction-object.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forIn/for-in-object.src 1`] = ` -TSError { - "column": 14, - "index": 14, - "lineNumber": 1, - "message": "';' expected.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forIn/for-in-object-with-body.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forIn/for-in-with-assigment.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forIn/for-in-with-bare-assigment.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forIn/for-in-with-const.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forIn/for-in-with-milti-asigment.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forIn/for-in-with-rest.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forIn/for-in-with-var.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forOf/for-of-array.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forOf/for-of-destruction.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forOf/for-of-destruction-object.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forOf/for-of-object.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forOf/for-of-with-function-initializer.src 1`] = ` -TSError { - "column": 9, - "index": 9, - "lineNumber": 1, - "message": "The variable declaration of a 'for...of' statement cannot have an initializer.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forOf/for-of-with-rest.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forOf/for-of-with-var-and-braces.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forOf/for-of-with-var-and-no-braces.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forOf/invalid-for-of-with-const-and-no-braces.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/forOf/invalid-for-of-with-let-and-no-braces.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/function/return-multiline-sequence.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/function/return-sequence.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/generators/anonymous-generator.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/generators/async-generator-function.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/generators/async-generator-method.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/generators/double-yield.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/generators/empty-generator-declaration.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/generators/generator-declaration.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/generators/yield-delegation.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/generators/yield-without-value.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/generators/yield-without-value-in-call.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/generators/yield-without-value-no-semi.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/globalReturn/return-identifier.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/globalReturn/return-no-arg.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/globalReturn/return-true.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/hexLiterals/invalid.src 1`] = ` -TSError { - "column": 4, - "index": 4, - "lineNumber": 1, - "message": "';' expected.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/hexLiterals/lowercase.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/hexLiterals/uppercase.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/importMeta/simple-import-meta.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/labels/label-break.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/labels/label-continue.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/error-delete.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/error-function.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/error-strict.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-async-named-function.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-const.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-default-array.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-default-async-named-function.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-default-class.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-default-expression.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-default-function.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-default-named-class.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-default-named-function.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-default-number.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-default-object.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-default-value.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-from-batch.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-from-default.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-from-named-as-default.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-from-named-as-specifier.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-from-named-as-specifiers.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-from-specifier.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-from-specifiers.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-function.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-let.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-named-as-default.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-named-as-specifier.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-named-as-specifiers.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-named-class.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-named-empty.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-named-specifier.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-named-specifiers.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-named-specifiers-comma.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-var.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-var-anonymous-function.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/export-var-number.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/import-default.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/import-default-and-named-specifiers.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/import-default-and-namespace-specifiers.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/import-default-as.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/import-jquery.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/import-module.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/import-named-as-specifier.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/import-named-as-specifiers.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/import-named-empty.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/import-named-specifier.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/import-named-specifiers.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/import-named-specifiers-comma.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/import-namespace-specifier.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/import-null-as-nil.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-await.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-class.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-export-batch-missing-from-clause.src 1`] = ` -TSError { - "column": 0, - "index": 9, - "lineNumber": 2, - "message": "'from' expected.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-export-batch-token.src 1`] = ` -TSError { - "column": 9, - "index": 9, - "lineNumber": 1, - "message": "'from' expected.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-export-default.src 1`] = ` -TSError { - "column": 20, - "index": 20, - "lineNumber": 1, - "message": "';' expected.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-export-default-equal.src 1`] = ` -TSError { - "column": 15, - "index": 15, - "lineNumber": 1, - "message": "Expression expected.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-export-default-token.src 1`] = ` -TSError { - "column": 17, - "index": 17, - "lineNumber": 1, - "message": "';' expected.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-export-module-specifier.src 1`] = ` -TSError { - "column": 19, - "index": 19, - "lineNumber": 1, - "message": "Module specifier must be a string literal.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-export-named-default.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-export-named-extra-comma.src 1`] = ` -TSError { - "column": 16, - "index": 16, - "lineNumber": 1, - "message": "Identifier expected.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-export-named-middle-comma.src 1`] = ` -TSError { - "column": 12, - "index": 12, - "lineNumber": 1, - "message": "Identifier expected.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-default.src 1`] = ` -TSError { - "column": 7, - "index": 7, - "lineNumber": 1, - "message": "Expression expected.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-default-after-named.src 1`] = ` -TSError { - "column": 12, - "index": 12, - "lineNumber": 1, - "message": "'from' expected.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-default-after-named-after-default.src 1`] = ` -TSError { - "column": 17, - "index": 17, - "lineNumber": 1, - "message": "'from' expected.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-default-missing-module-specifier.src 1`] = ` -TSError { - "column": 0, - "index": 11, - "lineNumber": 2, - "message": "'=' expected.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-default-module-specifier.src 1`] = ` -TSError { - "column": 15, - "index": 15, - "lineNumber": 1, - "message": "Module specifier must be a string literal.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-missing-module-specifier.src 1`] = ` -TSError { - "column": 0, - "index": 20, - "lineNumber": 2, - "message": "'from' expected.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-module-specifier.src 1`] = ` -TSError { - "column": 17, - "index": 17, - "lineNumber": 1, - "message": "Module specifier must be a string literal.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-named-after-named.src 1`] = ` -TSError { - "column": 12, - "index": 12, - "lineNumber": 1, - "message": "'from' expected.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-named-after-namespace.src 1`] = ` -TSError { - "column": 15, - "index": 15, - "lineNumber": 1, - "message": "'from' expected.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-named-as-missing-from.src 1`] = ` -TSError { - "column": 0, - "index": 24, - "lineNumber": 2, - "message": "'from' expected.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-named-extra-comma.src 1`] = ` -TSError { - "column": 16, - "index": 16, - "lineNumber": 1, - "message": "Identifier expected.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-named-middle-comma.src 1`] = ` -TSError { - "column": 12, - "index": 12, - "lineNumber": 1, - "message": "Identifier expected.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-namespace-after-named.src 1`] = ` -TSError { - "column": 12, - "index": 12, - "lineNumber": 1, - "message": "'from' expected.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/modules/invalid-import-namespace-missing-as.src 1`] = ` -TSError { - "column": 9, - "index": 9, - "lineNumber": 1, - "message": "'as' expected.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/newTarget/invalid-new-target.src 1`] = ` -TSError { - "column": 8, - "index": 8, - "lineNumber": 1, - "message": "Meta-property 'new.target' is only allowed in the body of a function declaration, function expression, or constructor.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/newTarget/invalid-unknown-property.src 1`] = ` -TSError { - "column": 25, - "index": 25, - "lineNumber": 1, - "message": "'unknown_property' is not a valid meta-property for keyword 'new'. Did you mean 'target'?", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/newTarget/simple-new-target.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteral/object-literal-in-lhs.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralComputedProperties/computed-addition-property.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralComputedProperties/computed-and-identifier.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralComputedProperties/computed-getter-and-setter.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralComputedProperties/computed-string-property.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralComputedProperties/computed-variable-property.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralComputedProperties/invalid-computed-variable-property.src 1`] = ` -TSError { - "column": 0, - "index": 20, - "lineNumber": 3, - "message": "':' expected.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralComputedProperties/invalid-standalone-computed-variable-property.src 1`] = ` -TSError { - "column": 5, - "index": 5, - "lineNumber": 1, - "message": "':' expected.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralComputedProperties/standalone-expression.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralComputedProperties/standalone-expression-with-addition.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralComputedProperties/standalone-expression-with-method.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralDuplicateProperties/error-proto-property.src 1`] = ` -TSError { - "column": 1, - "index": 62, - "lineNumber": 7, - "message": "An object literal cannot have multiple properties with the same name.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralDuplicateProperties/error-proto-string-property.src 1`] = ` -TSError { - "column": 1, - "index": 64, - "lineNumber": 7, - "message": "An object literal cannot have multiple properties with the same name.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralDuplicateProperties/strict-duplicate-properties.src 1`] = ` -TSError { - "column": 1, - "index": 39, - "lineNumber": 5, - "message": "An object literal cannot have multiple properties with the same name.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralDuplicateProperties/strict-duplicate-string-properties.src 1`] = ` -TSError { - "column": 1, - "index": 41, - "lineNumber": 5, - "message": "An object literal cannot have multiple properties with the same name.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralShorthandMethods/invalid-method-no-braces.src 1`] = ` -TSError { - "column": 13, - "index": 19, - "lineNumber": 2, - "message": "'{' expected.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralShorthandMethods/method-property.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralShorthandMethods/simple-method.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralShorthandMethods/simple-method-named-get.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralShorthandMethods/simple-method-named-set.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralShorthandMethods/simple-method-with-argument.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralShorthandMethods/simple-method-with-string-name.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralShorthandMethods/string-name-method-property.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/objectLiteralShorthandProperties/shorthand-properties.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/octalLiterals/invalid.src 1`] = ` -TSError { - "column": 4, - "index": 4, - "lineNumber": 1, - "message": "';' expected.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/octalLiterals/legacy.src 1`] = ` -TSError { - "column": 0, - "index": 0, - "lineNumber": 1, - "message": "Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '0o2343'.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/octalLiterals/lowercase.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/octalLiterals/strict-uppercase.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/octalLiterals/uppercase.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/regex/regexp-simple.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/regexUFlag/regex-u-extended-escape.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/regexUFlag/regex-u-invalid-extended-escape.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/regexUFlag/regex-u-simple.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/regexYFlag/regexp-y-simple.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/restParams/basic-rest.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/restParams/class-constructor.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/restParams/class-method.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/restParams/error-no-default.src 1`] = ` -TSError { - "column": 17, - "index": 17, - "lineNumber": 1, - "message": "A rest parameter cannot have an initializer.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/restParams/error-not-last.src 1`] = ` -TSError { - "column": 14, - "index": 14, - "lineNumber": 1, - "message": "A rest parameter must be last in a parameter list.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/restParams/func-expression.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/restParams/func-expression-multi.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/restParams/invalid-rest-param.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/restParams/single-rest.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/simple-literals/literal-float.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/simple-literals/literal-float-negative.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/simple-literals/literal-null.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/simple-literals/literal-number.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/simple-literals/literal-number-negative.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/simple-literals/literal-string.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/simple-literals/literal-undefined.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/spread/complex-spread.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/spread/error-invalid-if.src 1`] = ` -TSError { - "column": 6, - "index": 6, - "lineNumber": 1, - "message": "Expression expected.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/spread/error-invalid-sequence.src 1`] = ` -TSError { - "column": 4, - "index": 4, - "lineNumber": 1, - "message": "Expression expected.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/spread/multi-function-call.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/spread/not-final-param.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/spread/simple-function-call.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/templateStrings/deeply-nested.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/templateStrings/error-octal-literal.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/templateStrings/escape-characters.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/templateStrings/expressions.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/templateStrings/multi-line-template-string.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/templateStrings/simple-template-string.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/templateStrings/single-dollar-sign.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/templateStrings/tagged-no-placeholders.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/templateStrings/tagged-template-string.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/unicodeCodePointEscapes/basic-string-literal.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/unicodeCodePointEscapes/complex-string-literal.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/unicodeCodePointEscapes/ignored.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/unicodeCodePointEscapes/invalid-empty-escape.src 1`] = ` -TSError { - "column": 4, - "index": 4, - "lineNumber": 1, - "message": "Hexadecimal digit expected.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/javascript/unicodeCodePointEscapes/invalid-too-large-escape.src 1`] = ` -TSError { - "column": 10, - "index": 10, - "lineNumber": 1, - "message": "An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/attributes.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/element-keyword-name.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/embedded-comment.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/embedded-conditional.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/embedded-invalid-js-identifier.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/embedded-tags.src 1`] = ` -TSError { - "column": 40, - "index": 40, - "lineNumber": 1, - "message": "Unexpected token. Did you mean \`{'>'}\` or \`>\`?", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/empty-placeholder.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/escape-patterns-ignored.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/escape-patterns-unknown.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/escape-patterns-valid.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/escape-patters-multi.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-attribute.src 1`] = ` -TSError { - "column": 5, - "index": 5, - "lineNumber": 1, - "message": "'{' or JSX element expected.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-attribute-missing-equals.src 1`] = ` -TSError { - "column": 14, - "index": 14, - "lineNumber": 1, - "message": "Identifier expected.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-broken-tag.src 1`] = ` -TSError { - "column": 12, - "index": 12, - "lineNumber": 1, - "message": "Unterminated string literal.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-computed-end-tag-name.src 1`] = ` -TSError { - "column": 2, - "index": 2, - "lineNumber": 1, - "message": "Identifier expected.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-computed-string-end-tag-name.src 1`] = ` -TSError { - "column": 2, - "index": 2, - "lineNumber": 1, - "message": "Identifier expected.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-embedded-expression.src 1`] = ` -TSError { - "column": 9, - "index": 9, - "lineNumber": 1, - "message": "'}' expected.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-leading-dot-tag-name.src 1`] = ` -TSError { - "column": 0, - "index": 0, - "lineNumber": 1, - "message": "Expression expected.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-matching-placeholder-in-closing-tag.src 1`] = ` -TSError { - "column": 27, - "index": 27, - "lineNumber": 1, - "message": "'>' expected.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-mismatched-closing-tag.src 1`] = ` -TSError { - "column": 5, - "index": 5, - "lineNumber": 1, - "message": "Expected corresponding JSX closing tag for 'a'.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-mismatched-closing-tags.src 1`] = ` -TSError { - "column": 1, - "index": 1, - "lineNumber": 1, - "message": "JSX element 'a' has no corresponding closing tag.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-mismatched-dot-tag-name.src 1`] = ` -TSError { - "column": 9, - "index": 9, - "lineNumber": 1, - "message": "Expected corresponding JSX closing tag for 'a.b.c'.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-mismatched-namespace-tag.src 1`] = ` -TSError { - "column": 7, - "index": 7, - "lineNumber": 1, - "message": "Expected corresponding JSX closing tag for 'a:b'.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-missing-closing-tag.src 1`] = ` -TSError { - "column": 1, - "index": 1, - "lineNumber": 1, - "message": "JSX element 'a' has no corresponding closing tag.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-missing-closing-tag-attribute-placeholder.src 1`] = ` -TSError { - "column": 1, - "index": 1, - "lineNumber": 1, - "message": "JSX element 'a' has no corresponding closing tag.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-missing-namespace-name.src 1`] = ` -TSError { - "column": 0, - "index": 0, - "lineNumber": 1, - "message": "Expression expected.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-missing-namespace-value.src 1`] = ` -TSError { - "column": 2, - "index": 2, - "lineNumber": 1, - "message": "Identifier expected.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-missing-spread-operator.src 1`] = ` -TSError { - "column": 6, - "index": 6, - "lineNumber": 1, - "message": "'...' expected.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-namespace-name-with-docts.src 1`] = ` -TSError { - "column": 4, - "index": 4, - "lineNumber": 1, - "message": "Identifier expected.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-namespace-value-with-dots.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-no-common-parent.src 1`] = ` -TSError { - "column": 8, - "index": 8, - "lineNumber": 1, - "message": "JSX expressions must have one parent element.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-no-common-parent-with-comment.src 1`] = ` -TSError { - "column": 8, - "index": 8, - "lineNumber": 1, - "message": "JSX expressions must have one parent element.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-no-tag-name.src 1`] = ` -TSError { - "column": 0, - "index": 0, - "lineNumber": 1, - "message": "Declaration or statement expected.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-placeholder-in-closing-tag.src 1`] = ` -TSError { - "column": 16, - "index": 16, - "lineNumber": 1, - "message": "'>' expected.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-shorthand-fragment-no-closing.src 1`] = ` -TSError { - "column": 0, - "index": 0, - "lineNumber": 1, - "message": "JSX fragment has no corresponding closing tag.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-trailing-dot-tag-name.src 1`] = ` -TSError { - "column": 3, - "index": 3, - "lineNumber": 1, - "message": "Identifier expected.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/invalid-unexpected-comma.src 1`] = ` -TSError { - "column": 19, - "index": 19, - "lineNumber": 1, - "message": "Identifier expected.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/japanese-characters.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/less-than-operator.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/member-expression.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/member-expression-private.src 1`] = ` -TSError { - "column": 10, - "index": 10, - "lineNumber": 1, - "message": "Identifier expected.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/member-expression-this.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/multiple-blank-spaces.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/namespace-this-name.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/namespaced-attribute-and-value-inserted.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/namespaced-name-and-attribute.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/newslines-and-entities.src 1`] = ` -TSError { - "column": 8, - "index": 8, - "lineNumber": 1, - "message": "Invalid character.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/self-closing-tag.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/self-closing-tag-inside-tag.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/self-closing-tag-with-newline.src 1`] = ` -TSError { - "column": 2, - "index": 2, - "lineNumber": 1, - "message": "Invalid character.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/shorthand-fragment.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/shorthand-fragment-with-child.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/spread-child.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/spread-operator-attribute-and-regular-attribute.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/spread-operator-attributes.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/tag-names-with-dots.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/tag-names-with-multi-dots.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/tag-names-with-multi-dots-multi.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/test-content.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx/trailing-spread-operator-attribute.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx-useJSXTextNode/self-closing-tag-inside-tag.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/jsx-useJSXTextNode/test-content.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/tsx/generic-jsx-element.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/tsx/generic-jsx-member-expression-private.src 1`] = ` -TSError { - "column": 22, - "index": 22, - "lineNumber": 1, - "message": "Identifier expected.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/tsx/generic-jsx-opening-element.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/tsx/react-typed-props.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/babylon-convergence/type-parameter-whitespace-loc.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/babylon-convergence/type-parameters.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/abstract-class-with-abstract-constructor.src 1`] = ` -TSError { - "column": 4, - "index": 43, - "lineNumber": 2, - "message": "'abstract' modifier can only appear on a class, method, or property declaration.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/abstract-class-with-abstract-method.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/abstract-class-with-abstract-properties.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/abstract-class-with-abstract-readonly-property.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/abstract-class-with-abstract-static-constructor.src 1`] = ` -TSError { - "column": 2, - "index": 41, - "lineNumber": 2, - "message": "'abstract' modifier can only appear on a class, method, or property declaration.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/abstract-class-with-declare-properties.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/abstract-class-with-optional-method.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/abstract-class-with-override-method.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/abstract-class-with-override-property.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/abstract-interface.src 1`] = ` -TSError { - "column": 7, - "index": 7, - "lineNumber": 1, - "message": "'abstract' modifier can only appear on a class, method, or property declaration.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/angle-bracket-type-assertion.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/angle-bracket-type-assertion-arrow-function.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/arrow-function-with-optional-parameter.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/arrow-function-with-type-parameters.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/async-function-expression.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/async-function-with-var-declaration.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/await-without-async-function.src 1`] = ` -TSError { - "column": 14, - "index": 31, - "lineNumber": 2, - "message": "'await' expressions are only allowed within async functions and at the top levels of modules.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/call-signatures.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/call-signatures-with-generics.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/cast-as-expression.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/cast-as-multi.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/cast-as-multi-assign.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/cast-as-operator.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/cast-as-simple.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/catch-clause-with-annotation.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/catch-clause-with-invalid-annotation.src 1`] = ` -TSError { - "column": 12, - "index": 19, - "lineNumber": 3, - "message": "Catch clause variable type annotation must be 'any' or 'unknown' if specified.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-multi-line-keyword-abstract.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-multi-line-keyword-declare.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-private-identifier-field-with-accessibility-error.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-private-identifier-field-with-annotation.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-private-identifier-readonly-field.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-static-blocks.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-accessibility-modifiers.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-constructor-and-modifier.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-constructor-and-parameter-property-with-modifiers.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-constructor-and-parameter-proptery-with-override-modifier.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-constructor-and-return-type.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-constructor-and-type-parameters.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-declare-properties.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-definite-assignment.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-export-parameter-properties.src 1`] = ` -TSError { - "column": 16, - "index": 28, - "lineNumber": 2, - "message": "'export' modifier cannot appear on a parameter.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-extends-and-implements.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-extends-generic.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-extends-generic-multiple.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-generic-method.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-generic-method-default.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-implements.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-implements-and-extends.src 1`] = ` -TSError { - "column": 57, - "index": 57, - "lineNumber": 1, - "message": "'extends' clause must precede 'implements' clause.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-implements-generic.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-implements-generic-multiple.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-method.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-mixin.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-mixin-reference.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-optional-computed-method.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-optional-computed-property.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-optional-methods.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-optional-properties.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-optional-property-undefined.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-override-method.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-override-property.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-private-optional-property.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-private-parameter-properties.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-property-function.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-property-values.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-protected-parameter-properties.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-public-parameter-properties.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-readonly-parameter-properties.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-readonly-property.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-static-parameter-properties.src 1`] = ` -TSError { - "column": 16, - "index": 28, - "lineNumber": 2, - "message": "'static' modifier cannot appear on a parameter.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-two-methods-computed-constructor.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-type-parameter.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-type-parameter-default.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/class-with-type-parameter-underscore.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/const-assertions.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/const-enum.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/declare-class-with-optional-method.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/declare-function.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/destructuring-assignment.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/destructuring-assignment-nested.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/destructuring-assignment-object.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/destructuring-assignment-property.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/directive-in-module.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/directive-in-namespace.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/dynamic-import-with-import-assertions.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/export-all-with-import-assertions.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/export-as-namespace.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/export-assignment.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/export-declare-const-named-enum.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/export-declare-named-enum.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/export-default-class-with-generic.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/export-default-class-with-multiple-generics.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/export-default-interface.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/export-named-class-with-generic.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/export-named-class-with-multiple-generics.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/export-named-enum.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/export-named-enum-computed-number.src 1`] = ` -TSError { - "column": 4, - "index": 22, - "lineNumber": 2, - "message": "An enum member cannot have a numeric name.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/export-named-enum-computed-string.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/export-named-enum-computed-var-ref.src 1`] = ` -TSError { - "column": 4, - "index": 22, - "lineNumber": 2, - "message": "Computed property names are not allowed in enums.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/export-star-as-ns-from.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/export-type.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/export-type-as.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/export-type-from.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/export-type-from-as.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/export-type-star-from.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/export-with-import-assertions.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/function-anonymus-with-type-parameters.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/function-anynomus-with-return-type.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/function-overloads.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/function-with-await.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/function-with-object-type-with-optional-properties.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/function-with-object-type-without-annotation.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/function-with-type-parameters.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/function-with-type-parameters-that-have-comments.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/function-with-type-parameters-with-constraint.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/function-with-types.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/function-with-types-assignation.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/global-this.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/import-equal-declaration.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/import-equal-type-declaration.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/import-export-equal-declaration.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/import-export-equal-type-declaration.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/import-type-default.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/import-type-empty.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/import-type-error.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/import-type-named.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/import-type-named-as.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/import-type-star-as-ns.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/import-with-import-assertions.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/interface-extends.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/interface-extends-multiple.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/interface-type-parameters.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/interface-with-all-property-types.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/interface-with-construct-signature-with-parameter-accessibility.src 1`] = ` -TSError { - "column": 9, - "index": 26, - "lineNumber": 2, - "message": "A parameter property is only allowed in a constructor implementation.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/interface-with-extends-member-expression.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/interface-with-extends-type-parameters.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/interface-with-generic.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/interface-with-jsdoc.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/interface-with-method.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/interface-with-optional-properties.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/interface-without-type-annotation.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/intrinsic-keyword.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/keyof-operator.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/keyword-variables.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/nested-type-arguments.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/never-type-param.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/new-target-in-arrow-function-body.src 1`] = ` -TSError { - "column": 16, - "index": 16, - "lineNumber": 1, - "message": "Meta-property 'new.target' is only allowed in the body of a function declaration, function expression, or constructor.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/non-null-assertion-operator.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/null-and-undefined-type-annotations.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/nullish-coalescing.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/object-with-escaped-properties.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/object-with-typed-methods.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/optional-chain.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/optional-chain-call.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/optional-chain-call-with-non-null-assertion.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/optional-chain-call-with-parens.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/optional-chain-element-access.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/optional-chain-element-access-with-non-null-assertion.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/optional-chain-element-access-with-parens.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/optional-chain-with-non-null-assertion.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/optional-chain-with-parens.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/parenthesized-use-strict.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/private-fields-in-in.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/readonly-arrays.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/readonly-tuples.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/short-circuiting-assignment-and-and.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/short-circuiting-assignment-or-or.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/short-circuiting-assignment-question-question.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/symbol-type-param.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/type-alias-declaration.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/type-alias-declaration-export.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/type-alias-declaration-export-function-type.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/type-alias-declaration-export-object-type.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/type-alias-declaration-with-constrained-type-parameter.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/type-alias-object-without-annotation.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/type-assertion-in-arrow-function.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/type-assertion-in-function.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/type-assertion-in-interface.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/type-assertion-in-method.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/type-assertion-with-guard-in-arrow-function.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/type-assertion-with-guard-in-function.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/type-assertion-with-guard-in-interface.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/type-assertion-with-guard-in-method.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/type-guard-in-arrow-function.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/type-guard-in-function.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/type-guard-in-interface.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/type-guard-in-method.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/type-import-type.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/type-import-type-with-type-parameters-in-type-reference.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/type-only-export-specifiers.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/type-only-import-specifiers.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/type-parameters-comments.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/type-parameters-comments-heritage.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/type-reference-comments.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-bigint.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-boolean.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-false.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-never.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-null.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-number.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-object.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-string.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-symbol.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-true.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-undefined.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-unknown.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-keyword-void.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-method-signature.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/typed-this.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/union-intersection.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/unique-symbol.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/unknown-type-annotation.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/var-with-definite-assignment.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/var-with-dotted-type.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/var-with-type.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/basics/variable-declaration-type-annotation-spacing.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/declare/abstract-class.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/declare/class.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/declare/enum.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/declare/function.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/declare/interface.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/declare/module.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/declare/namespace.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/declare/type-alias.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/declare/variable.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/accessor-decorators/accessor-decorator-factory-instance-member.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/accessor-decorators/accessor-decorator-factory-static-member.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/accessor-decorators/accessor-decorator-instance-member.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/accessor-decorators/accessor-decorator-static-member.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/class-decorators/class-decorator.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/class-decorators/class-decorator-factory.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/class-decorators/class-parameter-property.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/class-decorators/export-default-class-decorator.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/class-decorators/export-named-class-decorator.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/method-decorators/method-decorator-factory-instance-member.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/method-decorators/method-decorator-factory-static-member.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/method-decorators/method-decorator-instance-member.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/method-decorators/method-decorator-static-member.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/parameter-decorators/parameter-array-pattern-decorator.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/parameter-decorators/parameter-decorator-constructor.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/parameter-decorators/parameter-decorator-decorator-instance-member.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/parameter-decorators/parameter-decorator-decorator-static-member.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/parameter-decorators/parameter-decorator-instance-member.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/parameter-decorators/parameter-decorator-static-member.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/parameter-decorators/parameter-object-pattern-decorator.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/parameter-decorators/parameter-rest-element-decorator.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/property-decorators/property-decorator-factory-instance-member.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/property-decorators/property-decorator-factory-static-member.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/property-decorators/property-decorator-instance-member.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/decorators/property-decorators/property-decorator-static-member.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/class-empty-extends.src 1`] = ` -TSError { - "column": 17, - "index": 17, - "lineNumber": 1, - "message": "'extends' list cannot be empty.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/class-empty-extends-implements.src 1`] = ` -TSError { - "column": 17, - "index": 17, - "lineNumber": 1, - "message": "'extends' list cannot be empty.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/class-extends-empty-implements.src 1`] = ` -TSError { - "column": 32, - "index": 32, - "lineNumber": 1, - "message": "'implements' list cannot be empty.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/class-multiple-implements.src 1`] = ` -TSError { - "column": 21, - "index": 21, - "lineNumber": 1, - "message": "'implements' clause already seen.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/decorator-on-enum-declaration.src 1`] = ` -TSError { - "column": 0, - "index": 0, - "lineNumber": 1, - "message": "Decorators are not valid here.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/decorator-on-function.src 1`] = ` -TSError { - "column": 0, - "index": 0, - "lineNumber": 1, - "message": "Decorators are not valid here.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/decorator-on-interface-declaration.src 1`] = ` -TSError { - "column": 0, - "index": 0, - "lineNumber": 1, - "message": "Decorators are not valid here.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/decorator-on-variable.src 1`] = ` -TSError { - "column": 0, - "index": 0, - "lineNumber": 1, - "message": "Decorators are not valid here.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/empty-type-arguments.src 1`] = ` -TSError { - "column": 14, - "index": 14, - "lineNumber": 1, - "message": "Type argument list cannot be empty.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/empty-type-arguments-in-call-expression.src 1`] = ` -TSError { - "column": 3, - "index": 3, - "lineNumber": 1, - "message": "Type argument list cannot be empty.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/empty-type-arguments-in-new-expression.src 1`] = ` -TSError { - "column": 7, - "index": 7, - "lineNumber": 1, - "message": "Type argument list cannot be empty.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/empty-type-parameters.src 1`] = ` -TSError { - "column": 11, - "index": 11, - "lineNumber": 1, - "message": "Type parameter list cannot be empty.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/empty-type-parameters-in-arrow-function.src 1`] = ` -TSError { - "column": 11, - "index": 11, - "lineNumber": 1, - "message": "Type parameter list cannot be empty.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/empty-type-parameters-in-constructor.src 1`] = ` -TSError { - "column": 13, - "index": 25, - "lineNumber": 2, - "message": "Type parameter list cannot be empty.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/empty-type-parameters-in-function-expression.src 1`] = ` -TSError { - "column": 20, - "index": 20, - "lineNumber": 1, - "message": "Type parameter list cannot be empty.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/empty-type-parameters-in-method.src 1`] = ` -TSError { - "column": 6, - "index": 18, - "lineNumber": 2, - "message": "Type parameter list cannot be empty.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/empty-type-parameters-in-method-signature.src 1`] = ` -TSError { - "column": 6, - "index": 22, - "lineNumber": 2, - "message": "Type parameter list cannot be empty.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/enum-with-keywords.src 1`] = ` -TSError { - "column": 7, - "index": 7, - "lineNumber": 1, - "message": "'private' modifier cannot appear on a module or namespace element.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/index-signature-parameters.src 1`] = ` -TSError { - "column": 3, - "index": 16, - "lineNumber": 2, - "message": "An index signature must have exactly one parameter.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-empty-extends.src 1`] = ` -TSError { - "column": 21, - "index": 21, - "lineNumber": 1, - "message": "'extends' list cannot be empty.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-implements.src 1`] = ` -TSError { - "column": 12, - "index": 12, - "lineNumber": 1, - "message": "Interface declaration cannot have 'implements' clause.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-index-signature-export.src 1`] = ` -TSError { - "column": 2, - "index": 18, - "lineNumber": 2, - "message": "'export' modifier cannot appear on an index signature.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-index-signature-private.src 1`] = ` -TSError { - "column": 2, - "index": 18, - "lineNumber": 2, - "message": "'private' modifier cannot appear on an index signature.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-index-signature-protected.src 1`] = ` -TSError { - "column": 2, - "index": 18, - "lineNumber": 2, - "message": "'protected' modifier cannot appear on an index signature.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-index-signature-public.src 1`] = ` -TSError { - "column": 2, - "index": 18, - "lineNumber": 2, - "message": "'public' modifier cannot appear on an index signature.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-index-signature-static.src 1`] = ` -TSError { - "column": 2, - "index": 18, - "lineNumber": 2, - "message": "'static' modifier cannot appear on an index signature.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-method-export.src 1`] = ` -TSError { - "column": 4, - "index": 20, - "lineNumber": 2, - "message": "'export' modifier cannot appear on a type member.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-method-private.src 1`] = ` -TSError { - "column": 4, - "index": 20, - "lineNumber": 2, - "message": "'private' modifier cannot appear on a type member.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-method-protected.src 1`] = ` -TSError { - "column": 2, - "index": 18, - "lineNumber": 2, - "message": "'protected' modifier cannot appear on a type member.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-method-public.src 1`] = ` -TSError { - "column": 4, - "index": 20, - "lineNumber": 2, - "message": "'public' modifier cannot appear on a type member.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-method-readonly.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-method-static.src 1`] = ` -TSError { - "column": 2, - "index": 18, - "lineNumber": 2, - "message": "'static' modifier cannot appear on a type member.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-multiple-extends.src 1`] = ` -TSError { - "column": 26, - "index": 26, - "lineNumber": 1, - "message": "'extends' clause already seen.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-property-export.src 1`] = ` -TSError { - "column": 2, - "index": 18, - "lineNumber": 2, - "message": "'export' modifier cannot appear on a type member.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-property-private.src 1`] = ` -TSError { - "column": 2, - "index": 18, - "lineNumber": 2, - "message": "'private' modifier cannot appear on a type member.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-property-protected.src 1`] = ` -TSError { - "column": 2, - "index": 18, - "lineNumber": 2, - "message": "'protected' modifier cannot appear on a type member.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-property-public.src 1`] = ` -TSError { - "column": 4, - "index": 20, - "lineNumber": 2, - "message": "'public' modifier cannot appear on a type member.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-property-static.src 1`] = ` -TSError { - "column": 2, - "index": 18, - "lineNumber": 2, - "message": "'static' modifier cannot appear on a type member.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-property-with-default-value.src 1`] = ` -TSError { - "column": 16, - "index": 32, - "lineNumber": 2, - "message": "An interface property cannot have an initializer.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-with-no-body.src 1`] = ` -TSError { - "column": 0, - "index": 14, - "lineNumber": 2, - "message": "'{' expected.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/interface-with-optional-index-signature.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/object-assertion-not-allowed.src 1`] = ` -TSError { - "column": 3, - "index": 3, - "lineNumber": 1, - "message": "A definite assignment assertion '!' is not permitted in this context.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/object-optional-not-allowed.src 1`] = ` -TSError { - "column": 3, - "index": 3, - "lineNumber": 1, - "message": "An object member cannot be declared optional.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/errorRecovery/solo-const.src 1`] = ` -TSError { - "column": 5, - "index": 5, - "lineNumber": 1, - "message": "Variable declaration list cannot be empty.", -} -`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/expressions/call-expression-type-arguments.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/expressions/instantiation-expression.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/expressions/new-expression-type-arguments.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/expressions/optional-call-expression-type-arguments.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/expressions/tagged-template-expression-type-arguments.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/namespaces-and-modules/ambient-module-declaration-with-import.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/namespaces-and-modules/declare-namespace-with-exported-function.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/namespaces-and-modules/global-module-declaration.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/namespaces-and-modules/module-with-default-exports.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/namespaces-and-modules/nested-internal-module.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/namespaces-and-modules/shorthand-ambient-module-declaration.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/array-type.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/conditional.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/conditional-infer.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/conditional-infer-nested.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/conditional-infer-simple.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/conditional-infer-with-constraint.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/conditional-with-null.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/constructor.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/constructor-abstract.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/constructor-empty.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/constructor-generic.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/constructor-in-generic.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/constructor-with-rest.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/function.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/function-generic.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/function-in-generic.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/function-with-array-destruction.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/function-with-object-destruction.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/function-with-rest.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/function-with-this.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/index-signature.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/index-signature-readonly.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/index-signature-without-type.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/indexed.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/interface-with-accessors.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/intersection-type.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/literal-number.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/literal-number-negative.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/literal-string.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/mapped.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/mapped-named-type.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/mapped-readonly.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/mapped-readonly-minus.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/mapped-readonly-plus.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/mapped-untypped.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/nested-types.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/object-literal-type-with-accessors.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/optional-variance-in.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/optional-variance-in-and-out.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/optional-variance-in-out.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/optional-variance-out.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/parenthesized-type.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/reference.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/reference-generic.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/reference-generic-nested.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/template-literal-type-1.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/template-literal-type-2.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/template-literal-type-3.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/template-literal-type-4.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/this-type.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/this-type-expanded.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/tuple.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/tuple-empty.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/tuple-named.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/tuple-named-optional.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/tuple-named-rest.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/tuple-named-type.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/tuple-optional.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/tuple-rest.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/tuple-type.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/type-literal.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/type-operator.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/typeof.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/typeof-this.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/typeof-with-type-parameters.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/union-intersection.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; - -exports[`Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled fixtures/typescript/types/union-type.src 1`] = `"TEST OUTPUT: No semantic or syntactic issues found"`; diff --git a/packages/typescript-estree/tests/lib/parse.moduleResolver.default-program-error.test.ts b/packages/typescript-estree/tests/lib/parse.moduleResolver.default-program-error.test.ts new file mode 100644 index 00000000000..628897b6606 --- /dev/null +++ b/packages/typescript-estree/tests/lib/parse.moduleResolver.default-program-error.test.ts @@ -0,0 +1,32 @@ +import * as parser from '../../src'; +import type { TSESTreeOptions } from '../../src/parser-options'; +import { createAndPrepareParseConfig } from '../../tools/test-utils'; + +beforeEach(() => { + jest.clearAllMocks(); +}); + +describe('parseAndGenerateServices', () => { + describe('moduleResolver', () => { + const { code, config } = createAndPrepareParseConfig(); + + const withDefaultProgramConfig: TSESTreeOptions = { + ...config, + project: './tsconfig.defaultProgram.json', + DEPRECATED__createDefaultProgram: true, + }; + + describe('when file is not in the project and createDefaultProgram=true', () => { + it('returns error because __PLACEHOLDER__ can not be resolved', () => { + expect( + parser + .parseAndGenerateServices(code, withDefaultProgramConfig) + .services.program!.getSemanticDiagnostics(), + ).toHaveProperty( + [0, 'messageText'], + "Cannot find module '__PLACEHOLDER__' or its corresponding type declarations.", + ); + }); + }); + }); +}); diff --git a/packages/typescript-estree/tests/lib/parse.moduleResolver.default-program-success.test.ts b/packages/typescript-estree/tests/lib/parse.moduleResolver.default-program-success.test.ts new file mode 100644 index 00000000000..341170a2442 --- /dev/null +++ b/packages/typescript-estree/tests/lib/parse.moduleResolver.default-program-success.test.ts @@ -0,0 +1,34 @@ +import { resolve } from 'path'; + +import * as parser from '../../src'; +import type { TSESTreeOptions } from '../../src/parser-options'; +import { createAndPrepareParseConfig } from '../../tools/test-utils'; + +beforeEach(() => { + jest.clearAllMocks(); +}); + +describe('parseAndGenerateServices', () => { + describe('moduleResolver', () => { + const { code, config, projectDirectory } = createAndPrepareParseConfig(); + + const withDefaultProgramConfig: TSESTreeOptions = { + ...config, + project: './tsconfig.defaultProgram.json', + DEPRECATED__createDefaultProgram: true, + }; + + describe('when file is not in the project and createDefaultProgram=true', () => { + it('resolves __PLACEHOLDER__ correctly', () => { + expect( + parser + .parseAndGenerateServices(code, { + ...withDefaultProgramConfig, + moduleResolver: resolve(projectDirectory, './moduleResolver.js'), + }) + .services.program!.getSemanticDiagnostics(), + ).toHaveLength(0); + }); + }); + }); +}); diff --git a/packages/typescript-estree/tests/lib/parse.moduleResolver.placeholder-error.test.ts b/packages/typescript-estree/tests/lib/parse.moduleResolver.placeholder-error.test.ts new file mode 100644 index 00000000000..8b9bc0959ad --- /dev/null +++ b/packages/typescript-estree/tests/lib/parse.moduleResolver.placeholder-error.test.ts @@ -0,0 +1,42 @@ +import { resolve } from 'path'; + +import * as parser from '../../src'; +import { createAndPrepareParseConfig } from '../../tools/test-utils'; + +beforeEach(() => { + jest.clearAllMocks(); +}); + +describe('parseAndGenerateServices', () => { + describe('moduleResolver', () => { + const { code, config, projectDirectory } = createAndPrepareParseConfig(); + + describe('when file is in the project', () => { + it('returns error if __PLACEHOLDER__ can not be resolved', () => { + expect( + parser + .parseAndGenerateServices(code, config) + .services.program!.getSemanticDiagnostics(), + ).toHaveProperty( + [0, 'messageText'], + "Cannot find module '__PLACEHOLDER__' or its corresponding type declarations.", + ); + }); + + it('throws error if moduleResolver can not be found', () => { + expect(() => + parser.parseAndGenerateServices(code, { + ...config, + moduleResolver: resolve( + projectDirectory, + './this_moduleResolver_does_not_exist.js', + ), + }), + ).toThrowErrorMatchingInlineSnapshot(` + "Could not find the provided parserOptions.moduleResolver. + Hint: use an absolute path if you are not in control over where the ESLint instance runs." + `); + }); + }); + }); +}); diff --git a/packages/typescript-estree/tests/lib/parse.moduleResolver.placeholder-success.test.ts b/packages/typescript-estree/tests/lib/parse.moduleResolver.placeholder-success.test.ts new file mode 100644 index 00000000000..633e2ed67b0 --- /dev/null +++ b/packages/typescript-estree/tests/lib/parse.moduleResolver.placeholder-success.test.ts @@ -0,0 +1,27 @@ +import { resolve } from 'path'; + +import * as parser from '../../src'; +import { createAndPrepareParseConfig } from '../../tools/test-utils'; + +beforeEach(() => { + jest.clearAllMocks(); +}); + +describe('parseAndGenerateServices', () => { + describe('moduleResolver', () => { + const { code, config, projectDirectory } = createAndPrepareParseConfig(); + + describe('when file is in the project', () => { + it('resolves __PLACEHOLDER__ correctly', () => { + expect( + parser + .parseAndGenerateServices(code, { + ...config, + moduleResolver: resolve(projectDirectory, './moduleResolver.js'), + }) + .services.program!.getSemanticDiagnostics(), + ).toHaveLength(0); + }); + }); + }); +}); diff --git a/packages/typescript-estree/tests/lib/parse.test.ts b/packages/typescript-estree/tests/lib/parse.test.ts index afa44a8c5f8..412d96de8c9 100644 --- a/packages/typescript-estree/tests/lib/parse.test.ts +++ b/packages/typescript-estree/tests/lib/parse.test.ts @@ -6,6 +6,7 @@ import * as astConverterModule from '../../src/ast-converter'; import * as sharedParserUtilsModule from '../../src/create-program/shared'; import type { TSESTreeOptions } from '../../src/parser-options'; import { createSnapshotTestBlock } from '../../tools/test-utils'; +import { expectToHaveParserServices } from './test-utils/expectToHaveParserServices'; const FIXTURES_DIR = join(__dirname, '../fixtures/simpleProject'); @@ -196,39 +197,6 @@ describe('parseWithNodeMaps()', () => { }); describe('parseAndGenerateServices', () => { - describe('errorOnTypeScriptSyntacticAndSemanticIssues', () => { - const code = '@test const foo = 2'; - const options: TSESTreeOptions = { - comment: true, - tokens: true, - range: true, - loc: true, - errorOnTypeScriptSyntacticAndSemanticIssues: true, - }; - - it('should throw on invalid option when used in parseWithNodeMaps', () => { - expect(() => { - parser.parseWithNodeMaps(code, options); - }).toThrow( - `"errorOnTypeScriptSyntacticAndSemanticIssues" is only supported for parseAndGenerateServices()`, - ); - }); - - it('should not throw when used in parseAndGenerateServices', () => { - expect(() => { - parser.parseAndGenerateServices(code, options); - }).not.toThrow( - `"errorOnTypeScriptSyntacticAndSemanticIssues" is only supported for parseAndGenerateServices()`, - ); - }); - - it('should error on invalid code', () => { - expect(() => { - parser.parseAndGenerateServices(code, options); - }).toThrow('Decorators are not valid here.'); - }); - }); - describe('preserveNodeMaps', () => { const code = 'var a = true'; const baseConfig: TSESTreeOptions = { @@ -321,18 +289,11 @@ describe('parseAndGenerateServices', () => { preserveNodeMaps: setting, }); - expect(parseResult.services.esTreeNodeToTSNodeMap).toBeDefined(); - expect(parseResult.services.tsNodeToESTreeNodeMap).toBeDefined(); expect( - parseResult.services.esTreeNodeToTSNodeMap.has( + parseResult.services.esTreeNodeToTSNodeMap?.has( parseResult.ast.body[0], ), ).toBe(setting); - expect( - parseResult.services.tsNodeToESTreeNodeMap.has( - parseResult.services.program.getSourceFile('estree.ts'), - ), - ).toBe(setting); }); it('with project', () => { @@ -341,20 +302,11 @@ describe('parseAndGenerateServices', () => { preserveNodeMaps: setting, }); - expect(parseResult.services.esTreeNodeToTSNodeMap).toBeDefined(); - expect(parseResult.services.tsNodeToESTreeNodeMap).toBeDefined(); expect( parseResult.services.esTreeNodeToTSNodeMap.has( parseResult.ast.body[0], ), ).toBe(setting); - expect( - parseResult.services.tsNodeToESTreeNodeMap.has( - parseResult.services.program.getSourceFile( - join(FIXTURES_DIR, 'file.ts'), - ), - ), - ).toBe(setting); }); } @@ -397,6 +349,7 @@ describe('parseAndGenerateServices', () => { let result: | parser.ParseAndGenerateServicesResult | undefined; + // eslint-disable-next-line jest/valid-expect const exp = expect(() => { result = parser.parseAndGenerateServices(code, { ...config, @@ -411,14 +364,16 @@ describe('parseAndGenerateServices', () => { } if (!shouldThrow) { - expect(result?.services.program).toBeDefined(); expect(result?.ast).toBeDefined(); expect({ ...result, services: { ...result?.services, - // Reduce noise in snapshot - program: {}, + // Reduce noise in snapshot by not printing the TS program + program: + result?.services.program == null + ? 'No Program' + : 'With Program', }, }).toMatchSnapshot(); } @@ -700,9 +655,14 @@ describe('parseAndGenerateServices', () => { }); it('should turn on typescript debugger', () => { - parser.parseAndGenerateServices('const x = 1;', { - debugLevel: ['typescript'], - }); + expect(() => + parser.parseAndGenerateServices('const x = 1;', { + debugLevel: ['typescript'], + filePath: './path-that-doesnt-exist.ts', + project: ['./tsconfig-that-doesnt-exist.json'], + }), + ) // should throw because the file and tsconfig don't exist + .toThrow(); expect(createDefaultCompilerOptionsFromExtra).toHaveBeenCalled(); expect(createDefaultCompilerOptionsFromExtra).toHaveReturnedWith( expect.objectContaining({ @@ -752,94 +712,4 @@ describe('parseAndGenerateServices', () => { expect(testParse('includeme', ignore)).not.toThrow(); }); }); - - describe('moduleResolver', () => { - beforeEach(() => { - parser.clearCaches(); - }); - - const PROJECT_DIR = resolve(FIXTURES_DIR, '../moduleResolver'); - const code = ` - import { something } from '__PLACEHOLDER__'; - - something(); - `; - const config: TSESTreeOptions = { - comment: true, - tokens: true, - range: true, - loc: true, - project: './tsconfig.json', - tsconfigRootDir: PROJECT_DIR, - filePath: resolve(PROJECT_DIR, 'file.ts'), - }; - const withDeprecatedDefaultProgramConfig: TSESTreeOptions = { - ...config, - project: './tsconfig.defaultProgram.json', - DEPRECATED__createDefaultProgram: true, - }; - - describe('when file is in the project', () => { - it('returns error if __PLACEHOLDER__ can not be resolved', () => { - expect( - parser - .parseAndGenerateServices(code, config) - .services.program.getSemanticDiagnostics(), - ).toHaveProperty( - [0, 'messageText'], - "Cannot find module '__PLACEHOLDER__' or its corresponding type declarations.", - ); - }); - - it('throws error if moduleResolver can not be found', () => { - expect(() => - parser.parseAndGenerateServices(code, { - ...config, - moduleResolver: resolve( - PROJECT_DIR, - './this_moduleResolver_does_not_exist.js', - ), - }), - ).toThrowErrorMatchingInlineSnapshot(` - "Could not find the provided parserOptions.moduleResolver. - Hint: use an absolute path if you are not in control over where the ESLint instance runs." - `); - }); - - it('resolves __PLACEHOLDER__ correctly', () => { - expect( - parser - .parseAndGenerateServices(code, { - ...config, - moduleResolver: resolve(PROJECT_DIR, './moduleResolver.js'), - }) - .services.program.getSemanticDiagnostics(), - ).toHaveLength(0); - }); - }); - - describe('when file is not in the project and DEPRECATED__createDefaultProgram=true', () => { - it('returns error because __PLACEHOLDER__ can not be resolved', () => { - expect( - parser - .parseAndGenerateServices(code, withDeprecatedDefaultProgramConfig) - .services.program.getSemanticDiagnostics(), - ).toHaveProperty( - [0, 'messageText'], - "Cannot find module '__PLACEHOLDER__' or its corresponding type declarations.", - ); - }); - - it('resolves __PLACEHOLDER__ correctly', () => { - expect( - parser - .parseAndGenerateServices(code, { - ...withDeprecatedDefaultProgramConfig, - moduleResolver: resolve(PROJECT_DIR, './moduleResolver.js'), - }) - .services.program.getSemanticDiagnostics(), - ).toHaveLength(0); - }); - }); - }); }); diff --git a/packages/typescript-estree/tests/lib/semantic-diagnostics-enabled.test.ts b/packages/typescript-estree/tests/lib/semantic-diagnostics-enabled.test.ts deleted file mode 100644 index a512e56f93c..00000000000 --- a/packages/typescript-estree/tests/lib/semantic-diagnostics-enabled.test.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { readFileSync } from 'fs'; -import glob from 'glob'; -import path from 'path'; - -import * as parser from '../../src'; -import { formatSnapshotName, isJSXFileType } from '../../tools/test-utils'; -import { serializer } from '../../tools/tserror-serializer'; - -/** - * Process all fixtures, we will only snapshot the ones that have semantic errors - * which are ignored by default parsing logic. - */ -const FIXTURES_DIR = path.join(__dirname, '../../../shared-fixtures/fixtures'); - -const testFiles = glob.sync('**/*.src.*', { - cwd: FIXTURES_DIR, -}); - -expect.addSnapshotSerializer(serializer); - -describe('Parse all fixtures with "errorOnTypeScriptSyntacticAndSemanticIssues" enabled', () => { - testFiles.forEach(filename => { - const code = readFileSync(path.join(FIXTURES_DIR, filename), 'utf8'); - const fileExtension = path.extname(filename); - const config: parser.TSESTreeOptions = { - loc: true, - range: true, - tokens: true, - errorOnUnknownASTType: true, - errorOnTypeScriptSyntacticAndSemanticIssues: true, - jsx: isJSXFileType(fileExtension), - }; - it(formatSnapshotName(filename, FIXTURES_DIR, fileExtension), () => { - expect.assertions(1); - try { - parser.parseAndGenerateServices(code, config); - expect( - 'TEST OUTPUT: No semantic or syntactic issues found', - ).toMatchSnapshot(); - } catch (err) { - expect(err).toMatchSnapshot(); - } - }); - }); -}); diff --git a/packages/typescript-estree/tests/lib/semanticInfo.test.ts b/packages/typescript-estree/tests/lib/semanticInfo.test.ts index ba56471f441..76d7767fcb8 100644 --- a/packages/typescript-estree/tests/lib/semanticInfo.test.ts +++ b/packages/typescript-estree/tests/lib/semanticInfo.test.ts @@ -14,6 +14,7 @@ import { formatSnapshotName, parseCodeAndGenerateServices, } from '../../tools/test-utils'; +import { expectToHaveParserServices } from './test-utils/expectToHaveParserServices'; const FIXTURES_DIR = './tests/fixtures/semanticInfo'; const testFiles = glob.sync(`**/*.src.ts`, { @@ -104,9 +105,9 @@ describe('semanticInfo', () => { code, optionsRelativePath, ); - if (absolutePathResult.services.program === undefined) { + if (absolutePathResult.services.program == null) { throw new Error('Unable to create ts.program for absolute tsconfig'); - } else if (relativePathResult.services.program === undefined) { + } else if (relativePathResult.services.program == null) { throw new Error('Unable to create ts.program for relative tsconfig'); } expect( @@ -150,12 +151,13 @@ describe('semanticInfo', () => { createOptions(fileName), ); - expect(parseResult).toHaveProperty('services.esTreeNodeToTSNodeMap'); + expectToHaveParserServices(parseResult.services); const binaryExpression = ( parseResult.ast.body[0] as TSESTree.VariableDeclaration ).declarations[0].init!; const tsBinaryExpression = parseResult.services.esTreeNodeToTSNodeMap.get(binaryExpression); + expectToBeDefined(tsBinaryExpression); expect(tsBinaryExpression.kind).toEqual(ts.SyntaxKind.BinaryExpression); const computedPropertyString = ( @@ -164,6 +166,7 @@ describe('semanticInfo', () => { ).key; const tsComputedPropertyString = parseResult.services.esTreeNodeToTSNodeMap.get(computedPropertyString); + expectToBeDefined(tsComputedPropertyString); expect(tsComputedPropertyString.kind).toEqual(ts.SyntaxKind.StringLiteral); }); @@ -176,7 +179,8 @@ describe('semanticInfo', () => { // get type checker expect(parseResult).toHaveProperty('services.program.getTypeChecker'); - const checker = parseResult.services.program.getTypeChecker(); + const checker = parseResult.services.program?.getTypeChecker(); + expectToBeDefined(checker); // get array node (ast shape validated by snapshot) // node is defined in other file than the parsed one @@ -188,10 +192,10 @@ describe('semanticInfo', () => { ).object as TSESTree.Identifier; expect(arrayBoundName.name).toBe('arr'); - expect(parseResult).toHaveProperty('services.esTreeNodeToTSNodeMap'); + expectToHaveParserServices(parseResult.services); const tsArrayBoundName = parseResult.services.esTreeNodeToTSNodeMap.get(arrayBoundName); - expect(tsArrayBoundName).toBeDefined(); + expectToBeDefined(tsArrayBoundName); checkNumberArrayType(checker, tsArrayBoundName); expect( @@ -209,18 +213,17 @@ describe('semanticInfo', () => { }, ); - expect(parseResult.services.program).toBeDefined(); - // get bound name const boundName = (parseResult.ast.body[0] as TSESTree.VariableDeclaration) .declarations[0].id as TSESTree.Identifier; expect(boundName.name).toBe('x'); const tsBoundName = - parseResult.services.esTreeNodeToTSNodeMap.get(boundName); + parseResult.services.esTreeNodeToTSNodeMap?.get(boundName); + expectToBeDefined(tsBoundName); expect(tsBoundName).toBeDefined(); - expect(parseResult.services.tsNodeToESTreeNodeMap.get(tsBoundName)).toBe( + expect(parseResult.services.tsNodeToESTreeNodeMap?.get(tsBoundName)).toBe( boundName, ); }); @@ -290,7 +293,7 @@ describe('semanticInfo', () => { DEPRECATED__createDefaultProgram: true, }); - expect(parseResult.services.program).toBeDefined(); + expectToHaveParserServices(parseResult.services); }); it('empty programs array should throw', () => { @@ -358,20 +361,20 @@ function testIsolatedFile( parseResult: ParseAndGenerateServicesResult, ): void { // get type checker - expect(parseResult).toHaveProperty('services.program.getTypeChecker'); + expectToHaveParserServices(parseResult.services); const checker = parseResult.services.program.getTypeChecker(); + expectToBeDefined(checker); // get number node (ast shape validated by snapshot) const declaration = (parseResult.ast.body[0] as TSESTree.VariableDeclaration) .declarations[0]; const arrayMember = (declaration.init! as TSESTree.ArrayExpression) - .elements[0]; - expect(parseResult).toHaveProperty('services.esTreeNodeToTSNodeMap'); + .elements[0]!; // get corresponding TS node const tsArrayMember = parseResult.services.esTreeNodeToTSNodeMap.get(arrayMember); - expect(tsArrayMember).toBeDefined(); + expectToBeDefined(tsArrayMember); expect(tsArrayMember.kind).toBe(ts.SyntaxKind.NumericLiteral); expect((tsArrayMember as ts.NumericLiteral).text).toBe('3'); @@ -383,7 +386,6 @@ function testIsolatedFile( expect((arrayMemberType as any).value).toBe(3); // make sure it maps back to original ESTree node - expect(parseResult).toHaveProperty('services.tsNodeToESTreeNodeMap'); expect(parseResult.services.tsNodeToESTreeNodeMap.get(tsArrayMember)).toBe( arrayMember, ); @@ -392,7 +394,7 @@ function testIsolatedFile( const boundName = declaration.id as TSESTree.Identifier; expect(boundName.name).toBe('x'); const tsBoundName = parseResult.services.esTreeNodeToTSNodeMap.get(boundName); - expect(tsBoundName).toBeDefined(); + expectToBeDefined(tsBoundName); checkNumberArrayType(checker, tsBoundName); expect(parseResult.services.tsNodeToESTreeNodeMap.get(tsBoundName)).toBe( boundName, @@ -414,3 +416,7 @@ function checkNumberArrayType(checker: ts.TypeChecker, tsNode: ts.Node): void { expect(typeArguments).toHaveLength(1); expect(typeArguments[0].flags).toBe(ts.TypeFlags.Number); } + +function expectToBeDefined(thing: unknown): asserts thing { + expect(thing).toBeDefined(); +} diff --git a/packages/typescript-estree/tests/lib/test-utils/expectToHaveParserServices.ts b/packages/typescript-estree/tests/lib/test-utils/expectToHaveParserServices.ts new file mode 100644 index 00000000000..d087dd3c54b --- /dev/null +++ b/packages/typescript-estree/tests/lib/test-utils/expectToHaveParserServices.ts @@ -0,0 +1,12 @@ +import type { + ParserServices, + ParserServicesWithTypeInformation, +} from '../../../src'; + +export function expectToHaveParserServices( + services: ParserServices | null | undefined, +): asserts services is ParserServicesWithTypeInformation { + expect(services?.program).toBeDefined(); + expect(services?.esTreeNodeToTSNodeMap).toBeDefined(); + expect(services?.tsNodeToESTreeNodeMap).toBeDefined(); +} diff --git a/packages/typescript-estree/tools/test-utils.ts b/packages/typescript-estree/tools/test-utils.ts index b3b873acc6a..6f40b597ca7 100644 --- a/packages/typescript-estree/tools/test-utils.ts +++ b/packages/typescript-estree/tools/test-utils.ts @@ -1,9 +1,15 @@ +import { join, resolve } from 'path'; + import type { ParseAndGenerateServicesResult, TSESTree, TSESTreeOptions, } from '../src'; -import { parse as parserParse, parseAndGenerateServices } from '../src'; +import { + clearCaches, + parse as parserParse, + parseAndGenerateServices, +} from '../src'; export function parseCodeAndGenerateServices( code: string, @@ -153,3 +159,41 @@ export function omitDeep( return visit(root as UnknownObject, null); } + +interface CreateAndPrepareParseConfig { + code: string; + config: TSESTreeOptions; + projectDirectory: string; +} + +const FIXTURES_DIR = join(__dirname, '../tests/fixtures/simpleProject'); + +export function createAndPrepareParseConfig(): CreateAndPrepareParseConfig { + beforeEach(() => { + clearCaches(); + }); + + const projectDirectory = resolve(FIXTURES_DIR, '../moduleResolver'); + + const code = ` + import { something } from '__PLACEHOLDER__'; + + something(); + `; + + const config: TSESTreeOptions = { + comment: true, + filePath: resolve(projectDirectory, 'file.ts'), + loc: true, + project: './tsconfig.json', + range: true, + tokens: true, + tsconfigRootDir: projectDirectory, + }; + + return { + code, + config, + projectDirectory, + }; +} diff --git a/packages/utils/CHANGELOG.md b/packages/utils/CHANGELOG.md index 40853481544..4e845751401 100644 --- a/packages/utils/CHANGELOG.md +++ b/packages/utils/CHANGELOG.md @@ -3,6 +3,34 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [5.48.2](https://github.com/typescript-eslint/typescript-eslint/compare/v5.48.1...v5.48.2) (2023-01-16) + +**Note:** Version bump only for package @typescript-eslint/utils + + + + + +## [5.48.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.48.0...v5.48.1) (2023-01-09) + +**Note:** Version bump only for package @typescript-eslint/utils + + + + + +# [5.48.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.47.1...v5.48.0) (2023-01-02) + +**Note:** Version bump only for package @typescript-eslint/utils + +## [5.47.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.47.0...v5.47.1) (2022-12-26) + +**Note:** Version bump only for package @typescript-eslint/utils + +# [5.47.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.46.1...v5.47.0) (2022-12-19) + +**Note:** Version bump only for package @typescript-eslint/utils + ## [5.46.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.46.0...v5.46.1) (2022-12-12) **Note:** Version bump only for package @typescript-eslint/utils diff --git a/packages/utils/package.json b/packages/utils/package.json index 65e0b606d08..4edfac65ebf 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/utils", - "version": "5.46.1", + "version": "5.48.2", "description": "Utilities for working with TypeScript + ESLint together", "keywords": [ "eslint", @@ -41,9 +41,9 @@ "dependencies": { "@types/json-schema": "^7.0.9", "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.46.1", - "@typescript-eslint/types": "5.46.1", - "@typescript-eslint/typescript-estree": "5.46.1", + "@typescript-eslint/scope-manager": "5.48.2", + "@typescript-eslint/types": "5.48.2", + "@typescript-eslint/typescript-estree": "5.48.2", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0", "semver": "^7.3.7" @@ -52,7 +52,7 @@ "eslint": "^7.0.0 || ^8.0.0" }, "devDependencies": { - "@typescript-eslint/parser": "5.46.1", + "@typescript-eslint/parser": "5.48.2", "typescript": "*" }, "funding": { diff --git a/packages/utils/src/eslint-utils/getParserServices.ts b/packages/utils/src/eslint-utils/getParserServices.ts index cb04d6cc93d..d0e6a9eb394 100644 --- a/packages/utils/src/eslint-utils/getParserServices.ts +++ b/packages/utils/src/eslint-utils/getParserServices.ts @@ -1,40 +1,55 @@ import type * as TSESLint from '../ts-eslint'; -import type { ParserServices } from '../ts-estree'; +import type { + ParserServices, + ParserServicesWithTypeInformation, +} from '../ts-estree'; const ERROR_MESSAGE = 'You have used a rule which requires parserServices to be generated. You must therefore provide a value for the "parserOptions.project" property for @typescript-eslint/parser.'; +type GetParserServicesResult = T extends true + ? ParserServices + : ParserServicesWithTypeInformation; + /** * Try to retrieve typescript parser service from context */ function getParserServices< TMessageIds extends string, TOptions extends readonly unknown[], + TAllowWithoutFullTypeInformation extends boolean = false, >( context: Readonly>, - allowWithoutFullTypeInformation = false, -): ParserServices { - // backwards compatibility check - // old versions of the parser would not return any parserServices unless parserOptions.project was set + allowWithoutFullTypeInformation: TAllowWithoutFullTypeInformation = false as TAllowWithoutFullTypeInformation, +): GetParserServicesResult { + // This check is unnecessary if the user is using the latest version of our parser. + // + // However the world isn't perfect: + // - Users often use old parser versions. + // Old versions of the parser would not return any parserServices unless parserOptions.project was set. + // - Users sometimes use parsers that aren't @typescript-eslint/parser + // Other parsers won't return the parser services we expect (if they return any at all). + // + // This check allows us to handle bad user setups whilst providing a nice user-facing + // error message explaining the problem. if ( - !context.parserServices?.program || - !context.parserServices.esTreeNodeToTSNodeMap || - !context.parserServices.tsNodeToESTreeNodeMap + context.parserServices == null || + context.parserServices.esTreeNodeToTSNodeMap == null || + context.parserServices.tsNodeToESTreeNodeMap == null ) { throw new Error(ERROR_MESSAGE); } - const hasFullTypeInformation = - context.parserServices.hasFullTypeInformation ?? - /* backwards compatible */ true; - // if a rule requires full type information, then hard fail if it doesn't exist // this forces the user to supply parserOptions.project - if (!hasFullTypeInformation && !allowWithoutFullTypeInformation) { + if ( + context.parserServices.program == null && + !allowWithoutFullTypeInformation + ) { throw new Error(ERROR_MESSAGE); } - return context.parserServices; + return context.parserServices as GetParserServicesResult; } export { getParserServices }; diff --git a/packages/utils/src/ts-estree.ts b/packages/utils/src/ts-estree.ts index 1138deddceb..212d339c4ba 100644 --- a/packages/utils/src/ts-estree.ts +++ b/packages/utils/src/ts-estree.ts @@ -7,7 +7,8 @@ export { TSESTree, } from '@typescript-eslint/types'; -// NOTE - this uses hard links inside ts-estree to avoid initialization of entire package -// via its main file (which imports typescript at runtime). -// Not every eslint-plugin written in typescript requires typescript at runtime. -export { ParserServices } from '@typescript-eslint/typescript-estree/dist/parser-options'; +export type { + ParserServices, + ParserServicesWithTypeInformation, + ParserServicesWithoutTypeInformation, +} from '@typescript-eslint/typescript-estree'; diff --git a/packages/visitor-keys/CHANGELOG.md b/packages/visitor-keys/CHANGELOG.md index d3c1d03fde2..702c037410c 100644 --- a/packages/visitor-keys/CHANGELOG.md +++ b/packages/visitor-keys/CHANGELOG.md @@ -3,6 +3,34 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [5.48.2](https://github.com/typescript-eslint/typescript-eslint/compare/v5.48.1...v5.48.2) (2023-01-16) + +**Note:** Version bump only for package @typescript-eslint/visitor-keys + + + + + +## [5.48.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.48.0...v5.48.1) (2023-01-09) + +**Note:** Version bump only for package @typescript-eslint/visitor-keys + + + + + +# [5.48.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.47.1...v5.48.0) (2023-01-02) + +**Note:** Version bump only for package @typescript-eslint/visitor-keys + +## [5.47.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.47.0...v5.47.1) (2022-12-26) + +**Note:** Version bump only for package @typescript-eslint/visitor-keys + +# [5.47.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.46.1...v5.47.0) (2022-12-19) + +**Note:** Version bump only for package @typescript-eslint/visitor-keys + ## [5.46.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.46.0...v5.46.1) (2022-12-12) **Note:** Version bump only for package @typescript-eslint/visitor-keys diff --git a/packages/visitor-keys/package.json b/packages/visitor-keys/package.json index 8b08cd21486..c00ed5b3a6b 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/visitor-keys", - "version": "5.46.1", + "version": "5.48.2", "description": "Visitor keys used to help traverse the TypeScript-ESTree AST", "keywords": [ "eslint", @@ -39,7 +39,7 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "5.46.1", + "@typescript-eslint/types": "5.48.2", "eslint-visitor-keys": "^3.3.0" }, "devDependencies": { diff --git a/packages/website-eslint/CHANGELOG.md b/packages/website-eslint/CHANGELOG.md index 1006fd2ea83..5f592d724ee 100644 --- a/packages/website-eslint/CHANGELOG.md +++ b/packages/website-eslint/CHANGELOG.md @@ -3,6 +3,34 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [5.48.2](https://github.com/typescript-eslint/typescript-eslint/compare/v5.48.1...v5.48.2) (2023-01-16) + +**Note:** Version bump only for package @typescript-eslint/website-eslint + + + + + +## [5.48.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.48.0...v5.48.1) (2023-01-09) + +**Note:** Version bump only for package @typescript-eslint/website-eslint + + + + + +# [5.48.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.47.1...v5.48.0) (2023-01-02) + +**Note:** Version bump only for package @typescript-eslint/website-eslint + +## [5.47.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.47.0...v5.47.1) (2022-12-26) + +**Note:** Version bump only for package @typescript-eslint/website-eslint + +# [5.47.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.46.1...v5.47.0) (2022-12-19) + +**Note:** Version bump only for package @typescript-eslint/website-eslint + ## [5.46.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.46.0...v5.46.1) (2022-12-12) **Note:** Version bump only for package @typescript-eslint/website-eslint diff --git a/packages/website-eslint/package.json b/packages/website-eslint/package.json index 11618489699..37793248820 100644 --- a/packages/website-eslint/package.json +++ b/packages/website-eslint/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/website-eslint", - "version": "5.46.1", + "version": "5.48.2", "private": true, "description": "ESLint which works in browsers.", "engines": { @@ -16,19 +16,19 @@ "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore" }, "dependencies": { - "@typescript-eslint/types": "5.46.1", - "@typescript-eslint/utils": "5.46.1" + "@typescript-eslint/types": "5.48.2", + "@typescript-eslint/utils": "5.48.2" }, "devDependencies": { "@rollup/plugin-commonjs": "^23.0.0", "@rollup/plugin-json": "^5.0.0", "@rollup/plugin-node-resolve": "^15.0.0", "@rollup/pluginutils": "^5.0.0", - "@typescript-eslint/eslint-plugin": "5.46.1", - "@typescript-eslint/parser": "5.46.1", - "@typescript-eslint/scope-manager": "5.46.1", - "@typescript-eslint/typescript-estree": "5.46.1", - "@typescript-eslint/visitor-keys": "5.46.1", + "@typescript-eslint/eslint-plugin": "5.48.2", + "@typescript-eslint/parser": "5.48.2", + "@typescript-eslint/scope-manager": "5.48.2", + "@typescript-eslint/typescript-estree": "5.48.2", + "@typescript-eslint/visitor-keys": "5.48.2", "eslint": "*", "rollup": "^2.75.4", "rollup-plugin-terser": "^7.0.2", diff --git a/packages/website/CHANGELOG.md b/packages/website/CHANGELOG.md index b0a49ca4a19..85e5fb0e5ef 100644 --- a/packages/website/CHANGELOG.md +++ b/packages/website/CHANGELOG.md @@ -3,6 +3,34 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [5.48.2](https://github.com/typescript-eslint/typescript-eslint/compare/v5.48.1...v5.48.2) (2023-01-16) + +**Note:** Version bump only for package website + + + + + +## [5.48.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.48.0...v5.48.1) (2023-01-09) + +**Note:** Version bump only for package website + + + + + +# [5.48.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.47.1...v5.48.0) (2023-01-02) + +**Note:** Version bump only for package website + +## [5.47.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.47.0...v5.47.1) (2022-12-26) + +**Note:** Version bump only for package website + +# [5.47.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.46.1...v5.47.0) (2022-12-19) + +**Note:** Version bump only for package website + ## [5.46.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.46.0...v5.46.1) (2022-12-12) **Note:** Version bump only for package website diff --git a/packages/website/data/sponsors.json b/packages/website/data/sponsors.json index d550faf83f8..0ad6496d845 100644 --- a/packages/website/data/sponsors.json +++ b/packages/website/data/sponsors.json @@ -10,23 +10,37 @@ "id": "Nx (by Nrwl)", "image": "https://images.opencollective.com/nx/0efbe42/logo.png", "name": "Nx (by Nrwl)", - "totalDonations": 575000, + "totalDonations": 600000, "website": "https://nx.dev" }, { "id": "ESLint", "image": "https://images.opencollective.com/eslint/96b09dc/logo.png", "name": "ESLint", - "totalDonations": 230000, + "totalDonations": 245000, "website": "https://eslint.org/" }, + { + "id": "Hugging Face", + "image": "https://images.opencollective.com/huggingface/5c934ee/logo.png", + "name": "Hugging Face", + "totalDonations": 180000, + "website": "https://huggingface.co" + }, { "id": "Airbnb", "image": "https://images.opencollective.com/airbnb/d327d66/logo.png", "name": "Airbnb", - "totalDonations": 145800, + "totalDonations": 150800, "website": "https://www.airbnb.com/" }, + { + "id": "GitBook", + "image": "https://images.opencollective.com/gitbook/d35a8e7/logo.png", + "name": "GitBook", + "totalDonations": 130000, + "website": "https://www.gitbook.com" + }, { "id": "n8n.io - n8n GmbH", "image": "https://images.opencollective.com/n8n/dca2f0c/logo.png", @@ -42,11 +56,11 @@ "website": "https://blog.coinbase.com/engineering-and-security/home" }, { - "id": "GitBook", - "image": "https://images.opencollective.com/gitbook/d35a8e7/logo.png", - "name": "GitBook", + "id": "Codecademy", + "image": "https://images.opencollective.com/codecademy/d56a48d/logo.png", + "name": "Codecademy", "totalDonations": 120000, - "website": "https://www.gitbook.com" + "website": "https://codecademy.com" }, { "id": "Sentry", @@ -55,13 +69,6 @@ "totalDonations": 114800, "website": "https://sentry.io/welcome/" }, - { - "id": "Codecademy", - "image": "https://images.opencollective.com/codecademy/d56a48d/logo.png", - "name": "Codecademy", - "totalDonations": 110000, - "website": "https://codecademy.com" - }, { "id": "EY Doberman", "image": "https://images.opencollective.com/ey-doberman/b269462/logo.png", @@ -73,7 +80,7 @@ "id": "Sourcegraph", "image": "https://images.opencollective.com/sourcegraph/67e40ff/logo.png", "name": "Sourcegraph", - "totalDonations": 60000, + "totalDonations": 70000, "website": "https://about.sourcegraph.com" }, { @@ -83,6 +90,13 @@ "totalDonations": 54000, "website": "https://www.future-processing.com/" }, + { + "id": "Codiga", + "image": "https://images.opencollective.com/codiga/1065f9f/logo.png", + "name": "Codiga", + "totalDonations": 50000, + "website": "https://www.codiga.io" + }, { "id": "Whitebox", "image": "https://images.opencollective.com/whiteboxinc/ef0d11d/logo.png", @@ -91,11 +105,11 @@ "website": "https://whitebox.com" }, { - "id": "Codiga", - "image": "https://images.opencollective.com/codiga/1065f9f/logo.png", - "name": "Codiga", - "totalDonations": 40000, - "website": "https://www.codiga.io" + "id": "STORIS", + "image": "https://images.opencollective.com/storis/dfb0e13/logo.png", + "name": "STORIS", + "totalDonations": 30000, + "website": "https://www.storis.com/" }, { "id": "Monito", @@ -104,13 +118,6 @@ "totalDonations": 30000, "website": "https://www.monito.com" }, - { - "id": "STORIS", - "image": "https://images.opencollective.com/storis/dfb0e13/logo.png", - "name": "STORIS", - "totalDonations": 28500, - "website": "https://www.storis.com/" - }, { "id": "revo.js", "image": "https://images.opencollective.com/revojsro/82623a7/logo.png", @@ -125,11 +132,18 @@ "totalDonations": 22000, "website": "https://twitter.com/nevir" }, + { + "id": "DeepSource", + "image": "https://images.opencollective.com/deepsource/0f18cea/logo.png", + "name": "DeepSource", + "totalDonations": 20000, + "website": "https://deepsource.io/" + }, { "id": "David Johnston", "image": "https://images.opencollective.com/blacksheepcode/976d69a/avatar.png", "name": "David Johnston", - "totalDonations": 15500, + "totalDonations": 16000, "website": "https://blacksheepcode.com" }, { @@ -150,14 +164,14 @@ "id": "Evil Martians", "image": "https://images.opencollective.com/evilmartians/707ab4d/logo.png", "name": "Evil Martians", - "totalDonations": 10500, + "totalDonations": 11000, "website": "https://evilmartians.com/" }, { "id": "Balsa", "image": "https://images.opencollective.com/balsa/77de498/logo.png", "name": "Balsa", - "totalDonations": 10500, + "totalDonations": 11000, "website": "https://balsa.com" }, { @@ -182,10 +196,10 @@ "website": "https://laserhub.com/" }, { - "id": "DeepSource", - "image": "https://images.opencollective.com/deepsource/0f18cea/logo.png", - "name": "DeepSource", + "id": "tRPC", + "image": "https://images.opencollective.com/trpc/82704a8/logo.png", + "name": "tRPC", "totalDonations": 10000, - "website": "https://deepsource.io/" + "website": "https://trpc.io" } ] diff --git a/packages/website/package.json b/packages/website/package.json index f2e254b7fd0..3905e9fc46d 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -1,6 +1,6 @@ { "name": "website", - "version": "5.46.1", + "version": "5.48.2", "private": true, "scripts": { "build": "docusaurus build", @@ -21,8 +21,8 @@ "@docusaurus/remark-plugin-npm2yarn": "~2.2.0", "@docusaurus/theme-common": "~2.2.0", "@mdx-js/react": "1.6.22", - "@typescript-eslint/parser": "5.46.1", - "@typescript-eslint/website-eslint": "5.46.1", + "@typescript-eslint/parser": "5.48.2", + "@typescript-eslint/website-eslint": "5.48.2", "clsx": "^1.1.1", "eslint": "*", "json-schema": "^0.4.0", @@ -48,7 +48,7 @@ "@types/react": "^18.0.9", "@types/react-helmet": "^6.1.5", "@types/react-router-dom": "^5.3.3", - "@typescript-eslint/eslint-plugin": "5.46.1", + "@typescript-eslint/eslint-plugin": "5.48.2", "copy-webpack-plugin": "^11.0.0", "eslint-plugin-jsx-a11y": "^6.5.1", "eslint-plugin-react": "^7.29.4", diff --git a/packages/website/plugins/generated-rule-docs.ts b/packages/website/plugins/generated-rule-docs.ts index 37bd4e02cc4..90f0b3fa6f7 100644 --- a/packages/website/plugins/generated-rule-docs.ts +++ b/packages/website/plugins/generated-rule-docs.ts @@ -298,39 +298,7 @@ export const generatedRuleDocs: Plugin = () => { } } - // 6. Add a notice about coming from ESLint core for extension rules - if (meta.docs.extendsBaseRule) { - root.children.push({ - children: [ - { - type: 'jsx', - value: '', - }, - { - type: 'text', - value: 'Taken with ❤️ ', - }, - { - type: 'link', - title: null, - url: `https://github.com/eslint/eslint/blob/main/docs/rules/${meta.docs.extendsBaseRule}.md`, - children: [ - { - type: 'text', - value: 'from ESLint core', - }, - ], - }, - { - type: 'jsx', - value: '', - }, - ], - type: 'paragraph', - } as mdast.Paragraph); - } - - // 7. Also add a link to view the rule's source and test code + // 6. Add a link to view the rule's source and test code root.children.push( { children: [ @@ -388,6 +356,42 @@ export const generatedRuleDocs: Plugin = () => { type: 'list', } as mdast.List, ); + + // 7. Also add a notice about coming from ESLint core for extension rules + if (meta.docs.extendsBaseRule) { + root.children.push({ + children: [ + { + type: 'jsx', + value: '', + }, + { + type: 'text', + value: 'Taken with ❤️ ', + }, + { + type: 'link', + title: null, + url: `https://github.com/eslint/eslint/blob/main/docs/src/rules/${ + meta.docs.extendsBaseRule === true + ? file.stem + : meta.docs.extendsBaseRule + }.md`, + children: [ + { + type: 'text', + value: 'from ESLint core', + }, + ], + }, + { + type: 'jsx', + value: '', + }, + ], + type: 'paragraph', + } as mdast.Paragraph); + } }; }; diff --git a/packages/website/sidebars/sidebar.base.js b/packages/website/sidebars/sidebar.base.js index fe84b9c1ae3..e6e7401727f 100644 --- a/packages/website/sidebars/sidebar.base.js +++ b/packages/website/sidebars/sidebar.base.js @@ -23,6 +23,7 @@ module.exports = { collapsible: false, type: 'category', items: [ + 'linting/troubleshooting/performance-troubleshooting', 'linting/troubleshooting/formatting', 'linting/troubleshooting/tslint', ], diff --git a/packages/website/src/components/linter/WebLinter.ts b/packages/website/src/components/linter/WebLinter.ts index acd3c569ff3..50c1daa2f7e 100644 --- a/packages/website/src/components/linter/WebLinter.ts +++ b/packages/website/src/components/linter/WebLinter.ts @@ -122,7 +122,6 @@ export class WebLinter { return { ast, services: { - hasFullTypeInformation: true, program, esTreeNodeToTSNodeMap: astMaps.esTreeNodeToTSNodeMap, tsNodeToESTreeNodeMap: astMaps.tsNodeToESTreeNodeMap, diff --git a/packages/website/src/pages/index.tsx b/packages/website/src/pages/index.tsx index 4ea4f88fd86..e82e7e7495b 100644 --- a/packages/website/src/pages/index.tsx +++ b/packages/website/src/pages/index.tsx @@ -117,7 +117,7 @@ function Feature({ title, description }: FeatureItem): JSX.Element { {title} -

{description}

+ {description}
=15.4.2 < 16" p-map "^4.0.0" -"@lerna/symlink-binary@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/symlink-binary/-/symlink-binary-6.1.0.tgz#7d476499b86ae5fcb853c510603cff9a27acf105" - integrity sha512-DaiRNZk/dvomNxgEaTW145PyL7vIGP7rvnfXV2FO+rjX8UUSNUOjmVmHlYfs64gV9Eqx/dLfQClIbKcwYMD83A== +"@lerna/symlink-binary@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/symlink-binary/-/symlink-binary-6.4.1.tgz#d8e1b653a7ae9fe38834851c66c92278e3bb25ae" + integrity sha512-poZX90VmXRjL/JTvxaUQPeMDxFUIQvhBkHnH+dwW0RjsHB/2Tu4QUAsE0OlFnlWQGsAtXF4FTtW8Xs57E/19Kw== dependencies: - "@lerna/create-symlink" "6.1.0" - "@lerna/package" "6.1.0" + "@lerna/create-symlink" "6.4.1" + "@lerna/package" "6.4.1" fs-extra "^9.1.0" p-map "^4.0.0" -"@lerna/symlink-dependencies@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/symlink-dependencies/-/symlink-dependencies-6.1.0.tgz#f44d33e043fed21a366c4ced2cbde8fa8be0c5fc" - integrity sha512-hrTvtY1Ek+fLA4JjXsKsvwPjuJD0rwB/+K4WY57t00owj//BpCsJ37w3kkkS7f/PcW/5uRjCuHcY67LOEwsRxw== +"@lerna/symlink-dependencies@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/symlink-dependencies/-/symlink-dependencies-6.4.1.tgz#988203cc260406b64d61294367821a0f26419ee6" + integrity sha512-43W2uLlpn3TTYuHVeO/2A6uiTZg6TOk/OSKi21ujD7IfVIYcRYCwCV+8LPP12R3rzyab0JWkWnhp80Z8A2Uykw== dependencies: - "@lerna/create-symlink" "6.1.0" - "@lerna/resolve-symlink" "6.1.0" - "@lerna/symlink-binary" "6.1.0" + "@lerna/create-symlink" "6.4.1" + "@lerna/resolve-symlink" "6.4.1" + "@lerna/symlink-binary" "6.4.1" fs-extra "^9.1.0" p-map "^4.0.0" p-map-series "^2.1.0" -"@lerna/temp-write@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/temp-write/-/temp-write-6.1.0.tgz#a5d532090dd7b2d4f8965fbb475376aae06b9242" - integrity sha512-ZcQl88H9HbQ/TeWUOVt+vDYwptm7kwprGvj9KkZXr9S5Bn6SiKRQOeydCCfCrQT+9Q3dm7QZXV6rWzLsACcAlQ== +"@lerna/temp-write@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/temp-write/-/temp-write-6.4.1.tgz#1c46d05b633597c77b0c5f5ab46c1315195f7786" + integrity sha512-7uiGFVoTyos5xXbVQg4bG18qVEn9dFmboXCcHbMj5mc/+/QmU9QeNz/Cq36O5TY6gBbLnyj3lfL5PhzERWKMFg== dependencies: graceful-fs "^4.1.15" is-stream "^2.0.0" @@ -2919,38 +2920,38 @@ temp-dir "^1.0.0" uuid "^8.3.2" -"@lerna/timer@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/timer/-/timer-6.1.0.tgz#245b02c05b2dec6d2aed2da8a0962cf0343d83d5" - integrity sha512-du+NQ9q7uO4d2nVU4AD2DSPuAZqUapA/bZKuVpFVxvY9Qhzb8dQKLsFISe4A9TjyoNAk8ZeWK0aBc/6N+Qer9A== +"@lerna/timer@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/timer/-/timer-6.4.1.tgz#47fe50b56bd2fc32396a2559f7bb65de8200f07d" + integrity sha512-ogmjFTWwRvevZr76a2sAbhmu3Ut2x73nDIn0bcwZwZ3Qc3pHD8eITdjs/wIKkHse3J7l3TO5BFJPnrvDS7HLnw== -"@lerna/validation-error@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/validation-error/-/validation-error-6.1.0.tgz#03bd46f6219b6db7c4420528d5aaf047f92693e3" - integrity sha512-q0c3XCi5OpyTr8AcfbisS6e3svZaJF/riCvBDqRMaQUT4A8QOPzB4fVF3/+J2u54nidBuTlIk0JZu9aOdWTUkQ== +"@lerna/validation-error@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/validation-error/-/validation-error-6.4.1.tgz#2cab92c2be395158c3d65fa57ddb73892617d7e8" + integrity sha512-fxfJvl3VgFd7eBfVMRX6Yal9omDLs2mcGKkNYeCEyt4Uwlz1B5tPAXyk/sNMfkKV2Aat/mlK5tnY13vUrMKkyA== dependencies: npmlog "^6.0.2" -"@lerna/version@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/version/-/version-6.1.0.tgz#44d8649e978df9d6a14d97c9d7631a7dcd4a9cbf" - integrity sha512-RUxVFdzHt0739lRNMrAbo6HWcFrcyG7atM1pn+Eo61fUoA5R/9N4bCk4m9xUGkJ/mOcROjuwAGe+wT1uOs58Bg== - dependencies: - "@lerna/check-working-tree" "6.1.0" - "@lerna/child-process" "6.1.0" - "@lerna/collect-updates" "6.1.0" - "@lerna/command" "6.1.0" - "@lerna/conventional-commits" "6.1.0" - "@lerna/github-client" "6.1.0" - "@lerna/gitlab-client" "6.1.0" - "@lerna/output" "6.1.0" - "@lerna/prerelease-id-from-version" "6.1.0" - "@lerna/prompt" "6.1.0" - "@lerna/run-lifecycle" "6.1.0" - "@lerna/run-topologically" "6.1.0" - "@lerna/temp-write" "6.1.0" - "@lerna/validation-error" "6.1.0" - "@nrwl/devkit" ">=14.8.6 < 16" +"@lerna/version@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/version/-/version-6.4.1.tgz#01011364df04240ce92dffed1d2fa76bb9f959ff" + integrity sha512-1/krPq0PtEqDXtaaZsVuKev9pXJCkNC1vOo2qCcn6PBkODw/QTAvGcUi0I+BM2c//pdxge9/gfmbDo1lC8RtAQ== + dependencies: + "@lerna/check-working-tree" "6.4.1" + "@lerna/child-process" "6.4.1" + "@lerna/collect-updates" "6.4.1" + "@lerna/command" "6.4.1" + "@lerna/conventional-commits" "6.4.1" + "@lerna/github-client" "6.4.1" + "@lerna/gitlab-client" "6.4.1" + "@lerna/output" "6.4.1" + "@lerna/prerelease-id-from-version" "6.4.1" + "@lerna/prompt" "6.4.1" + "@lerna/run-lifecycle" "6.4.1" + "@lerna/run-topologically" "6.4.1" + "@lerna/temp-write" "6.4.1" + "@lerna/validation-error" "6.4.1" + "@nrwl/devkit" ">=15.4.2 < 16" chalk "^4.1.0" dedent "^0.7.0" load-json-file "^6.2.0" @@ -2964,10 +2965,10 @@ slash "^3.0.0" write-json-file "^4.3.0" -"@lerna/write-log-file@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/write-log-file/-/write-log-file-6.1.0.tgz#b811cffd2ea2b3be6239a756c64dac9a3795707a" - integrity sha512-09omu2w4NCt8mJH/X9ZMuToQQ3xu/KpC7EU4yDl2Qy8nxKf8HiG8Oe+YYNprngmkdsq60F5eUZvoiFDZ5JeGIg== +"@lerna/write-log-file@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/write-log-file/-/write-log-file-6.4.1.tgz#b9b959e4b853cdabf0309bc5da1513fa025117ec" + integrity sha512-LE4fueQSDrQo76F4/gFXL0wnGhqdG7WHVH8D8TrKouF2Afl4NHltObCm4WsSMPjcfciVnZQFfx1ruxU4r/enHQ== dependencies: npmlog "^6.0.2" write-file-atomic "^4.0.1" @@ -3211,13 +3212,6 @@ read-package-json-fast "^2.0.3" which "^2.0.2" -"@nrwl/cli@15.2.4": - version "15.2.4" - resolved "https://registry.yarnpkg.com/@nrwl/cli/-/cli-15.2.4.tgz#7cf18d474c428d6b4aaf7b511c298369c47de39a" - integrity sha512-Urhkzj/hzhTlJqOHFZyibYGjvzHvSQhkjN3keHiYCNEOaAGp9DPF+oC5cYrPcqWbu3ZkldDWTk7aVBbeqwDWZQ== - dependencies: - nx "15.2.4" - "@nrwl/cli@15.3.2": version "15.3.2" resolved "https://registry.yarnpkg.com/@nrwl/cli/-/cli-15.3.2.tgz#dd713e6d6a064587a0ededd75d301b72f820e222" @@ -3225,6 +3219,13 @@ dependencies: nx "15.3.2" +"@nrwl/cli@15.4.5": + version "15.4.5" + resolved "https://registry.yarnpkg.com/@nrwl/cli/-/cli-15.4.5.tgz#2a8f663e5265379812ba83c0577abdc94dcdba8f" + integrity sha512-f13s0/hzS9jsV1+QPr1Lp3Um+3dOHD8gEP2h7uw17rEPrtJ5ggRKMj/HcZ9dkT9zDM9EmPtVTb6k38ON+NWcUw== + dependencies: + nx "15.4.5" + "@nrwl/devkit@15.3.2": version "15.3.2" resolved "https://registry.yarnpkg.com/@nrwl/devkit/-/devkit-15.3.2.tgz#44ea9bc038ce87d9ea24447f6b3f3e1351a58787" @@ -3236,10 +3237,10 @@ semver "7.3.4" tslib "^2.3.0" -"@nrwl/devkit@>=14.8.6 < 16": - version "15.2.4" - resolved "https://registry.yarnpkg.com/@nrwl/devkit/-/devkit-15.2.4.tgz#ffcb69f462df19d3d282cf25bf346926ee23f141" - integrity sha512-5JZWB4ydnu+NKNIfj958nML8AWwhareQ+Q1hLXoOIS/7brqfALNP3y/Ef1ljrLIo1f3xc484TPclqwSH7aRdvQ== +"@nrwl/devkit@>=15.4.2 < 16": + version "15.4.5" + resolved "https://registry.yarnpkg.com/@nrwl/devkit/-/devkit-15.4.5.tgz#22b7aa16bc14c171f061f770060d9af480d5f1cb" + integrity sha512-oag+wJgusKz+rwvgcVy9i8bNtTo7ikbjVVtSOmyVBE0ZrgN1CMFjugBj4FEjKGtd73djjpvW9Mm36uJRujrc2w== dependencies: "@phenomnomnominal/tsquery" "4.1.1" ejs "^3.1.7" @@ -3289,13 +3290,6 @@ tar "6.1.11" yargs-parser ">=21.0.1" -"@nrwl/tao@15.2.4": - version "15.2.4" - resolved "https://registry.yarnpkg.com/@nrwl/tao/-/tao-15.2.4.tgz#c335e0774e5b7ee26bb3b257a436fe154693d619" - integrity sha512-ebGJCkg84yfptuNhGMnIrgHvnknJkeyxWLqRQ7AlMXTzxXOfMS+whjVImM9XjfVYVpBVFWc5QBU5gaKQtzLHmA== - dependencies: - nx "15.2.4" - "@nrwl/tao@15.3.2": version "15.3.2" resolved "https://registry.yarnpkg.com/@nrwl/tao/-/tao-15.3.2.tgz#3498bd6596e582cbc5b922a45e5d8db5bcb2ce47" @@ -3303,6 +3297,13 @@ dependencies: nx "15.3.2" +"@nrwl/tao@15.4.5": + version "15.4.5" + resolved "https://registry.yarnpkg.com/@nrwl/tao/-/tao-15.4.5.tgz#d07f6d06cecb6acb84259e0654cfc59fcc5edd53" + integrity sha512-UMtxXxTWqbyZOdyD9Zt2IsDY/JVXIFZtY6pO4jPha7+UIHWf2Zi8Dszs6UoUTS4mqpNMIkKymwpZGtkDTfiAJA== + dependencies: + nx "15.4.5" + "@nrwl/workspace@15.3.2": version "15.3.2" resolved "https://registry.yarnpkg.com/@nrwl/workspace/-/workspace-15.3.2.tgz#143609997f1e391083a2934a7e5305f0ef385ea5" @@ -5670,7 +5671,7 @@ commander@^8.3.0: resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66" integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== -commander@^9.3.0, commander@^9.4.0, commander@~9.4.0: +commander@^9.3.0, commander@^9.4.0, commander@~9.4.1: version "9.4.1" resolved "https://registry.yarnpkg.com/commander/-/commander-9.4.1.tgz#d1dd8f2ce6faf93147295c0df13c7c21141cfbdd" integrity sha512-5EEkTNyHNGFPD2H+c/dXXfQZYa/scCKasxWcXJaWnNJ99pnQN9Vnmqow+p+PlFPE63Q6mThaZws1T+HxfpgtPw== @@ -6920,10 +6921,10 @@ eslint-plugin-import@^2.26.0: resolve "^1.22.0" tsconfig-paths "^3.14.1" -eslint-plugin-jest@^26.1.5: - version "26.7.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-26.7.0.tgz#41d405ac9143e1284a3401282db47ed459436778" - integrity sha512-/YNitdfG3o3cC6juZziAdkk6nfJt01jXVfj4AgaYVLs7bupHzRDL5K+eipdzhDXtQsiqaX1TzfwSuRlEgeln1A== +eslint-plugin-jest@^27.0.0: + version "27.1.7" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-27.1.7.tgz#0351e904afb8d66b7f70452929556dfdc8daba0d" + integrity sha512-0QVzf+og4YI1Qr3UoprkqqhezAZjFffdi62b0IurkCXMqPtRW84/UT4CKsYT80h/D82LA9avjO/80Ou1LdgbaQ== dependencies: "@typescript-eslint/utils" "^5.10.0" @@ -6971,10 +6972,10 @@ eslint-plugin-react@^7.29.4: semver "^6.3.0" string.prototype.matchall "^4.0.7" -eslint-plugin-simple-import-sort@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-8.0.0.tgz#9d9a2372b0606e999ea841b10458a370a6ccc160" - integrity sha512-bXgJQ+lqhtQBCuWY/FUWdB27j4+lqcvXv5rUARkzbeWLwea+S5eBZEQrhnO+WgX3ZoJHVj0cn943iyXwByHHQw== +eslint-plugin-simple-import-sort@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-9.0.0.tgz#04c97f06a2e526afd40e0ac694b70d1aaaec1aef" + integrity sha512-PtrLjyXP8kjRneWT1n0b99y/2Fyup37we7FVoWsI61/O7x4ztLohzhep/pxI/cYlECr/cQ2j6utckdvWpVwXNA== eslint-scope@5.1.1, eslint-scope@^5.1.1: version "5.1.1" @@ -8338,10 +8339,10 @@ ignore-walk@^5.0.1: dependencies: minimatch "^5.0.1" -ignore@^5.0.4, ignore@^5.0.5, ignore@^5.2.0, ignore@~5.2.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a" - integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== +ignore@^5.0.4, ignore@^5.0.5, ignore@^5.2.0, ignore@~5.2.4: + version "5.2.4" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" + integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== image-size@^1.0.1: version "1.0.1" @@ -9416,21 +9417,16 @@ json5@^1.0.1: dependencies: minimist "^1.2.0" -json5@^2.1.2, json5@^2.2.0, json5@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.1.tgz#655d50ed1e6f95ad1a3caababd2b0efda10b395c" - integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA== +json5@^2.1.2, json5@^2.2.0, json5@^2.2.1, json5@^2.2.2: + version "2.2.3" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" + integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== -jsonc-parser@3.2.0, jsonc-parser@^3.2.0: +jsonc-parser@3.2.0, jsonc-parser@^3.2.0, jsonc-parser@~3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.0.tgz#31ff3f4c2b9793f89c67212627c51c6394f88e76" integrity sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w== -jsonc-parser@~3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.1.0.tgz#73b8f0e5c940b83d03476bc2e51a20ef0932615d" - integrity sha512-DRf0QjnNeCUds3xTjKlQQ3DpJD51GvDjJfnxUVWg6PZTo2otSm+slzNAxU/35hF8/oJIKoG9slq30JYOsF2azg== - jsonfile@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" @@ -9536,33 +9532,35 @@ latest-version@^5.1.0: dependencies: package-json "^6.3.0" -lerna@6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/lerna/-/lerna-6.1.0.tgz#693145393ec22fd3ca98d817deab2246c1e2b107" - integrity sha512-3qAjIj8dgBwHtCAiLbq4VU/C1V9D1tvTLm2owZubdGAN72aB5TxuCu2mcw+yeEorOcXuR9YWx7EXIkAf+G0N2w== - dependencies: - "@lerna/add" "6.1.0" - "@lerna/bootstrap" "6.1.0" - "@lerna/changed" "6.1.0" - "@lerna/clean" "6.1.0" - "@lerna/cli" "6.1.0" - "@lerna/command" "6.1.0" - "@lerna/create" "6.1.0" - "@lerna/diff" "6.1.0" - "@lerna/exec" "6.1.0" - "@lerna/import" "6.1.0" - "@lerna/info" "6.1.0" - "@lerna/init" "6.1.0" - "@lerna/link" "6.1.0" - "@lerna/list" "6.1.0" - "@lerna/publish" "6.1.0" - "@lerna/run" "6.1.0" - "@lerna/version" "6.1.0" - "@nrwl/devkit" ">=14.8.6 < 16" +lerna@6.4.1: + version "6.4.1" + resolved "https://registry.yarnpkg.com/lerna/-/lerna-6.4.1.tgz#a1e5abcb6c00de3367f50d75eca449e382525e0f" + integrity sha512-0t8TSG4CDAn5+vORjvTFn/ZEGyc4LOEsyBUpzcdIxODHPKM4TVOGvbW9dBs1g40PhOrQfwhHS+3fSx/42j42dQ== + dependencies: + "@lerna/add" "6.4.1" + "@lerna/bootstrap" "6.4.1" + "@lerna/changed" "6.4.1" + "@lerna/clean" "6.4.1" + "@lerna/cli" "6.4.1" + "@lerna/command" "6.4.1" + "@lerna/create" "6.4.1" + "@lerna/diff" "6.4.1" + "@lerna/exec" "6.4.1" + "@lerna/filter-options" "6.4.1" + "@lerna/import" "6.4.1" + "@lerna/info" "6.4.1" + "@lerna/init" "6.4.1" + "@lerna/link" "6.4.1" + "@lerna/list" "6.4.1" + "@lerna/publish" "6.4.1" + "@lerna/run" "6.4.1" + "@lerna/validation-error" "6.4.1" + "@lerna/version" "6.4.1" + "@nrwl/devkit" ">=15.4.2 < 16" import-local "^3.0.2" inquirer "^8.2.4" npmlog "^6.0.2" - nx ">=14.8.6 < 16" + nx ">=15.4.2 < 16" typescript "^3 || ^4" leven@^3.1.0: @@ -9935,31 +9933,25 @@ markdown-table@^3.0.2: resolved "https://registry.yarnpkg.com/markdown-table/-/markdown-table-3.0.2.tgz#9b59eb2c1b22fe71954a65ff512887065a7bb57c" integrity sha512-y8j3a5/DkJCmS5x4dMCQL+OR0+2EAq3DOtio1COSHsmW2BGXnNCK3v12hJt1LrUz5iZH5g0LmuYOjDdI+czghA== -markdownlint-cli@^0.32.0: - version "0.32.2" - resolved "https://registry.yarnpkg.com/markdownlint-cli/-/markdownlint-cli-0.32.2.tgz#b7b5c5808039aef4022aef603efaa607caf8e0de" - integrity sha512-xmJT1rGueUgT4yGNwk6D0oqQr90UJ7nMyakXtqjgswAkEhYYqjHew9RY8wDbOmh2R270IWjuKSeZzHDEGPAUkQ== +markdownlint-cli@^0.33.0: + version "0.33.0" + resolved "https://registry.yarnpkg.com/markdownlint-cli/-/markdownlint-cli-0.33.0.tgz#703af1234c32c309ab52fcd0e8bc797a34e2b096" + integrity sha512-zMK1oHpjYkhjO+94+ngARiBBrRDEUMzooDHBAHtmEIJ9oYddd9l3chCReY2mPlecwH7gflQp1ApilTo+o0zopQ== dependencies: - commander "~9.4.0" + commander "~9.4.1" get-stdin "~9.0.0" glob "~8.0.3" - ignore "~5.2.0" + ignore "~5.2.4" js-yaml "^4.1.0" - jsonc-parser "~3.1.0" - markdownlint "~0.26.2" - markdownlint-rule-helpers "~0.17.2" - minimatch "~5.1.0" + jsonc-parser "~3.2.0" + markdownlint "~0.27.0" + minimatch "~5.1.2" run-con "~1.2.11" -markdownlint-rule-helpers@~0.17.2: - version "0.17.2" - resolved "https://registry.yarnpkg.com/markdownlint-rule-helpers/-/markdownlint-rule-helpers-0.17.2.tgz#64d6e8c66e497e631b0e40cf1cef7ca622a0b654" - integrity sha512-XaeoW2NYSlWxMCZM2B3H7YTG6nlaLfkEZWMBhr4hSPlq9MuY2sy83+Xr89jXOqZMZYjvi5nBCGoFh7hHoPKZmA== - -markdownlint@~0.26.2: - version "0.26.2" - resolved "https://registry.yarnpkg.com/markdownlint/-/markdownlint-0.26.2.tgz#11d3d03e7f0dd3c2e239753ee8fd064a861d9237" - integrity sha512-2Am42YX2Ex5SQhRq35HxYWDfz1NLEOZWWN25nqd2h3AHRKsGRE+Qg1gt1++exW792eXTrR4jCNHfShfWk9Nz8w== +markdownlint@~0.27.0: + version "0.27.0" + resolved "https://registry.yarnpkg.com/markdownlint/-/markdownlint-0.27.0.tgz#9dabf7710a4999e2835e3c68317f1acd0bc89049" + integrity sha512-HtfVr/hzJJmE0C198F99JLaeada+646B5SaG2pVoEakLFI6iRGsvMqrnnrflq8hm1zQgwskEgqSnhDW11JBp0w== dependencies: markdown-it "13.0.1" @@ -10177,10 +10169,10 @@ minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: dependencies: brace-expansion "^1.1.7" -minimatch@^5.0.1, minimatch@~5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.0.tgz#1717b464f4971b144f6aabe8f2d0b8e4511e09c7" - integrity sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg== +minimatch@^5.0.1, minimatch@~5.1.2: + version "5.1.6" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" + integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== dependencies: brace-expansion "^2.0.1" @@ -10615,13 +10607,13 @@ nth-check@^2.0.0, nth-check@^2.0.1: dependencies: boolbase "^1.0.0" -nx@15.2.4, "nx@>=14.8.6 < 16": - version "15.2.4" - resolved "https://registry.yarnpkg.com/nx/-/nx-15.2.4.tgz#de55a1342deb3ff2f7b123fe2bbef46c8495f792" - integrity sha512-8rTLo5WGmM6hEo5R/u03Jllkyj4vIUbBk2MRAppCvVRXWLS4xJUEOityXJ5BAvaKoLYm6sWUP1gqU7xlldnT5A== +nx@15.3.2: + version "15.3.2" + resolved "https://registry.yarnpkg.com/nx/-/nx-15.3.2.tgz#3269b7c1c0be4dc4c389a4c54f463eb43636d542" + integrity sha512-i/y9pkZj6OACnk/+VmJaqrRIhY9VZw0twyeUp9z3gy7KElFoQZ7EMm4LcacFpVYy/MTsHYi0c87CDzkSyPogOA== dependencies: - "@nrwl/cli" "15.2.4" - "@nrwl/tao" "15.2.4" + "@nrwl/cli" "15.3.2" + "@nrwl/tao" "15.3.2" "@parcel/watcher" "2.0.4" "@yarnpkg/lockfile" "^1.1.0" "@yarnpkg/parsers" "^3.0.0-rc.18" @@ -10656,13 +10648,13 @@ nx@15.2.4, "nx@>=14.8.6 < 16": yargs "^17.6.2" yargs-parser "21.1.1" -nx@15.3.2: - version "15.3.2" - resolved "https://registry.yarnpkg.com/nx/-/nx-15.3.2.tgz#3269b7c1c0be4dc4c389a4c54f463eb43636d542" - integrity sha512-i/y9pkZj6OACnk/+VmJaqrRIhY9VZw0twyeUp9z3gy7KElFoQZ7EMm4LcacFpVYy/MTsHYi0c87CDzkSyPogOA== +nx@15.4.5, "nx@>=15.4.2 < 16": + version "15.4.5" + resolved "https://registry.yarnpkg.com/nx/-/nx-15.4.5.tgz#12daa740256fa29ba634fbc4f3f87b6d078c2990" + integrity sha512-1spZL6sgOV8JJJuN8W5CLtJYwTOnlyaV32jPXfidavU0QMS8MP+rW3+NUQ9Uzc1UYhOu8llZWtnen93neVGQRw== dependencies: - "@nrwl/cli" "15.3.2" - "@nrwl/tao" "15.3.2" + "@nrwl/cli" "15.4.5" + "@nrwl/tao" "15.4.5" "@parcel/watcher" "2.0.4" "@yarnpkg/lockfile" "^1.1.0" "@yarnpkg/parsers" "^3.0.0-rc.18" @@ -10691,7 +10683,7 @@ nx@15.3.2: strong-log-transformer "^2.1.0" tar-stream "~2.2.0" tmp "~0.2.1" - tsconfig-paths "^3.9.0" + tsconfig-paths "^4.1.2" tslib "^2.3.0" v8-compile-cache "2.3.0" yargs "^17.6.2" @@ -11567,10 +11559,10 @@ prepend-http@^2.0.0: resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= -prettier@*, prettier@2.8.0, prettier@^2.6.2: - version "2.8.0" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.0.tgz#c7df58393c9ba77d6fba3921ae01faf994fb9dc9" - integrity sha512-9Lmg8hTFZKG0Asr/kW9Bp8tJjRVluO8EJQVfY2T7FMw9T5jy4I/Uvx0Rca/XWf50QQ1/SS48+6IJWnrb+2yemA== +prettier@*, prettier@2.8.1, prettier@^2.6.2: + version "2.8.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.1.tgz#4e1fd11c34e2421bc1da9aea9bd8127cd0a35efc" + integrity sha512-lqGoSJBQNJidqCHE80vqZJHWHRFoNYsSpP9AjFhlhi9ODCJA541svILes/+/1GM3VaL/abZi7cpFzOpdR9UPKg== pretty-bytes@^5.3.0: version "5.6.0" @@ -12383,12 +12375,10 @@ rfdc@^1.3.0: resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.3.0.tgz#d0b7c441ab2720d05dc4cf26e01c89631d9da08b" integrity sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA== -rimraf@*, rimraf@^3.0.0, rimraf@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" - integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== - dependencies: - glob "^7.1.3" +rimraf@*, rimraf@^4.0.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-4.1.1.tgz#ec29817863e5d82d22bca82f9dc4325be2f1e72b" + integrity sha512-Z4Y81w8atcvaJuJuBB88VpADRH66okZAuEm+Jtaufa+s7rZmIz+Hik2G53kGaNytE7lsfXyWktTmfVz0H9xuDg== rimraf@^2.6.3: version "2.7.1" @@ -12397,6 +12387,13 @@ rimraf@^2.6.3: dependencies: glob "^7.1.3" +rimraf@^3.0.0, rimraf@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + dependencies: + glob "^7.1.3" + rollup-plugin-terser@^7.0.0, rollup-plugin-terser@^7.0.2: version "7.0.2" resolved "https://registry.yarnpkg.com/rollup-plugin-terser/-/rollup-plugin-terser-7.0.2.tgz#e8fbba4869981b2dc35ae7e8a502d5c6c04d324d" @@ -13509,6 +13506,15 @@ tsconfig-paths@^3.14.1, tsconfig-paths@^3.9.0: minimist "^1.2.6" strip-bom "^3.0.0" +tsconfig-paths@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-4.1.2.tgz#4819f861eef82e6da52fb4af1e8c930a39ed979a" + integrity sha512-uhxiMgnXQp1IR622dUXI+9Ehnws7i/y6xvpZB9IbUVOPy0muvdvgXeZOn88UcGPiT98Vp3rJPTa8bFoalZ3Qhw== + dependencies: + json5 "^2.2.2" + minimist "^1.2.6" + strip-bom "^3.0.0" + tslib@^1.10.0, tslib@^1.13.0, tslib@^1.8.1, tslib@^1.9.0: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"