diff --git a/.cspell.json b/.cspell.json index f1806362b478..edd2532abf92 100644 --- a/.cspell.json +++ b/.cspell.json @@ -62,6 +62,7 @@ "declarators", "destructure", "destructured", + "discoverability", "dprint", "errored", "erroring", diff --git a/.eslintrc.js b/.eslintrc.js index 81f745d38247..7380b874d88f 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/.github/actions/prepare-build/action.yml b/.github/actions/prepare-build/action.yml index ce69eddedc50..d656587ca56a 100644 --- a/.github/actions/prepare-build/action.yml +++ b/.github/actions/prepare-build/action.yml @@ -19,4 +19,4 @@ runs: shell: bash # Website will be built by the Netlify GitHub App run: | - yarn build --exclude website + npx nx run-many --target=build --parallel --exclude website diff --git a/.github/renovate.json5 b/.github/renovate.json5 index a681df192af1..5d6c59a303a8 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -7,6 +7,9 @@ 'eslint-scope', // this dep is now ESM only 'execa', + // Some kind of weird caching issue: + // https://github.com/typescript-eslint/typescript-eslint/issues/6230 + 'ts-node', // the nx packages get updated using the nx migrate CLI '@nrwl/cli', '@nrwl/devkit', diff --git a/CHANGELOG.md b/CHANGELOG.md index 7fbfc4bba22a..e18c2ad1d33c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,61 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [5.49.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.48.2...v5.49.0) (2023-01-23) + + +### Bug Fixes + +* **typescript-estree:** fix typo in FAQ link ([#6346](https://github.com/typescript-eslint/typescript-eslint/issues/6346)) ([eefc578](https://github.com/typescript-eslint/typescript-eslint/commit/eefc5781b0f455264e4e58e33c27f8a91b3ab5e3)) + + +### Features + +* **eslint-plugin:** [naming-convention] add support for `#private` modifier on class members ([#6259](https://github.com/typescript-eslint/typescript-eslint/issues/6259)) ([c8a6d80](https://github.com/typescript-eslint/typescript-eslint/commit/c8a6d8096080228b6d122c861fe140ac97f17cbe)) + + + + + +## [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 2dcd4d3f847e..b1c6bfe4f0d3 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/architecture/Parser.mdx b/docs/architecture/Parser.mdx index 7c0cb37abe92..cb81c3a0e5c6 100644 --- a/docs/architecture/Parser.mdx +++ b/docs/architecture/Parser.mdx @@ -226,7 +226,8 @@ For example, by default it will ensure that a glob like `./**/tsconfig.json` wil > Default `undefined`. -This option allows you to provide the root directory for relative tsconfig paths specified in the `project` option above. +This option allows you to provide the root directory for relative TSConfig paths specified in the `project` option above. +Doing so ensures running ESLint from a directory other than the root will still be able to find your TSConfig. ### `warnOnUnsupportedTypeScriptVersion` diff --git a/docs/contributing/Discussions.md b/docs/contributing/Discussions.md new file mode 100644 index 000000000000..52de99914096 --- /dev/null +++ b/docs/contributing/Discussions.md @@ -0,0 +1,28 @@ +--- +id: discussions +title: Discussions +--- + +Most proposals in the typescript-eslint repository happen in [GitHub Issues](https://docs.github.com/issues). +We generally try to keep conversations inside issues for their discoverability and ability to be linked to [GitHub Pull Requests](https://docs.github.com/pull-requests). + +We have [GitHub Discussions](https://docs.github.com/discussions) enabled to enable three kinds of deeper, threaded conversations: + +- **Community Feedback**: Questions from the maintainer team that should be raised to the broader community +- **RFCs (Requests For Comments)**: Formalized proposals for larger changes that should be discussed before turned into issues +- **Technical Discussions**: Deeper questions about typescript-eslint's architecture and/or APIs + +Before filing a Discussion, search the issue tracker for any related conversations. +Link to them in the Discussion, along with a detailed description of what you'd like to discuss. + +:::tip +For change proposals that match an [existing issue format](https://github.com/typescript-eslint/typescript-eslint/issues/new/choose), keep to filing issues. +Most don't need to be moved to this separate format. +We can always move an issue to a discussion if it becomes unexpectedly deep. +::: + +:::caution +Please don't use Discussions as a support forum. +We don't have the maintainer-budget to handle that. +See [Issues > Questions and Support Requests](./Issues.mdx#questions-and-support-requests). +::: diff --git a/docs/contributing/Issues.mdx b/docs/contributing/Issues.mdx index ae61dd0e3123..d577248b2e61 100644 --- a/docs/contributing/Issues.mdx +++ b/docs/contributing/Issues.mdx @@ -21,6 +21,7 @@ Please don't: - Leave useless comments such as _"+1"_ or _"when's this getting fixed?"_ that only act as spam - If you have nothing to add but enthusiasm and joy, add a reaction such as 👍 + - One exception: if an issue has been blocked on a question to a maintainer for 3 or more months, please ping us - we probably lost track of it - Bring up unrelated topics in existing issues: instead, file a new issue - Comment on closed PRs: instead, [file a new issue](#raising-issues) - Comment on commits directly, as those comments are not searchable: instead, file a new issue diff --git a/docs/contributing/Pull_Requests.mdx b/docs/contributing/Pull_Requests.mdx index edb76feb7d6f..c5af830718ce 100644 --- a/docs/contributing/Pull_Requests.mdx +++ b/docs/contributing/Pull_Requests.mdx @@ -19,8 +19,9 @@ Please don't: - Force push after opening a PR - Reasoning: GitHub is not able to track changes across force pushes, which makes it take longer for us to perform incremental reviews -- Comment asking for updates +- Comment on an existing PR asking for updates - Reasoning: Your PR hasn't been forgotten! The volunteer maintainers have limited time to work on the project, and they will get to it as soon as they are able. + - One exception: if a PR has been blocked on a question to a maintainer for 3 or more months, please ping us - we probably lost track of it. ### Raising a PR diff --git a/docs/linting/CONFIGURATIONS.mdx b/docs/linting/CONFIGURATIONS.mdx index a620083fa714..aec668a16dde 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 f1aff9346bb5..67e4316608f2 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/Typed_Linting.md b/docs/linting/Typed_Linting.md index 3e1beb396a8a..65e2c875fff9 100644 --- a/docs/linting/Typed_Linting.md +++ b/docs/linting/Typed_Linting.md @@ -8,30 +8,30 @@ To tap into TypeScript's additional powers, there are two small changes you need ```js title=".eslintrc.js" module.exports = { - root: true, - parser: '@typescript-eslint/parser', - // Added lines start - parserOptions: { - tsconfigRootDir: __dirname, - project: ['./tsconfig.json'], - }, - // Added lines end - plugins: ['@typescript-eslint'], extends: [ 'eslint:recommended', 'plugin:@typescript-eslint/recommended', // Add this line 'plugin:@typescript-eslint/recommended-requiring-type-checking', ], + plugins: ['@typescript-eslint'], + parser: '@typescript-eslint/parser', + // Added lines start + parserOptions: { + project: ['./tsconfig.json'], + tsconfigRootDir: __dirname, + }, + // Added lines end + root: true, }; ``` In more detail: -- `parserOptions.tsconfigRootDir` tells our parser the absolute path of your project's root directory. +- `plugin:@typescript-eslint/recommended-requiring-type-checking` is another [recommended configuration](./CONFIGURATIONS.mdx) we provide. This one contains recommended rules that additionally require type information. - `parserOptions.project` tells our parser the relative path where your project's `tsconfig.json` is. - If your project is a multi-package monorepo, see [our docs on configuring a monorepo](./typed-linting/Monorepos.md). -- `plugin:@typescript-eslint/recommended-requiring-type-checking` is another recommended configuration we provide. This one contains rules that specifically require type information. +- `parserOptions.tsconfigRootDir` tells our parser the absolute path of your project's root directory (see [Parser#tsconfigRootDir](../architecture/Parser.mdx#tsconfigRootDir)). With that done, run the same lint command you ran before. You may see new rules reporting errors based on type information! 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 47ff57c3b45c..14c9d102dd00 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 000000000000..6f696a7a05f0 --- /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/ISSUES.md b/docs/maintenance/ISSUES.md index ebddcc6df1b4..e7850e3a4b3c 100644 --- a/docs/maintenance/ISSUES.md +++ b/docs/maintenance/ISSUES.md @@ -3,7 +3,7 @@ id: issues title: Issues --- -This document serves as a guide for how you might manage issues, also known as issue triaging. +This document serves as a guide for how you might manage our [GitHub Issues](https://docs.github.com/issues), also known as issue triaging. Use your best judgement when triaging issues, and most of all remember to be **kind, friendly, and encouraging** when responding to users. Many users are new to open source and/or typed linting. @@ -93,13 +93,41 @@ These bugs should be reported with a link to a GitHub repository that can be che If you cannot reproduce the issue as described using repository's README.md and issue description, it has not provided enough information. Consider using a specific response like the _Needs Full Reproduction_ response. -### ✨ Rule Enhancements +### 🏗 Feature Requests -TODO: This will be filled out... soon! +For any feature request, make sure the requested support is either: -### 🚀 New Rules +- Very useful for at least one commonly used way to run TypeScript (e.g. tsc-built CLI package; bundler-managed web app) +- Relevant for _most_ projects that would be using typescript-eslint -TODO: This will be filled out... soon! +We avoid features that: + +- Are only relevant for a minority of users, as they aren't likely worth the maintenance burden +- Aren't TypeScript-specific (e.g. should be in ESLint core instead) +- Are only relevant with specific userland frameworks or libraries, such as Jest or React +- Are for "formatting" functionality (we [strongly recommend users use a separate dedicated formatter](../linting/troubleshooting/FORMATTING.md)) + +#### ✨ Rule Enhancements + +We're generally accepting of rule enhancements that meet the above feature request criteria. +If a rule enhancement would substantially change the target area of the rule, consider whether it should instead be a new rule. +Common signs of this are the rule's original name now being inaccurate, or some options being relevant just for the old functionality. + +Enhancements that can cause new reports to be reported are considered breaking changes. +We have two common strategies for them: + +- Treat the enhancement as a breaking change, and block merging it until the next major version +- Add an option to disable the new logic: which is a breaking change if opt-in, and a non-breaking change if opt-out +- Add an option to enable the new logic: which is a breaking change if opt-out, and a non-breaking change if opt-in + +See [Can we standardize logical direction of rule options?](https://github.com/typescript-eslint/typescript-eslint/discussions/6101) for context on naming options. + +For enhancements meant to limit which kinds of nodes the rule targets, mark the issue as blocked on [RFC: Common format to specify a type or value as a rule option](https://github.com/typescript-eslint/typescript-eslint/discussions/6017). + +#### 🚀 New Rules + +We're generally accepting of new rules that meet the above feature request criteria. +The biggest exception is rules that can roughly be implemented with [`@typescript-eslint/ban-types`](https://typescript-eslint.io/rules/ban-types) and/or [`no-restricted-syntax`](https://eslint.org/docs/latest/rules/no-restricted-syntax). ## Pruning Old Issues diff --git a/docs/maintenance/RELEASES.md b/docs/maintenance/RELEASES.md index 211294d488bb..87fb87529df6 100644 --- a/docs/maintenance/RELEASES.md +++ b/docs/maintenance/RELEASES.md @@ -10,6 +10,27 @@ We release a canary version for each commit to `main` that passes all required c This release is goes to the `canary` tag on npm and it is versioned as an incremental canary patch release on top of the current `latest` version. I.e. if the current version is `5.6.1`, then the first canary version will be `5.6.2-alpha.0`, the second `5.6.2-alpha.1`, and so on. +### Installing Canary Versions + +To try out the latest canary versions of typescript-eslint, install `@typescript-eslint/eslint-plugin@canary` and `@typescript-eslint/parser@canary`. +Note that npm may need a `--force` to override version requirements. + + + +### npm + +```bash +npm i @typescript-eslint/eslint-plugin@canary @typescript-eslint/parser@canary --save-dev --force +``` + +### Yarn + +```bash +yarn add @typescript-eslint/eslint-plugin@canary @typescript-eslint/parser@canary --save-dev +``` + + + ## Latest We release a latest version every Monday at 1pm US Eastern time using the latest commit to `main` at that time. This release is performed automatically by a Github action located in a private repository. This release goes to the standard `latest` tag on npm. diff --git a/lerna.json b/lerna.json index 05ae3263abca..ca3b45abd274 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "5.46.1", + "version": "5.49.0", "npmClient": "yarn", "useWorkspaces": true, "stream": true diff --git a/package.json b/package.json index 1636910d3ed8..e0a2a92b97d5 100644 --- a/package.json +++ b/package.json @@ -22,28 +22,28 @@ "url": "https://github.com/typescript-eslint/typescript-eslint/issues" }, "scripts": { - "build": "nx run-many --target=build --all --parallel --exclude website", + "build": "nx run-many --target=build --parallel --exclude website", "check-clean-workspace-after-install": "git diff --quiet --exit-code", - "check-configs": "nx run-many --target=check-configs --all --parallel", - "check-docs": "nx run-many --target=check-docs --all --parallel", + "check-configs": "nx run-many --target=check-configs --parallel", + "check-docs": "nx run-many --target=check-docs --parallel", "check-format": "prettier --list-different .", "check-spelling": "cspell --config=.cspell.json \"**/*.{md,mdx,ts,mts,cts,js,cjs,mjs,tsx,jsx}\"", "clean": "lerna clean -y && nx run-many --target=clean", "format": "prettier --write .", - "generate-contributors": "yarn ts-node --transpile-only ./tools/generate-contributors.ts", - "generate-sponsors": "yarn ts-node --transpile-only ./tools/generate-sponsors.ts", - "generate-website-dts": "yarn ts-node --transpile-only ./tools/generate-website-dts.ts", + "generate-contributors": "yarn tsx ./tools/generate-contributors.ts", + "generate-sponsors": "yarn tsx ./tools/generate-sponsors.ts", + "generate-website-dts": "yarn tsx ./tools/generate-website-dts.ts", "generate-lib": "nx generate-lib @typescript-eslint/scope-manager", "lint-fix": "eslint . --fix", "lint-markdown-fix": "yarn lint-markdown --fix", "lint-markdown": "markdownlint \"**/*.md\" --config=.markdownlint.json --ignore-path=.markdownlintignore", - "lint": "nx run-many --target=lint --all --parallel", - "postinstall": "yarn ts-node --transpile-only ./tools/postinstall.ts", + "lint": "nx run-many --target=lint --parallel", + "postinstall": "yarn tsx ./tools/postinstall.ts", "pre-commit": "yarn lint-staged", "start": "nx run website:start", - "test": "nx run-many --target=test --all --parallel", + "test": "nx run-many --target=test --parallel", "test-integration": "yarn jest -c ./tests/integration/jest.config.js", - "typecheck": "nx run-many --target=typecheck --all --parallel" + "typecheck": "nx run-many --target=typecheck --parallel" }, "engines": { "node": "^14.18.0 || ^16.0.0 || >=18.0.0" @@ -52,11 +52,11 @@ "@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/jest": "15.5.3", "@nrwl/nx-cloud": "15.0.2", - "@nrwl/jest": "15.3.2", - "@nrwl/workspace": "15.3.2", + "@nrwl/workspace": "15.5.3", "@swc/core": "^1.3.1", "@swc/jest": "^0.2.21", "@types/babel__code-frame": "^7.0.3", @@ -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,18 +94,18 @@ "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", + "nx": "15.5.3", "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", + "ts-node": "10.7.0", "tslint": "^6.1.3", "typescript": ">=4.2.4 <5.0.0" }, diff --git a/packages/ast-spec/CHANGELOG.md b/packages/ast-spec/CHANGELOG.md index 8b8f051a142a..49507c453596 100644 --- a/packages/ast-spec/CHANGELOG.md +++ b/packages/ast-spec/CHANGELOG.md @@ -3,6 +3,44 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [5.49.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.48.2...v5.49.0) (2023-01-23) + +**Note:** Version bump only for package @typescript-eslint/ast-spec + + + + + +## [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 4df878e4ac36..e91a13a87b57 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.49.0", "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 e9efe0512eb3..000000000000 --- 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 7d44c5a9712d..000000000000 --- 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 a6fbd60e31cf..000000000000 --- 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 61e0e137a0eb..000000000000 --- 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 000000000000..147bdd6cb259 --- /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 000000000000..1d49b0c7ad18 --- /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 000000000000..27b36ea8b183 --- /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 6f975b3a497d..fd832b249e4f 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 61e0e137a0eb..000000000000 --- 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 000000000000..6423ad414358 --- /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 000000000000..41f02a221913 --- /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 000000000000..cecb46eb91fd --- /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 c49a847cd3a8..8d5295e9c35a 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 000000000000..0b61be5984af --- /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 000000000000..c9f1a1a1da8c --- /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 000000000000..057e8de958a0 --- /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 000000000000..991730e68ff7 --- /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 000000000000..76e4314a3c61 --- /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 000000000000..491288c619b2 --- /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 61e0e137a0eb..000000000000 --- 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 000000000000..b1451f6ef4dd --- /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 000000000000..3c588981ba1c --- /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 000000000000..d5ff97f0998b --- /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 95932fa93896..285c48241549 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 61e0e137a0eb..000000000000 --- 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 000000000000..dbe2364b1241 --- /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 000000000000..d8a82e4c1bb3 --- /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 000000000000..0e95b7b46200 --- /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 58104f64f7b3..2d68aa8d59a1 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 7dc07e30952b..3dccf5c6ab8a 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 260574cc59f9..a0a7cc65a33d 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/JSXExpression.ts b/packages/ast-spec/src/unions/JSXExpression.ts index 78dfad53525b..d30c150cc6f0 100644 --- a/packages/ast-spec/src/unions/JSXExpression.ts +++ b/packages/ast-spec/src/unions/JSXExpression.ts @@ -1,8 +1,4 @@ -import type { JSXEmptyExpression } from '../jsx/JSXEmptyExpression/spec'; import type { JSXExpressionContainer } from '../jsx/JSXExpressionContainer/spec'; import type { JSXSpreadChild } from '../jsx/JSXSpreadChild/spec'; -export type JSXExpression = - | JSXEmptyExpression - | JSXExpressionContainer - | JSXSpreadChild; +export type JSXExpression = JSXExpressionContainer | JSXSpreadChild; diff --git a/packages/ast-spec/src/unions/ObjectLiteralElement.ts b/packages/ast-spec/src/unions/ObjectLiteralElement.ts index d7575c80c1b9..e6ac567c63ee 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 e6ea1804e84d..233fc7f4f95e 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 687999524970..ad9289156df8 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 a4022f6319b7..0ecfffa63d0c 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 84d3ba163725..7bb1ad9d0df3 100644 --- a/packages/eslint-plugin-internal/CHANGELOG.md +++ b/packages/eslint-plugin-internal/CHANGELOG.md @@ -3,6 +3,44 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [5.49.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.48.2...v5.49.0) (2023-01-23) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal + + + + + +## [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 1d3a61a74ea4..b2e03c24a7ac 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.49.0", "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.49.0", + "@typescript-eslint/type-utils": "5.49.0", + "@typescript-eslint/utils": "5.49.0", "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 f86d49468364..313a32eea5bb 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 037d1977639c..92e446a5cc68 100644 --- a/packages/eslint-plugin-tslint/CHANGELOG.md +++ b/packages/eslint-plugin-tslint/CHANGELOG.md @@ -3,6 +3,42 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [5.49.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.48.2...v5.49.0) (2023-01-23) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint + + + + + +## [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 9b8b75d3d4e7..c4b90eaf6caf 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.49.0", "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.49.0", "lodash": "^4.17.21" }, "peerDependencies": { @@ -48,6 +48,6 @@ }, "devDependencies": { "@types/lodash": "*", - "@typescript-eslint/parser": "5.46.1" + "@typescript-eslint/parser": "5.49.0" } } diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index 74ddd9d67c61..52c4bf72c2a1 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/CHANGELOG.md @@ -3,6 +3,52 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [5.49.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.48.2...v5.49.0) (2023-01-23) + + +### Features + +* **eslint-plugin:** [naming-convention] add support for `#private` modifier on class members ([#6259](https://github.com/typescript-eslint/typescript-eslint/issues/6259)) ([c8a6d80](https://github.com/typescript-eslint/typescript-eslint/commit/c8a6d8096080228b6d122c861fe140ac97f17cbe)) + + + + + +## [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/README.md b/packages/eslint-plugin/README.md index b9dd0cecd032..9c98f8c7d4b6 100644 --- a/packages/eslint-plugin/README.md +++ b/packages/eslint-plugin/README.md @@ -5,6 +5,6 @@ An ESLint plugin which provides lint rules for TypeScript codebases. [![NPM Version](https://img.shields.io/npm/v/@typescript-eslint/eslint-plugin.svg?style=flat-square)](https://www.npmjs.com/package/@typescript-eslint/eslint-plugin) [![NPM Downloads](https://img.shields.io/npm/dm/@typescript-eslint/eslint-plugin.svg?style=flat-square)](https://www.npmjs.com/package/@typescript-eslint/eslint-plugin) -👉 See **https://typescript-eslint.io/architecture/utils** for our Getting Started docs. +👉 See **https://typescript-eslint.io/getting-started** for our Getting Started docs. > See https://typescript-eslint.io for general documentation on typescript-eslint, the tooling that allows you to run ESLint and Prettier on TypeScript code. diff --git a/packages/eslint-plugin/docs/rules/ban-types.md b/packages/eslint-plugin/docs/rules/ban-types.md index 016b2a7217e7..3f2e663669a8 100644 --- a/packages/eslint-plugin/docs/rules/ban-types.md +++ b/packages/eslint-plugin/docs/rules/ban-types.md @@ -72,12 +72,6 @@ The default options provide a set of "best practices", intended to provide safet - This is a point of confusion for many developers, who think it means "any object type". - See [this comment for more information](https://github.com/typescript-eslint/typescript-eslint/issues/2063#issuecomment-675156492). -:::important - -The default options suggest using `Record`; this was a stylistic decision, as the built-in `Record` type is considered to look cleaner. - -::: -
Default Options @@ -115,15 +109,16 @@ const defaultTypes = { Object: { message: [ 'The `Object` type actually means "any non-nullish value", so it is marginally better than `unknown`.', - '- If you want a type meaning "any object", you probably want `Record` instead.', + '- If you want a type meaning "any object", you probably want `object` instead.', '- If you want a type meaning "any value", you probably want `unknown` instead.', ].join('\n'), }, '{}': { message: [ '`{}` actually means "any non-nullish value".', - '- If you want a type meaning "any object", you probably want `Record` instead.', + '- If you want a type meaning "any object", you probably want `object` instead.', '- If you want a type meaning "any value", you probably want `unknown` instead.', + '- If you want a type meaning "empty object", you probably want `Record` instead.', ].join('\n'), }, }; diff --git a/packages/eslint-plugin/docs/rules/key-spacing.md b/packages/eslint-plugin/docs/rules/key-spacing.md new file mode 100644 index 000000000000..3bfcf5f389f0 --- /dev/null +++ b/packages/eslint-plugin/docs/rules/key-spacing.md @@ -0,0 +1,12 @@ +--- +description: 'Enforce consistent spacing between property names and type annotations in types and interfaces.' +--- + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/key-spacing** for documentation. + +## Examples + +This rule extends the base [`eslint/keyword-spacing`](https://eslint.org/docs/rules/key-spacing) rule. +This version adds support for type annotations on interfaces, classes and type literals properties. diff --git a/packages/eslint-plugin/docs/rules/naming-convention.md b/packages/eslint-plugin/docs/rules/naming-convention.md index f5922ba3653c..ab0405592c47 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 5736561d2ff4..609eb3a7bb53 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 5cdd4cb8c63e..98029c75cb25 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.49.0", "description": "TypeScript plugin for ESLint", "keywords": [ "eslint", @@ -37,18 +37,20 @@ "clean": "tsc -b tsconfig.build.json --clean", "postclean": "rimraf dist && rimraf coverage", "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", - "generate:breaking-changes": "../../node_modules/.bin/ts-node tools/generate-breaking-changes.ts", - "generate:configs": "../../node_modules/.bin/ts-node tools/generate-configs.ts", + "generate:breaking-changes": "yarn tsx tools/generate-breaking-changes.ts", + "generate:configs": "yarn tsx tools/generate-configs.ts", "lint": "nx lint", "test": "jest --coverage", "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.49.0", + "@typescript-eslint/type-utils": "5.49.0", + "@typescript-eslint/utils": "5.49.0", "debug": "^4.3.4", + "grapheme-splitter": "^1.0.4", "ignore": "^5.2.0", + "grapheme-splitter": "^1.0.4", "natural-compare-lite": "^1.4.0", "regexpp": "^3.2.0", "semver": "^7.3.7", @@ -61,6 +63,7 @@ "@types/natural-compare-lite": "^1.4.0", "@types/prettier": "*", "chalk": "^5.0.1", + "grapheme-splitter": "^1.0.4", "cross-fetch": "^3.1.5", "json-schema": "*", "markdown-table": "^3.0.2", diff --git a/packages/eslint-plugin/src/configs/all.ts b/packages/eslint-plugin/src/configs/all.ts index 25c42ad0f390..bbf8a8f0fdd5 100644 --- a/packages/eslint-plugin/src/configs/all.ts +++ b/packages/eslint-plugin/src/configs/all.ts @@ -37,6 +37,8 @@ export = { '@typescript-eslint/indent': 'error', 'init-declarations': 'off', '@typescript-eslint/init-declarations': 'error', + 'key-spacing': 'off', + '@typescript-eslint/key-spacing': 'error', 'keyword-spacing': 'off', '@typescript-eslint/keyword-spacing': 'error', 'lines-between-class-members': 'off', diff --git a/packages/eslint-plugin/src/rules/ban-ts-comment.ts b/packages/eslint-plugin/src/rules/ban-ts-comment.ts index 9c55b437da63..511a951280e7 100644 --- a/packages/eslint-plugin/src/rules/ban-ts-comment.ts +++ b/packages/eslint-plugin/src/rules/ban-ts-comment.ts @@ -147,7 +147,10 @@ export default util.createRule<[Options], MessageIds>({ minimumDescriptionLength = defaultMinimumDescriptionLength, } = options; const format = descriptionFormats.get(fullDirective); - if (description.trim().length < minimumDescriptionLength) { + if ( + util.getStringLength(description.trim()) < + minimumDescriptionLength + ) { context.report({ data: { directive, minimumDescriptionLength }, node: comment, diff --git a/packages/eslint-plugin/src/rules/index.ts b/packages/eslint-plugin/src/rules/index.ts index ac17f4a42476..45801a7b6979 100644 --- a/packages/eslint-plugin/src/rules/index.ts +++ b/packages/eslint-plugin/src/rules/index.ts @@ -22,6 +22,7 @@ import explicitModuleBoundaryTypes from './explicit-module-boundary-types'; import funcCallSpacing from './func-call-spacing'; import indent from './indent'; import initDeclarations from './init-declarations'; +import keySpacing from './key-spacing'; import keywordSpacing from './keyword-spacing'; import linesBetweenClassMembers from './lines-between-class-members'; import memberDelimiterStyle from './member-delimiter-style'; @@ -149,6 +150,7 @@ export default { 'func-call-spacing': funcCallSpacing, indent: indent, 'init-declarations': initDeclarations, + 'key-spacing': keySpacing, 'keyword-spacing': keywordSpacing, 'lines-between-class-members': linesBetweenClassMembers, 'member-delimiter-style': memberDelimiterStyle, diff --git a/packages/eslint-plugin/src/rules/key-spacing.ts b/packages/eslint-plugin/src/rules/key-spacing.ts new file mode 100644 index 000000000000..587d2674f4f3 --- /dev/null +++ b/packages/eslint-plugin/src/rules/key-spacing.ts @@ -0,0 +1,421 @@ +import type { TSESTree } from '@typescript-eslint/utils'; +import { AST_NODE_TYPES } from '@typescript-eslint/utils'; + +import * as util from '../util'; +import { getESLintCoreRule } from '../util/getESLintCoreRule'; + +const baseRule = getESLintCoreRule('key-spacing'); + +export type Options = util.InferOptionsTypeFromRule; +export type MessageIds = util.InferMessageIdsTypeFromRule; + +// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment +const baseSchema = Array.isArray(baseRule.meta.schema) + ? baseRule.meta.schema[0] + : baseRule.meta.schema; + +export default util.createRule({ + name: 'key-spacing', + meta: { + type: 'layout', + docs: { + description: + 'Enforce consistent spacing between property names and type annotations in types and interfaces', + recommended: false, + extendsBaseRule: true, + }, + fixable: 'whitespace', + hasSuggestions: baseRule.meta.hasSuggestions, + schema: [baseSchema], + messages: baseRule.meta.messages, + }, + defaultOptions: [{}], + + create(context, [options]) { + const sourceCode = context.getSourceCode(); + const baseRules = baseRule.create(context); + + /** + * @returns the column of the position after converting all unicode characters in the line to 1 char length + */ + function adjustedColumn(position: TSESTree.Position): number { + const line = position.line - 1; // position.line is 1-indexed + return util.getStringLength( + sourceCode.lines[line].slice(0, position.column), + ); + } + + /** + * Starting from the given a node (a property.key node here) looks forward + * until it finds the last token before a colon punctuator and returns it. + */ + function getLastTokenBeforeColon(node: TSESTree.Node): TSESTree.Token { + const colonToken = sourceCode.getTokenAfter(node, util.isColonToken)!; + + return sourceCode.getTokenBefore(colonToken)!; + } + + type KeyTypeNode = + | TSESTree.TSIndexSignature + | TSESTree.TSPropertySignature + | TSESTree.PropertyDefinition; + + type KeyTypeNodeWithTypeAnnotation = KeyTypeNode & { + typeAnnotation: TSESTree.TSTypeAnnotation; + }; + + function isKeyTypeNode( + node: TSESTree.Node, + ): node is KeyTypeNodeWithTypeAnnotation { + return ( + (node.type === AST_NODE_TYPES.TSPropertySignature || + node.type === AST_NODE_TYPES.TSIndexSignature || + node.type === AST_NODE_TYPES.PropertyDefinition) && + !!node.typeAnnotation + ); + } + + /** + * To handle index signatures, to get the whole text for the parameters + */ + function getKeyText(node: KeyTypeNodeWithTypeAnnotation): string { + if (node.type !== AST_NODE_TYPES.TSIndexSignature) { + return sourceCode.getText(node.key); + } + + const code = sourceCode.getText(node); + return code.slice( + 0, + sourceCode.getTokenAfter( + node.parameters.at(-1)!, + util.isClosingBracketToken, + )!.range[1] - node.range[0], + ); + } + + /** + * To handle index signatures, be able to get the end position of the parameters + */ + function getKeyLocEnd( + node: KeyTypeNodeWithTypeAnnotation, + ): TSESTree.Position { + return getLastTokenBeforeColon( + node.type !== AST_NODE_TYPES.TSIndexSignature + ? node.key + : node.parameters.at(-1)!, + ).loc.end; + } + + function checkBeforeColon( + node: KeyTypeNodeWithTypeAnnotation, + expectedWhitespaceBeforeColon: number, + mode: 'strict' | 'minimum', + ): void { + const { typeAnnotation } = node; + const colon = typeAnnotation.loc.start.column; + const keyEnd = getKeyLocEnd(node); + const difference = colon - keyEnd.column - expectedWhitespaceBeforeColon; + if (mode === 'strict' ? difference : difference < 0) { + context.report({ + node, + messageId: difference > 0 ? 'extraKey' : 'missingKey', + fix: fixer => { + if (difference > 0) { + return fixer.removeRange([ + typeAnnotation.range[0] - difference, + typeAnnotation.range[0], + ]); + } else { + return fixer.insertTextBefore( + typeAnnotation, + ' '.repeat(-difference), + ); + } + }, + data: { + computed: '', + key: getKeyText(node), + }, + }); + } + } + + function checkAfterColon( + node: KeyTypeNodeWithTypeAnnotation, + expectedWhitespaceAfterColon: number, + mode: 'strict' | 'minimum', + ): void { + const { typeAnnotation } = node; + const colon = typeAnnotation.loc.start.column; + const typeStart = typeAnnotation.typeAnnotation.loc.start.column; + const difference = typeStart - colon - 1 - expectedWhitespaceAfterColon; + if (mode === 'strict' ? difference : difference < 0) { + context.report({ + node, + messageId: difference > 0 ? 'extraValue' : 'missingValue', + fix: fixer => { + if (difference > 0) { + return fixer.removeRange([ + typeAnnotation.typeAnnotation.range[0] - difference, + typeAnnotation.typeAnnotation.range[0], + ]); + } else { + return fixer.insertTextBefore( + typeAnnotation.typeAnnotation, + ' '.repeat(-difference), + ); + } + }, + data: { + computed: '', + key: getKeyText(node), + }, + }); + } + } + + // adapted from https://github.com/eslint/eslint/blob/ba74253e8bd63e9e163bbee0540031be77e39253/lib/rules/key-spacing.js#L356 + function continuesAlignGroup( + lastMember: TSESTree.Node, + candidate: TSESTree.Node, + ): boolean { + const groupEndLine = lastMember.loc.start.line; + const candidateValueStartLine = ( + isKeyTypeNode(candidate) ? candidate.typeAnnotation : candidate + ).loc.start.line; + + if (candidateValueStartLine === groupEndLine) { + return false; + } + + if (candidateValueStartLine - groupEndLine === 1) { + return true; + } + + /* + * Check that the first comment is adjacent to the end of the group, the + * last comment is adjacent to the candidate property, and that successive + * comments are adjacent to each other. + */ + const leadingComments = sourceCode.getCommentsBefore(candidate); + + if ( + leadingComments.length && + leadingComments[0].loc.start.line - groupEndLine <= 1 && + candidateValueStartLine - leadingComments.at(-1)!.loc.end.line <= 1 + ) { + for (let i = 1; i < leadingComments.length; i++) { + if ( + leadingComments[i].loc.start.line - + leadingComments[i - 1].loc.end.line > + 1 + ) { + return false; + } + } + return true; + } + + return false; + } + + function checkAlignGroup(group: TSESTree.Node[]): void { + let alignColumn = 0; + const align: 'value' | 'colon' = + (typeof options.align === 'object' + ? options.align.on + : typeof options.multiLine?.align === 'object' + ? options.multiLine.align.on + : options.multiLine?.align ?? options.align) ?? 'colon'; + const beforeColon = + (typeof options.align === 'object' + ? options.align.beforeColon + : options.multiLine + ? typeof options.multiLine.align === 'object' + ? options.multiLine.align.beforeColon + : options.multiLine.beforeColon + : options.beforeColon) ?? false; + const expectedWhitespaceBeforeColon = beforeColon ? 1 : 0; + const afterColon = + (typeof options.align === 'object' + ? options.align.afterColon + : options.multiLine + ? typeof options.multiLine.align === 'object' + ? options.multiLine.align.afterColon + : options.multiLine.afterColon + : options.afterColon) ?? true; + const expectedWhitespaceAfterColon = afterColon ? 1 : 0; + const mode = + (typeof options.align === 'object' + ? options.align.mode + : options.multiLine + ? typeof options.multiLine.align === 'object' + ? // same behavior as in original rule + options.multiLine.align.mode ?? options.multiLine.mode + : options.multiLine.mode + : options.mode) ?? 'strict'; + + for (const node of group) { + if (isKeyTypeNode(node)) { + const keyEnd = adjustedColumn(getKeyLocEnd(node)); + alignColumn = Math.max( + alignColumn, + align === 'colon' + ? keyEnd + expectedWhitespaceBeforeColon + : keyEnd + + ':'.length + + expectedWhitespaceAfterColon + + expectedWhitespaceBeforeColon, + ); + } + } + + for (const node of group) { + if (!isKeyTypeNode(node)) { + continue; + } + const { typeAnnotation } = node; + const toCheck = + align === 'colon' ? typeAnnotation : typeAnnotation.typeAnnotation; + const difference = adjustedColumn(toCheck.loc.start) - alignColumn; + + if (difference) { + context.report({ + node, + messageId: + difference > 0 + ? align === 'colon' + ? 'extraKey' + : 'extraValue' + : align === 'colon' + ? 'missingKey' + : 'missingValue', + fix: fixer => { + if (difference > 0) { + return fixer.removeRange([ + toCheck.range[0] - difference, + toCheck.range[0], + ]); + } else { + return fixer.insertTextBefore(toCheck, ' '.repeat(-difference)); + } + }, + data: { + computed: '', + key: getKeyText(node), + }, + }); + } + + if (align === 'colon') { + checkAfterColon(node, expectedWhitespaceAfterColon, mode); + } else { + checkBeforeColon(node, expectedWhitespaceBeforeColon, mode); + } + } + } + + function checkIndividualNode( + node: TSESTree.Node, + { singleLine }: { singleLine: boolean }, + ): void { + const beforeColon = + (singleLine + ? options.singleLine + ? options.singleLine.beforeColon + : options.beforeColon + : options.multiLine + ? options.multiLine.beforeColon + : options.beforeColon) ?? false; + const expectedWhitespaceBeforeColon = beforeColon ? 1 : 0; + const afterColon = + (singleLine + ? options.singleLine + ? options.singleLine.afterColon + : options.afterColon + : options.multiLine + ? options.multiLine.afterColon + : options.afterColon) ?? true; + const expectedWhitespaceAfterColon = afterColon ? 1 : 0; + const mode = + (singleLine + ? options.singleLine + ? options.singleLine.mode + : options.mode + : options.multiLine + ? options.multiLine.mode + : options.mode) ?? 'strict'; + + if (isKeyTypeNode(node)) { + checkBeforeColon(node, expectedWhitespaceBeforeColon, mode); + checkAfterColon(node, expectedWhitespaceAfterColon, mode); + } + } + + function validateBody( + body: + | TSESTree.TSTypeLiteral + | TSESTree.TSInterfaceBody + | TSESTree.ClassBody, + ): void { + const isSingleLine = body.loc.start.line === body.loc.end.line; + + const members = + body.type === AST_NODE_TYPES.TSTypeLiteral ? body.members : body.body; + + let alignGroups: TSESTree.Node[][] = []; + let unalignedElements: TSESTree.Node[] = []; + + if (options.align || options.multiLine?.align) { + let currentAlignGroup: TSESTree.Node[] = []; + alignGroups.push(currentAlignGroup); + + let prevNode: TSESTree.Node | undefined = undefined; + + for (const node of members) { + let prevAlignedNode = currentAlignGroup.at(-1); + if (prevAlignedNode !== prevNode) { + prevAlignedNode = undefined; + } + + if (prevAlignedNode && continuesAlignGroup(prevAlignedNode, node)) { + currentAlignGroup.push(node); + } else if (prevNode?.loc.start.line === node.loc.start.line) { + if (prevAlignedNode) { + // Here, prevNode === prevAlignedNode === currentAlignGroup.at(-1) + unalignedElements.push(prevAlignedNode); + currentAlignGroup.pop(); + } + unalignedElements.push(node); + } else { + currentAlignGroup = [node]; + alignGroups.push(currentAlignGroup); + } + + prevNode = node; + } + + unalignedElements = unalignedElements.concat( + ...alignGroups.filter(group => group.length === 1), + ); + alignGroups = alignGroups.filter(group => group.length >= 2); + } else { + unalignedElements = members; + } + + for (const group of alignGroups) { + checkAlignGroup(group); + } + + for (const node of unalignedElements) { + checkIndividualNode(node, { singleLine: isSingleLine }); + } + } + return { + ...baseRules, + TSTypeLiteral: validateBody, + TSInterfaceBody: validateBody, + ClassBody: validateBody, + }; + }, +}); diff --git a/packages/eslint-plugin/src/rules/member-ordering.ts b/packages/eslint-plugin/src/rules/member-ordering.ts index 87022f16f4fd..81e0ae6484e9 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 bc2547ffa3f6..02900ab1d8b6 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 179b6dd7f43d..ff91d2e156d4 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 05f3dd0f2a6b..3b500b0b347e 100644 --- a/packages/eslint-plugin/src/rules/naming-convention.ts +++ b/packages/eslint-plugin/src/rules/naming-convention.ts @@ -127,7 +127,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 030ed4fe1886..5a6872f57484 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-optional-chain.ts b/packages/eslint-plugin/src/rules/prefer-optional-chain.ts index 95295fc4d1b5..d52aa2f4eace 100644 --- a/packages/eslint-plugin/src/rules/prefer-optional-chain.ts +++ b/packages/eslint-plugin/src/rules/prefer-optional-chain.ts @@ -490,10 +490,20 @@ function reportIfMoreThanOne({ shouldHandleChainedAnds && previous.right.type === AST_NODE_TYPES.BinaryExpression ) { + let operator = previous.right.operator; + if ( + previous.right.operator === '!==' && + // TODO(#4820): Use the type checker to know whether this is `null` + previous.right.right.type === AST_NODE_TYPES.Literal && + previous.right.right.raw === 'null' + ) { + // case like foo !== null && foo.bar !== null + operator = '!='; + } // case like foo && foo.bar !== someValue - optionallyChainedCode += ` ${ - previous.right.operator - } ${sourceCode.getText(previous.right.right)}`; + optionallyChainedCode += ` ${operator} ${sourceCode.getText( + previous.right.right, + )}`; } context.report({ 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 f0949acd16cd..31a570652dcb 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 b7b57e467056..713a9e51d6e5 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 c95a7fd35e1a..6741f4df09f2 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/src/util/getESLintCoreRule.ts b/packages/eslint-plugin/src/util/getESLintCoreRule.ts index 86dfcc9393df..76482d4f24ac 100644 --- a/packages/eslint-plugin/src/util/getESLintCoreRule.ts +++ b/packages/eslint-plugin/src/util/getESLintCoreRule.ts @@ -12,6 +12,7 @@ interface RuleMap { 'dot-notation': typeof import('eslint/lib/rules/dot-notation'); indent: typeof import('eslint/lib/rules/indent'); 'init-declarations': typeof import('eslint/lib/rules/init-declarations'); + 'key-spacing': typeof import('eslint/lib/rules/key-spacing'); 'keyword-spacing': typeof import('eslint/lib/rules/keyword-spacing'); 'lines-between-class-members': typeof import('eslint/lib/rules/lines-between-class-members'); 'no-dupe-args': typeof import('eslint/lib/rules/no-dupe-args'); diff --git a/packages/eslint-plugin/src/util/getStringLength.ts b/packages/eslint-plugin/src/util/getStringLength.ts new file mode 100644 index 000000000000..65a22551949a --- /dev/null +++ b/packages/eslint-plugin/src/util/getStringLength.ts @@ -0,0 +1,17 @@ +import GraphemeSplitter from 'grapheme-splitter'; + +let splitter: GraphemeSplitter; + +function isASCII(value: string): boolean { + return /^[\u0020-\u007f]*$/u.test(value); +} + +export function getStringLength(value: string): number { + if (isASCII(value)) { + return value.length; + } + + splitter ??= new GraphemeSplitter(); + + return splitter.countGraphemes(value); +} diff --git a/packages/eslint-plugin/src/util/index.ts b/packages/eslint-plugin/src/util/index.ts index b2ad2927773a..53a19a96d368 100644 --- a/packages/eslint-plugin/src/util/index.ts +++ b/packages/eslint-plugin/src/util/index.ts @@ -5,6 +5,7 @@ export * from './collectUnusedVariables'; export * from './createRule'; export * from './getFunctionHeadLoc'; export * from './getOperatorPrecedence'; +export * from './getStringLength'; export * from './getThisExpression'; export * from './getWrappingFixer'; export * from './isNodeEqual'; diff --git a/packages/eslint-plugin/tests/rules/ban-ts-comment.test.ts b/packages/eslint-plugin/tests/rules/ban-ts-comment.test.ts index 7e8ef295ba91..54855f19cf39 100644 --- a/packages/eslint-plugin/tests/rules/ban-ts-comment.test.ts +++ b/packages/eslint-plugin/tests/rules/ban-ts-comment.test.ts @@ -45,6 +45,14 @@ ruleTester.run('ts-expect-error', rule, { }, ], }, + { + code: noFormat`// @ts-expect-error 👨‍👩‍👧‍👦👨‍👩‍👧‍👦👨‍👩‍👧‍👦`, + options: [ + { + 'ts-expect-error': 'allow-with-description', + }, + ], + }, ], invalid: [ { @@ -228,6 +236,22 @@ if (false) { }, ], }, + { + code: noFormat`// @ts-expect-error 👨‍👩‍👧‍👦`, + options: [ + { + 'ts-expect-error': 'allow-with-description', + }, + ], + errors: [ + { + data: { directive: 'expect-error', minimumDescriptionLength: 3 }, + messageId: 'tsDirectiveCommentRequiresDescription', + line: 1, + column: 1, + }, + ], + }, ], }); @@ -266,6 +290,14 @@ ruleTester.run('ts-ignore', rule, { }, ], }, + { + code: noFormat`// @ts-ignore 👨‍👩‍👧‍👦👨‍👩‍👧‍👦👨‍👩‍👧‍👦`, + options: [ + { + 'ts-ignore': 'allow-with-description', + }, + ], + }, ], invalid: [ { @@ -460,6 +492,22 @@ if (false) { }, ], }, + { + code: noFormat`// @ts-ignore 👨‍👩‍👧‍👦`, + options: [ + { + 'ts-ignore': 'allow-with-description', + }, + ], + errors: [ + { + data: { directive: 'ignore', minimumDescriptionLength: 3 }, + messageId: 'tsDirectiveCommentRequiresDescription', + line: 1, + column: 1, + }, + ], + }, ], }); @@ -498,6 +546,14 @@ ruleTester.run('ts-nocheck', rule, { }, ], }, + { + code: noFormat`// @ts-nocheck 👨‍👩‍👧‍👦👨‍👩‍👧‍👦👨‍👩‍👧‍👦`, + options: [ + { + 'ts-nocheck': 'allow-with-description', + }, + ], + }, ], invalid: [ { @@ -668,6 +724,22 @@ if (false) { }, ], }, + { + code: noFormat`// @ts-nocheck 👨‍👩‍👧‍👦`, + options: [ + { + 'ts-nocheck': 'allow-with-description', + }, + ], + errors: [ + { + data: { directive: 'nocheck', minimumDescriptionLength: 3 }, + messageId: 'tsDirectiveCommentRequiresDescription', + line: 1, + column: 1, + }, + ], + }, ], }); @@ -700,6 +772,14 @@ ruleTester.run('ts-check', rule, { }, ], }, + { + code: noFormat`// @ts-check 👨‍👩‍👧‍👦👨‍👩‍👧‍👦👨‍👩‍👧‍👦`, + options: [ + { + 'ts-check': 'allow-with-description', + }, + ], + }, ], invalid: [ { @@ -863,5 +943,21 @@ if (false) { }, ], }, + { + code: noFormat`// @ts-check 👨‍👩‍👧‍👦`, + options: [ + { + 'ts-check': 'allow-with-description', + }, + ], + errors: [ + { + data: { directive: 'check', minimumDescriptionLength: 3 }, + messageId: 'tsDirectiveCommentRequiresDescription', + line: 1, + column: 1, + }, + ], + }, ], }); diff --git a/packages/eslint-plugin/tests/rules/key-spacing.test.ts b/packages/eslint-plugin/tests/rules/key-spacing.test.ts new file mode 100644 index 000000000000..40206258671c --- /dev/null +++ b/packages/eslint-plugin/tests/rules/key-spacing.test.ts @@ -0,0 +1,1278 @@ +/* eslint-disable eslint-comments/no-use */ +// this rule tests the new lines, which prettier will want to fix and break the tests +/* eslint "@typescript-eslint/internal/plugin-test-formatting": ["error", { formatWithPrettier: false }] */ +/* eslint-enable eslint-comments/no-use */ +import rule from '../../src/rules/key-spacing'; +import { RuleTester } from '../RuleTester'; + +const ruleTester = new RuleTester({ + parser: '@typescript-eslint/parser', +}); + +ruleTester.run('key-spacing', rule, { + valid: [ + // align: value + { + code: ` +interface X { + a: number; + abc: string +}; + `, + options: [{ align: 'value' }], + }, + { + code: ` +interface X { + "a:b": number; + abcde: string +}; + `, + options: [{ align: 'value' }], + }, + { + code: ` +let x: { + a: number; + abc: string +}; + `, + options: [{ align: 'value' }], + }, + { + code: ` +let x: { + a: number; + "𐌘": string; + [𐌘]: Date; + "🌷": "bar", // 2 code points + "🎁": "baz", // 2 code points + "🇮🇳": "qux", // 4 code points + "🏳️‍🌈": "xyz", // 6 code points +}; + `, + options: [{ align: 'value' }], + }, + { + code: ` +interface X { + a: number; + abc: string; c: number; +}; + `, + options: [{ align: 'value' }], + }, + { + code: ` +interface X { + a: number; + abc: string; c: number; de: boolean; + abcef: number; +}; + `, + options: [{ align: 'colon' }], + }, + { + code: ` +interface X { + a : number; + abc; + abcef: number; +}; + `, + options: [{ align: 'colon' }], + }, + { + code: ` +interface X { + a?: number; + abc: string +}; + `, + options: [{ align: 'value' }], + }, + { + code: ` +interface X { + a: number; + // Some comment + abc: string +}; + `, + options: [{ align: 'value' }], + }, + { + code: ` +interface X { + a: number; + // Some comment + // on multiple lines + abc: string +}; + `, + options: [{ align: 'value' }], + }, + { + code: ` +interface X { + a: number; + /** + * Some comment + * on multiple lines + */ + abc: string +}; + `, + options: [{ align: 'value' }], + }, + { + code: ` +interface X { + a: number; + /** + * Doc comment + */ + abc: string +}; + `, + options: [{ align: 'value' }], + }, + { + code: ` +interface X { + a: number; + + abc: string +}; + `, + options: [{ align: 'value' }], + }, + { + code: ` +class X { + a: number; + abc: string +}; + `, + options: [{ align: 'value' }], + }, + { + code: ` +class X { + a?: number; + abc: string +}; + `, + options: [{ align: 'value' }], + }, + { + code: ` +class X { + x: number; + z = 1; + xbcef: number; + } + `, + options: [{ align: 'value' }], + }, + { + code: ` +class X { + a: number; + + abc: string +}; + `, + options: [{ align: 'value' }], + }, + { + code: ` +type X = { + a: number; + abc: string +}; + `, + options: [{ align: 'value' }], + }, + { + code: ` +type X = { + a: number; + + abc: string +}; + `, + options: [{ align: 'value' }], + }, + { + code: ` +type X = { + a : number; + abc: string +}; + `, + options: [{ align: 'value', mode: 'minimum' }], + }, + { + code: ` +type X = { + a : number; + abc: string +}; + `, + options: [ + { + align: { + on: 'value', + mode: 'minimum', + beforeColon: false, + afterColon: true, + }, + }, + ], + }, + { + code: ` +interface X { + a: number; + prop: { + abc: number; + a: number; + }; + abc: string +} + `, + options: [{ align: 'value' }], + }, + { + code: ` +class X { + a: number; + prop: { + abc: number; + a: number; + }; + abc: string + x = 1; + d: number; + z: number = 1; + ef: string; +} + `, + options: [{ align: 'value' }], + }, + // align: colon + { + code: ` +interface X { + a : number; + abc: string +}; + `, + options: [{ align: 'colon' }], + }, + { + code: ` +interface X { + a :number; + abc:string +}; + `, + options: [{ align: 'colon', afterColon: false }], + }, + { + code: ` +interface X { + a : number; + abc: string +}; + `, + options: [{ align: 'colon', mode: 'minimum' }], + }, + // no align + { + code: ` +interface X { + a: number; + abc: string +}; + `, + options: [{}], + }, + { + code: ` +interface X { + a : number; + abc : string +}; + `, + options: [{ beforeColon: true }], + }, + // singleLine / multiLine + { + code: ` +interface X { + a : number; + abc : string +}; + `, + options: [ + { + singleLine: { beforeColon: false, afterColon: false }, + multiLine: { beforeColon: true, afterColon: true }, + }, + ], + }, + { + code: ` +interface X { + a : number; + abc : string +}; + `, + options: [ + { + align: { on: 'value', beforeColon: true, afterColon: true }, + singleLine: { beforeColon: false, afterColon: false }, + multiLine: { beforeColon: false, afterColon: false }, + }, + ], + }, + { + code: ` +interface X { + a : number; + abc : string +}; + `, + options: [ + { + align: { beforeColon: true, afterColon: true }, // defaults to 'colon' + singleLine: { beforeColon: false, afterColon: false }, + multiLine: { beforeColon: false, afterColon: false }, + }, + ], + }, + { + code: ` +interface X { + a : number; + abc : string +}; + `, + options: [ + { + singleLine: { beforeColon: false, afterColon: false }, + multiLine: { beforeColon: true, afterColon: true, align: 'value' }, + }, + ], + }, + { + code: ` +interface X { + a : number; + abc : string +}; + `, + options: [ + { + singleLine: { beforeColon: false, afterColon: false }, + multiLine: { + beforeColon: true, + afterColon: true, + align: { + on: 'colon', + mode: 'strict', + afterColon: true, + beforeColon: true, + }, + }, + }, + ], + }, + { + code: ` +interface X { + a : number; + abc : string +}; + `, + options: [ + { + singleLine: { beforeColon: false, afterColon: false }, + multiLine: { + beforeColon: true, + afterColon: true, + align: { + mode: 'strict', + afterColon: true, + beforeColon: true, + }, + }, + }, + ], + }, + { + code: ` +interface X { + a : number; + abc : string +}; + `, + options: [ + { + beforeColon: true, + afterColon: true, + align: { + on: 'colon', + mode: 'strict', + afterColon: true, + beforeColon: true, + }, + }, + ], + }, + { + code: ` +interface X { + a : number; + abc : string +}; + `, + options: [ + { + beforeColon: true, + afterColon: true, + align: { + mode: 'strict', + afterColon: true, + beforeColon: true, + }, + }, + ], + }, + { + code: ` +interface X { + a : number; + abc: string + + xadzd : number; +}; + `, + options: [ + { + singleLine: { beforeColon: false, afterColon: false }, + multiLine: { + beforeColon: true, + afterColon: true, + align: { + on: 'colon', + mode: 'strict', + afterColon: true, + beforeColon: false, + }, + }, + }, + ], + }, + { + code: ` +interface X { + a : number; + abc: string + + xadzd : number; +}; + `, + options: [ + { + singleLine: { beforeColon: false, afterColon: false }, + multiLine: { + beforeColon: true, + afterColon: true, + mode: 'strict', + align: { + on: 'colon', + afterColon: true, + beforeColon: false, + }, + }, + }, + ], + }, + { + code: ` +interface X { + a : number; + abc: string + + xadzd : number; +}; + `, + options: [ + { + singleLine: { beforeColon: false, afterColon: false }, + multiLine: { + beforeColon: true, + afterColon: true, + mode: 'minimum', + align: { + on: 'colon', + afterColon: true, + beforeColon: false, + }, + }, + }, + ], + }, + { + code: ` +interface X { a:number; abc:string; }; + `, + options: [ + { + singleLine: { beforeColon: false, afterColon: false }, + multiLine: { beforeColon: true, afterColon: true }, + }, + ], + }, + ], + invalid: [ + // align: value + { + code: ` +interface X { + a: number; + abc: string +}; + `, + output: ` +interface X { + a: number; + abc: string +}; + `, + options: [{ align: 'value' }], + errors: [{ messageId: 'missingValue' }], + }, + { + code: ` +interface X { + a: number; + "a:c": string +}; + `, + output: ` +interface X { + a: number; + "a:c": string +}; + `, + options: [{ align: 'value' }], + errors: [{ messageId: 'missingValue' }], + }, + { + code: ` +let x: { + a: number; + abc: string +}; + `, + output: ` +let x: { + a: number; + abc: string +}; + `, + options: [{ align: 'value' }], + errors: [{ messageId: 'missingValue' }], + }, + { + code: ` +let x: { + a: number; + abc: string +}; + `, + output: ` +let x: { + a: number; + abc: string +}; + `, + options: [{ align: { on: 'value' } }], + errors: [{ messageId: 'missingValue' }], + }, + { + code: ` +let x: { + a: number; + "🌷": "bar", // 2 code points + "🎁": "baz", // 2 code points + "🇮🇳": "qux", // 4 code points + "🏳️‍🌈": "xyz", // 6 code points + [𐌘]: string + "𐌘": string +}; + `, + output: ` +let x: { + a: number; + "🌷": "bar", // 2 code points + "🎁": "baz", // 2 code points + "🇮🇳": "qux", // 4 code points + "🏳️‍🌈": "xyz", // 6 code points + [𐌘]: string + "𐌘": string +}; + `, + options: [{ align: 'value' }], + errors: [{ messageId: 'missingValue' }], + }, + { + code: ` +class X { + a: number; + abc: string +}; + `, + output: ` +class X { + a: number; + abc: string +}; + `, + options: [{ align: 'value' }], + errors: [{ messageId: 'missingValue' }], + }, + { + code: ` +class X { + a: number; + abc: string +}; + `, + output: ` +class X { + a: number; + abc: string +}; + `, + options: [{ align: 'value', mode: 'minimum' }], + errors: [{ messageId: 'missingValue' }], + }, + { + code: ` +class X { + a: number; + b; + abc: string +}; + `, + output: ` +class X { + a: number; + b; + abc: string +}; + `, + options: [{ align: 'value', mode: 'minimum' }], + errors: [{ messageId: 'missingValue' }], + }, + { + code: ` +type X = { + a: number; + abc: string +}; + `, + output: ` +type X = { + a: number; + abc: string +}; + `, + options: [{ align: 'value' }], + errors: [{ messageId: 'missingValue' }], + }, + { + code: ` +interface X { + a: number; + abc: string +}; + `, + output: ` +interface X { + a: number; + abc: string +}; + `, + options: [{ align: 'value' }], + errors: [{ messageId: 'extraValue' }], + }, + { + code: ` +class X { + a: number; + abc: string +}; + `, + output: ` +class X { + a: number; + abc: string +}; + `, + options: [{ align: 'value' }], + errors: [{ messageId: 'extraValue' }], + }, + { + code: ` +class X { + x: number; + z = 1; + xbcef: number; + } + `, + output: ` +class X { + x: number; + z = 1; + xbcef: number; + } + `, + options: [{ align: 'value' }], + errors: [{ messageId: 'missingValue' }], + }, + { + code: ` +interface X { + a: number; + + abc : string +}; + `, + output: ` +interface X { + a: number; + + abc: string +}; + `, + options: [{ align: 'value' }], + errors: [{ messageId: 'extraValue' }, { messageId: 'extraKey' }], + }, + { + code: ` +class X { + a: number; + + abc : string +}; + `, + output: ` +class X { + a: number; + + abc: string +}; + `, + options: [{ align: 'value' }], + errors: [{ messageId: 'extraValue' }, { messageId: 'extraKey' }], + }, + { + code: ` +interface X { + a: number; + // Some comment + + // interrupted in the middle + abc: string +}; + `, + output: ` +interface X { + a: number; + // Some comment + + // interrupted in the middle + abc: string +}; + `, + options: [{ align: 'value' }], + errors: [{ messageId: 'extraValue' }], + }, + { + code: ` +interface X { + a: number; + /** + * Multiline comment + */ + + /** interrupted in the middle */ + abc: string +}; + `, + output: ` +interface X { + a: number; + /** + * Multiline comment + */ + + /** interrupted in the middle */ + abc: string +}; + `, + options: [{ align: 'value' }], + errors: [{ messageId: 'extraValue' }], + }, + { + code: ` +interface X { + a: number; + prop: { + abc: number; + a: number; + }, + abc: string +} + `, + output: ` +interface X { + a: number; + prop: { + abc: number; + a: number; + }, + abc: string +} + `, + options: [{ align: 'value' }], + errors: [{ messageId: 'missingValue' }], + }, + { + code: ` +interface X { + a: number; + prop: { + abc: number; + a: number; + }, + abc: string +} + `, + output: ` +interface X { + a: number; + prop: { + abc: number; + a: number; + }, + abc: string +} + `, + options: [{ align: 'value' }], + errors: [{ messageId: 'missingValue' }], + }, + { + code: ` +interface X { + a: number; + prop: { + abc: number; + a: number; + }, + abc: string +} + `, + output: ` +interface X { + a: number; + prop: { + abc: number; + a: number; + }, + abc: string +} + `, + options: [{ align: 'value' }], + errors: [{ messageId: 'extraValue' }], + }, + { + code: ` +class X { + a: number; + prop: { + abc: number; + a?: number; + }; + abc: string; + x = 1; + d: number; + z: number = 1; + ef: string; +} + `, + output: ` +class X { + a: number; + prop: { + abc: number; + a?: number; + }; + abc: string; + x = 1; + d: number; + z: number = 1; + ef: string; +} + `, + options: [{ align: 'value' }], + errors: [ + { messageId: 'extraValue' }, + { messageId: 'missingValue' }, + { messageId: 'missingValue' }, + { messageId: 'missingValue' }, + { messageId: 'missingValue' }, + ], + }, + // align: colon + { + code: ` +interface X { + a : number; + abc: string +}; + `, + output: ` +interface X { + a : number; + abc: string +}; + `, + options: [{ align: 'colon' }], + errors: [{ messageId: 'extraKey' }], + }, + { + code: ` +interface X { + a : number; + abc: string +}; + `, + output: ` +interface X { + a : number; + abc: string +}; + `, + options: [{ align: { on: 'colon' } }], + errors: [{ messageId: 'extraKey' }], + }, + { + code: ` +interface X { + a : number; + abc: string +}; + `, + output: ` +interface X { + a : number; + abc : string +}; + `, + options: [{ align: 'colon', beforeColon: true, afterColon: true }], + errors: [{ messageId: 'missingKey' }], + }, + // no align + { + code: ` +interface X { + [x: number]: string; +} + `, + output: ` +interface X { + [x: number]: string; +} + `, + errors: [{ messageId: 'extraValue' }], + }, + { + code: ` +interface X { + [x: number]:string; +} + `, + output: ` +interface X { + [x: number]: string; +} + `, + errors: [{ messageId: 'missingValue' }], + }, + // singleLine / multiLine + { + code: ` +interface X { + a:number; + abc:string +}; + `, + output: ` +interface X { + a : number; + abc : string +}; + `, + options: [ + { + singleLine: { beforeColon: false, afterColon: false }, + multiLine: { beforeColon: true, afterColon: true }, + }, + ], + errors: [ + { messageId: 'missingKey' }, + { messageId: 'missingValue' }, + { messageId: 'missingKey' }, + { messageId: 'missingValue' }, + ], + }, + { + code: ` +interface X { a : number; abc : string; }; + `, + output: ` +interface X { a:number; abc:string; }; + `, + options: [ + { + singleLine: { beforeColon: false, afterColon: false }, + multiLine: { beforeColon: true, afterColon: true }, + }, + ], + errors: [ + { messageId: 'extraKey' }, + { messageId: 'extraValue' }, + { messageId: 'extraKey' }, + { messageId: 'extraValue' }, + ], + }, + { + code: ` +interface X { a : number; abc : string; }; + `, + output: ` +interface X { a: number; abc: string; }; + `, + options: [ + { + singleLine: { beforeColon: false, afterColon: true }, + multiLine: { beforeColon: true, afterColon: true }, + }, + ], + errors: [{ messageId: 'extraKey' }, { messageId: 'extraKey' }], + }, + { + code: ` +interface X { a:number; abc:string; }; + `, + output: ` +interface X { a : number; abc : string; }; + `, + options: [ + { + singleLine: { beforeColon: true, afterColon: true, mode: 'strict' }, + multiLine: { beforeColon: true, afterColon: true }, + }, + ], + errors: [ + { messageId: 'missingKey' }, + { messageId: 'missingValue' }, + { messageId: 'missingKey' }, + { messageId: 'missingValue' }, + ], + }, + { + code: ` +interface X { a:number; abc: string; }; + `, + output: ` +interface X { a : number; abc : string; }; + `, + options: [ + { + singleLine: { beforeColon: true, afterColon: true, mode: 'minimum' }, + multiLine: { beforeColon: true, afterColon: true }, + }, + ], + errors: [ + { messageId: 'missingKey' }, + { messageId: 'missingValue' }, + { messageId: 'missingKey' }, + ], + }, + { + code: ` +interface X { a : number; abc : string; }; + `, + output: ` +interface X { a:number; abc:string; }; + `, + options: [ + { + beforeColon: false, + afterColon: false, + }, + ], + errors: [ + { messageId: 'extraKey' }, + { messageId: 'extraValue' }, + { messageId: 'extraKey' }, + { messageId: 'extraValue' }, + ], + }, + { + code: ` +interface X { a:number; abc:string; }; + `, + output: ` +interface X { a : number; abc : string; }; + `, + options: [ + { + beforeColon: true, + afterColon: true, + mode: 'strict', + }, + ], + errors: [ + { messageId: 'missingKey' }, + { messageId: 'missingValue' }, + { messageId: 'missingKey' }, + { messageId: 'missingValue' }, + ], + }, + { + code: ` +type Wacky = { + a: number; + b: string; + agc: number; + middle: Date | { + inner: { + a: boolean; + bc: boolean; + "🌷": "rose"; + } + [x: number]: string; + abc: boolean; + } +} & { + a: "string"; + abc: number; +} + `, + output: ` +type Wacky = { + a: number; + b: string; + agc: number; + middle: Date | { + inner: { + a: boolean; + bc: boolean; + "🌷": "rose"; + } + [x: number]: string; + abc: boolean; + } +} & { + a: "string"; + abc: number; +} + `, + options: [{ align: 'value' }], + errors: [ + { messageId: 'missingValue' }, + { messageId: 'missingValue' }, + { messageId: 'missingValue' }, + { messageId: 'missingValue' }, + { messageId: 'missingValue' }, + { messageId: 'missingValue' }, + { messageId: 'missingValue' }, + ], + }, + { + code: ` +class Wacky { + a: number; + b?: string; + public z: number; + abc = 10; + private override xy: number; + static x = "test"; + static abcdef: number = 1; + get fn(): number { return 0; }; + inter: number; + get fn2(): number { + return 1; + }; + agc: number; + middle: Date | { + inner: { + a: boolean; + bc: boolean; + "🌷": "rose"; + } + [x: number]: string; + abc: boolean; + } +} + `, + output: ` +class Wacky { + a: number; + b?: string; + public z: number; + abc = 10; + private override xy: number; + static x = "test"; + static abcdef: number = 1; + get fn(): number { return 0; }; + inter: number; + get fn2(): number { + return 1; + }; + agc: number; + middle: Date | { + inner: { + a: boolean; + bc: boolean; + "🌷": "rose"; + } + [x: number]: string; + abc: boolean; + } +} + `, + options: [{ align: 'value' }], + errors: [ + { messageId: 'missingValue' }, + { messageId: 'missingValue' }, + { messageId: 'missingValue' }, + { messageId: 'missingValue' }, + { messageId: 'missingValue' }, + { messageId: 'missingValue' }, + { messageId: 'missingValue' }, + { messageId: 'missingValue' }, + { messageId: 'missingValue' }, + ], + }, + ], +}); 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 9c72fc7322a9..4f7d789798dd 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 9917aec3cb7a..b55ce321f00a 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/prefer-optional-chain/base-cases.ts b/packages/eslint-plugin/tests/rules/prefer-optional-chain/base-cases.ts new file mode 100644 index 000000000000..99cfe6b0ff9b --- /dev/null +++ b/packages/eslint-plugin/tests/rules/prefer-optional-chain/base-cases.ts @@ -0,0 +1,228 @@ +import type { TSESLint } from '@typescript-eslint/utils'; + +import type rule from '../../../src/rules/prefer-optional-chain'; +import type { + InferMessageIdsTypeFromRule, + InferOptionsTypeFromRule, +} from '../../../src/util'; + +type InvalidTestCase = TSESLint.InvalidTestCase< + InferMessageIdsTypeFromRule, + InferOptionsTypeFromRule +>; + +interface BaseCase { + canReplaceAndWithOr: boolean; + output: string; + code: string; +} + +const mapper = (c: BaseCase): InvalidTestCase => ({ + code: c.code.trim(), + output: null, + errors: [ + { + messageId: 'preferOptionalChain', + suggestions: [ + { + messageId: 'optionalChainSuggest', + output: c.output.trim(), + }, + ], + }, + ], +}); + +const baseCases: Array = [ + // chained members + { + code: 'foo && foo.bar', + output: 'foo?.bar', + canReplaceAndWithOr: true, + }, + { + code: 'foo.bar && foo.bar.baz', + output: 'foo.bar?.baz', + canReplaceAndWithOr: true, + }, + { + code: 'foo && foo()', + output: 'foo?.()', + canReplaceAndWithOr: true, + }, + { + code: 'foo.bar && foo.bar()', + output: 'foo.bar?.()', + canReplaceAndWithOr: true, + }, + { + code: 'foo && foo.bar && foo.bar.baz && foo.bar.baz.buzz', + output: 'foo?.bar?.baz?.buzz', + canReplaceAndWithOr: true, + }, + { + code: 'foo.bar && foo.bar.baz && foo.bar.baz.buzz', + output: 'foo.bar?.baz?.buzz', + canReplaceAndWithOr: true, + }, + // case with a jump (i.e. a non-nullish prop) + { + code: 'foo && foo.bar && foo.bar.baz.buzz', + output: 'foo?.bar?.baz.buzz', + canReplaceAndWithOr: true, + }, + { + code: 'foo.bar && foo.bar.baz.buzz', + output: 'foo.bar?.baz.buzz', + canReplaceAndWithOr: true, + }, + // case where for some reason there is a doubled up expression + { + code: 'foo && foo.bar && foo.bar.baz && foo.bar.baz && foo.bar.baz.buzz', + output: 'foo?.bar?.baz?.buzz', + canReplaceAndWithOr: true, + }, + { + code: 'foo.bar && foo.bar.baz && foo.bar.baz && foo.bar.baz.buzz', + output: 'foo.bar?.baz?.buzz', + canReplaceAndWithOr: true, + }, + // chained members with element access + { + code: 'foo && foo[bar] && foo[bar].baz && foo[bar].baz.buzz', + output: 'foo?.[bar]?.baz?.buzz', + canReplaceAndWithOr: true, + }, + { + // case with a jump (i.e. a non-nullish prop) + code: 'foo && foo[bar].baz && foo[bar].baz.buzz', + output: 'foo?.[bar].baz?.buzz', + canReplaceAndWithOr: true, + }, + // case with a property access in computed property + { + code: 'foo && foo[bar.baz] && foo[bar.baz].buzz', + output: 'foo?.[bar.baz]?.buzz', + canReplaceAndWithOr: true, + }, + // case with this keyword + { + code: 'foo[this.bar] && foo[this.bar].baz', + output: 'foo[this.bar]?.baz', + canReplaceAndWithOr: true, + }, + // chained calls + { + code: 'foo && foo.bar && foo.bar.baz && foo.bar.baz.buzz()', + output: 'foo?.bar?.baz?.buzz()', + canReplaceAndWithOr: true, + }, + { + code: 'foo && foo.bar && foo.bar.baz && foo.bar.baz.buzz && foo.bar.baz.buzz()', + output: 'foo?.bar?.baz?.buzz?.()', + canReplaceAndWithOr: true, + }, + { + code: 'foo.bar && foo.bar.baz && foo.bar.baz.buzz && foo.bar.baz.buzz()', + output: 'foo.bar?.baz?.buzz?.()', + canReplaceAndWithOr: true, + }, + // case with a jump (i.e. a non-nullish prop) + { + code: 'foo && foo.bar && foo.bar.baz.buzz()', + output: 'foo?.bar?.baz.buzz()', + canReplaceAndWithOr: true, + }, + { + code: 'foo.bar && foo.bar.baz.buzz()', + output: 'foo.bar?.baz.buzz()', + canReplaceAndWithOr: true, + }, + { + // case with a jump (i.e. a non-nullish prop) + code: 'foo && foo.bar && foo.bar.baz.buzz && foo.bar.baz.buzz()', + output: 'foo?.bar?.baz.buzz?.()', + canReplaceAndWithOr: true, + }, + { + // case with a call expr inside the chain for some inefficient reason + code: 'foo && foo.bar() && foo.bar().baz && foo.bar().baz.buzz && foo.bar().baz.buzz()', + output: 'foo?.bar()?.baz?.buzz?.()', + canReplaceAndWithOr: true, + }, + // chained calls with element access + { + code: 'foo && foo.bar && foo.bar.baz && foo.bar.baz[buzz]()', + output: 'foo?.bar?.baz?.[buzz]()', + canReplaceAndWithOr: true, + }, + { + code: 'foo && foo.bar && foo.bar.baz && foo.bar.baz[buzz] && foo.bar.baz[buzz]()', + output: 'foo?.bar?.baz?.[buzz]?.()', + canReplaceAndWithOr: true, + }, + // (partially) pre-optional chained + { + code: 'foo && foo?.bar && foo?.bar.baz && foo?.bar.baz[buzz] && foo?.bar.baz[buzz]()', + output: 'foo?.bar?.baz?.[buzz]?.()', + canReplaceAndWithOr: true, + }, + { + code: 'foo && foo?.bar.baz && foo?.bar.baz[buzz]', + output: 'foo?.bar.baz?.[buzz]', + canReplaceAndWithOr: true, + }, + { + code: 'foo && foo?.() && foo?.().bar', + output: 'foo?.()?.bar', + canReplaceAndWithOr: true, + }, + { + code: 'foo.bar && foo.bar?.() && foo.bar?.().baz', + output: 'foo.bar?.()?.baz', + canReplaceAndWithOr: true, + }, + { + code: 'foo !== null && foo.bar !== null', + output: 'foo?.bar != null', + canReplaceAndWithOr: false, + }, + { + code: 'foo != null && foo.bar != null', + output: 'foo?.bar != null', + canReplaceAndWithOr: false, + }, + { + code: 'foo != null && foo.bar !== null', + output: 'foo?.bar != null', + canReplaceAndWithOr: false, + }, + { + code: 'foo !== null && foo.bar != null', + output: 'foo?.bar != null', + canReplaceAndWithOr: false, + }, +]; + +interface Selector { + all(): Array; + select>( + key: K, + value: BaseCase[K], + ): Selector; +} + +const selector = (cases: Array): Selector => ({ + all: () => cases.map(mapper), + select: >( + key: K, + value: BaseCase[K], + ): Selector => { + const selectedCases = baseCases.filter(c => c[key] === value); + return selector(selectedCases); + }, +}); + +const { all, select } = selector(baseCases); + +export { all, select }; diff --git a/packages/eslint-plugin/tests/rules/prefer-optional-chain.test.ts b/packages/eslint-plugin/tests/rules/prefer-optional-chain/prefer-optional-chain.test.ts similarity index 85% rename from packages/eslint-plugin/tests/rules/prefer-optional-chain.test.ts rename to packages/eslint-plugin/tests/rules/prefer-optional-chain/prefer-optional-chain.test.ts index 120ad20aaeac..ca783df13b32 100644 --- a/packages/eslint-plugin/tests/rules/prefer-optional-chain.test.ts +++ b/packages/eslint-plugin/tests/rules/prefer-optional-chain/prefer-optional-chain.test.ts @@ -1,160 +1,11 @@ -import type { TSESLint } from '@typescript-eslint/utils'; - -import rule from '../../src/rules/prefer-optional-chain'; -import type { - InferMessageIdsTypeFromRule, - InferOptionsTypeFromRule, -} from '../../src/util'; -import { noFormat, RuleTester } from '../RuleTester'; +import rule from '../../../src/rules/prefer-optional-chain'; +import { noFormat, RuleTester } from '../../RuleTester'; +import * as BaseCases from './base-cases'; const ruleTester = new RuleTester({ parser: '@typescript-eslint/parser', }); -const baseCases = [ - // chained members - { - code: 'foo && foo.bar', - output: 'foo?.bar', - }, - { - code: 'foo.bar && foo.bar.baz', - output: 'foo.bar?.baz', - }, - { - code: 'foo && foo()', - output: 'foo?.()', - }, - { - code: 'foo.bar && foo.bar()', - output: 'foo.bar?.()', - }, - { - code: 'foo && foo.bar && foo.bar.baz && foo.bar.baz.buzz', - output: 'foo?.bar?.baz?.buzz', - }, - { - code: 'foo.bar && foo.bar.baz && foo.bar.baz.buzz', - output: 'foo.bar?.baz?.buzz', - }, - // case with a jump (i.e. a non-nullish prop) - { - code: 'foo && foo.bar && foo.bar.baz.buzz', - output: 'foo?.bar?.baz.buzz', - }, - { - code: 'foo.bar && foo.bar.baz.buzz', - output: 'foo.bar?.baz.buzz', - }, - // case where for some reason there is a doubled up expression - { - code: 'foo && foo.bar && foo.bar.baz && foo.bar.baz && foo.bar.baz.buzz', - output: 'foo?.bar?.baz?.buzz', - }, - { - code: 'foo.bar && foo.bar.baz && foo.bar.baz && foo.bar.baz.buzz', - output: 'foo.bar?.baz?.buzz', - }, - // chained members with element access - { - code: 'foo && foo[bar] && foo[bar].baz && foo[bar].baz.buzz', - output: 'foo?.[bar]?.baz?.buzz', - }, - { - // case with a jump (i.e. a non-nullish prop) - code: 'foo && foo[bar].baz && foo[bar].baz.buzz', - output: 'foo?.[bar].baz?.buzz', - }, - // case with a property access in computed property - { - code: 'foo && foo[bar.baz] && foo[bar.baz].buzz', - output: 'foo?.[bar.baz]?.buzz', - }, - // case with this keyword - { - code: 'foo[this.bar] && foo[this.bar].baz', - output: 'foo[this.bar]?.baz', - }, - // chained calls - { - code: 'foo && foo.bar && foo.bar.baz && foo.bar.baz.buzz()', - output: 'foo?.bar?.baz?.buzz()', - }, - { - code: 'foo && foo.bar && foo.bar.baz && foo.bar.baz.buzz && foo.bar.baz.buzz()', - output: 'foo?.bar?.baz?.buzz?.()', - }, - { - code: 'foo.bar && foo.bar.baz && foo.bar.baz.buzz && foo.bar.baz.buzz()', - output: 'foo.bar?.baz?.buzz?.()', - }, - // case with a jump (i.e. a non-nullish prop) - { - code: 'foo && foo.bar && foo.bar.baz.buzz()', - output: 'foo?.bar?.baz.buzz()', - }, - { - code: 'foo.bar && foo.bar.baz.buzz()', - output: 'foo.bar?.baz.buzz()', - }, - { - // case with a jump (i.e. a non-nullish prop) - code: 'foo && foo.bar && foo.bar.baz.buzz && foo.bar.baz.buzz()', - output: 'foo?.bar?.baz.buzz?.()', - }, - { - // case with a call expr inside the chain for some inefficient reason - code: 'foo && foo.bar() && foo.bar().baz && foo.bar().baz.buzz && foo.bar().baz.buzz()', - output: 'foo?.bar()?.baz?.buzz?.()', - }, - // chained calls with element access - { - code: 'foo && foo.bar && foo.bar.baz && foo.bar.baz[buzz]()', - output: 'foo?.bar?.baz?.[buzz]()', - }, - { - code: 'foo && foo.bar && foo.bar.baz && foo.bar.baz[buzz] && foo.bar.baz[buzz]()', - output: 'foo?.bar?.baz?.[buzz]?.()', - }, - // (partially) pre-optional chained - { - code: 'foo && foo?.bar && foo?.bar.baz && foo?.bar.baz[buzz] && foo?.bar.baz[buzz]()', - output: 'foo?.bar?.baz?.[buzz]?.()', - }, - { - code: 'foo && foo?.bar.baz && foo?.bar.baz[buzz]', - output: 'foo?.bar.baz?.[buzz]', - }, - { - code: 'foo && foo?.() && foo?.().bar', - output: 'foo?.()?.bar', - }, - { - code: 'foo.bar && foo.bar?.() && foo.bar?.().baz', - output: 'foo.bar?.()?.baz', - }, -].map( - c => - ({ - code: c.code.trim(), - output: null, - errors: [ - { - messageId: 'preferOptionalChain', - suggestions: [ - { - messageId: 'optionalChainSuggest', - output: c.output.trim(), - }, - ], - }, - ], - } as TSESLint.InvalidTestCase< - InferMessageIdsTypeFromRule, - InferOptionsTypeFromRule - >), -); - ruleTester.run('prefer-optional-chain', rule, { valid: [ '!a || !b;', @@ -219,18 +70,18 @@ ruleTester.run('prefer-optional-chain', rule, { '!new.target || true;', ], invalid: [ - ...baseCases, + ...BaseCases.all(), // it should ignore whitespace in the expressions - ...baseCases.map(c => ({ + ...BaseCases.all().map(c => ({ ...c, code: c.code.replace(/\./g, '. '), })), - ...baseCases.map(c => ({ + ...BaseCases.all().map(c => ({ ...c, code: c.code.replace(/\./g, '.\n'), })), // it should ignore parts of the expression that aren't part of the expression chain - ...baseCases.map(c => ({ + ...BaseCases.all().map(c => ({ ...c, code: `${c.code} && bing`, errors: [ @@ -245,7 +96,7 @@ ruleTester.run('prefer-optional-chain', rule, { }, ], })), - ...baseCases.map(c => ({ + ...BaseCases.all().map(c => ({ ...c, code: `${c.code} && bing.bong`, errors: [ @@ -261,22 +112,42 @@ ruleTester.run('prefer-optional-chain', rule, { ], })), // strict nullish equality checks x !== null && x.y !== null - ...baseCases.map(c => ({ + ...BaseCases.all().map(c => ({ ...c, code: c.code.replace(/&&/g, '!== null &&'), })), - ...baseCases.map(c => ({ + ...BaseCases.all().map(c => ({ ...c, code: c.code.replace(/&&/g, '!= null &&'), })), - ...baseCases.map(c => ({ + ...BaseCases.all().map(c => ({ ...c, code: c.code.replace(/&&/g, '!== undefined &&'), })), - ...baseCases.map(c => ({ + ...BaseCases.all().map(c => ({ ...c, code: c.code.replace(/&&/g, '!= undefined &&'), })), + + // replace && with ||: foo && foo.bar -> !foo || !foo.bar + ...BaseCases.select('canReplaceAndWithOr', true) + .all() + .map(c => ({ + ...c, + code: c.code.replace(/(^|\s)foo/g, '$1!foo').replace(/&&/g, '||'), + errors: [ + { + ...c.errors[0], + suggestions: [ + { + ...c.errors[0].suggestions![0], + output: `!${c.errors[0].suggestions![0].output}`, + }, + ], + }, + ], + })), + // two errors { code: noFormat`foo && foo.bar && foo.bar.baz || baz && baz.bar && baz.bar.foo`, @@ -1211,21 +1082,6 @@ foo?.bar(/* comment */a, }, ], }, - ...baseCases.map(c => ({ - ...c, - code: c.code.replace(/foo/g, '!foo').replace(/&&/g, '||'), - errors: [ - { - ...c.errors[0], - suggestions: [ - { - ...c.errors[0].suggestions![0], - output: `!${c.errors[0].suggestions![0].output}`, - }, - ], - }, - ], - })), // case with this keyword at the start of expression { code: '!this.bar || !this.bar.baz;', diff --git a/packages/eslint-plugin/tests/rules/unbound-method.test.ts b/packages/eslint-plugin/tests/rules/unbound-method.test.ts index 2105ef41e593..49b06a4ac509 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/eslint-plugin/tsconfig.json b/packages/eslint-plugin/tsconfig.json index 53deb3aa1bb9..7801773b539b 100644 --- a/packages/eslint-plugin/tsconfig.json +++ b/packages/eslint-plugin/tsconfig.json @@ -10,12 +10,5 @@ { "path": "../parser/tsconfig.build.json" }, { "path": "../scope-manager/tsconfig.build.json" }, { "path": "../type-utils/tsconfig.build.json" } - ], - "ts-node": { - "compilerOptions": { - "module": "ESNext" - }, - "files": true, - "transpileOnly": true - } + ] } diff --git a/packages/eslint-plugin/typings/eslint-rules.d.ts b/packages/eslint-plugin/typings/eslint-rules.d.ts index 951c1d706dfd..57c26fc88996 100644 --- a/packages/eslint-plugin/typings/eslint-rules.d.ts +++ b/packages/eslint-plugin/typings/eslint-rules.d.ts @@ -141,6 +141,58 @@ declare module 'eslint/lib/rules/indent' { export = rule; } +declare module 'eslint/lib/rules/key-spacing' { + import type { TSESLint, TSESTree } from '@typescript-eslint/utils'; + import type { RuleFunction } from '@typescript-eslint/utils/dist/ts-eslint'; + + type Options = [ + { + beforeColon?: boolean; + afterColon?: boolean; + mode?: 'strict' | 'minimum'; + align?: + | 'value' + | 'colon' + | { + on?: 'value' | 'colon'; + beforeColon?: boolean; + afterColon?: boolean; + mode?: 'strict' | 'minimum'; + }; + singleLine?: { + beforeColon?: boolean; + afterColon?: boolean; + mode?: 'strict' | 'minimum'; + }; + multiLine?: { + beforeColon?: boolean; + afterColon?: boolean; + mode?: 'strict' | 'minimum'; + align?: + | 'value' + | 'colon' + | { + on?: 'value' | 'colon'; + beforeColon?: boolean; + afterColon?: boolean; + mode?: 'strict' | 'minimum'; + }; + }; + }, + ]; + type MessageIds = 'extraKey' | 'extraValue' | 'missingKey' | 'missingValue'; + + const rule: TSESLint.RuleModule< + MessageIds, + Options, + { + ObjectExpression: RuleFunction; + Property: RuleFunction; + } + >; + export = rule; +} + declare module 'eslint/lib/rules/keyword-spacing' { import type { TSESLint, TSESTree } from '@typescript-eslint/utils'; import type { RuleFunction } from '@typescript-eslint/utils/dist/ts-eslint'; diff --git a/packages/experimental-utils/CHANGELOG.md b/packages/experimental-utils/CHANGELOG.md index d958d1436812..e578cc75abf2 100644 --- a/packages/experimental-utils/CHANGELOG.md +++ b/packages/experimental-utils/CHANGELOG.md @@ -3,6 +3,42 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [5.49.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.48.2...v5.49.0) (2023-01-23) + +**Note:** Version bump only for package @typescript-eslint/experimental-utils + + + + + +## [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 7a75d8f6a1d3..8e136f432d3e 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.49.0", "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.49.0" }, "peerDependencies": { "eslint": "^7.0.0 || ^8.0.0" diff --git a/packages/parser/CHANGELOG.md b/packages/parser/CHANGELOG.md index ab637d405ae4..e1b4ba3f6982 100644 --- a/packages/parser/CHANGELOG.md +++ b/packages/parser/CHANGELOG.md @@ -3,6 +3,42 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [5.49.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.48.2...v5.49.0) (2023-01-23) + +**Note:** Version bump only for package @typescript-eslint/parser + + + + + +## [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 d4102ec1f6ca..8b70cad54c4e 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.49.0", "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.49.0", + "@typescript-eslint/types": "5.49.0", + "@typescript-eslint/typescript-estree": "5.49.0", + "@typescript-eslint/visitor-keys": "5.49.0", "debug": "^4.3.4" }, "devDependencies": { diff --git a/packages/scope-manager/CHANGELOG.md b/packages/scope-manager/CHANGELOG.md index 7af026248532..7643d240f880 100644 --- a/packages/scope-manager/CHANGELOG.md +++ b/packages/scope-manager/CHANGELOG.md @@ -3,6 +3,42 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [5.49.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.48.2...v5.49.0) (2023-01-23) + +**Note:** Version bump only for package @typescript-eslint/scope-manager + + + + + +## [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 3f9cda42e039..4b708bb6982e 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.49.0", "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.49.0", + "@typescript-eslint/visitor-keys": "5.49.0" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/typescript-estree": "5.46.1", + "@typescript-eslint/typescript-estree": "5.49.0", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/scope-manager/project.json b/packages/scope-manager/project.json index 9d4a6c37c9a7..9694ae861630 100644 --- a/packages/scope-manager/project.json +++ b/packages/scope-manager/project.json @@ -69,9 +69,7 @@ "options": { "parallel": false, "cwd": "packages/scope-manager", - "commands": [ - "../../node_modules/.bin/ts-node --files --transpile-only tools/generate-lib.ts" - ] + "commands": ["yarn tsx tools/generate-lib.ts"] } } }, diff --git a/packages/shared-fixtures/CHANGELOG.md b/packages/shared-fixtures/CHANGELOG.md index 8954c99d3f82..a5102cf788ee 100644 --- a/packages/shared-fixtures/CHANGELOG.md +++ b/packages/shared-fixtures/CHANGELOG.md @@ -3,6 +3,42 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [5.49.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.48.2...v5.49.0) (2023-01-23) + +**Note:** Version bump only for package @typescript-eslint/shared-fixtures + + + + + +## [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 fe37cc399219..3abb676c6aec 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.49.0", "private": true } diff --git a/packages/type-utils/CHANGELOG.md b/packages/type-utils/CHANGELOG.md index 8ef63cde40ce..97cbdcabbc03 100644 --- a/packages/type-utils/CHANGELOG.md +++ b/packages/type-utils/CHANGELOG.md @@ -3,6 +3,42 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [5.49.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.48.2...v5.49.0) (2023-01-23) + +**Note:** Version bump only for package @typescript-eslint/type-utils + + + + + +## [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 faa209e9d7a7..d06ada90e466 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.49.0", "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.49.0", + "@typescript-eslint/utils": "5.49.0", "debug": "^4.3.4", "tsutils": "^3.21.0" }, "devDependencies": { - "@typescript-eslint/parser": "5.46.1", + "@typescript-eslint/parser": "5.49.0", "typescript": "*" }, "peerDependencies": { diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index 3350b0f54706..4424df99e42a 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/CHANGELOG.md @@ -3,6 +3,42 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [5.49.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.48.2...v5.49.0) (2023-01-23) + +**Note:** Version bump only for package @typescript-eslint/types + + + + + +## [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 473d4ad749f7..b78fc480a1a0 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.49.0", "description": "Types for the TypeScript-ESTree AST spec", "keywords": [ "eslint", @@ -29,13 +29,13 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "scripts": { - "prebuild": "yarn ts-node --transpile-only ./tools/copy-ast-spec.ts", + "prebuild": "yarn tsx ./tools/copy-ast-spec.ts", "build": "tsc -b tsconfig.build.json", "postbuild": "downlevel-dts dist _ts3.4/dist", "clean": "tsc -b tsconfig.build.json --clean", "postclean": "rimraf dist && rimraf src/generated && rimraf _ts3.4 && rimraf coverage", "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", - "generate:lib": "../../node_modules/.bin/ts-node --files --transpile-only ../scope-manager/tools/generate-lib.ts", + "generate:lib": "yarn tsx ../scope-manager/tools/generate-lib.ts", "lint": "nx lint", "typecheck": "tsc -p tsconfig.json --noEmit" }, diff --git a/packages/typescript-estree/CHANGELOG.md b/packages/typescript-estree/CHANGELOG.md index 7c12eb686ebb..7db432d3477e 100644 --- a/packages/typescript-estree/CHANGELOG.md +++ b/packages/typescript-estree/CHANGELOG.md @@ -3,6 +3,47 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [5.49.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.48.2...v5.49.0) (2023-01-23) + + +### Bug Fixes + +* **typescript-estree:** fix typo in FAQ link ([#6346](https://github.com/typescript-eslint/typescript-eslint/issues/6346)) ([eefc578](https://github.com/typescript-eslint/typescript-eslint/commit/eefc5781b0f455264e4e58e33c27f8a91b3ab5e3)) + + + + + +## [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/package.json b/packages/typescript-estree/package.json index a17deb244cb2..42a653dfbe76 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.49.0", "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.49.0", + "@typescript-eslint/visitor-keys": "5.49.0", "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.49.0", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/typescript-estree/src/create-program/createProjectProgram.ts b/packages/typescript-estree/src/create-program/createProjectProgram.ts index 1feb8f427968..c1bf64b7b40c 100644 --- a/packages/typescript-estree/src/create-program/createProjectProgram.ts +++ b/packages/typescript-estree/src/create-program/createProjectProgram.ts @@ -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/tests/lib/__snapshots__/parse.test.ts.snap b/packages/typescript-estree/tests/lib/__snapshots__/parse.test.ts.snap index 369094739305..2b406baf12b9 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`] = ` 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 000000000000..25557a24ef51 --- /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', + 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 000000000000..9bebf21de1ae --- /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', + 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 000000000000..699c88f0f235 --- /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 000000000000..eebc01b9369a --- /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 afa44a8c5f84..3e84dd3e069f 100644 --- a/packages/typescript-estree/tests/lib/parse.test.ts +++ b/packages/typescript-estree/tests/lib/parse.test.ts @@ -397,6 +397,7 @@ describe('parseAndGenerateServices', () => { let result: | parser.ParseAndGenerateServicesResult | undefined; + // eslint-disable-next-line jest/valid-expect const exp = expect(() => { result = parser.parseAndGenerateServices(code, { ...config, @@ -752,94 +753,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/semanticInfo.test.ts b/packages/typescript-estree/tests/lib/semanticInfo.test.ts index ba56471f441c..8693c9484c20 100644 --- a/packages/typescript-estree/tests/lib/semanticInfo.test.ts +++ b/packages/typescript-estree/tests/lib/semanticInfo.test.ts @@ -365,7 +365,7 @@ function testIsolatedFile( const declaration = (parseResult.ast.body[0] as TSESTree.VariableDeclaration) .declarations[0]; const arrayMember = (declaration.init! as TSESTree.ArrayExpression) - .elements[0]; + .elements[0]!; expect(parseResult).toHaveProperty('services.esTreeNodeToTSNodeMap'); // get corresponding TS node diff --git a/packages/typescript-estree/tools/test-utils.ts b/packages/typescript-estree/tools/test-utils.ts index b3b873acc6a4..6f40b597ca73 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 408534815441..119494deff16 100644 --- a/packages/utils/CHANGELOG.md +++ b/packages/utils/CHANGELOG.md @@ -3,6 +3,42 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [5.49.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.48.2...v5.49.0) (2023-01-23) + +**Note:** Version bump only for package @typescript-eslint/utils + + + + + +## [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 65e0b606d08c..c91f4538bb63 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.49.0", "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.49.0", + "@typescript-eslint/types": "5.49.0", + "@typescript-eslint/typescript-estree": "5.49.0", "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.49.0", "typescript": "*" }, "funding": { diff --git a/packages/visitor-keys/CHANGELOG.md b/packages/visitor-keys/CHANGELOG.md index d3c1d03fde29..77bc19f5a7d0 100644 --- a/packages/visitor-keys/CHANGELOG.md +++ b/packages/visitor-keys/CHANGELOG.md @@ -3,6 +3,42 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [5.49.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.48.2...v5.49.0) (2023-01-23) + +**Note:** Version bump only for package @typescript-eslint/visitor-keys + + + + + +## [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 8b08cd214867..0bd85832e564 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.49.0", "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.49.0", "eslint-visitor-keys": "^3.3.0" }, "devDependencies": { diff --git a/packages/website-eslint/CHANGELOG.md b/packages/website-eslint/CHANGELOG.md index 1006fd2ea831..f8a5a882f820 100644 --- a/packages/website-eslint/CHANGELOG.md +++ b/packages/website-eslint/CHANGELOG.md @@ -3,6 +3,42 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [5.49.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.48.2...v5.49.0) (2023-01-23) + +**Note:** Version bump only for package @typescript-eslint/website-eslint + + + + + +## [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 116184896994..a11f84e15a25 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.49.0", "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.49.0", + "@typescript-eslint/utils": "5.49.0" }, "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.49.0", + "@typescript-eslint/parser": "5.49.0", + "@typescript-eslint/scope-manager": "5.49.0", + "@typescript-eslint/typescript-estree": "5.49.0", + "@typescript-eslint/visitor-keys": "5.49.0", "eslint": "*", "rollup": "^2.75.4", "rollup-plugin-terser": "^7.0.2", diff --git a/packages/website/CHANGELOG.md b/packages/website/CHANGELOG.md index b0a49ca4a19f..3558af9ab446 100644 --- a/packages/website/CHANGELOG.md +++ b/packages/website/CHANGELOG.md @@ -3,6 +3,42 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [5.49.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.48.2...v5.49.0) (2023-01-23) + +**Note:** Version bump only for package website + + + + + +## [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 d550faf83f85..0ad6496d8453 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 f2e254b7fd07..2397fc252a2d 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -1,6 +1,6 @@ { "name": "website", - "version": "5.46.1", + "version": "5.49.0", "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.49.0", + "@typescript-eslint/website-eslint": "5.49.0", "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.49.0", "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 37bd4e02cc40..90f0b3fa6f70 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 fe84b9c1ae39..770ab620ec02 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', ], @@ -38,6 +39,7 @@ module.exports = { 'custom-rules', { items: [ + 'contributing/discussions', 'contributing/issues', 'contributing/local-development', 'contributing/pull-requests', diff --git a/packages/website/src/components/FinancialContributors/Sponsor.tsx b/packages/website/src/components/FinancialContributors/Sponsor.tsx index 06f53dd438f1..c50ab89b609c 100644 --- a/packages/website/src/components/FinancialContributors/Sponsor.tsx +++ b/packages/website/src/components/FinancialContributors/Sponsor.tsx @@ -1,17 +1,17 @@ import React from 'react'; import styles from './styles.module.css'; -import type { SponsorData, SponsorIncludeOptions } from './types'; +import type { SponsorData } from './types'; interface SponsorProps { - include?: SponsorIncludeOptions; + includeName?: boolean; sponsor: SponsorData; } -export function Sponsor({ include = {}, sponsor }: SponsorProps): JSX.Element { +export function Sponsor({ includeName, sponsor }: SponsorProps): JSX.Element { let children = {`${sponsor.name}; - if (include.name) { + if (includeName) { children = ( <> {children} @@ -20,19 +20,15 @@ export function Sponsor({ include = {}, sponsor }: SponsorProps): JSX.Element { ); } - if (include.link) { - children = ( - - {children} - - ); - } - - return children; + return ( + + {children} + + ); } diff --git a/packages/website/src/components/FinancialContributors/Sponsors/index.tsx b/packages/website/src/components/FinancialContributors/Sponsors/index.tsx index dfcdad8c7b96..6c2d8874593c 100644 --- a/packages/website/src/components/FinancialContributors/Sponsors/index.tsx +++ b/packages/website/src/components/FinancialContributors/Sponsors/index.tsx @@ -2,12 +2,12 @@ import clsx from 'clsx'; import React from 'react'; import { Sponsor } from '../Sponsor'; -import type { SponsorData, SponsorIncludeOptions } from '../types'; +import type { SponsorData } from '../types'; import styles from './styles.module.css'; interface SponsorsProps { className: string; - include?: SponsorIncludeOptions; + includeName?: boolean; expanded?: boolean; sponsors: SponsorData[]; title: string; @@ -16,7 +16,7 @@ interface SponsorsProps { export function Sponsors({ className, - include, + includeName, title, tier, sponsors, @@ -27,7 +27,7 @@ export function Sponsors({
    {sponsors.map(sponsor => (
  • - +
  • ))}
diff --git a/packages/website/src/components/FinancialContributors/Sponsors/styles.module.css b/packages/website/src/components/FinancialContributors/Sponsors/styles.module.css index b92051eddcba..526e1ab745eb 100644 --- a/packages/website/src/components/FinancialContributors/Sponsors/styles.module.css +++ b/packages/website/src/components/FinancialContributors/Sponsors/styles.module.css @@ -82,7 +82,6 @@ .tierArea { margin: 16px 0; width: auto; - padding: 0 60px; } .tier-gold-supporter { diff --git a/packages/website/src/components/FinancialContributors/index.tsx b/packages/website/src/components/FinancialContributors/index.tsx index d71bd0650045..0460e1e8694e 100644 --- a/packages/website/src/components/FinancialContributors/index.tsx +++ b/packages/website/src/components/FinancialContributors/index.tsx @@ -16,14 +16,13 @@ export function FinancialContributors(): JSX.Element {
-

{description}

+ {description}
{ - await page.goto('/'); - await new AxeBuilder({ page }).analyze(); +test.describe('Website', () => { + test('Axe', async ({ page }) => { + await page.goto('/'); + await new AxeBuilder({ page }).analyze(); + }); + + test('should have no errors', async ({ page }) => { + const errorMessages: string[] = []; + page.on('console', msg => { + if (['error', 'warning'].includes(msg.type())) { + errorMessages.push(`[${msg.type()}] ${msg.text()}`); + } + }); + await page.goto('/'); + expect(errorMessages).toStrictEqual([ + "[error] Warning: ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot", + ]); + }); }); diff --git a/yarn.lock b/yarn.lock index b739ee7c87d8..dc2850dbcbc1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -441,10 +441,10 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@*", "@babel/parser@^7.1.0", "@babel/parser@^7.12.7", "@babel/parser@^7.14.7", "@babel/parser@^7.18.10", "@babel/parser@^7.18.8", "@babel/parser@^7.20.1", "@babel/parser@^7.20.2", "@babel/parser@^7.20.3": - version "7.20.3" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.20.3.tgz#5358cf62e380cf69efcb87a7bb922ff88bfac6e2" - integrity sha512-OP/s5a94frIPXwjzEcv5S/tpQfc6XhxYUnmWpgdqMWGgYCuErA3SzozaRAMQgSZWKeTJxht9aWAkUY+0UzvOFg== +"@babel/parser@*", "@babel/parser@^7.1.0", "@babel/parser@^7.12.7", "@babel/parser@^7.14.7", "@babel/parser@^7.18.10", "@babel/parser@^7.18.8", "@babel/parser@^7.20.1", "@babel/parser@^7.20.2", "@babel/parser@^7.20.7": + version "7.20.7" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.20.7.tgz#66fe23b3c8569220817d5feb8b9dcdc95bb4f71b" + integrity sha512-T3Z9oHybU+0vZlY9CiDSJQTD5ZapcW18ZctFMi0MOAl/4BjFF4ul7NVSARLdbGO5vDqy9eQiGTV0LtKfvCYvcg== "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.18.6": version "7.18.6" @@ -2288,39 +2288,39 @@ resolved "https://registry.yarnpkg.com/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz#b2ac626d6cb9c8718ab459166d4bb405b8ffa78b" integrity sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A== -"@lerna/add@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/add/-/add-6.1.0.tgz#0f09495c5e1af4c4f316344af34b6d1a91b15b19" - integrity sha512-f2cAeS1mE/p7QvSRn5TCgdUXw6QVbu8PeRxaTOxTThhTdJIWdXZfY00QjAsU6jw1PdYXK1qGUSwWOPkdR16mBg== - dependencies: - "@lerna/bootstrap" "6.1.0" - "@lerna/command" "6.1.0" - "@lerna/filter-options" "6.1.0" - "@lerna/npm-conf" "6.1.0" - "@lerna/validation-error" "6.1.0" +"@lerna/add@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/add/-/add-6.4.1.tgz#fa20fe9ff875dc5758141262c8cde0d9a6481ec4" + integrity sha512-YSRnMcsdYnQtQQK0NSyrS9YGXvB3jzvx183o+JTH892MKzSlBqwpBHekCknSibyxga1HeZ0SNKQXgsHAwWkrRw== + dependencies: + "@lerna/bootstrap" "6.4.1" + "@lerna/command" "6.4.1" + "@lerna/filter-options" "6.4.1" + "@lerna/npm-conf" "6.4.1" + "@lerna/validation-error" "6.4.1" dedent "^0.7.0" npm-package-arg "8.1.1" p-map "^4.0.0" pacote "^13.6.1" semver "^7.3.4" -"@lerna/bootstrap@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/bootstrap/-/bootstrap-6.1.0.tgz#81738f32cd431814c9943dfffe28752587d90830" - integrity sha512-aDxKqgxexVj/Z0B1aPu7P1iPbPqhk1FPkl/iayCmPlkAh90pYEH0uVytGzi1hFB5iXEfG7Pa6azGQywUodx/1g== - dependencies: - "@lerna/command" "6.1.0" - "@lerna/filter-options" "6.1.0" - "@lerna/has-npm-version" "6.1.0" - "@lerna/npm-install" "6.1.0" - "@lerna/package-graph" "6.1.0" - "@lerna/pulse-till-done" "6.1.0" - "@lerna/rimraf-dir" "6.1.0" - "@lerna/run-lifecycle" "6.1.0" - "@lerna/run-topologically" "6.1.0" - "@lerna/symlink-binary" "6.1.0" - "@lerna/symlink-dependencies" "6.1.0" - "@lerna/validation-error" "6.1.0" +"@lerna/bootstrap@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/bootstrap/-/bootstrap-6.4.1.tgz#a76ff22c3160d134fb60bcfddb3f8b0759b4f1ff" + integrity sha512-64cm0mnxzxhUUjH3T19ZSjPdn28vczRhhTXhNAvOhhU0sQgHrroam1xQC1395qbkV3iosSertlu8e7xbXW033w== + dependencies: + "@lerna/command" "6.4.1" + "@lerna/filter-options" "6.4.1" + "@lerna/has-npm-version" "6.4.1" + "@lerna/npm-install" "6.4.1" + "@lerna/package-graph" "6.4.1" + "@lerna/pulse-till-done" "6.4.1" + "@lerna/rimraf-dir" "6.4.1" + "@lerna/run-lifecycle" "6.4.1" + "@lerna/run-topologically" "6.4.1" + "@lerna/symlink-binary" "6.4.1" + "@lerna/symlink-dependencies" "6.4.1" + "@lerna/validation-error" "6.4.1" "@npmcli/arborist" "5.3.0" dedent "^0.7.0" get-port "^5.1.1" @@ -2332,100 +2332,100 @@ p-waterfall "^2.1.1" semver "^7.3.4" -"@lerna/changed@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/changed/-/changed-6.1.0.tgz#4fa480cbb0e7106ea9dad30d315e953975118d06" - integrity sha512-p7C2tf1scmvoUC1Osck/XIKVKXAQ8m8neL8/rfgKSYsvUVjsOB1LbF5HH1VUZntE6S4OxkRxUQGkAHVf5xrGqw== +"@lerna/changed@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/changed/-/changed-6.4.1.tgz#4da6d08df7c53bc90c0c0d9d04839f91dd6d70a9" + integrity sha512-Z/z0sTm3l/iZW0eTSsnQpcY5d6eOpNO0g4wMOK+hIboWG0QOTc8b28XCnfCUO+33UisKl8PffultgoaHMKkGgw== dependencies: - "@lerna/collect-updates" "6.1.0" - "@lerna/command" "6.1.0" - "@lerna/listable" "6.1.0" - "@lerna/output" "6.1.0" + "@lerna/collect-updates" "6.4.1" + "@lerna/command" "6.4.1" + "@lerna/listable" "6.4.1" + "@lerna/output" "6.4.1" -"@lerna/check-working-tree@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/check-working-tree/-/check-working-tree-6.1.0.tgz#b8970fd27a26449b12456d5d0ece60477aa54e15" - integrity sha512-hSciDmRqsNPevMhAD+SYbnhjatdb7UUu9W8vTyGtUXkrq2xtRZU0vAOgqovV8meirRkbC41pZePYKqyQtF0y3w== +"@lerna/check-working-tree@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/check-working-tree/-/check-working-tree-6.4.1.tgz#c0dcb5c474faf214865058e2fedda44962367a4e" + integrity sha512-EnlkA1wxaRLqhJdn9HX7h+JYxqiTK9aWEFOPqAE8lqjxHn3RpM9qBp1bAdL7CeUk3kN1lvxKwDEm0mfcIyMbPA== dependencies: - "@lerna/collect-uncommitted" "6.1.0" - "@lerna/describe-ref" "6.1.0" - "@lerna/validation-error" "6.1.0" + "@lerna/collect-uncommitted" "6.4.1" + "@lerna/describe-ref" "6.4.1" + "@lerna/validation-error" "6.4.1" -"@lerna/child-process@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/child-process/-/child-process-6.1.0.tgz#6361f7945cd5b36e983f819de3cd91c315707302" - integrity sha512-jhr3sCFeps6Y15SCrWEPvqE64i+QLOTSh+OzxlziCBf7ZEUu7sF0yA4n5bAqw8j43yCKhhjkf/ZLYxZe+pnl3Q== +"@lerna/child-process@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/child-process/-/child-process-6.4.1.tgz#d697fb769f4c5b57c59f87471eb9b3d65be904a3" + integrity sha512-dvEKK0yKmxOv8pccf3I5D/k+OGiLxQp5KYjsrDtkes2pjpCFfQAMbmpol/Tqx6w/2o2rSaRrLsnX8TENo66FsA== dependencies: chalk "^4.1.0" execa "^5.0.0" strong-log-transformer "^2.1.0" -"@lerna/clean@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/clean/-/clean-6.1.0.tgz#1114fd90ad82438123726e2493d3550e73abebbc" - integrity sha512-LRK2hiNUiBhPe5tmJiefOVpkaX2Yob0rp15IFNIbuteRWUJg0oERFQo62WvnxwElfzKSOhr8OGuEq/vN4bMrRA== - dependencies: - "@lerna/command" "6.1.0" - "@lerna/filter-options" "6.1.0" - "@lerna/prompt" "6.1.0" - "@lerna/pulse-till-done" "6.1.0" - "@lerna/rimraf-dir" "6.1.0" +"@lerna/clean@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/clean/-/clean-6.4.1.tgz#e9ee365ee6879ee998b78b3269fad02b5f385771" + integrity sha512-FuVyW3mpos5ESCWSkQ1/ViXyEtsZ9k45U66cdM/HnteHQk/XskSQw0sz9R+whrZRUDu6YgYLSoj1j0YAHVK/3A== + dependencies: + "@lerna/command" "6.4.1" + "@lerna/filter-options" "6.4.1" + "@lerna/prompt" "6.4.1" + "@lerna/pulse-till-done" "6.4.1" + "@lerna/rimraf-dir" "6.4.1" p-map "^4.0.0" p-map-series "^2.1.0" p-waterfall "^2.1.1" -"@lerna/cli@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/cli/-/cli-6.1.0.tgz#41214331fa4c1ea5f41125befdd81b009fe12640" - integrity sha512-p4G/OSPIrHiNkEl8bXrQdFOh4ORAZp2+ljvbXmAxpdf2qmopaUdr+bZYtIAxd+Z42SxRnDNz9IEyR0kOsARRQQ== +"@lerna/cli@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/cli/-/cli-6.4.1.tgz#2b2d093baace40e822caee8c90f698e98a437a2f" + integrity sha512-2pNa48i2wzFEd9LMPKWI3lkW/3widDqiB7oZUM1Xvm4eAOuDWc9I3RWmAUIVlPQNf3n4McxJCvsZZ9BpQN50Fg== dependencies: - "@lerna/global-options" "6.1.0" + "@lerna/global-options" "6.4.1" dedent "^0.7.0" npmlog "^6.0.2" yargs "^16.2.0" -"@lerna/collect-uncommitted@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/collect-uncommitted/-/collect-uncommitted-6.1.0.tgz#b6ffd7adda24d73b70304210967d3518caa3529d" - integrity sha512-VvWvqDZG+OiF4PwV4Ro695r3+8ty4w+11Bnq8tbsbu5gq8qZiam8Fkc/TQLuNNqP0SPi4qmMPaIzWvSze3SmDg== +"@lerna/collect-uncommitted@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/collect-uncommitted/-/collect-uncommitted-6.4.1.tgz#ae62bcaa5ecaa5b7fbc41eb9ae90b6711be156ec" + integrity sha512-5IVQGhlLrt7Ujc5ooYA1Xlicdba/wMcDSnbQwr8ufeqnzV2z4729pLCVk55gmi6ZienH/YeBPHxhB5u34ofE0Q== dependencies: - "@lerna/child-process" "6.1.0" + "@lerna/child-process" "6.4.1" chalk "^4.1.0" npmlog "^6.0.2" -"@lerna/collect-updates@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/collect-updates/-/collect-updates-6.1.0.tgz#75fcc0733b5a9ac318a6484b890aa4061b7859c2" - integrity sha512-dgH7kgstwCXFctylQ4cxuCmhwSIE6VJZfHdh2bOaLuncs6ATMErKWN/mVuFHuUWEqPDRyy5Ky40Cu9S40nUq5w== +"@lerna/collect-updates@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/collect-updates/-/collect-updates-6.4.1.tgz#4f7cf1c411f3253d0104e7b64cb0aa315a5dfc81" + integrity sha512-pzw2/FC+nIqYkknUHK9SMmvP3MsLEjxI597p3WV86cEDN3eb1dyGIGuHiKShtjvT08SKSwpTX+3bCYvLVxtC5Q== dependencies: - "@lerna/child-process" "6.1.0" - "@lerna/describe-ref" "6.1.0" + "@lerna/child-process" "6.4.1" + "@lerna/describe-ref" "6.4.1" minimatch "^3.0.4" npmlog "^6.0.2" slash "^3.0.0" -"@lerna/command@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/command/-/command-6.1.0.tgz#bcb12516f2c181822b3b5be46c18eadc9b61e885" - integrity sha512-OnMqBDaEBY0C8v9CXIWFbGGKgsiUtZrnKVvQRbupMSZDKMpVGWIUd3X98Is9j9MAmk1ynhBMWE9Fwai5ML/mcA== - dependencies: - "@lerna/child-process" "6.1.0" - "@lerna/package-graph" "6.1.0" - "@lerna/project" "6.1.0" - "@lerna/validation-error" "6.1.0" - "@lerna/write-log-file" "6.1.0" +"@lerna/command@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/command/-/command-6.4.1.tgz#96c4f5d88792c6c638738c66fcc3a7ad0d2487e2" + integrity sha512-3Lifj8UTNYbRad8JMP7IFEEdlIyclWyyvq/zvNnTS9kCOEymfmsB3lGXr07/AFoi6qDrvN64j7YSbPZ6C6qonw== + dependencies: + "@lerna/child-process" "6.4.1" + "@lerna/package-graph" "6.4.1" + "@lerna/project" "6.4.1" + "@lerna/validation-error" "6.4.1" + "@lerna/write-log-file" "6.4.1" clone-deep "^4.0.1" dedent "^0.7.0" execa "^5.0.0" is-ci "^2.0.0" npmlog "^6.0.2" -"@lerna/conventional-commits@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/conventional-commits/-/conventional-commits-6.1.0.tgz#1157bb66d84d48880dc5c5026d743cedf0f47094" - integrity sha512-Tipo3cVr8mNVca4btzrCIzct59ZJWERT8/ZCZ/TQWuI4huUJZs6LRofLtB0xsGJAVZ7Vz2WRXAeH4XYgeUxutQ== +"@lerna/conventional-commits@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/conventional-commits/-/conventional-commits-6.4.1.tgz#b8d44a8a71865b4d37b900137acef623f3a0a11b" + integrity sha512-NIvCOjStjQy5O8VojB7/fVReNNDEJOmzRG2sTpgZ/vNS4AzojBQZ/tobzhm7rVkZZ43R9srZeuhfH9WgFsVUSA== dependencies: - "@lerna/validation-error" "6.1.0" + "@lerna/validation-error" "6.4.1" conventional-changelog-angular "^5.0.12" conventional-changelog-core "^4.2.4" conventional-recommended-bump "^6.1.0" @@ -2436,24 +2436,24 @@ pify "^5.0.0" semver "^7.3.4" -"@lerna/create-symlink@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/create-symlink/-/create-symlink-6.1.0.tgz#d4260831f5d10abc0c70f0a8f39bea91db87e640" - integrity sha512-ulMa5OUJEwEWBHSgCUNGxrcsJllq1YMYWqhufvIigmMPJ0Zv3TV1Hha5i2MsqLJAakxtW0pNuwdutkUTtUdgxQ== +"@lerna/create-symlink@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/create-symlink/-/create-symlink-6.4.1.tgz#0efec22d78dd814a70d8345ced52c39beb05874b" + integrity sha512-rNivHFYV1GAULxnaTqeGb2AdEN2OZzAiZcx5CFgj45DWXQEGwPEfpFmCSJdXhFZbyd3K0uiDlAXjAmV56ov3FQ== dependencies: cmd-shim "^5.0.0" fs-extra "^9.1.0" npmlog "^6.0.2" -"@lerna/create@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/create/-/create-6.1.0.tgz#cde219da46a7c5062c558366b4ffce2134f13845" - integrity sha512-ZqlknXu0L29cV5mcfNgBLl+1RbKTWmNk8mj545zgXc7qQDgmrY+EVvrs8Cirey8C7bBpVkzP7Brzze0MSoB4rQ== +"@lerna/create@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/create/-/create-6.4.1.tgz#3fc8556adadff1265432a6cee69ee14465798e71" + integrity sha512-qfQS8PjeGDDlxEvKsI/tYixIFzV2938qLvJohEKWFn64uvdLnXCamQ0wvRJST8p1ZpHWX4AXrB+xEJM3EFABrA== dependencies: - "@lerna/child-process" "6.1.0" - "@lerna/command" "6.1.0" - "@lerna/npm-conf" "6.1.0" - "@lerna/validation-error" "6.1.0" + "@lerna/child-process" "6.4.1" + "@lerna/command" "6.4.1" + "@lerna/npm-conf" "6.4.1" + "@lerna/validation-error" "6.4.1" dedent "^0.7.0" fs-extra "^9.1.0" init-package-json "^3.0.2" @@ -2467,218 +2467,218 @@ validate-npm-package-name "^4.0.0" yargs-parser "20.2.4" -"@lerna/describe-ref@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/describe-ref/-/describe-ref-6.1.0.tgz#60f0b8297b912aa5fe5e6ab8ef6c4127813681a7" - integrity sha512-0RQAYnxBaMz1SrEb/rhfR+8VeZx5tvCNYKRee5oXIDZdQ2c6/EPyrKCp3WcqiuOWY50SfGOVfxJEcxpK8Y3FNA== +"@lerna/describe-ref@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/describe-ref/-/describe-ref-6.4.1.tgz#c0a0beca5dfeada3a39b030f69c8c98f5623bb13" + integrity sha512-MXGXU8r27wl355kb1lQtAiu6gkxJ5tAisVJvFxFM1M+X8Sq56icNoaROqYrvW6y97A9+3S8Q48pD3SzkFv31Xw== dependencies: - "@lerna/child-process" "6.1.0" + "@lerna/child-process" "6.4.1" npmlog "^6.0.2" -"@lerna/diff@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/diff/-/diff-6.1.0.tgz#bfa9bc35894d88a33fa0a3a5787082dea45d8cb2" - integrity sha512-GhP+jPDbcp9QcAMSAjFn4lzM8MKpLR1yt5jll+zUD831U1sL0I5t8HUosFroe5MoRNffEL/jHuI3SbC3jjqWjQ== +"@lerna/diff@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/diff/-/diff-6.4.1.tgz#ca9e62a451ce199faaa7ef5990ded3fad947e2f9" + integrity sha512-TnzJsRPN2fOjUrmo5Boi43fJmRtBJDsVgwZM51VnLoKcDtO1kcScXJ16Od2Xx5bXbp5dES5vGDLL/USVVWfeAg== dependencies: - "@lerna/child-process" "6.1.0" - "@lerna/command" "6.1.0" - "@lerna/validation-error" "6.1.0" + "@lerna/child-process" "6.4.1" + "@lerna/command" "6.4.1" + "@lerna/validation-error" "6.4.1" npmlog "^6.0.2" -"@lerna/exec@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/exec/-/exec-6.1.0.tgz#a2d165576471ff61e33c49952d40a5dbc36fc78f" - integrity sha512-Ej6WlPHXLF6hZHsfD+J/dxeuTrnc0HIfIXR1DU//msHW5RNCdi9+I7StwreCAQH/dLEsdBjPg5chNmuj2JLQRg== - dependencies: - "@lerna/child-process" "6.1.0" - "@lerna/command" "6.1.0" - "@lerna/filter-options" "6.1.0" - "@lerna/profiler" "6.1.0" - "@lerna/run-topologically" "6.1.0" - "@lerna/validation-error" "6.1.0" +"@lerna/exec@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/exec/-/exec-6.4.1.tgz#493ce805b6959e8299ec58fab8d31fd01ed209ba" + integrity sha512-KAWfuZpoyd3FMejHUORd0GORMr45/d9OGAwHitfQPVs4brsxgQFjbbBEEGIdwsg08XhkDb4nl6IYVASVTq9+gA== + dependencies: + "@lerna/child-process" "6.4.1" + "@lerna/command" "6.4.1" + "@lerna/filter-options" "6.4.1" + "@lerna/profiler" "6.4.1" + "@lerna/run-topologically" "6.4.1" + "@lerna/validation-error" "6.4.1" p-map "^4.0.0" -"@lerna/filter-options@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/filter-options/-/filter-options-6.1.0.tgz#f4ee65d0db0273ce490ce6c72c9dbb1d23268ca6" - integrity sha512-kPf92Z7uLsR6MUiXnyXWebaUWArLa15wLfpfTwIp5H3MNk1lTbuG7QnrxE7OxQj+ozFmBvXeV9fuwfLsYTfmOw== +"@lerna/filter-options@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/filter-options/-/filter-options-6.4.1.tgz#571d37436878fab8b2ac84ca1c3863acd3515cfb" + integrity sha512-efJh3lP2T+9oyNIP2QNd9EErf0Sm3l3Tz8CILMsNJpjSU6kO43TYWQ+L/ezu2zM99KVYz8GROLqDcHRwdr8qUA== dependencies: - "@lerna/collect-updates" "6.1.0" - "@lerna/filter-packages" "6.1.0" + "@lerna/collect-updates" "6.4.1" + "@lerna/filter-packages" "6.4.1" dedent "^0.7.0" npmlog "^6.0.2" -"@lerna/filter-packages@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/filter-packages/-/filter-packages-6.1.0.tgz#1ddac63a6ffdf5f058d206be5adfb39ad7aaf4f9" - integrity sha512-zW2avsZHs/ITE/37AEMhegGVHjiD0rgNk9bguNDfz6zaPa90UaW6PWDH6Tf4ThPRlbkl2Go48N3bFYHYSJKbcw== +"@lerna/filter-packages@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/filter-packages/-/filter-packages-6.4.1.tgz#e138b182816a049c81de094069cad12aaa41a236" + integrity sha512-LCMGDGy4b+Mrb6xkcVzp4novbf5MoZEE6ZQF1gqG0wBWqJzNcKeFiOmf352rcDnfjPGZP6ct5+xXWosX/q6qwg== dependencies: - "@lerna/validation-error" "6.1.0" + "@lerna/validation-error" "6.4.1" multimatch "^5.0.0" npmlog "^6.0.2" -"@lerna/get-npm-exec-opts@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/get-npm-exec-opts/-/get-npm-exec-opts-6.1.0.tgz#22351e2ebc4adbef21ca4b86187278e15e4cb38a" - integrity sha512-10Pdf+W0z7RT34o0SWlf+WVzz2/WbnTIJ1tQqXvXx6soj2L/xGLhOPvhJiKNtl4WlvUiO/zQ91yb83ESP4TZaA== +"@lerna/get-npm-exec-opts@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/get-npm-exec-opts/-/get-npm-exec-opts-6.4.1.tgz#42681f6db4238277889b3423f87308eda5dc01ec" + integrity sha512-IvN/jyoklrWcjssOf121tZhOc16MaFPOu5ii8a+Oy0jfTriIGv929Ya8MWodj75qec9s+JHoShB8yEcMqZce4g== dependencies: npmlog "^6.0.2" -"@lerna/get-packed@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/get-packed/-/get-packed-6.1.0.tgz#b6d1c1dd1e068212e784b8dfc2e5fe64741ea8db" - integrity sha512-lg0wPpV0wPekcD0mebJp619hMxsOgbZDOH5AkL/bCR217391eha0iPhQ0dU/G0Smd2vv6Cg443+J5QdI4LGRTg== +"@lerna/get-packed@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/get-packed/-/get-packed-6.4.1.tgz#b3b8b907002d50bf8792dd97e2729249c0b0e0cd" + integrity sha512-uaDtYwK1OEUVIXn84m45uPlXShtiUcw6V9TgB3rvHa3rrRVbR7D4r+JXcwVxLGrAS7LwxVbYWEEO/Z/bX7J/Lg== dependencies: fs-extra "^9.1.0" ssri "^9.0.1" tar "^6.1.0" -"@lerna/github-client@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/github-client/-/github-client-6.1.0.tgz#cd33743e4529a0b822ae6716cb4b981e1d8ffe8f" - integrity sha512-+/4PtDgsjt0VRRZtOCN2Piyu0asU/16gSZZy/opVb8dlT44lTrH/ZghrJLE4tSL8Nuv688kx0kSgbUG8BY54jQ== +"@lerna/github-client@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/github-client/-/github-client-6.4.1.tgz#25d19b440395a6039b9162ee58dadb9dce990ff0" + integrity sha512-ridDMuzmjMNlcDmrGrV9mxqwUKzt9iYqCPwVYJlRYrnE3jxyg+RdooquqskVFj11djcY6xCV2Q2V1lUYwF+PmA== dependencies: - "@lerna/child-process" "6.1.0" + "@lerna/child-process" "6.4.1" "@octokit/plugin-enterprise-rest" "^6.0.1" "@octokit/rest" "^19.0.3" git-url-parse "^13.1.0" npmlog "^6.0.2" -"@lerna/gitlab-client@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/gitlab-client/-/gitlab-client-6.1.0.tgz#bbcbf80d937e5980798ac1e0edd1f769101057d8" - integrity sha512-fUI/ppXzxJafN9ceSl+FDgsYvu3iTsO6UW0WTD63pS32CfM+PiCryLQHzuc4RkyVW8WQH3aCR/GbaKCqbu52bw== +"@lerna/gitlab-client@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/gitlab-client/-/gitlab-client-6.4.1.tgz#a01d962dc52a55b8272ea52bc54d72c5fd9db6f9" + integrity sha512-AdLG4d+jbUvv0jQyygQUTNaTCNSMDxioJso6aAjQ/vkwyy3fBJ6FYzX74J4adSfOxC2MQZITFyuG+c9ggp7pyQ== dependencies: node-fetch "^2.6.1" npmlog "^6.0.2" -"@lerna/global-options@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/global-options/-/global-options-6.1.0.tgz#268e1de924369102e47babd9288086764ec6f9e6" - integrity sha512-1OyJ/N1XJh3ZAy8S20c6th9C4yBm/k3bRIdC+z0XxpDaHwfNt8mT9kUIDt6AIFCUvVKjSwnIsMHwhzXqBnwYSA== +"@lerna/global-options@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/global-options/-/global-options-6.4.1.tgz#7df76b1d38500606a8dc3ce0804bab6894c4f4a3" + integrity sha512-UTXkt+bleBB8xPzxBPjaCN/v63yQdfssVjhgdbkQ//4kayaRA65LyEtJTi9rUrsLlIy9/rbeb+SAZUHg129fJg== -"@lerna/has-npm-version@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/has-npm-version/-/has-npm-version-6.1.0.tgz#a5d960213d1a7ca5374eb3c551a17b322b9a9e62" - integrity sha512-up5PVuP6BmKQ5/UgH/t2c5B1q4HhjwW3/bqbNayX6V0qNz8OijnMYvEUbxFk8fOdeN41qVnhAk0Tb5kbdtYh2A== +"@lerna/has-npm-version@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/has-npm-version/-/has-npm-version-6.4.1.tgz#04eba7df687e665294834253b659430efc1e01bb" + integrity sha512-vW191w5iCkwNWWWcy4542ZOpjKYjcP/pU3o3+w6NM1J3yBjWZcNa8lfzQQgde2QkGyNi+i70o6wIca1o0sdKwg== dependencies: - "@lerna/child-process" "6.1.0" + "@lerna/child-process" "6.4.1" semver "^7.3.4" -"@lerna/import@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/import/-/import-6.1.0.tgz#1c64281e3431c43c9cd140b66a6a51427afe7095" - integrity sha512-xsBhiKLUavATR32dAFL+WFY0yuab0hsM1eztKtRKk4wy7lSyxRfA5EIUcNCsLXx2xaDOKoMncCTXgNcpeYuqcQ== - dependencies: - "@lerna/child-process" "6.1.0" - "@lerna/command" "6.1.0" - "@lerna/prompt" "6.1.0" - "@lerna/pulse-till-done" "6.1.0" - "@lerna/validation-error" "6.1.0" +"@lerna/import@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/import/-/import-6.4.1.tgz#b5696fed68a32d32398d66f95192267f1da5110e" + integrity sha512-oDg8g1PNrCM1JESLsG3rQBtPC+/K9e4ohs0xDKt5E6p4l7dc0Ib4oo0oCCT/hGzZUlNwHxrc2q9JMRzSAn6P/Q== + dependencies: + "@lerna/child-process" "6.4.1" + "@lerna/command" "6.4.1" + "@lerna/prompt" "6.4.1" + "@lerna/pulse-till-done" "6.4.1" + "@lerna/validation-error" "6.4.1" dedent "^0.7.0" fs-extra "^9.1.0" p-map-series "^2.1.0" -"@lerna/info@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/info/-/info-6.1.0.tgz#a5d66a9c1f18398dc020a6f6073c399013081587" - integrity sha512-CsrWdW/Wyb4kcvHSnrsm7KYWFvjUNItu+ryeyWBZJtWYQOv45jNmWix6j2L4/w1+mMlWMjsfLmBscg82UBrF5w== +"@lerna/info@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/info/-/info-6.4.1.tgz#30354fcb82c99b1f0ed753f957fbaca5b250c3fa" + integrity sha512-Ks4R7IndIr4vQXz+702gumPVhH6JVkshje0WKA3+ew2qzYZf68lU1sBe1OZsQJU3eeY2c60ax+bItSa7aaIHGw== dependencies: - "@lerna/command" "6.1.0" - "@lerna/output" "6.1.0" + "@lerna/command" "6.4.1" + "@lerna/output" "6.4.1" envinfo "^7.7.4" -"@lerna/init@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/init/-/init-6.1.0.tgz#b178775693b9c38c0f3fe3300eeb574cf76e0297" - integrity sha512-z8oUeVjn+FQYAtepAw6G47cGodLyBAyNoEjO3IsJjQLWE1yH3r83L2sjyD/EckgR3o2VTEzrKo4ArhxLp2mNmg== +"@lerna/init@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/init/-/init-6.4.1.tgz#ea4905ca976189db4b0bf04d78919060146bf684" + integrity sha512-CXd/s/xgj0ZTAoOVyolOTLW2BG7uQOhWW4P/ktlwwJr9s3c4H/z+Gj36UXw3q5X1xdR29NZt7Vc6fvROBZMjUQ== dependencies: - "@lerna/child-process" "6.1.0" - "@lerna/command" "6.1.0" - "@lerna/project" "6.1.0" + "@lerna/child-process" "6.4.1" + "@lerna/command" "6.4.1" + "@lerna/project" "6.4.1" fs-extra "^9.1.0" p-map "^4.0.0" write-json-file "^4.3.0" -"@lerna/link@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/link/-/link-6.1.0.tgz#f6f0cfd0b02aecdeb304ce614e4e4e89fe0a3ad5" - integrity sha512-7OD2lYNQHl6Kl1KYmplt8KoWjVHdiaqpYqwD38AwcB09YN58nGmo4aJgC12Fdx8DSNjkumgM0ROg/JOjMCTIzQ== +"@lerna/link@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/link/-/link-6.4.1.tgz#f31ed1f6aea1581e358a9ff545be78b61e923175" + integrity sha512-O8Rt7MAZT/WT2AwrB/+HY76ktnXA9cDFO9rhyKWZGTHdplbzuJgfsGzu8Xv0Ind+w+a8xLfqtWGPlwiETnDyrw== dependencies: - "@lerna/command" "6.1.0" - "@lerna/package-graph" "6.1.0" - "@lerna/symlink-dependencies" "6.1.0" - "@lerna/validation-error" "6.1.0" + "@lerna/command" "6.4.1" + "@lerna/package-graph" "6.4.1" + "@lerna/symlink-dependencies" "6.4.1" + "@lerna/validation-error" "6.4.1" p-map "^4.0.0" slash "^3.0.0" -"@lerna/list@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/list/-/list-6.1.0.tgz#a7625bceb5224c4bf1154e715c07ea29f9698bac" - integrity sha512-7/g2hjizkvVnBGpVm+qC7lUFGhZ/0GIMUbGQwnE6yXDGm8yP9aEcNVkU4JGrDWW+uIklf9oodnMHaLXd/FJe6Q== +"@lerna/list@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/list/-/list-6.4.1.tgz#12ad83902e148d1e5ba007149b72b14636f9f1ba" + integrity sha512-7a6AKgXgC4X7nK6twVPNrKCiDhrCiAhL/FE4u9HYhHqw9yFwyq8Qe/r1RVOkAOASNZzZ8GuBvob042bpunupCw== dependencies: - "@lerna/command" "6.1.0" - "@lerna/filter-options" "6.1.0" - "@lerna/listable" "6.1.0" - "@lerna/output" "6.1.0" + "@lerna/command" "6.4.1" + "@lerna/filter-options" "6.4.1" + "@lerna/listable" "6.4.1" + "@lerna/output" "6.4.1" -"@lerna/listable@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/listable/-/listable-6.1.0.tgz#2510045fde7bc568b18172a5d24372a719bb5c4c" - integrity sha512-3KZ9lQ9AtNfGNH/mYJYaMKCiF2EQvLLBGYkWHeIzIs6foegcZNXe0Cyv3LNXuo5WslMNr5RT4wIgy3BOoAxdtg== +"@lerna/listable@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/listable/-/listable-6.4.1.tgz#6f5c83865391c6beeb41802951c674e2de119bde" + integrity sha512-L8ANeidM10aoF8aL3L/771Bb9r/TRkbEPzAiC8Iy2IBTYftS87E3rT/4k5KBEGYzMieSKJaskSFBV0OQGYV1Cw== dependencies: - "@lerna/query-graph" "6.1.0" + "@lerna/query-graph" "6.4.1" chalk "^4.1.0" columnify "^1.6.0" -"@lerna/log-packed@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/log-packed/-/log-packed-6.1.0.tgz#18ae946e8b7881f2fc5b973cc6682cc599b1759b" - integrity sha512-Sq2HZJAcPuoNeEHeIutcPYQCyWBxLyVGvEhgsP3xTe6XkBGQCG8piCp9wX+sc2zT+idPdpI6qLqdh85yYIMMhA== +"@lerna/log-packed@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/log-packed/-/log-packed-6.4.1.tgz#43eae50d5c0cd906b1977a58b62b35541cf89ec1" + integrity sha512-Pwv7LnIgWqZH4vkM1rWTVF+pmWJu7d0ZhVwyhCaBJUsYbo+SyB2ZETGygo3Z/A+vZ/S7ImhEEKfIxU9bg5lScQ== dependencies: byte-size "^7.0.0" columnify "^1.6.0" has-unicode "^2.0.1" npmlog "^6.0.2" -"@lerna/npm-conf@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/npm-conf/-/npm-conf-6.1.0.tgz#79697260c9d14ffb9d892927f37fcde75b89ec58" - integrity sha512-+RD3mmJe9XSQj7Diibs0+UafAHPcrFCd29ODpDI+tzYl4MmYZblfrlL6mbSCiVYCZQneQ8Uku3P0r+DlbYBaFw== +"@lerna/npm-conf@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/npm-conf/-/npm-conf-6.4.1.tgz#64dba237ff41472a24f96192669c1bc0dce15edb" + integrity sha512-Q+83uySGXYk3n1pYhvxtzyGwBGijYgYecgpiwRG1YNyaeGy+Mkrj19cyTWubT+rU/kM5c6If28+y9kdudvc7zQ== dependencies: config-chain "^1.1.12" pify "^5.0.0" -"@lerna/npm-dist-tag@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/npm-dist-tag/-/npm-dist-tag-6.1.0.tgz#29f843aa628687a29dc3a9b905dd3002db7a3820" - integrity sha512-1zo+Yww/lvWJWZnEXpke9dZSb5poDzhUM/pQNqAQYSlbZ96o18SuCR6TEi5isMPiw63Aq1MMzbUqttQfJ11EOA== +"@lerna/npm-dist-tag@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/npm-dist-tag/-/npm-dist-tag-6.4.1.tgz#f14e7176f7e323284e8aa8636b44818a61738fd1" + integrity sha512-If1Hn4q9fn0JWuBm455iIZDWE6Fsn4Nv8Tpqb+dYf0CtoT5Hn+iT64xSiU5XJw9Vc23IR7dIujkEXm2MVbnvZw== dependencies: - "@lerna/otplease" "6.1.0" + "@lerna/otplease" "6.4.1" npm-package-arg "8.1.1" npm-registry-fetch "^13.3.0" npmlog "^6.0.2" -"@lerna/npm-install@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/npm-install/-/npm-install-6.1.0.tgz#b75d1f152540a144bd6c81586a9f6010ed7f3046" - integrity sha512-1SHmOHZA1YJuUctLQBRjA2+yMp+UNYdOBsFb3xUVT7MjWnd1Zl0toT3jxGu96RNErD9JKkk/cGo/Aq+DU3s9pg== +"@lerna/npm-install@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/npm-install/-/npm-install-6.4.1.tgz#99f5748cb43de9786ea2b538c94a7183d38fc476" + integrity sha512-7gI1txMA9qTaT3iiuk/8/vL78wIhtbbOLhMf8m5yQ2G+3t47RUA8MNgUMsq4Zszw9C83drayqesyTf0u8BzVRg== dependencies: - "@lerna/child-process" "6.1.0" - "@lerna/get-npm-exec-opts" "6.1.0" + "@lerna/child-process" "6.4.1" + "@lerna/get-npm-exec-opts" "6.4.1" fs-extra "^9.1.0" npm-package-arg "8.1.1" npmlog "^6.0.2" signal-exit "^3.0.3" write-pkg "^4.0.0" -"@lerna/npm-publish@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/npm-publish/-/npm-publish-6.1.0.tgz#8fe561e639e6a06380354271aeca7cbc39acf7dd" - integrity sha512-N0LdR1ImZQw1r4cYaKtVbBhBPtj4Zu9NbvygzizEP5HuTfxZmE1Ans3w93Kks9VTXZXob8twNbXnzBwzTyEpEA== +"@lerna/npm-publish@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/npm-publish/-/npm-publish-6.4.1.tgz#baf07b108ae8b32932612db63206bcd5b5ee0e88" + integrity sha512-lbNEg+pThPAD8lIgNArm63agtIuCBCF3umxvgTQeLzyqUX6EtGaKJFyz/6c2ANcAuf8UfU7WQxFFbOiolibXTQ== dependencies: - "@lerna/otplease" "6.1.0" - "@lerna/run-lifecycle" "6.1.0" + "@lerna/otplease" "6.4.1" + "@lerna/run-lifecycle" "6.4.1" fs-extra "^9.1.0" libnpmpublish "^6.0.4" npm-package-arg "8.1.1" @@ -2686,85 +2686,85 @@ pify "^5.0.0" read-package-json "^5.0.1" -"@lerna/npm-run-script@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/npm-run-script/-/npm-run-script-6.1.0.tgz#bc5bd414ee9696168d88d8ce78f8e8b715967100" - integrity sha512-7p13mvdxdY5+VqWvvtMsMDeyCRs0PrrTmSHRO+FKuLQuGhBvUo05vevcMEOQNDvEvl/tXPrOVbeGCiGubYTCLg== +"@lerna/npm-run-script@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/npm-run-script/-/npm-run-script-6.4.1.tgz#86db4f15d359b8a371db666aa51c9b2b87b602f3" + integrity sha512-HyvwuyhrGqDa1UbI+pPbI6v+wT6I34R0PW3WCADn6l59+AyqLOCUQQr+dMW7jdYNwjO6c/Ttbvj4W58EWsaGtQ== dependencies: - "@lerna/child-process" "6.1.0" - "@lerna/get-npm-exec-opts" "6.1.0" + "@lerna/child-process" "6.4.1" + "@lerna/get-npm-exec-opts" "6.4.1" npmlog "^6.0.2" -"@lerna/otplease@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/otplease/-/otplease-6.1.0.tgz#d25dbe2d867215b69f06de12ab4ff559d83d1d01" - integrity sha512-gqSE6IbaD4IeNJePkaDLaFLoGp0Ceu35sn7z0AHAOoHiQGGorOmvM+h1Md3xZZRSXQmY9LyJVhG5eRa38SoG4g== +"@lerna/otplease@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/otplease/-/otplease-6.4.1.tgz#9573e053c43e7139442da96fe655aa02749cb8a3" + integrity sha512-ePUciFfFdythHNMp8FP5K15R/CoGzSLVniJdD50qm76c4ATXZHnGCW2PGwoeAZCy4QTzhlhdBq78uN0wAs75GA== dependencies: - "@lerna/prompt" "6.1.0" + "@lerna/prompt" "6.4.1" -"@lerna/output@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/output/-/output-6.1.0.tgz#d470146c6ee8ee063fd416081c1ca64fb132c4d8" - integrity sha512-mgCIzLKIuroytXuxjTB689ERtpfgyNXW0rMv9WHOa6ufQc+QJPjh3L4jVsOA0l+/OxZyi97PUXotduNj+0cbnA== +"@lerna/output@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/output/-/output-6.4.1.tgz#327baf768b8fb63db9d52f68288d387379f814f7" + integrity sha512-A1yRLF0bO+lhbIkrryRd6hGSD0wnyS1rTPOWJhScO/Zyv8vIPWhd2fZCLR1gI2d/Kt05qmK3T/zETTwloK7Fww== dependencies: npmlog "^6.0.2" -"@lerna/pack-directory@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/pack-directory/-/pack-directory-6.1.0.tgz#3252ba7250d826b9922238c775abf5004e7580c4" - integrity sha512-Xsixqm2nkGXs9hvq08ClbGpRlCYnlBV4TwSrLttIDL712RlyXoPe2maJzTUqo9OXBbOumFSahUEInCMT2OS05g== +"@lerna/pack-directory@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/pack-directory/-/pack-directory-6.4.1.tgz#e78aae4e7944057d8fc6cb4dd8ae50be7a95c2fd" + integrity sha512-kBtDL9bPP72/Nl7Gqa2CA3Odb8CYY1EF2jt801f+B37TqRLf57UXQom7yF3PbWPCPmhoU+8Fc4RMpUwSbFC46Q== dependencies: - "@lerna/get-packed" "6.1.0" - "@lerna/package" "6.1.0" - "@lerna/run-lifecycle" "6.1.0" - "@lerna/temp-write" "6.1.0" + "@lerna/get-packed" "6.4.1" + "@lerna/package" "6.4.1" + "@lerna/run-lifecycle" "6.4.1" + "@lerna/temp-write" "6.4.1" npm-packlist "^5.1.1" npmlog "^6.0.2" tar "^6.1.0" -"@lerna/package-graph@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/package-graph/-/package-graph-6.1.0.tgz#2373617605f48f53b5fa9d13188838b6c09022b0" - integrity sha512-yGyxd/eHTDjkpnBbDhTV0hwKF+i01qZc+6/ko65wOsh8xtgqpQeE6mtdgbvsLKcuMcIQ7PDy1ntyIv9phg14gQ== +"@lerna/package-graph@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/package-graph/-/package-graph-6.4.1.tgz#7a18024d531f0bd88609944e572b4861f0f8868f" + integrity sha512-fQvc59stRYOqxT3Mn7g/yI9/Kw5XetJoKcW5l8XeqKqcTNDURqKnN0qaNBY6lTTLOe4cR7gfXF2l1u3HOz0qEg== dependencies: - "@lerna/prerelease-id-from-version" "6.1.0" - "@lerna/validation-error" "6.1.0" + "@lerna/prerelease-id-from-version" "6.4.1" + "@lerna/validation-error" "6.4.1" npm-package-arg "8.1.1" npmlog "^6.0.2" semver "^7.3.4" -"@lerna/package@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/package/-/package-6.1.0.tgz#e9e33876c0509a86c1b676045b19fd3f7f1c77e2" - integrity sha512-PyNFtdH2IcLasp/nyMDshmeXotriOSlhbeFIxhdl1XuGj5v1so3utMSOrJMO5kzZJQg5zyx8qQoxL+WH/hkrVQ== +"@lerna/package@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/package/-/package-6.4.1.tgz#ebbd4c5f58f4b6cf77019271a686be9585272a3b" + integrity sha512-TrOah58RnwS9R8d3+WgFFTu5lqgZs7M+e1dvcRga7oSJeKscqpEK57G0xspvF3ycjfXQwRMmEtwPmpkeEVLMzA== dependencies: load-json-file "^6.2.0" npm-package-arg "8.1.1" write-pkg "^4.0.0" -"@lerna/prerelease-id-from-version@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/prerelease-id-from-version/-/prerelease-id-from-version-6.1.0.tgz#4ee5beeef4e81d77001e94ec5613c140b6615616" - integrity sha512-ngC4I6evvZztB6aOaSDEnhUgRTlqX3TyBXwWwLGTOXCPaCQBTPaLNokhmRdJ+ZVdZ4iHFbzEDSL07ubZrYUcmQ== +"@lerna/prerelease-id-from-version@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/prerelease-id-from-version/-/prerelease-id-from-version-6.4.1.tgz#65eb1835cdfd112783eea6b596812c64f535386b" + integrity sha512-uGicdMFrmfHXeC0FTosnUKRgUjrBJdZwrmw7ZWMb5DAJGOuTzrvJIcz5f0/eL3XqypC/7g+9DoTgKjX3hlxPZA== dependencies: semver "^7.3.4" -"@lerna/profiler@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/profiler/-/profiler-6.1.0.tgz#aae2249f1a39c79db72a548ce50bf32f86a0f3a5" - integrity sha512-WFDQNpuqPqMJLg8llvrBHF8Ib5Asgp23lMeNUe89T62NUX6gkjVBTYdjsduxM0tZH6Pa0GAGaQcha97P6fxfdQ== +"@lerna/profiler@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/profiler/-/profiler-6.4.1.tgz#0d5e017e1389e35960d671f43db7eb16337fda1b" + integrity sha512-dq2uQxcu0aq6eSoN+JwnvHoAnjtZAVngMvywz5bTAfzz/sSvIad1v8RCpJUMBQHxaPtbfiNvOIQgDZOmCBIM4g== dependencies: fs-extra "^9.1.0" npmlog "^6.0.2" upath "^2.0.1" -"@lerna/project@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/project/-/project-6.1.0.tgz#605afe28fb15d8b8b890fafe0ec1da2700964056" - integrity sha512-EOkfjjrTM16c3GUxGqcfYD2stV35p9mBEmkF41NPmyjfbzjol/irDF1r6Q7BsQSRsdClMJRCeZ168xdSxC2X0A== +"@lerna/project@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/project/-/project-6.4.1.tgz#0519323aa8bde5b73fc0bf1c428385a556a445f0" + integrity sha512-BPFYr4A0mNZ2jZymlcwwh7PfIC+I6r52xgGtJ4KIrIOB6mVKo9u30dgYJbUQxmSuMRTOnX7PJZttQQzSda4gEg== dependencies: - "@lerna/package" "6.1.0" - "@lerna/validation-error" "6.1.0" + "@lerna/package" "6.4.1" + "@lerna/validation-error" "6.4.1" cosmiconfig "^7.0.0" dedent "^0.7.0" dot-prop "^6.0.1" @@ -2777,38 +2777,38 @@ resolve-from "^5.0.0" write-json-file "^4.3.0" -"@lerna/prompt@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/prompt/-/prompt-6.1.0.tgz#98e228220428d33620822f77e39f592ce29c776c" - integrity sha512-981J/C53TZ2l2mFVlWJN7zynSzf5GEHKvKQa12Td9iknhASZOuwTAWb6eq46246Ant6W5tWwb0NSPu3I5qtcrA== +"@lerna/prompt@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/prompt/-/prompt-6.4.1.tgz#5ede06b4c8e17ec3045180b10ec5bd313cbc8585" + integrity sha512-vMxCIgF9Vpe80PnargBGAdS/Ib58iYEcfkcXwo7mYBCxEVcaUJFKZ72FEW8rw+H5LkxBlzrBJyfKRoOe0ks9gQ== dependencies: inquirer "^8.2.4" npmlog "^6.0.2" -"@lerna/publish@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/publish/-/publish-6.1.0.tgz#9d62c327bc3541a0430951d726b39a2fb17b7925" - integrity sha512-XtvuydtU0IptbAapLRgoN1AZj/WJR+e3UKnx9BQ1Dwc+Fpg2oqPxR/vi+6hxAsr95pdQ5CnWBdgS+dg2wEUJ7Q== - 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/describe-ref" "6.1.0" - "@lerna/log-packed" "6.1.0" - "@lerna/npm-conf" "6.1.0" - "@lerna/npm-dist-tag" "6.1.0" - "@lerna/npm-publish" "6.1.0" - "@lerna/otplease" "6.1.0" - "@lerna/output" "6.1.0" - "@lerna/pack-directory" "6.1.0" - "@lerna/prerelease-id-from-version" "6.1.0" - "@lerna/prompt" "6.1.0" - "@lerna/pulse-till-done" "6.1.0" - "@lerna/run-lifecycle" "6.1.0" - "@lerna/run-topologically" "6.1.0" - "@lerna/validation-error" "6.1.0" - "@lerna/version" "6.1.0" +"@lerna/publish@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/publish/-/publish-6.4.1.tgz#e1bdfa67297ca4a3054863e7acfc8482bf613c35" + integrity sha512-/D/AECpw2VNMa1Nh4g29ddYKRIqygEV1ftV8PYXVlHpqWN7VaKrcbRU6pn0ldgpFlMyPtESfv1zS32F5CQ944w== + 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/describe-ref" "6.4.1" + "@lerna/log-packed" "6.4.1" + "@lerna/npm-conf" "6.4.1" + "@lerna/npm-dist-tag" "6.4.1" + "@lerna/npm-publish" "6.4.1" + "@lerna/otplease" "6.4.1" + "@lerna/output" "6.4.1" + "@lerna/pack-directory" "6.4.1" + "@lerna/prerelease-id-from-version" "6.4.1" + "@lerna/prompt" "6.4.1" + "@lerna/pulse-till-done" "6.4.1" + "@lerna/run-lifecycle" "6.4.1" + "@lerna/run-topologically" "6.4.1" + "@lerna/validation-error" "6.4.1" + "@lerna/version" "6.4.1" fs-extra "^9.1.0" libnpmaccess "^6.0.3" npm-package-arg "8.1.1" @@ -2819,99 +2819,100 @@ pacote "^13.6.1" semver "^7.3.4" -"@lerna/pulse-till-done@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/pulse-till-done/-/pulse-till-done-6.1.0.tgz#df0112a9a5b8547b53d18742ce21104eb360d731" - integrity sha512-a2RVT82E4R9nVXtehzp2TQL6iXp0QfEM3bu8tBAR/SfI1A9ggZWQhuuUqtRyhhVCajdQDOo7rS0UG7R5JzK58w== +"@lerna/pulse-till-done@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/pulse-till-done/-/pulse-till-done-6.4.1.tgz#85c38a43939bf5e21b61091d0bcf73a1109a59db" + integrity sha512-efAkOC1UuiyqYBfrmhDBL6ufYtnpSqAG+lT4d/yk3CzJEJKkoCwh2Hb692kqHHQ5F74Uusc8tcRB7GBcfNZRWA== dependencies: npmlog "^6.0.2" -"@lerna/query-graph@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/query-graph/-/query-graph-6.1.0.tgz#e78c47c78d4691231fc379570e036bc2753cf6fa" - integrity sha512-YkyCc+6aR7GlCOcZXEKPcl5o5L2v+0YUNs59JrfAS0mctFosZ/2tP7pkdu2SI4qXIi5D0PMNsh/0fRni56znsQ== +"@lerna/query-graph@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/query-graph/-/query-graph-6.4.1.tgz#3c224a49ff392d08ce8aeeaa1af4458f522a2b78" + integrity sha512-gBGZLgu2x6L4d4ZYDn4+d5rxT9RNBC+biOxi0QrbaIq83I+JpHVmFSmExXK3rcTritrQ3JT9NCqb+Yu9tL9adQ== dependencies: - "@lerna/package-graph" "6.1.0" + "@lerna/package-graph" "6.4.1" -"@lerna/resolve-symlink@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/resolve-symlink/-/resolve-symlink-6.1.0.tgz#5a8686b99c838bc6e869930e5b5fd582607ebbe7" - integrity sha512-8ILO+h5fsE0q8MSLfdL+MT1GEsNhAB1fDyMkSsYgLRCsssN/cViZbffpclZyT/EfAhpyKfBCHZ0CmT1ZGofU1A== +"@lerna/resolve-symlink@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/resolve-symlink/-/resolve-symlink-6.4.1.tgz#ab42dcbd03bc4028ec77ee481c5db8884ebaf40a" + integrity sha512-gnqltcwhWVLUxCuwXWe/ch9WWTxXRI7F0ZvCtIgdfOpbosm3f1g27VO1LjXeJN2i6ks03qqMowqy4xB4uMR9IA== dependencies: fs-extra "^9.1.0" npmlog "^6.0.2" read-cmd-shim "^3.0.0" -"@lerna/rimraf-dir@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/rimraf-dir/-/rimraf-dir-6.1.0.tgz#75559585d5921563eff0e206bb9ec8ab0cc967c6" - integrity sha512-J9YeGHkCCeAIzsnKURYeGECBexiIii6HA+Bbd+rAgoKPsNCOj6ql4+qJE8Jbd7fQEFNDPQeBCYvM7JcdMc0WSA== +"@lerna/rimraf-dir@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/rimraf-dir/-/rimraf-dir-6.4.1.tgz#116e379f653135b3ae955dcba703bdf212cab51a" + integrity sha512-5sDOmZmVj0iXIiEgdhCm0Prjg5q2SQQKtMd7ImimPtWKkV0IyJWxrepJFbeQoFj5xBQF7QB5jlVNEfQfKhD6pQ== dependencies: - "@lerna/child-process" "6.1.0" + "@lerna/child-process" "6.4.1" npmlog "^6.0.2" path-exists "^4.0.0" rimraf "^3.0.2" -"@lerna/run-lifecycle@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/run-lifecycle/-/run-lifecycle-6.1.0.tgz#e1fa6cd300842ef1d688af77648fed05ec2d5345" - integrity sha512-GbTdKxL+hWHEPgyBEKtqY9Nf+jFlt6YLtP5VjEVc5SdLkm+FeRquar9/YcZVUbzr3c+NJwWNgVjHuePfowdpUA== +"@lerna/run-lifecycle@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/run-lifecycle/-/run-lifecycle-6.4.1.tgz#1eac136afae97e197bdb564e67fb385f4d346685" + integrity sha512-42VopI8NC8uVCZ3YPwbTycGVBSgukJltW5Saein0m7TIqFjwSfrcP0n7QJOr+WAu9uQkk+2kBstF5WmvKiqgEA== dependencies: - "@lerna/npm-conf" "6.1.0" + "@lerna/npm-conf" "6.4.1" "@npmcli/run-script" "^4.1.7" npmlog "^6.0.2" p-queue "^6.6.2" -"@lerna/run-topologically@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/run-topologically/-/run-topologically-6.1.0.tgz#8f1a428b5d4b800bced178edabfa2262b328572f" - integrity sha512-kpTaSBKdKjtf61be8Z1e7TIaMt/aksfxswQtpFxEuKDsPsdHfR8htSkADO4d/3SZFtmcAHIHNCQj9CaNj4O4Xw== +"@lerna/run-topologically@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/run-topologically/-/run-topologically-6.4.1.tgz#640b07d83f1d1e6d3bc36f81a74957839bb1672f" + integrity sha512-gXlnAsYrjs6KIUGDnHM8M8nt30Amxq3r0lSCNAt+vEu2sMMEOh9lffGGaJobJZ4bdwoXnKay3uER/TU8E9owMw== dependencies: - "@lerna/query-graph" "6.1.0" + "@lerna/query-graph" "6.4.1" p-queue "^6.6.2" -"@lerna/run@6.1.0": - version "6.1.0" - resolved "https://registry.yarnpkg.com/@lerna/run/-/run-6.1.0.tgz#efaea1acc78cb7fc73b4906be70002e118628d64" - integrity sha512-vlEEKPcTloiob6EK7gxrjEdB6fQQ/LNfWhSJCGxJlvNVbrMpoWIu0Kpp20b0nE+lzX7rRJ4seWr7Wdo/Fjub4Q== - dependencies: - "@lerna/command" "6.1.0" - "@lerna/filter-options" "6.1.0" - "@lerna/npm-run-script" "6.1.0" - "@lerna/output" "6.1.0" - "@lerna/profiler" "6.1.0" - "@lerna/run-topologically" "6.1.0" - "@lerna/timer" "6.1.0" - "@lerna/validation-error" "6.1.0" +"@lerna/run@6.4.1": + version "6.4.1" + resolved "https://registry.yarnpkg.com/@lerna/run/-/run-6.4.1.tgz#985279f071ff23ae15f92837f85f979a1352fc01" + integrity sha512-HRw7kS6KNqTxqntFiFXPEeBEct08NjnL6xKbbOV6pXXf+lXUQbJlF8S7t6UYqeWgTZ4iU9caIxtZIY+EpW93mQ== + dependencies: + "@lerna/command" "6.4.1" + "@lerna/filter-options" "6.4.1" + "@lerna/npm-run-script" "6.4.1" + "@lerna/output" "6.4.1" + "@lerna/profiler" "6.4.1" + "@lerna/run-topologically" "6.4.1" + "@lerna/timer" "6.4.1" + "@lerna/validation-error" "6.4.1" fs-extra "^9.1.0" + nx ">=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,24 +3212,24 @@ 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== +"@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.2.4" + nx "15.4.5" -"@nrwl/cli@15.3.2": - version "15.3.2" - resolved "https://registry.yarnpkg.com/@nrwl/cli/-/cli-15.3.2.tgz#dd713e6d6a064587a0ededd75d301b72f820e222" - integrity sha512-3xlH5LlNDzQ1mvVk+8w2WPoDwaOuUKR+9+38nnxTW6jW8g8S+h259/2IGsXnJ+cD7oEv3TARTC6aCrwVNn7egA== +"@nrwl/cli@15.5.3": + version "15.5.3" + resolved "https://registry.npmjs.org/@nrwl/cli/-/cli-15.5.3.tgz#13277e5a0e8ba713850bcf13fa76717ea747a2bb" + integrity sha512-NWf9CWswvdYM6YzXuweaZPAZ2erMtQrrHZdgFbUGeojZBZ+b4TCGzLWNodZj4yQOa/eTwlyPMYO2LEw9CoapDQ== dependencies: - nx "15.3.2" + nx "15.5.3" -"@nrwl/devkit@15.3.2": - version "15.3.2" - resolved "https://registry.yarnpkg.com/@nrwl/devkit/-/devkit-15.3.2.tgz#44ea9bc038ce87d9ea24447f6b3f3e1351a58787" - integrity sha512-h0MmDOjvhBJCrpXaAEK6eojpO5juaV6OEX0XjadPAQs4McxTALJxNP7Te6wIfgsY8t9WecARPIt85zKsLJeCjg== +"@nrwl/devkit@15.5.3": + version "15.5.3" + resolved "https://registry.npmjs.org/@nrwl/devkit/-/devkit-15.5.3.tgz#16fac0147c2ab6ebba7b5357b2b959ad46b6eb26" + integrity sha512-GGNLLGXDGWflrpaLimnE6hChfZfq3+XWZ0LJWL0IuCnchngPbNzuyh8S8KPgNKKgq4Nv0hglWefIwMg2UhHysA== dependencies: "@phenomnomnominal/tsquery" "4.1.1" ejs "^3.1.7" @@ -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" @@ -3247,16 +3248,16 @@ semver "7.3.4" tslib "^2.3.0" -"@nrwl/jest@15.3.2": - version "15.3.2" - resolved "https://registry.yarnpkg.com/@nrwl/jest/-/jest-15.3.2.tgz#5616af79444914e8a6c4b0dd7426eac8993accfb" - integrity sha512-3ksxm7gtJjXp/WeThxs2H5bAYI0zWQwquTjaNwaGKWvtwjtUbu+sM4zEF2HgOu4CKP6In3wFA4q0gZH7QlCEsw== +"@nrwl/jest@15.5.3": + version "15.5.3" + resolved "https://registry.npmjs.org/@nrwl/jest/-/jest-15.5.3.tgz#492ab42ac3171354a9afd6f93a7c43a6c56b3f61" + integrity sha512-BSs4ZQJtRjQ+OAPHdfeemoAiYsGL3Zuq2Ezj8XwGp50SkgVLUBZdXg2Ld1ARjTh/d3pMg+Mf+yKfjoYqFzKx+A== dependencies: "@jest/reporters" "28.1.1" "@jest/test-result" "28.1.1" - "@nrwl/devkit" "15.3.2" + "@nrwl/devkit" "15.5.3" "@phenomnomnominal/tsquery" "4.1.1" - chalk "4.1.0" + chalk "^4.1.0" dotenv "~10.0.0" identity-obj-proxy "3.0.0" jest-config "28.1.1" @@ -3265,12 +3266,12 @@ resolve.exports "1.1.0" tslib "^2.3.0" -"@nrwl/linter@15.3.2": - version "15.3.2" - resolved "https://registry.yarnpkg.com/@nrwl/linter/-/linter-15.3.2.tgz#7c947ece44d964d7331795e405966da71a02318b" - integrity sha512-sMOgmMufH5jhsseRLipKTk7GTfW3l0edjHFj9zVo49tQmGjMeurXdIw4MkJhX23JdSc1w1JGdrqeUi10iqtMyg== +"@nrwl/linter@15.5.3": + version "15.5.3" + resolved "https://registry.npmjs.org/@nrwl/linter/-/linter-15.5.3.tgz#de9c10c51d2ec92d51cc89207f642d41493314ba" + integrity sha512-ZeUtLOT0olORBL4FpEXmJoaiSKq4VIffW/vmCbosRIuHZqL4Cye5uHyQ6/KJXjD44Z+P6QCkyfr0etcy3lhSkg== dependencies: - "@nrwl/devkit" "15.3.2" + "@nrwl/devkit" "15.5.3" "@phenomnomnominal/tsquery" "4.1.1" tmp "~0.2.1" tslib "^2.3.0" @@ -3289,29 +3290,29 @@ 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== +"@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.2.4" + nx "15.4.5" -"@nrwl/tao@15.3.2": - version "15.3.2" - resolved "https://registry.yarnpkg.com/@nrwl/tao/-/tao-15.3.2.tgz#3498bd6596e582cbc5b922a45e5d8db5bcb2ce47" - integrity sha512-iP7e7gxSLn7xahz13Mj0c6KMSd9S2sUmD1Z6+F/H/lThikkrgURckSyZFtAW6OQNYOkWWi9RwdzVsH5He0syhQ== +"@nrwl/tao@15.5.3": + version "15.5.3" + resolved "https://registry.npmjs.org/@nrwl/tao/-/tao-15.5.3.tgz#08c05715d2ecb108ed8b2c5381b9017cf1448b4a" + integrity sha512-vgPLIW9IoBfQ4IkHRT5RC4LqNwFBK5jmHYmFIRgbIeFRudFBbnpmOaKRME0OwN7qJ6964PVVbzahAPvYVD02xw== dependencies: - nx "15.3.2" + nx "15.5.3" -"@nrwl/workspace@15.3.2": - version "15.3.2" - resolved "https://registry.yarnpkg.com/@nrwl/workspace/-/workspace-15.3.2.tgz#143609997f1e391083a2934a7e5305f0ef385ea5" - integrity sha512-h5WtTpRTHBmcO/V7WPnkzGJADQtAubZAinTn5ptkvFOYr0jnidwiVOidm0AgNvYMJtHIUf8h3jbKUIBAsRFF0g== +"@nrwl/workspace@15.5.3": + version "15.5.3" + resolved "https://registry.npmjs.org/@nrwl/workspace/-/workspace-15.5.3.tgz#3343b0de3a0fb8b0b7176c0c3cb7c19907e1485e" + integrity sha512-/Udv+dF4Z/9GZ4QmdCu/6e4QUJYx7zGTcoCOZi+Pt+OPRqOULkBbfKmB+xtiG/D32WnFePsxcssaZGux/aysUQ== dependencies: - "@nrwl/devkit" "15.3.2" - "@nrwl/linter" "15.3.2" + "@nrwl/devkit" "15.5.3" + "@nrwl/linter" "15.5.3" "@parcel/watcher" "2.0.4" - chalk "4.1.0" + chalk "^4.1.0" chokidar "^3.5.1" cli-cursor "3.1.0" cli-spinners "2.6.1" @@ -3319,12 +3320,13 @@ enquirer "~2.3.6" figures "3.2.0" flat "^5.0.2" - fs-extra "^10.1.0" + fs-extra "^11.1.0" glob "7.1.4" ignore "^5.0.4" + jsonc-parser "3.2.0" minimatch "3.0.5" npm-run-path "^4.0.1" - nx "15.3.2" + nx "15.5.3" open "^8.4.0" rxjs "^6.5.4" semver "7.3.4" @@ -5670,7 +5672,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 +6922,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 +6973,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" @@ -7540,6 +7542,15 @@ fs-extra@^10.1.0: jsonfile "^6.0.1" universalify "^2.0.0" +fs-extra@^11.1.0: + version "11.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.1.0.tgz#5784b102104433bb0e090f48bfc4a30742c357ed" + integrity sha512-0rcTq621PD5jM/e0a3EJoGC/1TC5ZBCERW82LQuwfGnCa1V8w7dpYH1yNu+SLb6E5dkeCBzKEyLGlFrnr+dUyw== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + fs-extra@^7.0.1, fs-extra@~7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" @@ -7908,6 +7919,11 @@ graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6 resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.9.tgz#041b05df45755e587a24942279b9d113146e1c96" integrity sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ== +grapheme-splitter@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e" + integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ== + gray-matter@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/gray-matter/-/gray-matter-4.0.3.tgz#e893c064825de73ea1f5f7d88c7a9f7274288798" @@ -8338,10 +8354,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 +9432,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 +9547,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: @@ -9609,6 +9622,11 @@ lines-and-columns@^1.1.6: resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00" integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA= +lines-and-columns@~2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-2.0.3.tgz#b2f0badedb556b747020ab8ea7f0373e22efac1b" + integrity sha512-cNOjgCnLB+FnvWWtyRTzmB3POJ+cXxTA81LoW7u8JdmhfXzriropYwpjShnz1QLLWsQwY7nIxoDmcPTwphDK9w== + linkify-it@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-4.0.1.tgz#01f1d5e508190d06669982ba31a7d9f56a5751ec" @@ -9935,31 +9953,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 +10189,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 +10627,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.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.2.4" - "@nrwl/tao" "15.2.4" + "@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" @@ -10650,26 +10662,25 @@ nx@15.2.4, "nx@>=14.8.6 < 16": 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" 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.5.3: + version "15.5.3" + resolved "https://registry.npmjs.org/nx/-/nx-15.5.3.tgz#bf6252e7d9e17121dd82dec4f6fce319b9e005fa" + integrity sha512-PHB8VbiBLP108xb+yR8IGEsYWr7OcmDDOjHL+73oP4lVjyPgT8wdTMe6tI5LdBgv+KZ+0kiThK3ckvcPsfgvLQ== dependencies: - "@nrwl/cli" "15.3.2" - "@nrwl/tao" "15.3.2" + "@nrwl/cli" "15.5.3" + "@nrwl/tao" "15.5.3" "@parcel/watcher" "2.0.4" "@yarnpkg/lockfile" "^1.1.0" "@yarnpkg/parsers" "^3.0.0-rc.18" "@zkochan/js-yaml" "0.0.6" axios "^1.0.0" - chalk "4.1.0" - chokidar "^3.5.1" + chalk "^4.1.0" cli-cursor "3.1.0" cli-spinners "2.6.1" cliui "^7.0.2" @@ -10678,11 +10689,12 @@ nx@15.3.2: fast-glob "3.2.7" figures "3.2.0" flat "^5.0.2" - fs-extra "^10.1.0" + fs-extra "^11.1.0" glob "7.1.4" ignore "^5.0.4" js-yaml "4.1.0" jsonc-parser "3.2.0" + lines-and-columns "~2.0.3" minimatch "3.0.5" npm-run-path "^4.0.1" open "^8.4.0" @@ -10691,7 +10703,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 +11579,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 +12395,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 +12407,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" @@ -13480,7 +13497,7 @@ ts-essentials@^2.0.3: resolved "https://registry.yarnpkg.com/ts-essentials/-/ts-essentials-2.0.12.tgz#c9303f3d74f75fa7528c3d49b80e089ab09d8745" integrity sha512-3IVX4nI6B5cc31/GFFE+i8ey/N2eA0CZDbo6n0yrz0zDX8ZJ8djmU1p+XRz7G3is0F3bB3pu2pAroFdAWQKU3w== -ts-node@^10.7.0: +ts-node@10.7.0: version "10.7.0" resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.7.0.tgz#35d503d0fab3e2baa672a0e94f4b40653c2463f5" integrity sha512-TbIGS4xgJoX2i3do417KSaep1uRAW/Lu+WAL2doDHC0D6ummjirVOXU5/7aiZotbQ5p1Zp9tP7U6cYhA0O7M8A== @@ -13499,7 +13516,7 @@ ts-node@^10.7.0: v8-compile-cache-lib "^3.0.0" yn "3.1.1" -tsconfig-paths@^3.14.1, tsconfig-paths@^3.9.0: +tsconfig-paths@^3.14.1: version "3.14.1" resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz#ba0734599e8ea36c862798e920bcf163277b137a" integrity sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ== @@ -13509,6 +13526,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"