diff --git a/.github/renovate.json5 b/.github/renovate.json5 index d42567b92dd6..b1a585e0cbe6 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -1,94 +1,62 @@ { + $schema: 'https://docs.renovatebot.com/renovate-schema.json', + extends: ['config:recommended', ':approveMajorUpdates'], + + dependencyDashboardLabels: ['dependencies', 'repo maintenance'], enabledManagers: ['github-actions', 'npm'], + ignoreDeps: [ - // AJV is out-of-date, but it's intentionally synced with ESLint - https://github.com/eslint/eslint/blob/ad9dd6a933fd098a0d99c6a9aa059850535c23ee/package.json#L70 + // AJV is intentionally synced with ESLint. + // https://github.com/eslint/eslint/blob/13dbecdea749abf51951ce61662eec2621a4b9af/package.json#L77 'ajv', - // globby is ESM so we can't go any higher right now + // ESM only so we can't go higher until we natively run ESM internally. 'globby', - // this dep is now ESM only + // Blocked until we enable ESLint v9 locally in our own PR (#9119). + 'eslint', + // ESM only so we can't go higher until we natively run ESM internally. 'execa', - // the nx packages get updated using the nx migrate CLI - '@nrwl/cli', - '@nx/cli', - '@nrwl/devkit', - '@nx/devkit', - '@nx/jest', - '@nx/jest', - '@nrwl/nx-cloud', - 'nx-cloud', - '@nrwl/tao', ], ignorePaths: [ - // integration test package.json's should never be updated as they're purposely fixed tests + // Integration test package.json's should never be updated as they're purposely fixed tests. 'tests/integration/fixtures', ], - internalChecksFilter: 'strict', + labels: ['dependencies'], - dependencyDashboard: true, - dependencyDashboardLabels: ['dependencies', 'repo maintenance'], - major: { - // most majors will require some manual effort to upgrade to, so we don't want to create - // PRs automatically or else we'll just spam ourselves. - dependencyDashboardApproval: true, - }, - // by default renovate will auto-rebase whenever the dep pranch falls behind main. - // this is annoying as it spams notifications and creates unnecessary action runs. - // instead only auto-rebase when conflicted, and we can trigger a manual rebase if required. - rebaseWhen: 'conflicted', - packageRules: [ - // automerge everything but major updates - { - matchUpdateTypes: ['minor', 'patch', 'pin', 'digest'], - automerge: true, - automergeStrategy: 'squash', - }, - // label PRs appropriately + // Wait well over npm's three day window for any new package as a precaution against malicious publishes. + // https://docs.npmjs.com/policies/unpublish/#packages-published-less-than-72-hours-ago + minimumReleaseAge: '7 days', + + packageRules: [ { - matchManagers: ['npm'], addLabels: ['javascript'], + description: 'Label JS ecosystem PRs appropriately.', + matchManagers: ['npm'], }, { - matchManagers: ['github-actions'], addLabels: ['github-actions'], - }, - - // batch package sets together - { - extends: ['packages:react'], - groupName: 'react', - }, - { - extends: ['monorepo:docusaurus'], - groupName: 'docusaurus', - }, - { - extends: ['monorepo:nrwl'], - groupName: 'nx', - }, - { - matchPackagePrefixes: ['@babel', 'babel-'], - groupName: 'babel', - }, - { - matchPackageNames: ['ts-jest', 'pretty-format'], - matchPackagePrefixes: ['@types/jest', 'jest', '@jest'], - groupName: 'jest', - }, - { - matchPackageNames: ['eslint'], - matchPackagePrefixes: ['@eslint'], - groupName: 'eslint', + description: 'Label GHA ecosystem PRs appropriately.', + matchManagers: ['github-actions'], }, { - matchPackageNames: ['stylelint'], - matchPackagePrefixes: ['@stylelint'], - groupName: 'stylelint', + description: 'Ignore Nrwl/Nx packages updated using the nx migrate CLI.', + enabled: false, + packagePatterns: ['^@nrwl/', '^@nx/', 'nx-cloud'], }, ], + + // We've found enabling patch updates on all dependencies is a lot of noise. + patch: { + enabled: false, + }, + postUpdateOptions: [ - // run yarn dedupe to cleanup the lockfile after updates + // Run yarn dedupe to cleanup the lockfile after updates. 'yarnDedupeHighest', ], - stabilityDays: 3, + + // By default renovate will auto-rebase whenever the dep pranch falls behind main. + // This is annoying as it spams notifications and creates unnecessary action runs. + // Instead only auto-rebase when conflicted, and we can trigger a manual rebase if required. + rebaseWhen: 'conflicted', } diff --git a/.github/workflows/a11y-alt-bot.yml b/.github/workflows/a11y-alt-bot.yml index 2c4bf7d28a6f..6b542ff2a044 100644 --- a/.github/workflows/a11y-alt-bot.yml +++ b/.github/workflows/a11y-alt-bot.yml @@ -5,7 +5,10 @@ on: pull_request: types: [opened, edited] issue_comment: - types: [created, edited] + # nx bot and netlify bot edit their comments regularly + # this floods our action queue with this action + # it's rare that someone edits a comment to add an image so to save our queue we ignore the edit + types: [created] discussion: types: [created, edited] discussion_comment: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aaa3b40510f5..56f4025feeed 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -262,7 +262,7 @@ jobs: path: coverage - name: Publish code coverage report - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4.5.0 with: token: ${{ secrets.CODECOV_TOKEN }} files: coverage/**/lcov.info diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b6f17bb5a10..b93391e18c46 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,27 @@ +## 7.15.0 (2024-07-01) + + +### 🚀 Features + +- **eslint-plugin:** [array-type] detect `Readonly` case ([#8752](https://github.com/typescript-eslint/typescript-eslint/pull/8752)) +- **eslint-plugin:** back-port new rules around empty object types from v8 ([#9443](https://github.com/typescript-eslint/typescript-eslint/pull/9443)) + +### 🩹 Fixes + +- disable `EXPERIMENTAL_useProjectService` in `disabled-type-checked` shared config ([#9459](https://github.com/typescript-eslint/typescript-eslint/pull/9459)) +- **eslint-plugin:** [no-unsafe-return] differentiate a types-error any from a true any ([#9254](https://github.com/typescript-eslint/typescript-eslint/pull/9254)) +- **eslint-plugin:** [no-unsafe-call] differentiate a types-error any from a true any ([#9304](https://github.com/typescript-eslint/typescript-eslint/pull/9304)) +- **utils:** clean outdated `RuleTester` export ([#9322](https://github.com/typescript-eslint/typescript-eslint/pull/9322)) + +### ❤️ Thank You + +- auvred @auvred +- Kim Sang Du @developer-bandi +- rgehbt @Gehbt +- Vinccool96 + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 7.14.1 (2024-06-24) diff --git a/docs/developers/Custom_Rules.mdx b/docs/developers/Custom_Rules.mdx index d0494bdd0c33..2347d4db88a9 100644 --- a/docs/developers/Custom_Rules.mdx +++ b/docs/developers/Custom_Rules.mdx @@ -233,15 +233,13 @@ In that case, it is best to add an explicit type declaration. This rule snippet targets name nodes of both function and interface declarations: ```ts -import { AST_NODE_TYPES, ESLintUtils } from '@typescript-eslint/utils'; +import { TSESTree } from '@typescript-eslint/utils'; export const rule = createRule({ create(context) { return { 'FunctionDeclaration, TSInterfaceDeclaration'( - node: - | AST_NODE_TYPES.FunctionDeclaration - | AST_NODE_TYPES.TSInterfaceDeclaration, + node: TSESTree.FunctionDeclaration | TSESTree.TSInterfaceDeclaration, ) { if (/^[a-z]/.test(node.id.name)) { // ... diff --git a/docs/troubleshooting/typed-linting/Performance.mdx b/docs/troubleshooting/typed-linting/Performance.mdx index ba5037b1d628..208c42bc9c21 100644 --- a/docs/troubleshooting/typed-linting/Performance.mdx +++ b/docs/troubleshooting/typed-linting/Performance.mdx @@ -11,6 +11,19 @@ As mentioned in the [type-aware linting doc](../../getting-started/Typed_Linting If you're experiencing times much slower than that, then there are a few common culprits. +## Slow TypeScript Types + +Running typed linting on a project is generally as slow as type checking that same project. +If TypeScript's type checker runs slowly on your project, then typed linting will as well. + +The [TypeScript Wiki's Performance page](https://github.com/microsoft/TypeScript/wiki/Performance) includes general performance tips and steps to investigate slow type checking. +In particular for typed linting: + +- [Investigating Issues](https://github.com/microsoft/TypeScript/wiki/Performance#investigating-issues) can spot slow types and type checking: + - [Running `tsc` alone](https://github.com/microsoft/TypeScript/wiki/Performance#running-tsc-alone) should provide a baseline for your full project's type checking speed. + - [Performance Tracing](https://github.com/microsoft/TypeScript/wiki/Performance#performance-tracing) can spotlight specific slow types within your project. +- [Using Project References](https://github.com/microsoft/TypeScript/wiki/Performance#using-project-references) -which requires enabling the [new "project service" (`parserOptions.projectService`) in v8](/blog/announcing-typescript-eslint-v8-beta#project-service)- can be helpful to speed up type checking on larger projects. + ## Wide includes in your `tsconfig` When using type-aware linting, you provide us with one or more tsconfigs. diff --git a/docs/troubleshooting/typed-linting/index.mdx b/docs/troubleshooting/typed-linting/index.mdx index 6723ae5aea34..9488d8199927 100644 --- a/docs/troubleshooting/typed-linting/index.mdx +++ b/docs/troubleshooting/typed-linting/index.mdx @@ -7,6 +7,19 @@ slug: /troubleshooting/typed-linting import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; +## Editor ESLint reports become out-of-date after file changes + +There is a known issue in at least VS Code with typed linting that files might have out-of-date lint errors after multiple updates to files on disk. +The root cause is that ESLint doesn't provide a way for editors to know about cross-file dependencies, such as type information. +This results in files receiving out-of-date type information when files they import from are changed. + +You might see this as erroneous `no-unsafe-*` rule complaints on `any` or `error typed` values. +Other rules may be more subtly incorrect. + +For now, the workaround is to run the _**Restart ESLint Server**_ command in VS Code (or an equivalent in other editors) when types get out of date. + +See [ESLint does not re-compute cross-file information on file changes (microsoft/vscode-eslint#1774)](https://github.com/microsoft/vscode-eslint/issues/1774) for more information. + ## I get errors telling me "Having many files run with the default project is known to cause performance issues and slow down linting." diff --git a/docs/users/Releases.mdx b/docs/users/Releases.mdx index 09070f950ecb..e3192c946bb0 100644 --- a/docs/users/Releases.mdx +++ b/docs/users/Releases.mdx @@ -38,7 +38,7 @@ These release notes will list the PRs included in the release. We release a canary version for each commit to `main` that passes all required checks. This release is performed automatically by the [`publish_canary_version` step](https://github.com/typescript-eslint/typescript-eslint/blob/5feb2dba9da2bd5e233451b7b0f1c99414b5aef9/.github/workflows/ci.yml#L234-L263). So **you never need to wait for a new stable version to make use of any updates**. -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. +This release 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. :::note The only exception to the automated publishes described above is when we are in the final phases of creating the next major version of the libraries - e.g. going from `1.x.x` to `2.x.x`. diff --git a/packages/ast-spec/CHANGELOG.md b/packages/ast-spec/CHANGELOG.md index 8623ad15ebf0..486d1d2a081c 100644 --- a/packages/ast-spec/CHANGELOG.md +++ b/packages/ast-spec/CHANGELOG.md @@ -1,3 +1,9 @@ +## 7.15.0 (2024-07-01) + +This was a version bump only for ast-spec to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 7.14.1 (2024-06-24) This was a version bump only for ast-spec to align it with other projects, there were no code changes. diff --git a/packages/ast-spec/package.json b/packages/ast-spec/package.json index 7d27522029ac..2099ca327535 100644 --- a/packages/ast-spec/package.json +++ b/packages/ast-spec/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/ast-spec", - "version": "7.14.1", + "version": "7.15.0", "description": "Complete specification for the TypeScript-ESTree AST", "private": true, "keywords": [ diff --git a/packages/eslint-plugin-internal/CHANGELOG.md b/packages/eslint-plugin-internal/CHANGELOG.md index ebb3f79e2b91..2081130971a3 100644 --- a/packages/eslint-plugin-internal/CHANGELOG.md +++ b/packages/eslint-plugin-internal/CHANGELOG.md @@ -1,3 +1,9 @@ +## 7.15.0 (2024-07-01) + +This was a version bump only for eslint-plugin-internal to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 7.14.1 (2024-06-24) This was a version bump only for eslint-plugin-internal to align it with other projects, there were no code changes. diff --git a/packages/eslint-plugin-internal/package.json b/packages/eslint-plugin-internal/package.json index 6a438de5bf2b..d3cd95c3f521 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": "7.14.1", + "version": "7.15.0", "private": true, "main": "dist/index.js", "types": "index.d.ts", @@ -15,10 +15,10 @@ }, "dependencies": { "@prettier/sync": "^0.5.1", - "@typescript-eslint/rule-tester": "7.14.1", - "@typescript-eslint/scope-manager": "7.14.1", - "@typescript-eslint/type-utils": "7.14.1", - "@typescript-eslint/utils": "7.14.1", + "@typescript-eslint/rule-tester": "7.15.0", + "@typescript-eslint/scope-manager": "7.15.0", + "@typescript-eslint/type-utils": "7.15.0", + "@typescript-eslint/utils": "7.15.0", "prettier": "^3.2.5" }, "devDependencies": { diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index 9d18dc0c000b..177614af7e79 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/CHANGELOG.md @@ -1,3 +1,31 @@ +## 7.15.0 (2024-07-01) + + +### 🚀 Features + +- **eslint-plugin:** [array-type] detect `Readonly` case + +- **eslint-plugin:** back-port new rules around empty object types from v8 + + +### 🩹 Fixes + +- disable `EXPERIMENTAL_useProjectService` in `disabled-type-checked` shared config + +- **eslint-plugin:** [no-unsafe-return] differentiate a types-error any from a true any + +- **eslint-plugin:** [no-unsafe-call] differentiate a types-error any from a true any + + +### ❤️ Thank You + +- auvred +- Kim Sang Du +- rgehbt +- Vinccool96 + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 7.14.1 (2024-06-24) diff --git a/packages/eslint-plugin/docs/rules/array-type.mdx b/packages/eslint-plugin/docs/rules/array-type.mdx index 3985ccc7e2ac..d3238025e47d 100644 --- a/packages/eslint-plugin/docs/rules/array-type.mdx +++ b/packages/eslint-plugin/docs/rules/array-type.mdx @@ -42,7 +42,8 @@ const y: readonly string[] = ['a', 'b']; ### `"generic"` -Always use `Array` or `ReadonlyArray` for all array types. +Always use `Array`, `ReadonlyArray`, or `Readonly>` for all array types. +`readonly T[]` will be modified to `ReadonlyArray` and `Readonly` will be modified to `Readonly`. @@ -50,6 +51,7 @@ Always use `Array` or `ReadonlyArray` for all array types. ```ts option='{ "default": "generic" }' const x: string[] = ['a', 'b']; const y: readonly string[] = ['a', 'b']; +const z: Readonly = ['a', 'b']; ``` @@ -58,6 +60,7 @@ const y: readonly string[] = ['a', 'b']; ```ts option='{ "default": "generic" }' const x: Array = ['a', 'b']; const y: ReadonlyArray = ['a', 'b']; +const z: Readonly> = ['a', 'b']; ``` diff --git a/packages/eslint-plugin/docs/rules/no-empty-object-type.mdx b/packages/eslint-plugin/docs/rules/no-empty-object-type.mdx new file mode 100644 index 000000000000..6a0e27bd8834 --- /dev/null +++ b/packages/eslint-plugin/docs/rules/no-empty-object-type.mdx @@ -0,0 +1,177 @@ +--- +description: 'Disallow accidentally using the "empty object" type.' +--- + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + +> 🛑 This file is source code, not the primary documentation location! 🛑 +> +> See **https://typescript-eslint.io/rules/no-empty-object-type** for documentation. + +The `{}`, or "empty object" type in TypeScript is a common source of confusion for developers unfamiliar with TypeScript's structural typing. +`{}` represents any _non-nullish value_, including literals like `0` and `""`: + +```ts +let anyNonNullishValue: {} = 'Intentionally allowed by TypeScript.'; +``` + +Often, developers writing `{}` actually mean either: + +- `object`: representing any _object_ value +- `unknown`: representing any value at all, including `null` and `undefined` + +In other words, the "empty object" type `{}` really means _"any value that is defined"_. +That includes arrays, class instances, functions, and primitives such as `string` and `symbol`. + +To avoid confusion around the `{}` type allowing any _non-nullish value_, this rule bans usage of the `{}` type. +That includes interfaces and object type aliases with no fields. + +:::tip +If you do have a use case for an API allowing `{}`, you can always configure the [rule's options](#options), use an [ESLint disable comment](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1), or [disable the rule in your ESLint config](https://eslint.org/docs/latest/use/configure/rules#using-configuration-files-1). +::: + +Note that this rule does not report on: + +- `{}` as a type constituent in an intersection type (e.g. types like TypeScript's built-in `type NonNullable = T & {}`), as this can be useful in type system operations. +- Interfaces that extend from multiple other interfaces. + +## Examples + + + + +```ts +let anyObject: {}; +let anyValue: {}; + +interface AnyObjectA {} +interface AnyValueA {} + +type AnyObjectB = {}; +type AnyValueB = {}; +``` + + + + +```ts +let anyObject: object; +let anyValue: unknown; + +type AnyObjectA = object; +type AnyValueA = unknown; + +type AnyObjectB = object; +type AnyValueB = unknown; + +let objectWith: { property: boolean }; + +interface InterfaceWith { + property: boolean; +} + +type TypeWith = { property: boolean }; +``` + + + + +## Options + +By default, this rule flags both interfaces and object types. + +### `allowInterfaces` + +Whether to allow empty interfaces, as one of: + +- `'always'`: to always allow interfaces with no fields +- `'never'` _(default)_: to never allow interfaces with no fields +- `'with-single-extends'`: to allow empty interfaces that `extend` from a single base interface + +Examples of code for this rule with `{ allowInterfaces: 'with-single-extends' }`: + + + + +```ts option='{ "allowInterfaces": "with-single-extends" }' +interface Foo {} +``` + + + + +```ts option='{ "allowInterfaces": "with-single-extends" }' +interface Base { + value: boolean; +} + +interface Derived extends Base {} +``` + + + + +### `allowObjectTypes` + +Whether to allow empty object type literals, as one of: + +- `'always'`: to always allow object type literals with no fields +- `'never'` _(default)_: to never allow object type literals with no fields + +Examples of code for this rule with `{ allowObjectTypes: 'always' }`: + + + + +```ts option='{ "allowObjectTypes": "always" }' +interface Base {} +``` + + + + +```ts option='{ "allowObjectTypes": "always" }' +type Base = {}; +``` + + + + +### `allowWithName` + +A stringified regular expression to allow interfaces and object type aliases with the configured name. +This can be useful if your existing code style includes a pattern of declaring empty types with `{}` instead of `object`. + +Examples of code for this rule with `{ allowWithName: 'Props$' }`: + + + + +```ts option='{ "allowWithName": "Props$" }' +interface InterfaceValue {} + +type TypeValue = {}; +``` + + + + +```ts option='{ "allowWithName": "Props$" }' +interface InterfaceProps {} + +type TypeProps = {}; +``` + + + + +## When Not To Use It + +If your code commonly needs to represent the _"any non-nullish value"_ type, this rule may not be for you. +Projects that extensively use type operations such as conditional types and mapped types oftentimes benefit from disabling this rule. + +## Further Reading + +- [Enhancement: [ban-types] Split the {} ban into a separate, better-phrased rule](https://github.com/typescript-eslint/typescript-eslint/issues/8700) +- [The Empty Object Type in TypeScript](https://www.totaltypescript.com/the-empty-object-type-in-typescript) diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 4a6259f5e12d..9b29236c03b2 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin", - "version": "7.14.1", + "version": "7.15.0", "description": "TypeScript plugin for ESLint", "files": [ "dist", @@ -60,10 +60,10 @@ }, "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "7.14.1", - "@typescript-eslint/type-utils": "7.14.1", - "@typescript-eslint/utils": "7.14.1", - "@typescript-eslint/visitor-keys": "7.14.1", + "@typescript-eslint/scope-manager": "7.15.0", + "@typescript-eslint/type-utils": "7.15.0", + "@typescript-eslint/utils": "7.15.0", + "@typescript-eslint/visitor-keys": "7.15.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", @@ -74,8 +74,8 @@ "@types/marked": "^5.0.2", "@types/mdast": "^4.0.3", "@types/natural-compare": "*", - "@typescript-eslint/rule-schema-to-typescript-types": "7.14.1", - "@typescript-eslint/rule-tester": "7.14.1", + "@typescript-eslint/rule-schema-to-typescript-types": "7.15.0", + "@typescript-eslint/rule-tester": "7.15.0", "ajv": "^6.12.6", "cross-env": "^7.0.3", "cross-fetch": "*", diff --git a/packages/eslint-plugin/src/configs/all.ts b/packages/eslint-plugin/src/configs/all.ts index ee778e7e48cd..228b01034839 100644 --- a/packages/eslint-plugin/src/configs/all.ts +++ b/packages/eslint-plugin/src/configs/all.ts @@ -55,6 +55,7 @@ export = { 'no-empty-function': 'off', '@typescript-eslint/no-empty-function': 'error', '@typescript-eslint/no-empty-interface': 'error', + '@typescript-eslint/no-empty-object-type': 'error', '@typescript-eslint/no-explicit-any': 'error', '@typescript-eslint/no-extra-non-null-assertion': 'error', '@typescript-eslint/no-extraneous-class': 'error', diff --git a/packages/eslint-plugin/src/configs/disable-type-checked.ts b/packages/eslint-plugin/src/configs/disable-type-checked.ts index 8e47f9688d73..5b3e65c7635e 100644 --- a/packages/eslint-plugin/src/configs/disable-type-checked.ts +++ b/packages/eslint-plugin/src/configs/disable-type-checked.ts @@ -8,7 +8,11 @@ import type { ClassicConfig } from '@typescript-eslint/utils/ts-eslint'; export = { - parserOptions: { project: false, program: null }, + parserOptions: { + project: false, + program: null, + EXPERIMENTAL_useProjectService: false, + }, rules: { '@typescript-eslint/await-thenable': 'off', '@typescript-eslint/consistent-return': 'off', diff --git a/packages/eslint-plugin/src/rules/array-type.ts b/packages/eslint-plugin/src/rules/array-type.ts index fc8d5f32f80a..26b5c270914e 100644 --- a/packages/eslint-plugin/src/rules/array-type.ts +++ b/packages/eslint-plugin/src/rules/array-type.ts @@ -82,7 +82,8 @@ type MessageIds = | 'errorStringArray' | 'errorStringArraySimple' | 'errorStringGeneric' - | 'errorStringGenericSimple'; + | 'errorStringGenericSimple' + | 'errorStringArrayReadonly'; export default createRule({ name: 'array-type', @@ -99,6 +100,8 @@ export default createRule({ "Array type using '{{readonlyPrefix}}{{type}}[]' is forbidden. Use '{{className}}<{{type}}>' instead.", errorStringArray: "Array type using '{{className}}<{{type}}>' is forbidden. Use '{{readonlyPrefix}}{{type}}[]' instead.", + errorStringArrayReadonly: + "Array type using '{{className}}<{{type}}>' is forbidden. Use '{{readonlyPrefix}}{{type}}' instead.", errorStringArraySimple: "Array type using '{{className}}<{{type}}>' is forbidden for simple types. Use '{{readonlyPrefix}}{{type}}[]' instead.", errorStringGenericSimple: @@ -199,13 +202,22 @@ export default createRule({ node.typeName.type !== AST_NODE_TYPES.Identifier || !( node.typeName.name === 'Array' || - node.typeName.name === 'ReadonlyArray' - ) + node.typeName.name === 'ReadonlyArray' || + node.typeName.name === 'Readonly' + ) || + (node.typeName.name === 'Readonly' && + node.typeArguments?.params[0].type !== AST_NODE_TYPES.TSArrayType) ) { return; } - const isReadonlyArrayType = node.typeName.name === 'ReadonlyArray'; + const isReadonlyWithGenericArrayType = + node.typeName.name === 'Readonly' && + node.typeArguments?.params[0].type === AST_NODE_TYPES.TSArrayType; + const isReadonlyArrayType = + node.typeName.name === 'ReadonlyArray' || + isReadonlyWithGenericArrayType; + const currentOption = isReadonlyArrayType ? readonlyOption : defaultOption; @@ -218,7 +230,9 @@ export default createRule({ const typeParams = node.typeArguments?.params; const messageId = currentOption === 'array' - ? 'errorStringArray' + ? isReadonlyWithGenericArrayType + ? 'errorStringArrayReadonly' + : 'errorStringArray' : 'errorStringArraySimple'; if (!typeParams || typeParams.length === 0) { @@ -256,13 +270,13 @@ export default createRule({ const start = `${parentParens ? '(' : ''}${readonlyPrefix}${ typeParens ? '(' : '' }`; - const end = `${typeParens ? ')' : ''}[]${parentParens ? ')' : ''}`; + const end = `${typeParens ? ')' : ''}${isReadonlyWithGenericArrayType ? '' : `[]`}${parentParens ? ')' : ''}`; context.report({ node, messageId, data: { - className: isReadonlyArrayType ? 'ReadonlyArray' : 'Array', + className: isReadonlyArrayType ? node.typeName.name : 'Array', readonlyPrefix, type: getMessageType(type), }, diff --git a/packages/eslint-plugin/src/rules/index.ts b/packages/eslint-plugin/src/rules/index.ts index fe0d36026bd1..62358555d7f3 100644 --- a/packages/eslint-plugin/src/rules/index.ts +++ b/packages/eslint-plugin/src/rules/index.ts @@ -47,6 +47,7 @@ import noDuplicateTypeConstituents from './no-duplicate-type-constituents'; import noDynamicDelete from './no-dynamic-delete'; import noEmptyFunction from './no-empty-function'; import noEmptyInterface from './no-empty-interface'; +import noEmptyObjectType from './no-empty-object-type'; import noExplicitAny from './no-explicit-any'; import noExtraNonNullAssertion from './no-extra-non-null-assertion'; import noExtraParens from './no-extra-parens'; @@ -193,6 +194,7 @@ export default { 'no-dynamic-delete': noDynamicDelete, 'no-empty-function': noEmptyFunction, 'no-empty-interface': noEmptyInterface, + 'no-empty-object-type': noEmptyObjectType, 'no-explicit-any': noExplicitAny, 'no-extra-non-null-assertion': noExtraNonNullAssertion, 'no-extra-parens': noExtraParens, diff --git a/packages/eslint-plugin/src/rules/no-empty-object-type.ts b/packages/eslint-plugin/src/rules/no-empty-object-type.ts new file mode 100644 index 000000000000..21db86ba2033 --- /dev/null +++ b/packages/eslint-plugin/src/rules/no-empty-object-type.ts @@ -0,0 +1,186 @@ +import type { TSESLint } from '@typescript-eslint/utils'; +import { AST_NODE_TYPES } from '@typescript-eslint/utils'; + +import { createRule } from '../util'; + +export type AllowInterfaces = 'always' | 'never' | 'with-single-extends'; + +export type AllowObjectTypes = 'always' | 'never'; + +export type Options = [ + { + allowInterfaces?: AllowInterfaces; + allowObjectTypes?: AllowObjectTypes; + allowWithName?: string; + }, +]; + +export type MessageIds = + | 'noEmptyInterface' + | 'noEmptyObject' + | 'noEmptyInterfaceWithSuper' + | 'replaceEmptyInterface' + | 'replaceEmptyInterfaceWithSuper' + | 'replaceEmptyObjectType'; + +const noEmptyMessage = (emptyType: string): string => + [ + `${emptyType} allows any non-nullish value, including literals like \`0\` and \`""\`.`, + "- If that's what you want, disable this lint rule with an inline comment or configure the '{{ option }}' rule option.", + '- 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'); + +export default createRule({ + name: 'no-empty-object-type', + meta: { + type: 'suggestion', + docs: { + description: 'Disallow accidentally using the "empty object" type', + }, + hasSuggestions: true, + messages: { + noEmptyInterface: noEmptyMessage('An empty interface declaration'), + noEmptyObject: noEmptyMessage('The `{}` ("empty object") type'), + noEmptyInterfaceWithSuper: + 'An interface declaring no members is equivalent to its supertype.', + replaceEmptyInterface: 'Replace empty interface with `{{replacement}}`.', + replaceEmptyInterfaceWithSuper: + 'Replace empty interface with a type alias.', + replaceEmptyObjectType: 'Replace `{}` with `{{replacement}}`.', + }, + schema: [ + { + type: 'object', + additionalProperties: false, + properties: { + allowInterfaces: { + enum: ['always', 'never', 'with-single-extends'], + type: 'string', + }, + allowObjectTypes: { + enum: ['always', 'in-type-alias-with-name', 'never'], + type: 'string', + }, + allowWithName: { + type: 'string', + }, + }, + }, + ], + }, + defaultOptions: [ + { + allowInterfaces: 'never', + allowObjectTypes: 'never', + }, + ], + create(context, [{ allowInterfaces, allowWithName, allowObjectTypes }]) { + const allowWithNameTester = allowWithName + ? new RegExp(allowWithName, 'u') + : undefined; + + return { + ...(allowInterfaces !== 'always' && { + TSInterfaceDeclaration(node): void { + if (allowWithNameTester?.test(node.id.name)) { + return; + } + + const extend = node.extends; + if ( + node.body.body.length !== 0 || + (extend.length === 1 && + allowInterfaces === 'with-single-extends') || + extend.length > 1 + ) { + return; + } + + const scope = context.sourceCode.getScope(node); + + const mergedWithClassDeclaration = scope.set + .get(node.id.name) + ?.defs.some( + def => def.node.type === AST_NODE_TYPES.ClassDeclaration, + ); + + if (extend.length === 0) { + context.report({ + data: { option: 'allowInterfaces' }, + node: node.id, + messageId: 'noEmptyInterface', + ...(!mergedWithClassDeclaration && { + suggest: ['object', 'unknown'].map(replacement => ({ + data: { replacement }, + fix(fixer): TSESLint.RuleFix { + const id = context.sourceCode.getText(node.id); + const typeParam = node.typeParameters + ? context.sourceCode.getText(node.typeParameters) + : ''; + + return fixer.replaceText( + node, + `type ${id}${typeParam} = ${replacement}`, + ); + }, + messageId: 'replaceEmptyInterface', + })), + }), + }); + return; + } + + context.report({ + node: node.id, + messageId: 'noEmptyInterfaceWithSuper', + ...(!mergedWithClassDeclaration && { + suggest: [ + { + fix(fixer): TSESLint.RuleFix { + const extended = context.sourceCode.getText(extend[0]); + const id = context.sourceCode.getText(node.id); + const typeParam = node.typeParameters + ? context.sourceCode.getText(node.typeParameters) + : ''; + + return fixer.replaceText( + node, + `type ${id}${typeParam} = ${extended}`, + ); + }, + messageId: 'replaceEmptyInterfaceWithSuper', + }, + ], + }), + }); + }, + }), + ...(allowObjectTypes !== 'always' && { + TSTypeLiteral(node): void { + if ( + node.members.length || + node.parent.type === AST_NODE_TYPES.TSIntersectionType || + (allowWithNameTester && + node.parent.type === AST_NODE_TYPES.TSTypeAliasDeclaration && + allowWithNameTester.test(node.parent.id.name)) + ) { + return; + } + + context.report({ + data: { option: 'allowObjectTypes' }, + messageId: 'noEmptyObject', + node, + suggest: ['object', 'unknown'].map(replacement => ({ + data: { replacement }, + messageId: 'replaceEmptyObjectType', + fix: (fixer): TSESLint.RuleFix => + fixer.replaceText(node, replacement), + })), + }); + }, + }), + }; + }, +}); diff --git a/packages/eslint-plugin/src/rules/no-unsafe-call.ts b/packages/eslint-plugin/src/rules/no-unsafe-call.ts index b4ec6379f2e1..f496f02d9155 100644 --- a/packages/eslint-plugin/src/rules/no-unsafe-call.ts +++ b/packages/eslint-plugin/src/rules/no-unsafe-call.ts @@ -25,7 +25,7 @@ export default createRule<[], MessageIds>({ requiresTypeChecking: true, }, messages: { - unsafeCall: 'Unsafe call of an `any` typed value.', + unsafeCall: 'Unsafe call of an {{type}} typed value.', unsafeCallThis: [ 'Unsafe call of an `any` typed value. `this` is typed as `any`.', 'You can try to fix this by turning on the `noImplicitThis` compiler option, or adding a `this` parameter to the function.', @@ -64,9 +64,15 @@ export default createRule<[], MessageIds>({ messageId = 'unsafeCallThis'; } } + + const isErrorType = tsutils.isIntrinsicErrorType(type); + context.report({ node: reportingNode, messageId: messageId, + data: { + type: isErrorType ? '`error` type' : '`any`', + }, }); } } diff --git a/packages/eslint-plugin/src/rules/no-unsafe-return.ts b/packages/eslint-plugin/src/rules/no-unsafe-return.ts index ef308450bd80..ae959627c09d 100644 --- a/packages/eslint-plugin/src/rules/no-unsafe-return.ts +++ b/packages/eslint-plugin/src/rules/no-unsafe-return.ts @@ -28,7 +28,7 @@ export default createRule({ requiresTypeChecking: true, }, messages: { - unsafeReturn: 'Unsafe return of an `{{type}}` typed value.', + unsafeReturn: 'Unsafe return of an {{type}} typed value.', unsafeReturnThis: [ 'Unsafe return of an `{{type}}` typed value. `this` is typed as `any`.', 'You can try to fix this by turning on the `noImplicitThis` compiler option, or adding a `this` parameter to the function.', @@ -137,6 +137,7 @@ export default createRule({ } let messageId: 'unsafeReturn' | 'unsafeReturnThis' = 'unsafeReturn'; + const isErrorType = tsutils.isIntrinsicErrorType(returnNodeType); if (!isNoImplicitThis) { // `return this` @@ -156,7 +157,11 @@ export default createRule({ node: reportingNode, messageId, data: { - type: anyType === AnyType.Any ? 'any' : 'any[]', + type: isErrorType + ? 'error' + : anyType === AnyType.Any + ? '`any`' + : '`any[]`', }, }); } diff --git a/packages/eslint-plugin/tests/docs-eslint-output-snapshots/array-type.shot b/packages/eslint-plugin/tests/docs-eslint-output-snapshots/array-type.shot index 0241304b22e8..09bfe8fd3d19 100644 --- a/packages/eslint-plugin/tests/docs-eslint-output-snapshots/array-type.shot +++ b/packages/eslint-plugin/tests/docs-eslint-output-snapshots/array-type.shot @@ -28,6 +28,8 @@ const x: string[] = ['a', 'b']; ~~~~~~~~ Array type using 'string[]' is forbidden. Use 'Array' instead. const y: readonly string[] = ['a', 'b']; ~~~~~~~~~~~~~~~~~ Array type using 'readonly string[]' is forbidden. Use 'ReadonlyArray' instead. +const z: Readonly = ['a', 'b']; + ~~~~~~~~ Array type using 'string[]' is forbidden. Use 'Array' instead. " `; @@ -37,6 +39,7 @@ Options: { "default": "generic" } const x: Array = ['a', 'b']; const y: ReadonlyArray = ['a', 'b']; +const z: Readonly> = ['a', 'b']; " `; diff --git a/packages/eslint-plugin/tests/docs-eslint-output-snapshots/no-empty-object-type.shot b/packages/eslint-plugin/tests/docs-eslint-output-snapshots/no-empty-object-type.shot new file mode 100644 index 000000000000..1dacb3b537d8 --- /dev/null +++ b/packages/eslint-plugin/tests/docs-eslint-output-snapshots/no-empty-object-type.shot @@ -0,0 +1,133 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Validating rule docs no-empty-object-type.mdx code examples ESLint output 1`] = ` +"Incorrect + +let anyObject: {}; + ~~ The \`{}\` ("empty object") type allows any non-nullish value, including literals like \`0\` and \`""\`. + - If that's what you want, disable this lint rule with an inline comment or configure the 'allowObjectTypes' rule option. + - 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. +let anyValue: {}; + ~~ The \`{}\` ("empty object") type allows any non-nullish value, including literals like \`0\` and \`""\`. + - If that's what you want, disable this lint rule with an inline comment or configure the 'allowObjectTypes' rule option. + - 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. + +interface AnyObjectA {} + ~~~~~~~~~~ An empty interface declaration allows any non-nullish value, including literals like \`0\` and \`""\`. + - If that's what you want, disable this lint rule with an inline comment or configure the 'allowInterfaces' rule option. + - 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. +interface AnyValueA {} + ~~~~~~~~~ An empty interface declaration allows any non-nullish value, including literals like \`0\` and \`""\`. + - If that's what you want, disable this lint rule with an inline comment or configure the 'allowInterfaces' rule option. + - 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. + +type AnyObjectB = {}; + ~~ The \`{}\` ("empty object") type allows any non-nullish value, including literals like \`0\` and \`""\`. + - If that's what you want, disable this lint rule with an inline comment or configure the 'allowObjectTypes' rule option. + - 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. +type AnyValueB = {}; + ~~ The \`{}\` ("empty object") type allows any non-nullish value, including literals like \`0\` and \`""\`. + - If that's what you want, disable this lint rule with an inline comment or configure the 'allowObjectTypes' rule option. + - 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. +" +`; + +exports[`Validating rule docs no-empty-object-type.mdx code examples ESLint output 2`] = ` +"Correct + +let anyObject: object; +let anyValue: unknown; + +type AnyObjectA = object; +type AnyValueA = unknown; + +type AnyObjectB = object; +type AnyValueB = unknown; + +let objectWith: { property: boolean }; + +interface InterfaceWith { + property: boolean; +} + +type TypeWith = { property: boolean }; +" +`; + +exports[`Validating rule docs no-empty-object-type.mdx code examples ESLint output 3`] = ` +"Incorrect +Options: { "allowInterfaces": "with-single-extends" } + +interface Foo {} + ~~~ An empty interface declaration allows any non-nullish value, including literals like \`0\` and \`""\`. + - If that's what you want, disable this lint rule with an inline comment or configure the 'allowInterfaces' rule option. + - 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. +" +`; + +exports[`Validating rule docs no-empty-object-type.mdx code examples ESLint output 4`] = ` +"Correct +Options: { "allowInterfaces": "with-single-extends" } + +interface Base { + value: boolean; +} + +interface Derived extends Base {} +" +`; + +exports[`Validating rule docs no-empty-object-type.mdx code examples ESLint output 5`] = ` +"Incorrect +Options: { "allowObjectTypes": "always" } + +interface Base {} + ~~~~ An empty interface declaration allows any non-nullish value, including literals like \`0\` and \`""\`. + - If that's what you want, disable this lint rule with an inline comment or configure the 'allowInterfaces' rule option. + - 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. +" +`; + +exports[`Validating rule docs no-empty-object-type.mdx code examples ESLint output 6`] = ` +"Correct +Options: { "allowObjectTypes": "always" } + +type Base = {}; +" +`; + +exports[`Validating rule docs no-empty-object-type.mdx code examples ESLint output 7`] = ` +"Incorrect +Options: { "allowWithName": "Props$" } + +interface InterfaceValue {} + ~~~~~~~~~~~~~~ An empty interface declaration allows any non-nullish value, including literals like \`0\` and \`""\`. + - If that's what you want, disable this lint rule with an inline comment or configure the 'allowInterfaces' rule option. + - 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. + +type TypeValue = {}; + ~~ The \`{}\` ("empty object") type allows any non-nullish value, including literals like \`0\` and \`""\`. + - If that's what you want, disable this lint rule with an inline comment or configure the 'allowObjectTypes' rule option. + - 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. +" +`; + +exports[`Validating rule docs no-empty-object-type.mdx code examples ESLint output 8`] = ` +"Correct +Options: { "allowWithName": "Props$" } + +interface InterfaceProps {} + +type TypeProps = {}; +" +`; diff --git a/packages/eslint-plugin/tests/rules/array-type.test.ts b/packages/eslint-plugin/tests/rules/array-type.test.ts index 44be83ff63db..3ee5720d32c9 100644 --- a/packages/eslint-plugin/tests/rules/array-type.test.ts +++ b/packages/eslint-plugin/tests/rules/array-type.test.ts @@ -397,6 +397,14 @@ function bazFunction(baz: Arr>) { code: 'let a: readonly Array[] = [[]];', options: [{ default: 'generic', readonly: 'array' }], }, + { + code: 'let a: Readonly = [];', + options: [{ default: 'generic', readonly: 'array' }], + }, + { + code: "const x: Readonly = 'a';", + options: [{ default: 'array' }], + }, ], invalid: [ // Base cases from https://github.com/typescript-eslint/typescript-eslint/issues/2323#issuecomment-663977655 @@ -1918,6 +1926,21 @@ interface FooInterface { }, ], }, + { + code: "const x: Readonly = ['a', 'b'];", + output: "const x: readonly string[] = ['a', 'b'];", + options: [{ default: 'array' }], + errors: [ + { + messageId: 'errorStringArrayReadonly', + data: { + className: 'Readonly', + readonlyPrefix: 'readonly ', + type: 'string[]', + }, + }, + ], + }, ], }); diff --git a/packages/eslint-plugin/tests/rules/no-empty-object-type.test.ts b/packages/eslint-plugin/tests/rules/no-empty-object-type.test.ts new file mode 100644 index 000000000000..6494b8d6372f --- /dev/null +++ b/packages/eslint-plugin/tests/rules/no-empty-object-type.test.ts @@ -0,0 +1,591 @@ +import { RuleTester } from '@typescript-eslint/rule-tester'; + +import rule from '../../src/rules/no-empty-object-type'; + +const ruleTester = new RuleTester({ + parser: '@typescript-eslint/parser', +}); + +ruleTester.run('no-empty-object-type', rule, { + valid: [ + ` +interface Base { + name: string; +} + `, + ` +interface Base { + name: string; +} + +interface Derived { + age: number; +} + +// valid because extending multiple interfaces can be used instead of a union type +interface Both extends Base, Derived {} + `, + { + code: 'interface Base {}', + options: [{ allowInterfaces: 'always' }], + }, + { + code: ` +interface Base { + name: string; +} + +interface Derived extends Base {} + `, + options: [{ allowInterfaces: 'with-single-extends' }], + }, + { + code: ` +interface Base { + props: string; +} + +interface Derived extends Base {} + +class Derived {} + `, + options: [{ allowInterfaces: 'with-single-extends' }], + }, + 'let value: object;', + 'let value: Object;', + 'let value: { inner: true };', + 'type MyNonNullable = T & {};', + { + code: 'type Base = {};', + options: [{ allowObjectTypes: 'always' }], + }, + { + code: 'type Base = {};', + options: [{ allowWithName: 'Base' }], + }, + { + code: 'type BaseProps = {};', + options: [{ allowWithName: 'Props$' }], + }, + { + code: 'interface Base {}', + options: [{ allowWithName: 'Base' }], + }, + { + code: 'interface BaseProps {}', + options: [{ allowWithName: 'Props$' }], + }, + ], + invalid: [ + { + code: 'interface Base {}', + errors: [ + { + line: 1, + column: 11, + data: { option: 'allowInterfaces' }, + messageId: 'noEmptyInterface', + suggestions: [ + { + data: { replacement: 'object' }, + messageId: 'replaceEmptyInterface', + output: `type Base = object`, + }, + { + messageId: 'replaceEmptyInterface', + output: `type Base = unknown`, + }, + ], + }, + ], + }, + { + code: 'interface Base {}', + errors: [ + { + line: 1, + column: 11, + data: { option: 'allowInterfaces' }, + messageId: 'noEmptyInterface', + suggestions: [ + { + data: { replacement: 'object' }, + messageId: 'replaceEmptyInterface', + output: `type Base = object`, + }, + { + messageId: 'replaceEmptyInterface', + output: `type Base = unknown`, + }, + ], + }, + ], + options: [{ allowInterfaces: 'never' }], + }, + { + code: ` +interface Base { + props: string; +} + +interface Derived extends Base {} + +class Other {} + `, + errors: [ + { + line: 6, + column: 11, + messageId: 'noEmptyInterfaceWithSuper', + suggestions: [ + { + messageId: 'replaceEmptyInterfaceWithSuper', + output: ` +interface Base { + props: string; +} + +type Derived = Base + +class Other {} + `, + }, + ], + }, + ], + }, + { + code: ` +interface Base { + props: string; +} + +interface Derived extends Base {} + +class Derived {} + `, + errors: [ + { + line: 6, + column: 11, + messageId: 'noEmptyInterfaceWithSuper', + }, + ], + }, + { + code: ` +interface Base { + props: string; +} + +interface Derived extends Base {} + +const derived = class Derived {}; + `, + errors: [ + { + messageId: 'noEmptyInterfaceWithSuper', + line: 6, + column: 11, + suggestions: [ + { + messageId: 'replaceEmptyInterfaceWithSuper', + output: ` +interface Base { + props: string; +} + +type Derived = Base + +const derived = class Derived {}; + `, + }, + ], + }, + ], + }, + { + code: ` +interface Base { + name: string; +} + +interface Derived extends Base {} + `, + errors: [ + { + messageId: 'noEmptyInterfaceWithSuper', + line: 6, + column: 11, + suggestions: [ + { + messageId: 'replaceEmptyInterfaceWithSuper', + output: ` +interface Base { + name: string; +} + +type Derived = Base + `, + }, + ], + }, + ], + }, + { + code: 'interface Base extends Array {}', + errors: [ + { + messageId: 'noEmptyInterfaceWithSuper', + line: 1, + column: 11, + suggestions: [ + { + messageId: 'replaceEmptyInterfaceWithSuper', + output: `type Base = Array`, + }, + ], + }, + ], + }, + { + code: 'interface Base extends Array {}', + errors: [ + { + messageId: 'noEmptyInterfaceWithSuper', + line: 1, + column: 11, + endColumn: 15, + suggestions: [ + { + messageId: 'replaceEmptyInterfaceWithSuper', + output: `type Base = Array`, + }, + ], + }, + { + data: { option: 'allowObjectTypes' }, + messageId: 'noEmptyObject', + line: 1, + column: 39, + endColumn: 41, + suggestions: [ + { + data: { replacement: 'object' }, + messageId: 'replaceEmptyObjectType', + output: `interface Base extends Array {}`, + }, + { + data: { replacement: 'unknown' }, + messageId: 'replaceEmptyObjectType', + output: `interface Base extends Array {}`, + }, + ], + }, + ], + }, + { + code: ` +interface Derived { + property: string; +} +interface Base extends Array {} + `, + errors: [ + { + messageId: 'noEmptyInterfaceWithSuper', + line: 5, + column: 11, + suggestions: [ + { + messageId: 'replaceEmptyInterfaceWithSuper', + output: ` +interface Derived { + property: string; +} +type Base = Array + `, + }, + ], + }, + ], + }, + { + code: ` +type R = Record; +interface Base extends R {} + `, + errors: [ + { + messageId: 'noEmptyInterfaceWithSuper', + line: 3, + column: 11, + suggestions: [ + { + messageId: 'replaceEmptyInterfaceWithSuper', + output: ` +type R = Record; +type Base = R + `, + }, + ], + }, + ], + }, + { + code: 'interface Base extends Derived {}', + errors: [ + { + messageId: 'noEmptyInterfaceWithSuper', + line: 1, + column: 11, + suggestions: [ + { + messageId: 'replaceEmptyInterfaceWithSuper', + output: `type Base = Derived`, + }, + ], + }, + ], + }, + { + filename: 'test.d.ts', + code: ` +declare namespace BaseAndDerived { + type Base = typeof base; + export interface Derived extends Base {} +} + `, + errors: [ + { + messageId: 'noEmptyInterfaceWithSuper', + line: 4, + column: 20, + endLine: 4, + endColumn: 27, + suggestions: [ + { + messageId: 'replaceEmptyInterfaceWithSuper', + output: ` +declare namespace BaseAndDerived { + type Base = typeof base; + export type Derived = Base +} + `, + }, + ], + }, + ], + }, + { + code: 'type Base = {};', + errors: [ + { + column: 13, + line: 1, + endColumn: 15, + endLine: 1, + data: { option: 'allowObjectTypes' }, + messageId: 'noEmptyObject', + suggestions: [ + { + data: { replacement: 'object' }, + messageId: 'replaceEmptyObjectType', + output: 'type Base = object;', + }, + { + data: { replacement: 'unknown' }, + messageId: 'replaceEmptyObjectType', + output: 'type Base = unknown;', + }, + ], + }, + ], + }, + { + code: 'type Base = {};', + errors: [ + { + column: 13, + line: 1, + endColumn: 15, + endLine: 1, + data: { option: 'allowObjectTypes' }, + messageId: 'noEmptyObject', + suggestions: [ + { + data: { replacement: 'object' }, + messageId: 'replaceEmptyObjectType', + output: 'type Base = object;', + }, + { + data: { replacement: 'unknown' }, + messageId: 'replaceEmptyObjectType', + output: 'type Base = unknown;', + }, + ], + }, + ], + options: [{ allowObjectTypes: 'never' }], + }, + { + code: 'let value: {};', + errors: [ + { + column: 12, + line: 1, + endColumn: 14, + endLine: 1, + data: { option: 'allowObjectTypes' }, + messageId: 'noEmptyObject', + suggestions: [ + { + data: { replacement: 'object' }, + messageId: 'replaceEmptyObjectType', + output: 'let value: object;', + }, + { + data: { replacement: 'unknown' }, + messageId: 'replaceEmptyObjectType', + output: 'let value: unknown;', + }, + ], + }, + ], + }, + { + code: 'let value: {};', + errors: [ + { + column: 12, + line: 1, + endColumn: 14, + endLine: 1, + data: { option: 'allowObjectTypes' }, + messageId: 'noEmptyObject', + suggestions: [ + { + data: { replacement: 'object' }, + messageId: 'replaceEmptyObjectType', + output: 'let value: object;', + }, + { + data: { replacement: 'unknown' }, + messageId: 'replaceEmptyObjectType', + output: 'let value: unknown;', + }, + ], + }, + ], + options: [{ allowObjectTypes: 'never' }], + }, + { + code: ` +let value: { + /* ... */ +}; + `, + errors: [ + { + line: 2, + endLine: 4, + column: 12, + endColumn: 2, + data: { option: 'allowObjectTypes' }, + messageId: 'noEmptyObject', + suggestions: [ + { + data: { replacement: 'object' }, + messageId: 'replaceEmptyObjectType', + output: ` +let value: object; + `, + }, + { + data: { replacement: 'unknown' }, + messageId: 'replaceEmptyObjectType', + output: ` +let value: unknown; + `, + }, + ], + }, + ], + }, + { + code: 'type MyUnion = T | {};', + errors: [ + { + column: 23, + line: 1, + endColumn: 25, + endLine: 1, + data: { option: 'allowObjectTypes' }, + messageId: 'noEmptyObject', + suggestions: [ + { + data: { replacement: 'object' }, + messageId: 'replaceEmptyObjectType', + output: 'type MyUnion = T | object;', + }, + { + data: { replacement: 'unknown' }, + messageId: 'replaceEmptyObjectType', + output: 'type MyUnion = T | unknown;', + }, + ], + }, + ], + }, + { + code: 'type Base = {} | null;', + errors: [ + { + column: 13, + line: 1, + endColumn: 15, + endLine: 1, + messageId: 'noEmptyObject', + }, + ], + options: [{ allowWithName: 'Base' }], + }, + { + code: 'type Base = {};', + errors: [ + { + column: 13, + line: 1, + endColumn: 15, + endLine: 1, + messageId: 'noEmptyObject', + }, + ], + options: [{ allowWithName: 'Mismatch' }], + }, + { + code: 'interface Base {}', + errors: [ + { + column: 11, + line: 1, + endColumn: 15, + endLine: 1, + messageId: 'noEmptyInterface', + suggestions: [ + { + data: { replacement: 'object' }, + messageId: 'replaceEmptyInterface', + output: `type Base = object`, + }, + { + messageId: 'replaceEmptyInterface', + output: `type Base = unknown`, + }, + ], + }, + ], + options: [{ allowWithName: '.*Props$' }], + }, + ], +}); diff --git a/packages/eslint-plugin/tests/rules/no-unsafe-call.test.ts b/packages/eslint-plugin/tests/rules/no-unsafe-call.test.ts index bb844011fd7b..fe62b0595fb1 100644 --- a/packages/eslint-plugin/tests/rules/no-unsafe-call.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unsafe-call.test.ts @@ -51,7 +51,17 @@ function foo(x: any) { x(); } `, - errors: [{ messageId: 'unsafeCall' }], + errors: [ + { + messageId: 'unsafeCall', + line: 3, + column: 3, + endColumn: 4, + data: { + type: '`any`', + }, + }, + ], }, { code: ` @@ -59,7 +69,17 @@ function foo(x: any) { x?.(); } `, - errors: [{ messageId: 'unsafeCall' }], + errors: [ + { + messageId: 'unsafeCall', + line: 3, + column: 3, + endColumn: 4, + data: { + type: '`any`', + }, + }, + ], }, { code: ` @@ -67,7 +87,17 @@ function foo(x: any) { x.a.b.c.d.e.f.g(); } `, - errors: [{ messageId: 'unsafeCall' }], + errors: [ + { + messageId: 'unsafeCall', + line: 3, + column: 3, + endColumn: 18, + data: { + type: '`any`', + }, + }, + ], }, { code: ` @@ -75,7 +105,17 @@ function foo(x: any) { x.a.b.c.d.e.f.g?.(); } `, - errors: [{ messageId: 'unsafeCall' }], + errors: [ + { + messageId: 'unsafeCall', + line: 3, + column: 3, + endColumn: 18, + data: { + type: '`any`', + }, + }, + ], }, { code: ` @@ -83,7 +123,17 @@ function foo(x: { a: any }) { x.a(); } `, - errors: [{ messageId: 'unsafeCall' }], + errors: [ + { + messageId: 'unsafeCall', + line: 3, + column: 3, + endColumn: 6, + data: { + type: '`any`', + }, + }, + ], }, { code: ` @@ -91,7 +141,17 @@ function foo(x: { a: any }) { x?.a(); } `, - errors: [{ messageId: 'unsafeCall' }], + errors: [ + { + messageId: 'unsafeCall', + line: 3, + column: 3, + endColumn: 7, + data: { + type: '`any`', + }, + }, + ], }, { code: ` @@ -99,7 +159,17 @@ function foo(x: { a: any }) { x.a?.(); } `, - errors: [{ messageId: 'unsafeCall' }], + errors: [ + { + messageId: 'unsafeCall', + line: 3, + column: 3, + endColumn: 6, + data: { + type: '`any`', + }, + }, + ], }, { code: ` @@ -163,5 +233,22 @@ const methods = { }, ], }, + { + code: ` +let value: NotKnown; +value(); + `, + errors: [ + { + messageId: 'unsafeCall', + line: 3, + column: 1, + endColumn: 6, + data: { + type: '`error` type', + }, + }, + ], + }, ], }); diff --git a/packages/eslint-plugin/tests/rules/no-unsafe-return.test.ts b/packages/eslint-plugin/tests/rules/no-unsafe-return.test.ts index 36c6103bbc20..dc5e1df369d6 100644 --- a/packages/eslint-plugin/tests/rules/no-unsafe-return.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unsafe-return.test.ts @@ -139,7 +139,7 @@ function foo() { { messageId: 'unsafeReturn', data: { - type: 'any', + type: '`any`', }, }, ], @@ -154,7 +154,7 @@ function foo() { { messageId: 'unsafeReturn', data: { - type: 'any', + type: '`any`', }, }, ], @@ -169,7 +169,7 @@ const foo = () => { { messageId: 'unsafeReturn', data: { - type: 'any', + type: '`any`', }, }, ], @@ -180,7 +180,7 @@ const foo = () => { { messageId: 'unsafeReturn', data: { - type: 'any', + type: '`any`', }, }, ], @@ -195,7 +195,7 @@ function foo() { { messageId: 'unsafeReturn', data: { - type: 'any[]', + type: '`any[]`', }, }, ], @@ -210,7 +210,7 @@ function foo() { { messageId: 'unsafeReturn', data: { - type: 'any[]', + type: '`any[]`', }, }, ], @@ -225,7 +225,7 @@ function foo() { { messageId: 'unsafeReturn', data: { - type: 'any[]', + type: '`any[]`', }, }, ], @@ -240,7 +240,7 @@ function foo() { { messageId: 'unsafeReturn', data: { - type: 'any[]', + type: '`any[]`', }, }, ], @@ -255,7 +255,7 @@ const foo = () => { { messageId: 'unsafeReturn', data: { - type: 'any[]', + type: '`any[]`', }, }, ], @@ -266,7 +266,7 @@ const foo = () => { { messageId: 'unsafeReturn', data: { - type: 'any[]', + type: '`any[]`', }, }, ], @@ -407,12 +407,18 @@ function bar() { line: 3, column: 3, endColumn: 15, + data: { + type: '`any`', + }, }, { messageId: 'unsafeReturnThis', line: 7, column: 16, endColumn: 20, + data: { + type: '`any`', + }, }, ], }, @@ -427,6 +433,29 @@ foo(() => 'foo' as any); line: 3, column: 11, endColumn: 23, + data: { + type: '`any`', + }, + }, + ], + }, + { + code: ` +let value: NotKnown; + +function example() { + return value; +} + `, + errors: [ + { + messageId: 'unsafeReturn', + line: 5, + column: 3, + endColumn: 16, + data: { + type: 'error', + }, }, ], }, diff --git a/packages/eslint-plugin/tests/schema-snapshots/no-empty-object-type.shot b/packages/eslint-plugin/tests/schema-snapshots/no-empty-object-type.shot new file mode 100644 index 000000000000..632b3ce83ca9 --- /dev/null +++ b/packages/eslint-plugin/tests/schema-snapshots/no-empty-object-type.shot @@ -0,0 +1,38 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Rule schemas should be convertible to TS types for documentation purposes no-empty-object-type 1`] = ` +" +# SCHEMA: + +[ + { + "additionalProperties": false, + "properties": { + "allowInterfaces": { + "enum": ["always", "never", "with-single-extends"], + "type": "string" + }, + "allowObjectTypes": { + "enum": ["always", "in-type-alias-with-name", "never"], + "type": "string" + }, + "allowWithName": { + "type": "string" + } + }, + "type": "object" + } +] + + +# TYPES: + +type Options = [ + { + allowInterfaces?: 'always' | 'never' | 'with-single-extends'; + allowObjectTypes?: 'always' | 'in-type-alias-with-name' | 'never'; + allowWithName?: string; + }, +]; +" +`; diff --git a/packages/integration-tests/CHANGELOG.md b/packages/integration-tests/CHANGELOG.md index 3cc0a3f93e49..934d94497234 100644 --- a/packages/integration-tests/CHANGELOG.md +++ b/packages/integration-tests/CHANGELOG.md @@ -1,3 +1,9 @@ +## 7.15.0 (2024-07-01) + +This was a version bump only for integration-tests to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 7.14.1 (2024-06-24) This was a version bump only for integration-tests to align it with other projects, there were no code changes. diff --git a/packages/integration-tests/package.json b/packages/integration-tests/package.json index 2607d7e12b94..4af6f42c8021 100644 --- a/packages/integration-tests/package.json +++ b/packages/integration-tests/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/integration-tests", - "version": "7.14.1", + "version": "7.15.0", "private": true, "scripts": { "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", diff --git a/packages/parser/CHANGELOG.md b/packages/parser/CHANGELOG.md index 8d4250336d97..2f99daa71107 100644 --- a/packages/parser/CHANGELOG.md +++ b/packages/parser/CHANGELOG.md @@ -1,3 +1,9 @@ +## 7.15.0 (2024-07-01) + +This was a version bump only for parser to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 7.14.1 (2024-06-24) This was a version bump only for parser to align it with other projects, there were no code changes. diff --git a/packages/parser/package.json b/packages/parser/package.json index 1570d0cbf5a4..12b75c7a362c 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/parser", - "version": "7.14.1", + "version": "7.15.0", "description": "An ESLint custom parser which leverages TypeScript ESTree", "files": [ "dist", @@ -52,10 +52,10 @@ "eslint": "^8.56.0" }, "dependencies": { - "@typescript-eslint/scope-manager": "7.14.1", - "@typescript-eslint/types": "7.14.1", - "@typescript-eslint/typescript-estree": "7.14.1", - "@typescript-eslint/visitor-keys": "7.14.1", + "@typescript-eslint/scope-manager": "7.15.0", + "@typescript-eslint/types": "7.15.0", + "@typescript-eslint/typescript-estree": "7.15.0", + "@typescript-eslint/visitor-keys": "7.15.0", "debug": "^4.3.4" }, "devDependencies": { diff --git a/packages/repo-tools/CHANGELOG.md b/packages/repo-tools/CHANGELOG.md index 07cbc4fe8279..a0420dcadc04 100644 --- a/packages/repo-tools/CHANGELOG.md +++ b/packages/repo-tools/CHANGELOG.md @@ -1,3 +1,20 @@ +## 7.15.0 (2024-07-01) + + +### 🩹 Fixes + +- disable `EXPERIMENTAL_useProjectService` in `disabled-type-checked` shared config + + +### ❤️ Thank You + +- auvred +- Kim Sang Du +- rgehbt +- Vinccool96 + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 7.14.1 (2024-06-24) This was a version bump only for repo-tools to align it with other projects, there were no code changes. diff --git a/packages/repo-tools/package.json b/packages/repo-tools/package.json index c1c760b7ba6e..17ee7c7bf439 100644 --- a/packages/repo-tools/package.json +++ b/packages/repo-tools/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/repo-tools", - "version": "7.14.1", + "version": "7.15.0", "private": true, "//": "NOTE: intentionally no build step in this package", "scripts": { @@ -18,11 +18,11 @@ "devDependencies": { "@jest/types": "29.6.3", "@nx/devkit": "*", - "@typescript-eslint/eslint-plugin": "7.14.1", - "@typescript-eslint/scope-manager": "7.14.1", - "@typescript-eslint/types": "7.14.1", - "@typescript-eslint/typescript-estree": "7.14.1", - "@typescript-eslint/utils": "7.14.1", + "@typescript-eslint/eslint-plugin": "7.15.0", + "@typescript-eslint/scope-manager": "7.15.0", + "@typescript-eslint/types": "7.15.0", + "@typescript-eslint/typescript-estree": "7.15.0", + "@typescript-eslint/utils": "7.15.0", "cross-fetch": "*", "execa": "*", "prettier": "^3.2.5", diff --git a/packages/repo-tools/src/generate-configs.mts b/packages/repo-tools/src/generate-configs.mts index 64293b6f3c2f..60093aea19d9 100644 --- a/packages/repo-tools/src/generate-configs.mts +++ b/packages/repo-tools/src/generate-configs.mts @@ -391,6 +391,7 @@ async function main(): Promise { parserOptions: { project: false, program: null, + EXPERIMENTAL_useProjectService: false, }, rules: allRuleEntries.reduce( (config, entry) => diff --git a/packages/rule-schema-to-typescript-types/CHANGELOG.md b/packages/rule-schema-to-typescript-types/CHANGELOG.md index 24522daea901..ddee0cf67883 100644 --- a/packages/rule-schema-to-typescript-types/CHANGELOG.md +++ b/packages/rule-schema-to-typescript-types/CHANGELOG.md @@ -1,3 +1,9 @@ +## 7.15.0 (2024-07-01) + +This was a version bump only for rule-schema-to-typescript-types to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 7.14.1 (2024-06-24) This was a version bump only for rule-schema-to-typescript-types to align it with other projects, there were no code changes. diff --git a/packages/rule-schema-to-typescript-types/package.json b/packages/rule-schema-to-typescript-types/package.json index 21cae6feb1e2..8149a4b85ade 100644 --- a/packages/rule-schema-to-typescript-types/package.json +++ b/packages/rule-schema-to-typescript-types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/rule-schema-to-typescript-types", - "version": "7.14.1", + "version": "7.15.0", "private": true, "type": "commonjs", "exports": { @@ -34,8 +34,8 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@typescript-eslint/type-utils": "7.14.1", - "@typescript-eslint/utils": "7.14.1", + "@typescript-eslint/type-utils": "7.15.0", + "@typescript-eslint/utils": "7.15.0", "natural-compare": "^1.4.0", "prettier": "^3.2.5" }, diff --git a/packages/rule-tester/CHANGELOG.md b/packages/rule-tester/CHANGELOG.md index 8d473c518cad..1d12d205052b 100644 --- a/packages/rule-tester/CHANGELOG.md +++ b/packages/rule-tester/CHANGELOG.md @@ -1,3 +1,20 @@ +## 7.15.0 (2024-07-01) + + +### 🚀 Features + +- **eslint-plugin:** [array-type] detect `Readonly` case + + +### ❤️ Thank You + +- auvred +- Kim Sang Du +- rgehbt +- Vinccool96 + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 7.14.1 (2024-06-24) This was a version bump only for rule-tester to align it with other projects, there were no code changes. diff --git a/packages/rule-tester/package.json b/packages/rule-tester/package.json index 06c3c2c8f391..50534d64d82c 100644 --- a/packages/rule-tester/package.json +++ b/packages/rule-tester/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/rule-tester", - "version": "7.14.1", + "version": "7.15.0", "description": "Tooling to test ESLint rules", "files": [ "dist", @@ -48,8 +48,8 @@ }, "//": "NOTE - AJV is out-of-date, but it's intentionally synced with ESLint - https://github.com/eslint/eslint/blob/ad9dd6a933fd098a0d99c6a9aa059850535c23ee/package.json#L70", "dependencies": { - "@typescript-eslint/typescript-estree": "7.14.1", - "@typescript-eslint/utils": "7.14.1", + "@typescript-eslint/typescript-estree": "7.15.0", + "@typescript-eslint/utils": "7.15.0", "ajv": "^6.12.6", "json-stable-stringify-without-jsonify": "^1.0.1", "lodash.merge": "4.6.2", @@ -63,7 +63,7 @@ "@jest/types": "29.6.3", "@types/json-stable-stringify-without-jsonify": "^1.0.2", "@types/lodash.merge": "4.6.9", - "@typescript-eslint/parser": "7.14.1", + "@typescript-eslint/parser": "7.15.0", "chai": "^4.4.1", "eslint-visitor-keys": "^4.0.0", "espree": "^10.0.1", diff --git a/packages/rule-tester/src/RuleTester.ts b/packages/rule-tester/src/RuleTester.ts index 2f3ee8798722..059702547dc1 100644 --- a/packages/rule-tester/src/RuleTester.ts +++ b/packages/rule-tester/src/RuleTester.ts @@ -187,16 +187,16 @@ export class RuleTester extends TestFramework { /** * Adds the `only` property to a test to run it in isolation. */ - static only>( + static only( item: ValidTestCase | string, ): ValidTestCase; /** * Adds the `only` property to a test to run it in isolation. */ - static only>( + static only( item: InvalidTestCase, ): InvalidTestCase; - static only>( + static only( item: | InvalidTestCase | ValidTestCase diff --git a/packages/rule-tester/src/types/InvalidTestCase.ts b/packages/rule-tester/src/types/InvalidTestCase.ts index 96754682cc4b..fb10e85b0f4d 100644 --- a/packages/rule-tester/src/types/InvalidTestCase.ts +++ b/packages/rule-tester/src/types/InvalidTestCase.ts @@ -63,7 +63,7 @@ export interface TestCaseError { export interface InvalidTestCase< MessageIds extends string, - Options extends Readonly, + Options extends readonly unknown[], > extends ValidTestCase { /** * Expected errors. diff --git a/packages/rule-tester/src/types/ValidTestCase.ts b/packages/rule-tester/src/types/ValidTestCase.ts index c65b416917ca..c4aa40456a6a 100644 --- a/packages/rule-tester/src/types/ValidTestCase.ts +++ b/packages/rule-tester/src/types/ValidTestCase.ts @@ -6,7 +6,7 @@ import type { import type { DependencyConstraint } from './DependencyConstraint'; -export interface ValidTestCase> { +export interface ValidTestCase { /** * Name for the test case. */ diff --git a/packages/rule-tester/src/types/index.ts b/packages/rule-tester/src/types/index.ts index 7169810b11e2..93dad319d936 100644 --- a/packages/rule-tester/src/types/index.ts +++ b/packages/rule-tester/src/types/index.ts @@ -12,7 +12,7 @@ export type TesterConfigWithDefaults = Mutable< export interface RunTests< MessageIds extends string, - Options extends Readonly, + Options extends readonly unknown[], > { // RuleTester.run also accepts strings for valid cases readonly valid: readonly (ValidTestCase | string)[]; @@ -21,7 +21,7 @@ export interface RunTests< export interface NormalizedRunTests< MessageIds extends string, - Options extends Readonly, + Options extends readonly unknown[], > { readonly valid: readonly ValidTestCase[]; readonly invalid: readonly InvalidTestCase[]; diff --git a/packages/scope-manager/CHANGELOG.md b/packages/scope-manager/CHANGELOG.md index 4b1bb8ed9d90..b04950c336eb 100644 --- a/packages/scope-manager/CHANGELOG.md +++ b/packages/scope-manager/CHANGELOG.md @@ -1,3 +1,9 @@ +## 7.15.0 (2024-07-01) + +This was a version bump only for scope-manager to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 7.14.1 (2024-06-24) This was a version bump only for scope-manager to align it with other projects, there were no code changes. diff --git a/packages/scope-manager/package.json b/packages/scope-manager/package.json index 13f9c8140619..40a787073d6e 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/scope-manager", - "version": "7.14.1", + "version": "7.15.0", "description": "TypeScript scope analyser for ESLint", "files": [ "dist", @@ -46,13 +46,13 @@ "typecheck": "npx nx typecheck" }, "dependencies": { - "@typescript-eslint/types": "7.14.1", - "@typescript-eslint/visitor-keys": "7.14.1" + "@typescript-eslint/types": "7.15.0", + "@typescript-eslint/visitor-keys": "7.15.0" }, "devDependencies": { "@jest/types": "29.6.3", "@types/glob": "*", - "@typescript-eslint/typescript-estree": "7.14.1", + "@typescript-eslint/typescript-estree": "7.15.0", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/type-utils/CHANGELOG.md b/packages/type-utils/CHANGELOG.md index 9d2229aab9e0..045cee8058ca 100644 --- a/packages/type-utils/CHANGELOG.md +++ b/packages/type-utils/CHANGELOG.md @@ -1,3 +1,9 @@ +## 7.15.0 (2024-07-01) + +This was a version bump only for type-utils to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 7.14.1 (2024-06-24) This was a version bump only for type-utils to align it with other projects, there were no code changes. diff --git a/packages/type-utils/package.json b/packages/type-utils/package.json index 1da96a851ac4..5309578dfa3e 100644 --- a/packages/type-utils/package.json +++ b/packages/type-utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/type-utils", - "version": "7.14.1", + "version": "7.15.0", "description": "Type utilities for working with TypeScript + ESLint together", "files": [ "dist", @@ -46,14 +46,14 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@typescript-eslint/typescript-estree": "7.14.1", - "@typescript-eslint/utils": "7.14.1", + "@typescript-eslint/typescript-estree": "7.15.0", + "@typescript-eslint/utils": "7.15.0", "debug": "^4.3.4", "ts-api-utils": "^1.3.0" }, "devDependencies": { "@jest/types": "29.6.3", - "@typescript-eslint/parser": "7.14.1", + "@typescript-eslint/parser": "7.15.0", "ajv": "^6.12.6", "downlevel-dts": "*", "jest": "29.7.0", diff --git a/packages/type-utils/tests/isSymbolFromDefaultLibrary.test.ts b/packages/type-utils/tests/isSymbolFromDefaultLibrary.test.ts new file mode 100644 index 000000000000..858aa7d9b53a --- /dev/null +++ b/packages/type-utils/tests/isSymbolFromDefaultLibrary.test.ts @@ -0,0 +1,58 @@ +import { parseForESLint } from '@typescript-eslint/parser'; +import type { TSESTree } from '@typescript-eslint/typescript-estree'; +import path from 'path'; +import type * as ts from 'typescript'; + +import { isSymbolFromDefaultLibrary } from '../src'; +import { expectToHaveParserServices } from './test-utils/expectToHaveParserServices'; + +describe('isSymbolFromDefaultLibrary', () => { + const rootDir = path.join(__dirname, 'fixtures'); + + function getTypes(code: string): { + program: ts.Program; + symbol: ts.Symbol | undefined; + } { + const { services, ast } = parseForESLint(code, { + project: './tsconfig.json', + filePath: path.join(rootDir, 'file.ts'), + tsconfigRootDir: rootDir, + }); + expectToHaveParserServices(services); + const declaration = ast.body[0] as TSESTree.TSTypeAliasDeclaration; + const type = services.getTypeAtLocation(declaration.id); + return { program: services.program, symbol: type.getSymbol() }; + } + + function runTestForAliasDeclaration(code: string, expected: boolean): void { + const { program, symbol } = getTypes(code); + const result = isSymbolFromDefaultLibrary(program, symbol); + expect(result).toBe(expected); + } + + describe('is symbol from default library', () => { + function runTest(code: string): void { + runTestForAliasDeclaration(code, true); + } + + it.each([ + ['type Test = Array;'], + ['type Test = Map;'], + ['type Test = Promise'], + ['type Test = Error'], + ['type Test = Object'], + ])('when code is %s, returns true', runTest); + }); + + describe('is not symbol from default library', () => { + function runTest(code: string): void { + runTestForAliasDeclaration(code, false); + } + + it.each([ + ['const test: Array = [1,2,3];'], + ['type Test = number;'], + ['interface Test { bar: string; };'], + ])('when code is %s, returns false', runTest); + }); +}); diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index 67bfe16101bf..af9dfd05a491 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/CHANGELOG.md @@ -1,3 +1,9 @@ +## 7.15.0 (2024-07-01) + +This was a version bump only for types to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 7.14.1 (2024-06-24) This was a version bump only for types to align it with other projects, there were no code changes. diff --git a/packages/types/package.json b/packages/types/package.json index 86733c7ec981..9d2b31862e4f 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/types", - "version": "7.14.1", + "version": "7.15.0", "description": "Types for the TypeScript-ESTree AST spec", "files": [ "dist", diff --git a/packages/typescript-eslint/CHANGELOG.md b/packages/typescript-eslint/CHANGELOG.md index 23e5fa66bae8..e1739a20aac2 100644 --- a/packages/typescript-eslint/CHANGELOG.md +++ b/packages/typescript-eslint/CHANGELOG.md @@ -1,3 +1,25 @@ +## 7.15.0 (2024-07-01) + + +### 🚀 Features + +- **eslint-plugin:** back-port new rules around empty object types from v8 + + +### 🩹 Fixes + +- disable `EXPERIMENTAL_useProjectService` in `disabled-type-checked` shared config + + +### ❤️ Thank You + +- auvred +- Kim Sang Du +- rgehbt +- Vinccool96 + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 7.14.1 (2024-06-24) This was a version bump only for typescript-eslint to align it with other projects, there were no code changes. diff --git a/packages/typescript-eslint/package.json b/packages/typescript-eslint/package.json index 77ff9fe77bf1..e90b02f519a9 100644 --- a/packages/typescript-eslint/package.json +++ b/packages/typescript-eslint/package.json @@ -1,6 +1,6 @@ { "name": "typescript-eslint", - "version": "7.14.1", + "version": "7.15.0", "description": "Tooling which enables you to use TypeScript with ESLint", "files": [ "dist", @@ -55,9 +55,9 @@ "eslint": "^8.56.0" }, "dependencies": { - "@typescript-eslint/eslint-plugin": "7.14.1", - "@typescript-eslint/parser": "7.14.1", - "@typescript-eslint/utils": "7.14.1" + "@typescript-eslint/eslint-plugin": "7.15.0", + "@typescript-eslint/parser": "7.15.0", + "@typescript-eslint/utils": "7.15.0" }, "devDependencies": { "@jest/types": "29.6.3", diff --git a/packages/typescript-eslint/src/configs/all.ts b/packages/typescript-eslint/src/configs/all.ts index c92e80a1f275..f14a7a51cf45 100644 --- a/packages/typescript-eslint/src/configs/all.ts +++ b/packages/typescript-eslint/src/configs/all.ts @@ -64,6 +64,7 @@ export default ( 'no-empty-function': 'off', '@typescript-eslint/no-empty-function': 'error', '@typescript-eslint/no-empty-interface': 'error', + '@typescript-eslint/no-empty-object-type': 'error', '@typescript-eslint/no-explicit-any': 'error', '@typescript-eslint/no-extra-non-null-assertion': 'error', '@typescript-eslint/no-extraneous-class': 'error', diff --git a/packages/typescript-eslint/src/configs/disable-type-checked.ts b/packages/typescript-eslint/src/configs/disable-type-checked.ts index 3018fcabd9a8..734f5cbc71e8 100644 --- a/packages/typescript-eslint/src/configs/disable-type-checked.ts +++ b/packages/typescript-eslint/src/configs/disable-type-checked.ts @@ -69,5 +69,11 @@ export default ( '@typescript-eslint/unbound-method': 'off', '@typescript-eslint/use-unknown-in-catch-callback-variable': 'off', }, - languageOptions: { parserOptions: { project: false, program: null } }, + languageOptions: { + parserOptions: { + project: false, + program: null, + EXPERIMENTAL_useProjectService: false, + }, + }, }); diff --git a/packages/typescript-estree/CHANGELOG.md b/packages/typescript-estree/CHANGELOG.md index 1d52d4c77ea1..68207870c747 100644 --- a/packages/typescript-estree/CHANGELOG.md +++ b/packages/typescript-estree/CHANGELOG.md @@ -1,3 +1,9 @@ +## 7.15.0 (2024-07-01) + +This was a version bump only for typescript-estree to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 7.14.1 (2024-06-24) This was a version bump only for typescript-estree to align it with other projects, there were no code changes. diff --git a/packages/typescript-estree/package.json b/packages/typescript-estree/package.json index f0f8f96f8c40..2c103da9a2f2 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/typescript-estree", - "version": "7.14.1", + "version": "7.15.0", "description": "A parser that converts TypeScript source code into an ESTree compatible form", "files": [ "dist", @@ -54,8 +54,8 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@typescript-eslint/types": "7.14.1", - "@typescript-eslint/visitor-keys": "7.14.1", + "@typescript-eslint/types": "7.15.0", + "@typescript-eslint/visitor-keys": "7.15.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", diff --git a/packages/utils/CHANGELOG.md b/packages/utils/CHANGELOG.md index 97d572e70e39..3ab7b0de5633 100644 --- a/packages/utils/CHANGELOG.md +++ b/packages/utils/CHANGELOG.md @@ -1,3 +1,25 @@ +## 7.15.0 (2024-07-01) + + +### 🚀 Features + +- **eslint-plugin:** [array-type] detect `Readonly` case + + +### 🩹 Fixes + +- **utils:** clean outdated `RuleTester` export + + +### ❤️ Thank You + +- auvred +- Kim Sang Du +- rgehbt +- Vinccool96 + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 7.14.1 (2024-06-24) This was a version bump only for utils to align it with other projects, there were no code changes. diff --git a/packages/utils/package.json b/packages/utils/package.json index 53742afb2e6d..9858e807e6f8 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/utils", - "version": "7.14.1", + "version": "7.15.0", "description": "Utilities for working with TypeScript + ESLint together", "files": [ "dist", @@ -23,10 +23,6 @@ "types": "./dist/eslint-utils/index.d.ts", "default": "./dist/eslint-utils/index.js" }, - "./eslint-utils/rule-tester": { - "types": "./dist/eslint-utils/rule-tester/RuleTester.d.ts", - "default": "./dist/eslint-utils/rule-tester/RuleTester.js" - }, "./json-schema": { "types": "./dist/json-schema.d.ts", "default": "./dist/json-schema.js" @@ -68,9 +64,9 @@ }, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "7.14.1", - "@typescript-eslint/types": "7.14.1", - "@typescript-eslint/typescript-estree": "7.14.1" + "@typescript-eslint/scope-manager": "7.15.0", + "@typescript-eslint/types": "7.15.0", + "@typescript-eslint/typescript-estree": "7.15.0" }, "peerDependencies": { "eslint": "^8.56.0" diff --git a/packages/utils/src/ts-eslint/RuleTester.ts b/packages/utils/src/ts-eslint/RuleTester.ts index 11696716222f..76e1a2bfad73 100644 --- a/packages/utils/src/ts-eslint/RuleTester.ts +++ b/packages/utils/src/ts-eslint/RuleTester.ts @@ -11,7 +11,7 @@ import type { SharedConfigurationSettings, } from './Rule'; -interface ValidTestCase> { +interface ValidTestCase { /** * Name for the test case. */ @@ -75,7 +75,7 @@ interface SuggestionOutput { interface InvalidTestCase< MessageIds extends string, - Options extends Readonly, + Options extends readonly unknown[], > extends ValidTestCase { /** * Expected errors. @@ -135,7 +135,7 @@ type RuleTesterTestFrameworkFunction = ( interface RunTests< MessageIds extends string, - Options extends Readonly, + Options extends readonly unknown[], > { // RuleTester.run also accepts strings for valid cases readonly valid: readonly (ValidTestCase | string)[]; @@ -160,7 +160,7 @@ declare class RuleTesterBase { * @param rule The rule to test. * @param test The collection of tests to run. */ - run>( + run( ruleName: string, rule: RuleModule, tests: RunTests, @@ -190,7 +190,7 @@ declare class RuleTesterBase { /** * Define a rule for one particular run of tests. */ - defineRule>( + defineRule( name: string, rule: | RuleCreateFunction diff --git a/packages/visitor-keys/CHANGELOG.md b/packages/visitor-keys/CHANGELOG.md index 34b2626f29e5..267228ccb75f 100644 --- a/packages/visitor-keys/CHANGELOG.md +++ b/packages/visitor-keys/CHANGELOG.md @@ -1,3 +1,9 @@ +## 7.15.0 (2024-07-01) + +This was a version bump only for visitor-keys to align it with other projects, there were no code changes. + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 7.14.1 (2024-06-24) This was a version bump only for visitor-keys to align it with other projects, there were no code changes. diff --git a/packages/visitor-keys/package.json b/packages/visitor-keys/package.json index c597702f0b6c..9bd64c9512f1 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/visitor-keys", - "version": "7.14.1", + "version": "7.15.0", "description": "Visitor keys used to help traverse the TypeScript-ESTree AST", "files": [ "dist", @@ -47,7 +47,7 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@typescript-eslint/types": "7.14.1", + "@typescript-eslint/types": "7.15.0", "eslint-visitor-keys": "^3.4.3" }, "devDependencies": { diff --git a/packages/website-eslint/CHANGELOG.md b/packages/website-eslint/CHANGELOG.md index db6d0a86f238..7aa1c492f1ba 100644 --- a/packages/website-eslint/CHANGELOG.md +++ b/packages/website-eslint/CHANGELOG.md @@ -1,3 +1,20 @@ +## 7.15.0 (2024-07-01) + + +### 🩹 Fixes + +- **utils:** clean outdated `RuleTester` export + + +### ❤️ Thank You + +- auvred +- Kim Sang Du +- rgehbt +- Vinccool96 + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 7.14.1 (2024-06-24) This was a version bump only for website-eslint to align it with other projects, there were no code changes. diff --git a/packages/website-eslint/build.ts b/packages/website-eslint/build.ts index ef316770155e..5fef47dcf6c5 100644 --- a/packages/website-eslint/build.ts +++ b/packages/website-eslint/build.ts @@ -91,7 +91,6 @@ async function buildPackage(name: string, file: string): Promise { setup(build): void { build.onLoad( makeFilter([ - '/eslint-utils/rule-tester/RuleTester.ts', '/ts-eslint/ESLint.ts', '/ts-eslint/RuleTester.ts', '/ts-eslint/CLIEngine.ts', diff --git a/packages/website-eslint/package.json b/packages/website-eslint/package.json index e67568137d0c..aaa37f09f6aa 100644 --- a/packages/website-eslint/package.json +++ b/packages/website-eslint/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/website-eslint", - "version": "7.14.1", + "version": "7.15.0", "private": true, "description": "ESLint which works in browsers.", "files": [ @@ -24,11 +24,11 @@ }, "devDependencies": { "@eslint/js": "*", - "@typescript-eslint/eslint-plugin": "7.14.1", - "@typescript-eslint/parser": "7.14.1", - "@typescript-eslint/scope-manager": "7.14.1", - "@typescript-eslint/typescript-estree": "7.14.1", - "@typescript-eslint/visitor-keys": "7.14.1", + "@typescript-eslint/eslint-plugin": "7.15.0", + "@typescript-eslint/parser": "7.15.0", + "@typescript-eslint/scope-manager": "7.15.0", + "@typescript-eslint/typescript-estree": "7.15.0", + "@typescript-eslint/visitor-keys": "7.15.0", "esbuild": "~0.21.0", "eslint": "*", "esquery": "*", diff --git a/packages/website/CHANGELOG.md b/packages/website/CHANGELOG.md index 49f4efab0333..05b99980c93d 100644 --- a/packages/website/CHANGELOG.md +++ b/packages/website/CHANGELOG.md @@ -1,3 +1,20 @@ +## 7.15.0 (2024-07-01) + + +### 🚀 Features + +- **eslint-plugin:** [array-type] detect `Readonly` case + + +### ❤️ Thank You + +- auvred +- Kim Sang Du +- rgehbt +- Vinccool96 + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + ## 7.14.1 (2024-06-24) This was a version bump only for website to align it with other projects, there were no code changes. diff --git a/packages/website/data/sponsors.json b/packages/website/data/sponsors.json index 32ec4e421042..c1c1557131c3 100644 --- a/packages/website/data/sponsors.json +++ b/packages/website/data/sponsors.json @@ -73,7 +73,7 @@ "id": "THANKS.DEV", "image": "https://images.opencollective.com/thanks-dev/ed78b39/logo.png", "name": "THANKS.DEV", - "totalDonations": 159844, + "totalDonations": 178731, "website": "https://thanks.dev" }, { diff --git a/packages/website/package.json b/packages/website/package.json index b2c03e026b91..de51b327e683 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -1,6 +1,6 @@ { "name": "website", - "version": "7.14.1", + "version": "7.15.0", "private": true, "scripts": { "build": "docusaurus build", @@ -23,8 +23,8 @@ "@docusaurus/preset-classic": "^3.2.1", "@docusaurus/remark-plugin-npm2yarn": "^3.2.1", "@docusaurus/theme-common": "^3.2.1", - "@typescript-eslint/parser": "7.14.1", - "@typescript-eslint/website-eslint": "7.14.1", + "@typescript-eslint/parser": "7.15.0", + "@typescript-eslint/website-eslint": "7.15.0", "@uiw/react-shields": "2.0.1", "clsx": "^2.1.0", "eslint": "*", @@ -47,18 +47,18 @@ "@types/mdast": "^4.0.3", "@types/react": "*", "@types/unist": "^3.0.2", - "@typescript-eslint/eslint-plugin": "7.14.1", - "@typescript-eslint/rule-schema-to-typescript-types": "7.14.1", - "@typescript-eslint/scope-manager": "7.14.1", - "@typescript-eslint/types": "7.14.1", - "@typescript-eslint/typescript-estree": "7.14.1", - "@typescript-eslint/utils": "7.14.1", + "@typescript-eslint/eslint-plugin": "7.15.0", + "@typescript-eslint/rule-schema-to-typescript-types": "7.15.0", + "@typescript-eslint/scope-manager": "7.15.0", + "@typescript-eslint/types": "7.15.0", + "@typescript-eslint/typescript-estree": "7.15.0", + "@typescript-eslint/utils": "7.15.0", "copy-webpack-plugin": "^12.0.0", "cross-fetch": "*", "history": "^4.9.0", "make-dir": "*", "mdast-util-mdx": "^3.0.0", - "monaco-editor": "~0.49.0", + "monaco-editor": "~0.50.0", "raw-loader": "^4.0.2", "rimraf": "*", "stylelint": "^16.3.1", diff --git a/packages/website/plugins/generated-rule-docs/RuleDocsPage.ts b/packages/website/plugins/generated-rule-docs/RuleDocsPage.ts index ea16781aec40..b67c089720c0 100644 --- a/packages/website/plugins/generated-rule-docs/RuleDocsPage.ts +++ b/packages/website/plugins/generated-rule-docs/RuleDocsPage.ts @@ -26,7 +26,7 @@ export class RuleDocsPage { #headingIndices: RequiredHeadingIndices; #rule: Readonly; - get children(): Readonly { + get children(): readonly unist.Node[] { return this.#children; } diff --git a/yarn.lock b/yarn.lock index 64092e709cbf..30d3e7247383 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1739,7 +1739,7 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.1.2, @babel/runtime@npm:^7.10.3, @babel/runtime@npm:^7.11.2, @babel/runtime@npm:^7.12.13, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.22.6, @babel/runtime@npm:^7.23.2, @babel/runtime@npm:^7.24.4, @babel/runtime@npm:^7.7.2, @babel/runtime@npm:^7.8.4": +"@babel/runtime@npm:^7.1.2, @babel/runtime@npm:^7.10.3, @babel/runtime@npm:^7.11.2, @babel/runtime@npm:^7.12.13, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.22.6, @babel/runtime@npm:^7.24.4, @babel/runtime@npm:^7.7.2, @babel/runtime@npm:^7.8.4": version: 7.24.7 resolution: "@babel/runtime@npm:7.24.7" dependencies: @@ -5625,17 +5625,17 @@ __metadata: dependencies: "@jest/types": 29.6.3 "@prettier/sync": ^0.5.1 - "@typescript-eslint/rule-tester": 7.14.1 - "@typescript-eslint/scope-manager": 7.14.1 - "@typescript-eslint/type-utils": 7.14.1 - "@typescript-eslint/utils": 7.14.1 + "@typescript-eslint/rule-tester": 7.15.0 + "@typescript-eslint/scope-manager": 7.15.0 + "@typescript-eslint/type-utils": 7.15.0 + "@typescript-eslint/utils": 7.15.0 jest: 29.7.0 prettier: ^3.2.5 rimraf: "*" languageName: unknown linkType: soft -"@typescript-eslint/eslint-plugin@7.14.1, @typescript-eslint/eslint-plugin@workspace:packages/eslint-plugin": +"@typescript-eslint/eslint-plugin@7.15.0, @typescript-eslint/eslint-plugin@workspace:packages/eslint-plugin": version: 0.0.0-use.local resolution: "@typescript-eslint/eslint-plugin@workspace:packages/eslint-plugin" dependencies: @@ -5644,12 +5644,12 @@ __metadata: "@types/marked": ^5.0.2 "@types/mdast": ^4.0.3 "@types/natural-compare": "*" - "@typescript-eslint/rule-schema-to-typescript-types": 7.14.1 - "@typescript-eslint/rule-tester": 7.14.1 - "@typescript-eslint/scope-manager": 7.14.1 - "@typescript-eslint/type-utils": 7.14.1 - "@typescript-eslint/utils": 7.14.1 - "@typescript-eslint/visitor-keys": 7.14.1 + "@typescript-eslint/rule-schema-to-typescript-types": 7.15.0 + "@typescript-eslint/rule-tester": 7.15.0 + "@typescript-eslint/scope-manager": 7.15.0 + "@typescript-eslint/type-utils": 7.15.0 + "@typescript-eslint/utils": 7.15.0 + "@typescript-eslint/visitor-keys": 7.15.0 ajv: ^6.12.6 cross-env: ^7.0.3 cross-fetch: "*" @@ -5694,16 +5694,16 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/parser@7.14.1, @typescript-eslint/parser@workspace:packages/parser": +"@typescript-eslint/parser@7.15.0, @typescript-eslint/parser@workspace:packages/parser": version: 0.0.0-use.local resolution: "@typescript-eslint/parser@workspace:packages/parser" dependencies: "@jest/types": 29.6.3 "@types/glob": "*" - "@typescript-eslint/scope-manager": 7.14.1 - "@typescript-eslint/types": 7.14.1 - "@typescript-eslint/typescript-estree": 7.14.1 - "@typescript-eslint/visitor-keys": 7.14.1 + "@typescript-eslint/scope-manager": 7.15.0 + "@typescript-eslint/types": 7.15.0 + "@typescript-eslint/typescript-estree": 7.15.0 + "@typescript-eslint/visitor-keys": 7.15.0 debug: ^4.3.4 downlevel-dts: "*" glob: "*" @@ -5725,11 +5725,11 @@ __metadata: dependencies: "@jest/types": 29.6.3 "@nx/devkit": "*" - "@typescript-eslint/eslint-plugin": 7.14.1 - "@typescript-eslint/scope-manager": 7.14.1 - "@typescript-eslint/types": 7.14.1 - "@typescript-eslint/typescript-estree": 7.14.1 - "@typescript-eslint/utils": 7.14.1 + "@typescript-eslint/eslint-plugin": 7.15.0 + "@typescript-eslint/scope-manager": 7.15.0 + "@typescript-eslint/types": 7.15.0 + "@typescript-eslint/typescript-estree": 7.15.0 + "@typescript-eslint/utils": 7.15.0 cross-fetch: "*" execa: "*" prettier: ^3.2.5 @@ -5739,28 +5739,28 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/rule-schema-to-typescript-types@7.14.1, @typescript-eslint/rule-schema-to-typescript-types@workspace:packages/rule-schema-to-typescript-types": +"@typescript-eslint/rule-schema-to-typescript-types@7.15.0, @typescript-eslint/rule-schema-to-typescript-types@workspace:packages/rule-schema-to-typescript-types": version: 0.0.0-use.local resolution: "@typescript-eslint/rule-schema-to-typescript-types@workspace:packages/rule-schema-to-typescript-types" dependencies: "@jest/types": 29.6.3 - "@typescript-eslint/type-utils": 7.14.1 - "@typescript-eslint/utils": 7.14.1 + "@typescript-eslint/type-utils": 7.15.0 + "@typescript-eslint/utils": 7.15.0 natural-compare: ^1.4.0 prettier: ^3.2.5 languageName: unknown linkType: soft -"@typescript-eslint/rule-tester@7.14.1, @typescript-eslint/rule-tester@workspace:packages/rule-tester": +"@typescript-eslint/rule-tester@7.15.0, @typescript-eslint/rule-tester@workspace:packages/rule-tester": version: 0.0.0-use.local resolution: "@typescript-eslint/rule-tester@workspace:packages/rule-tester" dependencies: "@jest/types": 29.6.3 "@types/json-stable-stringify-without-jsonify": ^1.0.2 "@types/lodash.merge": 4.6.9 - "@typescript-eslint/parser": 7.14.1 - "@typescript-eslint/typescript-estree": 7.14.1 - "@typescript-eslint/utils": 7.14.1 + "@typescript-eslint/parser": 7.15.0 + "@typescript-eslint/typescript-estree": 7.15.0 + "@typescript-eslint/utils": 7.15.0 ajv: ^6.12.6 chai: ^4.4.1 eslint-visitor-keys: ^4.0.0 @@ -5779,15 +5779,15 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/scope-manager@7.14.1, @typescript-eslint/scope-manager@workspace:packages/scope-manager": +"@typescript-eslint/scope-manager@7.15.0, @typescript-eslint/scope-manager@workspace:packages/scope-manager": version: 0.0.0-use.local resolution: "@typescript-eslint/scope-manager@workspace:packages/scope-manager" dependencies: "@jest/types": 29.6.3 "@types/glob": "*" - "@typescript-eslint/types": 7.14.1 - "@typescript-eslint/typescript-estree": 7.14.1 - "@typescript-eslint/visitor-keys": 7.14.1 + "@typescript-eslint/types": 7.15.0 + "@typescript-eslint/typescript-estree": 7.15.0 + "@typescript-eslint/visitor-keys": 7.15.0 glob: "*" jest-specific-snapshot: "*" make-dir: "*" @@ -5816,14 +5816,14 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/type-utils@7.14.1, @typescript-eslint/type-utils@workspace:packages/type-utils": +"@typescript-eslint/type-utils@7.15.0, @typescript-eslint/type-utils@workspace:packages/type-utils": version: 0.0.0-use.local resolution: "@typescript-eslint/type-utils@workspace:packages/type-utils" dependencies: "@jest/types": 29.6.3 - "@typescript-eslint/parser": 7.14.1 - "@typescript-eslint/typescript-estree": 7.14.1 - "@typescript-eslint/utils": 7.14.1 + "@typescript-eslint/parser": 7.15.0 + "@typescript-eslint/typescript-estree": 7.15.0 + "@typescript-eslint/utils": 7.15.0 ajv: ^6.12.6 debug: ^4.3.4 downlevel-dts: "*" @@ -5840,7 +5840,7 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/types@7.14.1, @typescript-eslint/types@workspace:packages/types": +"@typescript-eslint/types@7.15.0, @typescript-eslint/types@workspace:packages/types": version: 0.0.0-use.local resolution: "@typescript-eslint/types@workspace:packages/types" dependencies: @@ -5939,13 +5939,13 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/typescript-estree@7.14.1, @typescript-eslint/typescript-estree@workspace:packages/typescript-estree": +"@typescript-eslint/typescript-estree@7.15.0, @typescript-eslint/typescript-estree@workspace:packages/typescript-estree": version: 0.0.0-use.local resolution: "@typescript-eslint/typescript-estree@workspace:packages/typescript-estree" dependencies: "@jest/types": 29.6.3 - "@typescript-eslint/types": 7.14.1 - "@typescript-eslint/visitor-keys": 7.14.1 + "@typescript-eslint/types": 7.15.0 + "@typescript-eslint/visitor-keys": 7.15.0 debug: ^4.3.4 glob: "*" globby: ^11.1.0 @@ -6001,14 +6001,14 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/utils@7.14.1, @typescript-eslint/utils@workspace:packages/utils": +"@typescript-eslint/utils@7.15.0, @typescript-eslint/utils@workspace:packages/utils": version: 0.0.0-use.local resolution: "@typescript-eslint/utils@workspace:packages/utils" dependencies: "@eslint-community/eslint-utils": ^4.4.0 - "@typescript-eslint/scope-manager": 7.14.1 - "@typescript-eslint/types": 7.14.1 - "@typescript-eslint/typescript-estree": 7.14.1 + "@typescript-eslint/scope-manager": 7.15.0 + "@typescript-eslint/types": 7.15.0 + "@typescript-eslint/typescript-estree": 7.15.0 downlevel-dts: "*" jest: 29.7.0 prettier: ^3.2.5 @@ -6054,13 +6054,13 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/visitor-keys@7.14.1, @typescript-eslint/visitor-keys@workspace:packages/visitor-keys": +"@typescript-eslint/visitor-keys@7.15.0, @typescript-eslint/visitor-keys@workspace:packages/visitor-keys": version: 0.0.0-use.local resolution: "@typescript-eslint/visitor-keys@workspace:packages/visitor-keys" dependencies: "@jest/types": 29.6.3 "@types/eslint-visitor-keys": "*" - "@typescript-eslint/types": 7.14.1 + "@typescript-eslint/types": 7.15.0 downlevel-dts: "*" eslint-visitor-keys: ^3.4.3 jest: 29.7.0 @@ -6090,16 +6090,16 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/website-eslint@7.14.1, @typescript-eslint/website-eslint@workspace:packages/website-eslint": +"@typescript-eslint/website-eslint@7.15.0, @typescript-eslint/website-eslint@workspace:packages/website-eslint": version: 0.0.0-use.local resolution: "@typescript-eslint/website-eslint@workspace:packages/website-eslint" dependencies: "@eslint/js": "*" - "@typescript-eslint/eslint-plugin": 7.14.1 - "@typescript-eslint/parser": 7.14.1 - "@typescript-eslint/scope-manager": 7.14.1 - "@typescript-eslint/typescript-estree": 7.14.1 - "@typescript-eslint/visitor-keys": 7.14.1 + "@typescript-eslint/eslint-plugin": 7.15.0 + "@typescript-eslint/parser": 7.15.0 + "@typescript-eslint/scope-manager": 7.15.0 + "@typescript-eslint/typescript-estree": 7.15.0 + "@typescript-eslint/visitor-keys": 7.15.0 esbuild: ~0.21.0 eslint: "*" esquery: "*" @@ -6691,12 +6691,12 @@ __metadata: languageName: node linkType: hard -"aria-query@npm:^5.3.0": - version: 5.3.0 - resolution: "aria-query@npm:5.3.0" +"aria-query@npm:~5.1.3": + version: 5.1.3 + resolution: "aria-query@npm:5.1.3" dependencies: - dequal: ^2.0.3 - checksum: 305bd73c76756117b59aba121d08f413c7ff5e80fa1b98e217a3443fcddb9a232ee790e24e432b59ae7625aebcf4c47cb01c2cac872994f0b426f5bdfcd96ba9 + deep-equal: ^2.0.5 + checksum: 929ff95f02857b650fb4cbcd2f41072eee2f46159a6605ea03bf63aa572e35ffdff43d69e815ddc462e16e07de8faba3978afc2813650b4448ee18c9895d982b languageName: node linkType: hard @@ -6707,7 +6707,7 @@ __metadata: languageName: node linkType: hard -"array-buffer-byte-length@npm:^1.0.1": +"array-buffer-byte-length@npm:^1.0.0, array-buffer-byte-length@npm:^1.0.1": version: 1.0.1 resolution: "array-buffer-byte-length@npm:1.0.1" dependencies: @@ -6938,10 +6938,10 @@ __metadata: languageName: node linkType: hard -"axe-core@npm:=4.7.0": - version: 4.7.0 - resolution: "axe-core@npm:4.7.0" - checksum: f086bcab42be1761ba2b0b127dec350087f4c3a853bba8dd58f69d898cefaac31a1561da23146f6f3c07954c76171d1f2ce460e555e052d2b02cd79af628fa4a +"axe-core@npm:^4.9.1": + version: 4.9.1 + resolution: "axe-core@npm:4.9.1" + checksum: 41d9227871781f96c2952e2a777fca73624959dd0e98864f6d82806a77602f82b4fc490852082a7e524d8cd864e50d8b4d9931819b4a150112981d8c932110c5 languageName: node linkType: hard @@ -6956,12 +6956,12 @@ __metadata: languageName: node linkType: hard -"axobject-query@npm:^3.2.1": - version: 3.2.1 - resolution: "axobject-query@npm:3.2.1" +"axobject-query@npm:~3.1.1": + version: 3.1.1 + resolution: "axobject-query@npm:3.1.1" dependencies: - dequal: ^2.0.3 - checksum: a94047e702b57c91680e6a952ec4a1aaa2cfd0d80ead76bc8c954202980d8c51968a6ea18b4d8010e8e2cf95676533d8022a8ebba9abc1dfe25686721df26fd2 + deep-equal: ^2.0.5 + checksum: c12a5da10dc7bab75e1cda9b6a3b5fcf10eba426ddf1a17b71ef65a434ed707ede7d1c4f013ba1609e970bc8c0cddac01365080d376204314e9b294719acd8a5 languageName: node linkType: hard @@ -8884,6 +8884,32 @@ __metadata: languageName: node linkType: hard +"deep-equal@npm:^2.0.5": + version: 2.2.3 + resolution: "deep-equal@npm:2.2.3" + dependencies: + array-buffer-byte-length: ^1.0.0 + call-bind: ^1.0.5 + es-get-iterator: ^1.1.3 + get-intrinsic: ^1.2.2 + is-arguments: ^1.1.1 + is-array-buffer: ^3.0.2 + is-date-object: ^1.0.5 + is-regex: ^1.1.4 + is-shared-array-buffer: ^1.0.2 + isarray: ^2.0.5 + object-is: ^1.1.5 + object-keys: ^1.1.1 + object.assign: ^4.1.4 + regexp.prototype.flags: ^1.5.1 + side-channel: ^1.0.4 + which-boxed-primitive: ^1.0.2 + which-collection: ^1.0.1 + which-typed-array: ^1.1.13 + checksum: ee8852f23e4d20a5626c13b02f415ba443a1b30b4b3d39eaf366d59c4a85e6545d7ec917db44d476a85ae5a86064f7e5f7af7479f38f113995ba869f3a1ddc53 + languageName: node + linkType: hard + "deep-extend@npm:^0.6.0": version: 0.6.0 resolution: "deep-extend@npm:0.6.0" @@ -9010,7 +9036,7 @@ __metadata: languageName: node linkType: hard -"dequal@npm:^2.0.0, dequal@npm:^2.0.3": +"dequal@npm:^2.0.0": version: 2.0.3 resolution: "dequal@npm:2.0.3" checksum: 8679b850e1a3d0ebbc46ee780d5df7b478c23f335887464023a631d1b9af051ad4a6595a44220f9ff8ff95a8ddccf019b5ad778a976fd7bbf77383d36f412f90 @@ -9464,7 +9490,7 @@ __metadata: languageName: node linkType: hard -"es-abstract@npm:^1.22.1, es-abstract@npm:^1.22.3, es-abstract@npm:^1.23.0, es-abstract@npm:^1.23.2, es-abstract@npm:^1.23.3": +"es-abstract@npm:^1.17.5, es-abstract@npm:^1.22.1, es-abstract@npm:^1.22.3, es-abstract@npm:^1.23.0, es-abstract@npm:^1.23.2, es-abstract@npm:^1.23.3": version: 1.23.3 resolution: "es-abstract@npm:1.23.3" dependencies: @@ -9534,7 +9560,24 @@ __metadata: languageName: node linkType: hard -"es-iterator-helpers@npm:^1.0.15, es-iterator-helpers@npm:^1.0.19": +"es-get-iterator@npm:^1.1.3": + version: 1.1.3 + resolution: "es-get-iterator@npm:1.1.3" + dependencies: + call-bind: ^1.0.2 + get-intrinsic: ^1.1.3 + has-symbols: ^1.0.3 + is-arguments: ^1.1.1 + is-map: ^2.0.2 + is-set: ^2.0.2 + is-string: ^1.0.7 + isarray: ^2.0.5 + stop-iteration-iterator: ^1.0.0 + checksum: 8fa118da42667a01a7c7529f8a8cca514feeff243feec1ce0bb73baaa3514560bd09d2b3438873cf8a5aaec5d52da248131de153b28e2638a061b6e4df13267d + languageName: node + linkType: hard + +"es-iterator-helpers@npm:^1.0.19": version: 1.0.19 resolution: "es-iterator-helpers@npm:1.0.19" dependencies: @@ -9950,28 +9993,28 @@ __metadata: linkType: hard "eslint-plugin-jsx-a11y@npm:^6.8.0": - version: 6.8.0 - resolution: "eslint-plugin-jsx-a11y@npm:6.8.0" + version: 6.9.0 + resolution: "eslint-plugin-jsx-a11y@npm:6.9.0" dependencies: - "@babel/runtime": ^7.23.2 - aria-query: ^5.3.0 - array-includes: ^3.1.7 + aria-query: ~5.1.3 + array-includes: ^3.1.8 array.prototype.flatmap: ^1.3.2 ast-types-flow: ^0.0.8 - axe-core: =4.7.0 - axobject-query: ^3.2.1 + axe-core: ^4.9.1 + axobject-query: ~3.1.1 damerau-levenshtein: ^1.0.8 emoji-regex: ^9.2.2 - es-iterator-helpers: ^1.0.15 - hasown: ^2.0.0 + es-iterator-helpers: ^1.0.19 + hasown: ^2.0.2 jsx-ast-utils: ^3.3.5 language-tags: ^1.0.9 minimatch: ^3.1.2 - object.entries: ^1.1.7 - object.fromentries: ^2.0.7 + object.fromentries: ^2.0.8 + safe-regex-test: ^1.0.3 + string.prototype.includes: ^2.0.0 peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 - checksum: 3dec00e2a3089c4c61ac062e4196a70985fb7eda1fd67fe035363d92578debde92fdb8ed2e472321fc0d71e75f4a1e8888c6a3218c14dd93c8e8d19eb6f51554 + checksum: 122cbd22bbd8c3e4a37f386ec183ada63a4ecfa7af7d40cd8a110777ac5ad5ff542f60644596a9e2582ed138a1cc6d96c5d5ca934105e29d5245d6c951ebc3ef languageName: node linkType: hard @@ -11073,7 +11116,7 @@ __metadata: languageName: node linkType: hard -"get-intrinsic@npm:^1.1.1, get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.1, get-intrinsic@npm:^1.2.3, get-intrinsic@npm:^1.2.4": +"get-intrinsic@npm:^1.1.1, get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.1, get-intrinsic@npm:^1.2.2, get-intrinsic@npm:^1.2.3, get-intrinsic@npm:^1.2.4": version: 1.2.4 resolution: "get-intrinsic@npm:1.2.4" dependencies: @@ -12160,7 +12203,7 @@ __metadata: languageName: node linkType: hard -"internal-slot@npm:^1.0.7": +"internal-slot@npm:^1.0.4, internal-slot@npm:^1.0.7": version: 1.0.7 resolution: "internal-slot@npm:1.0.7" dependencies: @@ -12225,7 +12268,17 @@ __metadata: languageName: node linkType: hard -"is-array-buffer@npm:^3.0.4": +"is-arguments@npm:^1.1.1": + version: 1.1.1 + resolution: "is-arguments@npm:1.1.1" + dependencies: + call-bind: ^1.0.2 + has-tostringtag: ^1.0.0 + checksum: 7f02700ec2171b691ef3e4d0e3e6c0ba408e8434368504bb593d0d7c891c0dbfda6d19d30808b904a6cb1929bca648c061ba438c39f296c2a8ca083229c49f27 + languageName: node + linkType: hard + +"is-array-buffer@npm:^3.0.2, is-array-buffer@npm:^3.0.4": version: 3.0.4 resolution: "is-array-buffer@npm:3.0.4" dependencies: @@ -12458,10 +12511,10 @@ __metadata: languageName: node linkType: hard -"is-map@npm:^2.0.1": - version: 2.0.2 - resolution: "is-map@npm:2.0.2" - checksum: ace3d0ecd667bbdefdb1852de601268f67f2db725624b1958f279316e13fecb8fa7df91fd60f690d7417b4ec180712f5a7ee967008e27c65cfd475cc84337728 +"is-map@npm:^2.0.1, is-map@npm:^2.0.2": + version: 2.0.3 + resolution: "is-map@npm:2.0.3" + checksum: e6ce5f6380f32b141b3153e6ba9074892bbbbd655e92e7ba5ff195239777e767a976dcd4e22f864accaf30e53ebf961ab1995424aef91af68788f0591b7396cc languageName: node linkType: hard @@ -12607,10 +12660,10 @@ __metadata: languageName: node linkType: hard -"is-set@npm:^2.0.1": - version: 2.0.2 - resolution: "is-set@npm:2.0.2" - checksum: b64343faf45e9387b97a6fd32be632ee7b269bd8183701f3b3f5b71a7cf00d04450ed8669d0bd08753e08b968beda96fca73a10fd0ff56a32603f64deba55a57 +"is-set@npm:^2.0.1, is-set@npm:^2.0.2": + version: 2.0.3 + resolution: "is-set@npm:2.0.3" + checksum: 36e3f8c44bdbe9496c9689762cc4110f6a6a12b767c5d74c0398176aa2678d4467e3bf07595556f2dba897751bde1422480212b97d973c7b08a343100b0c0dfe languageName: node linkType: hard @@ -15302,10 +15355,10 @@ __metadata: languageName: node linkType: hard -"monaco-editor@npm:~0.49.0": - version: 0.49.0 - resolution: "monaco-editor@npm:0.49.0" - checksum: 133b41b2b32d120ff6bc12d68a72501c90ff6de2e15e915a44c25f3f3ab29d164bd94ba501e13329e855b3000bd035319b01be122e76ab7f3fab6731cf0a323c +"monaco-editor@npm:~0.50.0": + version: 0.50.0 + resolution: "monaco-editor@npm:0.50.0" + checksum: 841b047c89060bcd5e8864c671389f7cda322bd8372663ea71f42eb3d780edbbabc41b151791629fec04bbf3c53b407eb9e5b0829ef95292103d685df0994147 languageName: node linkType: hard @@ -15810,6 +15863,16 @@ __metadata: languageName: node linkType: hard +"object-is@npm:^1.1.5": + version: 1.1.6 + resolution: "object-is@npm:1.1.6" + dependencies: + call-bind: ^1.0.7 + define-properties: ^1.2.1 + checksum: 3ea22759967e6f2380a2cbbd0f737b42dc9ddb2dfefdb159a1b927fea57335e1b058b564bfa94417db8ad58cddab33621a035de6f5e5ad56d89f2dd03e66c6a1 + languageName: node + linkType: hard + "object-keys@npm:^1.1.1": version: 1.1.1 resolution: "object-keys@npm:1.1.1" @@ -15843,7 +15906,7 @@ __metadata: languageName: node linkType: hard -"object.entries@npm:^1.1.7, object.entries@npm:^1.1.8": +"object.entries@npm:^1.1.8": version: 1.1.8 resolution: "object.entries@npm:1.1.8" dependencies: @@ -17547,7 +17610,7 @@ __metadata: languageName: node linkType: hard -"regexp.prototype.flags@npm:^1.5.2": +"regexp.prototype.flags@npm:^1.5.1, regexp.prototype.flags@npm:^1.5.2": version: 1.5.2 resolution: "regexp.prototype.flags@npm:1.5.2" dependencies: @@ -18803,6 +18866,15 @@ __metadata: languageName: node linkType: hard +"stop-iteration-iterator@npm:^1.0.0": + version: 1.0.0 + resolution: "stop-iteration-iterator@npm:1.0.0" + dependencies: + internal-slot: ^1.0.4 + checksum: d04173690b2efa40e24ab70e5e51a3ff31d56d699550cfad084104ab3381390daccb36652b25755e420245f3b0737de66c1879eaa2a8d4fc0a78f9bf892fcb42 + languageName: node + linkType: hard + "string-argv@npm:~0.3.1, string-argv@npm:~0.3.2": version: 0.3.2 resolution: "string-argv@npm:0.3.2" @@ -18860,6 +18932,16 @@ __metadata: languageName: node linkType: hard +"string.prototype.includes@npm:^2.0.0": + version: 2.0.0 + resolution: "string.prototype.includes@npm:2.0.0" + dependencies: + define-properties: ^1.1.3 + es-abstract: ^1.17.5 + checksum: cf413e7f603b0414b65fdf1e7e3670ba85fd992b31c7eadfbdd9a484b86d265f0260431e7558cdb44a318dcadd1da8442b7bb8193b9ddd0aea3c376d2a559859 + languageName: node + linkType: hard + "string.prototype.matchall@npm:^4.0.11, string.prototype.matchall@npm:^4.0.6": version: 4.0.11 resolution: "string.prototype.matchall@npm:4.0.11" @@ -19780,9 +19862,9 @@ __metadata: resolution: "typescript-eslint@workspace:packages/typescript-eslint" dependencies: "@jest/types": 29.6.3 - "@typescript-eslint/eslint-plugin": 7.14.1 - "@typescript-eslint/parser": 7.14.1 - "@typescript-eslint/utils": 7.14.1 + "@typescript-eslint/eslint-plugin": 7.15.0 + "@typescript-eslint/parser": 7.15.0 + "@typescript-eslint/utils": 7.15.0 downlevel-dts: "*" jest: 29.7.0 prettier: ^3.2.5 @@ -20494,14 +20576,14 @@ __metadata: "@types/mdast": ^4.0.3 "@types/react": "*" "@types/unist": ^3.0.2 - "@typescript-eslint/eslint-plugin": 7.14.1 - "@typescript-eslint/parser": 7.14.1 - "@typescript-eslint/rule-schema-to-typescript-types": 7.14.1 - "@typescript-eslint/scope-manager": 7.14.1 - "@typescript-eslint/types": 7.14.1 - "@typescript-eslint/typescript-estree": 7.14.1 - "@typescript-eslint/utils": 7.14.1 - "@typescript-eslint/website-eslint": 7.14.1 + "@typescript-eslint/eslint-plugin": 7.15.0 + "@typescript-eslint/parser": 7.15.0 + "@typescript-eslint/rule-schema-to-typescript-types": 7.15.0 + "@typescript-eslint/scope-manager": 7.15.0 + "@typescript-eslint/types": 7.15.0 + "@typescript-eslint/typescript-estree": 7.15.0 + "@typescript-eslint/utils": 7.15.0 + "@typescript-eslint/website-eslint": 7.15.0 "@uiw/react-shields": 2.0.1 clsx: ^2.1.0 copy-webpack-plugin: ^12.0.0 @@ -20513,7 +20595,7 @@ __metadata: lz-string: ^1.5.0 make-dir: "*" mdast-util-mdx: ^3.0.0 - monaco-editor: ~0.49.0 + monaco-editor: ~0.50.0 prettier: ^3.2.5 prism-react-renderer: ^1.3.5 raw-loader: ^4.0.2 @@ -20618,7 +20700,7 @@ __metadata: languageName: node linkType: hard -"which-typed-array@npm:^1.1.14, which-typed-array@npm:^1.1.15, which-typed-array@npm:^1.1.9": +"which-typed-array@npm:^1.1.13, which-typed-array@npm:^1.1.14, which-typed-array@npm:^1.1.15, which-typed-array@npm:^1.1.9": version: 1.1.15 resolution: "which-typed-array@npm:1.1.15" dependencies: