diff --git a/CHANGELOG.md b/CHANGELOG.md index 8edd6ad69604..51fb6a21529f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,25 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [6.17.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.16.0...v6.17.0) (2024-01-01) + + +### Bug Fixes + +* **eslint-plugin:** [no-restricted-imports] prevent crash when `patterns` or `paths` in options are empty ([#8108](https://github.com/typescript-eslint/typescript-eslint/issues/8108)) ([675e987](https://github.com/typescript-eslint/typescript-eslint/commit/675e987ca1d13244c03d7e09d4e42c6539689d9a)) + + +### Features + +* **eslint-plugin:** [no-floating-promises] flag result of .map(async) ([#7897](https://github.com/typescript-eslint/typescript-eslint/issues/7897)) ([5857356](https://github.com/typescript-eslint/typescript-eslint/commit/5857356962060b19aa792bee778f9167ee54154b)) +* **eslint-plugin:** [switch-exhaustiveness-check] add an option to warn against a `default` case on an already exhaustive `switch` ([#7539](https://github.com/typescript-eslint/typescript-eslint/issues/7539)) ([6a219bd](https://github.com/typescript-eslint/typescript-eslint/commit/6a219bdfe6fcf86aae28158e0d855f87a8bac719)) + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + + + + + # [6.16.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.15.0...v6.16.0) (2023-12-25) diff --git a/lerna.json b/lerna.json index a24fd9776360..ba2cfb5aa2d2 100644 --- a/lerna.json +++ b/lerna.json @@ -1,6 +1,6 @@ { "$schema": "node_modules/lerna/schemas/lerna-schema.json", - "version": "6.16.0", + "version": "6.17.0", "npmClient": "yarn", "stream": true, "command": { diff --git a/package.json b/package.json index 5448f0ebae21..0dba75824cf8 100644 --- a/package.json +++ b/package.json @@ -141,7 +141,7 @@ "pretty-format": "^29", "react-split-pane@^0.1.92": "patch:react-split-pane@npm%3A0.1.92#./.yarn/patches/react-split-pane-npm-0.1.92-93dbf51dff.patch", "tsx": "^4.6.2", - "typescript": "5.3.2" + "typescript": "5.3.3" }, "packageManager": "yarn@3.7.0" } diff --git a/packages/ast-spec/CHANGELOG.md b/packages/ast-spec/CHANGELOG.md index 9480618c6f82..738c2b5e872f 100644 --- a/packages/ast-spec/CHANGELOG.md +++ b/packages/ast-spec/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [6.17.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.16.0...v6.17.0) (2024-01-01) + +**Note:** Version bump only for package @typescript-eslint/ast-spec + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + + + + + # [6.16.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.15.0...v6.16.0) (2023-12-25) **Note:** Version bump only for package @typescript-eslint/ast-spec diff --git a/packages/ast-spec/package.json b/packages/ast-spec/package.json index a0f16dd1682e..b0c48fe7dcb6 100644 --- a/packages/ast-spec/package.json +++ b/packages/ast-spec/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/ast-spec", - "version": "6.16.0", + "version": "6.17.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 fba54ba3697f..e452c96d54a3 100644 --- a/packages/eslint-plugin-internal/CHANGELOG.md +++ b/packages/eslint-plugin-internal/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [6.17.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.16.0...v6.17.0) (2024-01-01) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + + + + + # [6.16.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.15.0...v6.16.0) (2023-12-25) **Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal diff --git a/packages/eslint-plugin-internal/package.json b/packages/eslint-plugin-internal/package.json index 8a6e2c6f3ce5..a2c4fb58804a 100644 --- a/packages/eslint-plugin-internal/package.json +++ b/packages/eslint-plugin-internal/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin-internal", - "version": "6.16.0", + "version": "6.17.0", "private": true, "main": "dist/index.js", "scripts": { @@ -14,10 +14,10 @@ }, "dependencies": { "@prettier/sync": "*", - "@typescript-eslint/rule-tester": "6.16.0", - "@typescript-eslint/scope-manager": "6.16.0", - "@typescript-eslint/type-utils": "6.16.0", - "@typescript-eslint/utils": "6.16.0", + "@typescript-eslint/rule-tester": "6.17.0", + "@typescript-eslint/scope-manager": "6.17.0", + "@typescript-eslint/type-utils": "6.17.0", + "@typescript-eslint/utils": "6.17.0", "prettier": "^3.0.3" }, "devDependencies": { diff --git a/packages/eslint-plugin-tslint/CHANGELOG.md b/packages/eslint-plugin-tslint/CHANGELOG.md index d1ecc13c0dc1..f9e20c2cb5e1 100644 --- a/packages/eslint-plugin-tslint/CHANGELOG.md +++ b/packages/eslint-plugin-tslint/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [6.17.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.16.0...v6.17.0) (2024-01-01) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + + + + + # [6.16.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.15.0...v6.16.0) (2023-12-25) diff --git a/packages/eslint-plugin-tslint/package.json b/packages/eslint-plugin-tslint/package.json index 6ef15a53d070..5b18eb2e8c66 100644 --- a/packages/eslint-plugin-tslint/package.json +++ b/packages/eslint-plugin-tslint/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin-tslint", - "version": "6.16.0", + "version": "6.17.0", "main": "dist/index.js", "typings": "src/index.ts", "description": "ESLint plugin that wraps a TSLint configuration and lints the whole source using TSLint", @@ -46,7 +46,7 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/utils": "6.16.0" + "@typescript-eslint/utils": "6.17.0" }, "peerDependencies": { "eslint": "^7.0.0 || ^8.0.0", @@ -55,7 +55,7 @@ }, "devDependencies": { "@types/lodash": "*", - "@typescript-eslint/parser": "6.16.0", + "@typescript-eslint/parser": "6.17.0", "jest": "29.7.0", "prettier": "^3.0.3", "rimraf": "*" diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index 6f0f6f22246a..8f5bfa11420a 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/CHANGELOG.md @@ -3,6 +3,25 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [6.17.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.16.0...v6.17.0) (2024-01-01) + + +### Bug Fixes + +* **eslint-plugin:** [no-restricted-imports] prevent crash when `patterns` or `paths` in options are empty ([#8108](https://github.com/typescript-eslint/typescript-eslint/issues/8108)) ([675e987](https://github.com/typescript-eslint/typescript-eslint/commit/675e987ca1d13244c03d7e09d4e42c6539689d9a)) + + +### Features + +* **eslint-plugin:** [no-floating-promises] flag result of .map(async) ([#7897](https://github.com/typescript-eslint/typescript-eslint/issues/7897)) ([5857356](https://github.com/typescript-eslint/typescript-eslint/commit/5857356962060b19aa792bee778f9167ee54154b)) +* **eslint-plugin:** [switch-exhaustiveness-check] add an option to warn against a `default` case on an already exhaustive `switch` ([#7539](https://github.com/typescript-eslint/typescript-eslint/issues/7539)) ([6a219bd](https://github.com/typescript-eslint/typescript-eslint/commit/6a219bdfe6fcf86aae28158e0d855f87a8bac719)) + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + + + + + # [6.16.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.15.0...v6.16.0) (2023-12-25) diff --git a/packages/eslint-plugin/docs/rules/explicit-module-boundary-types.md b/packages/eslint-plugin/docs/rules/explicit-module-boundary-types.md index d70bc3b17d81..657f34152e4f 100644 --- a/packages/eslint-plugin/docs/rules/explicit-module-boundary-types.md +++ b/packages/eslint-plugin/docs/rules/explicit-module-boundary-types.md @@ -22,11 +22,6 @@ export function test() { return; } -// Should indicate that a number is returned -export default function () { - return 1; -} - // Should indicate that a string is returned export var arrowFn = () => 'test'; @@ -45,16 +40,11 @@ export class Test { ### ✅ Correct ```ts -// Function is not exported -function test() { +// A function with no return value (void) +export function test(): void { return; } -// A return value of type number -export var fn = function (): number { - return 1; -}; - // A return value of type string export var arrowFn = (): string => 'test'; @@ -62,12 +52,17 @@ export var arrowFn = (): string => 'test'; export var arrowFn = (arg: string): string => `test ${arg}`; export var arrowFn = (arg: unknown): string => `test ${arg}`; -// Class is not exported -class Test { - method() { +export class Test { + // A class method with no return value (void) + method(): void { return; } } + +// The function does not apply because it is not an exported function. +function test() { + return; +} ``` ## Options diff --git a/packages/eslint-plugin/docs/rules/no-floating-promises.md b/packages/eslint-plugin/docs/rules/no-floating-promises.md index c08216cd794e..e137a85aaf97 100644 --- a/packages/eslint-plugin/docs/rules/no-floating-promises.md +++ b/packages/eslint-plugin/docs/rules/no-floating-promises.md @@ -17,6 +17,13 @@ Valid ways of handling a Promise-valued statement include: - Calling its `.then()` with two arguments - Calling its `.catch()` with one argument +This rule also reports when an Array containing Promises is created and not properly handled. The main way to resolve this is by using one of the Promise concurrency methods to create a single Promise, then handling that according to the procedure above. These methods include: + +- `Promise.all()`, +- `Promise.allSettled()`, +- `Promise.any()` +- `Promise.race()` + :::tip `no-floating-promises` only detects unhandled Promise _statements_. See [`no-misused-promises`](./no-misused-promises.md) for detecting code that provides Promises to _logical_ locations such as if statements. @@ -40,6 +47,8 @@ returnsPromise().then(() => {}); Promise.reject('value').catch(); Promise.reject('value').finally(); + +[1, 2, 3].map(async x => x + 1); ``` ### ✅ Correct @@ -59,6 +68,8 @@ returnsPromise().then( Promise.reject('value').catch(() => {}); await Promise.reject('value').finally(() => {}); + +await Promise.all([1, 2, 3].map(async x => x + 1)); ``` ## Options @@ -106,3 +117,7 @@ You might consider using `void`s and/or [ESLint disable comments](https://eslint ## Related To - [`no-misused-promises`](./no-misused-promises.md) + +## Further Reading + +- ["Using Promises" MDN documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises). Note especially the sections on [Promise rejection events](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises#promise_rejection_events) and [Composition](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises#composition). diff --git a/packages/eslint-plugin/docs/rules/prefer-readonly-parameter-types.md b/packages/eslint-plugin/docs/rules/prefer-readonly-parameter-types.md index 0284cb96e436..6a5c29ea4cd2 100644 --- a/packages/eslint-plugin/docs/rules/prefer-readonly-parameter-types.md +++ b/packages/eslint-plugin/docs/rules/prefer-readonly-parameter-types.md @@ -57,7 +57,7 @@ interface Foo { interface Foo { new (arg: string[]): void; } -const x = { foo(arg: string[]): void; }; +const x = { foo(arg: string[]): void {} }; function foo(arg: string[]); type Foo = (arg: string[]) => void; interface Foo { @@ -91,7 +91,7 @@ interface CustomFunction { } function custom2(arg: CustomFunction) {} -function union(arg: readonly string[] | ReadonlyArray) {} +function union(arg: readonly string[] | ReadonlyArray) {} function primitive1(arg: string) {} function primitive2(arg: number) {} @@ -105,8 +105,11 @@ function primitive9(arg: string | number | undefined) {} function fnSig(arg: () => void) {} -enum Foo { a, b } -function enum(arg: Foo) {} +enum Foo { + a, + b, +} +function enumArg(arg: Foo) {} function symb1(arg: symbol) {} const customSymbol = Symbol('a'); @@ -119,7 +122,7 @@ interface Foo { interface Foo { new (arg: readonly string[]): void; } -const x = { foo(arg: readonly string[]): void; }; +const x = { foo(arg: readonly string[]): void {} }; function foo(arg: readonly string[]); type Foo = (arg: readonly string[]) => void; interface Foo { diff --git a/packages/eslint-plugin/docs/rules/switch-exhaustiveness-check.md b/packages/eslint-plugin/docs/rules/switch-exhaustiveness-check.md index b362e97e1cf3..b0cbaf1c47d4 100644 --- a/packages/eslint-plugin/docs/rules/switch-exhaustiveness-check.md +++ b/packages/eslint-plugin/docs/rules/switch-exhaustiveness-check.md @@ -6,12 +6,51 @@ description: 'Require switch-case statements to be exhaustive.' > > See **https://typescript-eslint.io/rules/switch-exhaustiveness-check** for documentation. -When working with union types or enums in TypeScript, it's common to want to write a `switch` statement intended to contain a `case` for each constituent (possible type in the union or the enum). +When working with union types or enums in TypeScript, it's common to want to write a `switch` statement intended to contain a `case` for each possible type in the union or the enum. However, if the union type or the enum changes, it's easy to forget to modify the cases to account for any new types. This rule reports when a `switch` statement over a value typed as a union of literals or as an enum is missing a case for any of those literal types and does not have a `default` clause. -There is also an option to check the exhaustiveness of switches on non-union types by requiring a default clause. +## Options + +### `"allowDefaultCaseForExhaustiveSwitch"` + +Defaults to true. If set to false, this rule will also report when a `switch` statement has a case for everything in a union and _also_ contains a `default` case. Thus, by setting this option to false, the rule becomes stricter. + +When a `switch` statement over a union type is exhaustive, a final `default` case would be a form of dead code. +Additionally, if a new value is added to the union type, a `default` would prevent the `switch-exhaustiveness-check` rule from reporting on the new case not being handled in the `switch` statement. + +#### `"allowDefaultCaseForExhaustiveSwitch"` Caveats + +It can sometimes be useful to include a redundant `default` case on an exhaustive `switch` statement if it's possible for values to have types not represented by the union type. +For example, in applications that can have version mismatches between clients and servers, it's possible for a server running a newer software version to send a value not recognized by the client's older typings. + +If your project has a small number of intentionally redundant `default` cases, you might want to use an [inline ESLint disable comment](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for each of them. + +If your project has many intentionally redundant `default` cases, you may want to disable `allowDefaultCaseForExhaustiveSwitch` and use the [`default-case` core ESLint rule](https://eslint.org/docs/latest/rules/default-case) along with [a `satisfies never` check](https://www.typescriptlang.org/play?#code/C4TwDgpgBAYgTgVwJbCgXigcgIZjAGwkygB8sAjbAO2u0wG4AoRgMwSoGNgkB7KqBAGcI8ZMAAULRCgBcsacACUcwcDhIqAcygBvRlCiCA7ig4ALKJIWLd+g1A7ZhWXASJy99+3AjAEcfhw8QgApZA4iJi8AX2YvR2dMShoaTA87Lx8-AIpaGjCkCIYMqFiSgBMIFmwEfGB0rwMpMUNsbkEWJAhBKCoIADcIOCjGrP9A9gBrKh4jKgKikYNY5cZYoA). + +### `requireDefaultForNonUnion` + +Defaults to false. It set to true, this rule will also report when a `switch` statement switches over a non-union type (like a `number` or `string`, for example) and that `switch` statement does not have a `default` case. Thus, by setting this option to true, the rule becomes stricter. + +This is generally desirable so that `number` and `string` switches will be subject to the same exhaustive checks that your other switches are. + +Examples of additional **incorrect** code for this rule with `{ requireDefaultForNonUnion: true }`: + +```ts option='{ "requireDefaultForNonUnion": true }' showPlaygroundButton +const value: number = Math.floor(Math.random() * 3); + +switch (value) { + case 0: + return 0; + case 1: + return 1; +} +``` + +Since `value` is a non-union type it requires the switch case to have a default clause only with `requireDefaultForNonUnion` enabled. + + ## Examples @@ -181,27 +220,6 @@ switch (fruit) { -## Options - -### `requireDefaultForNonUnion` - -Examples of additional **incorrect** code for this rule with `{ requireDefaultForNonUnion: true }`: - -```ts option='{ "requireDefaultForNonUnion": true }' showPlaygroundButton -const value: number = Math.floor(Math.random() * 3); - -switch (value) { - case 0: - return 0; - case 1: - return 1; -} -``` - -Since `value` is a non-union type it requires the switch case to have a default clause only with `requireDefaultForNonUnion` enabled. - - - ## When Not To Use It If you don't frequently `switch` over union types or enums with many parts, or intentionally wish to leave out some parts, this rule may not be for you. diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 76736528ac66..b8fe0b32ea5d 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin", - "version": "6.16.0", + "version": "6.17.0", "description": "TypeScript plugin for ESLint", "files": [ "dist", @@ -57,10 +57,10 @@ }, "dependencies": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.16.0", - "@typescript-eslint/type-utils": "6.16.0", - "@typescript-eslint/utils": "6.16.0", - "@typescript-eslint/visitor-keys": "6.16.0", + "@typescript-eslint/scope-manager": "6.17.0", + "@typescript-eslint/type-utils": "6.17.0", + "@typescript-eslint/utils": "6.17.0", + "@typescript-eslint/visitor-keys": "6.17.0", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.4", @@ -73,8 +73,8 @@ "@types/debug": "*", "@types/marked": "*", "@types/natural-compare": "*", - "@typescript-eslint/rule-schema-to-typescript-types": "6.16.0", - "@typescript-eslint/rule-tester": "6.16.0", + "@typescript-eslint/rule-schema-to-typescript-types": "6.17.0", + "@typescript-eslint/rule-tester": "6.17.0", "ajv": "^6.12.6", "chalk": "^5.3.0", "cross-fetch": "*", diff --git a/packages/eslint-plugin/src/rules/no-floating-promises.ts b/packages/eslint-plugin/src/rules/no-floating-promises.ts index 9c1e9f785c18..b3ac65296992 100644 --- a/packages/eslint-plugin/src/rules/no-floating-promises.ts +++ b/packages/eslint-plugin/src/rules/no-floating-promises.ts @@ -23,7 +23,9 @@ type MessageId = | 'floatingUselessRejectionHandler' | 'floatingUselessRejectionHandlerVoid' | 'floatingFixAwait' - | 'floatingFixVoid'; + | 'floatingFixVoid' + | 'floatingPromiseArray' + | 'floatingPromiseArrayVoid'; const messageBase = 'Promises must be awaited, end with a call to .catch, or end with a call to .then with a rejection handler.'; @@ -35,6 +37,13 @@ const messageBaseVoid = const messageRejectionHandler = 'A rejection handler that is not a function will be ignored.'; +const messagePromiseArray = + "An array of Promises may be unintentional. Consider handling the promises' fulfillment or rejection with Promise.all or similar."; + +const messagePromiseArrayVoid = + "An array of Promises may be unintentional. Consider handling the promises' fulfillment or rejection with Promise.all or similar," + + ' or explicitly marking the expression as ignored with the `void` operator.'; + export default createRule({ name: 'no-floating-promises', meta: { @@ -54,6 +63,8 @@ export default createRule({ messageBase + ' ' + messageRejectionHandler, floatingUselessRejectionHandlerVoid: messageBaseVoid + ' ' + messageRejectionHandler, + floatingPromiseArray: messagePromiseArray, + floatingPromiseArrayVoid: messagePromiseArrayVoid, }, schema: [ { @@ -97,13 +108,18 @@ export default createRule({ expression = expression.expression; } - const { isUnhandled, nonFunctionHandler } = isUnhandledPromise( - checker, - expression, - ); + const { isUnhandled, nonFunctionHandler, promiseArray } = + isUnhandledPromise(checker, expression); if (isUnhandled) { - if (options.ignoreVoid) { + if (promiseArray) { + context.report({ + node, + messageId: options.ignoreVoid + ? 'floatingPromiseArrayVoid' + : 'floatingPromiseArray', + }); + } else if (options.ignoreVoid) { context.report({ node, messageId: nonFunctionHandler @@ -205,7 +221,11 @@ export default createRule({ function isUnhandledPromise( checker: ts.TypeChecker, node: TSESTree.Node, - ): { isUnhandled: boolean; nonFunctionHandler?: boolean } { + ): { + isUnhandled: boolean; + nonFunctionHandler?: boolean; + promiseArray?: boolean; + } { // First, check expressions whose resulting types may not be promise-like if (node.type === AST_NODE_TYPES.SequenceExpression) { // Any child in a comma expression could return a potentially unhandled @@ -228,8 +248,16 @@ export default createRule({ return isUnhandledPromise(checker, node.argument); } + const tsNode = services.esTreeNodeToTSNodeMap.get(node); + // Check the type. At this point it can't be unhandled if it isn't a promise - if (!isPromiseLike(checker, services.esTreeNodeToTSNodeMap.get(node))) { + // or array thereof. + + if (isPromiseArray(checker, tsNode)) { + return { isUnhandled: true, promiseArray: true }; + } + + if (!isPromiseLike(checker, tsNode)) { return { isUnhandled: false }; } @@ -295,12 +323,39 @@ export default createRule({ }, }); +function isPromiseArray(checker: ts.TypeChecker, node: ts.Node): boolean { + const type = checker.getTypeAtLocation(node); + for (const ty of tsutils + .unionTypeParts(type) + .map(t => checker.getApparentType(t))) { + if (checker.isArrayType(ty)) { + const arrayType = checker.getTypeArguments(ty)[0]; + if (isPromiseLike(checker, node, arrayType)) { + return true; + } + } + + if (checker.isTupleType(ty)) { + for (const tupleElementType of checker.getTypeArguments(ty)) { + if (isPromiseLike(checker, node, tupleElementType)) { + return true; + } + } + } + } + return false; +} + // Modified from tsutils.isThenable() to only consider thenables which can be // rejected/caught via a second parameter. Original source (MIT licensed): // // https://github.com/ajafff/tsutils/blob/49d0d31050b44b81e918eae4fbaf1dfe7b7286af/util/type.ts#L95-L125 -function isPromiseLike(checker: ts.TypeChecker, node: ts.Node): boolean { - const type = checker.getTypeAtLocation(node); +function isPromiseLike( + checker: ts.TypeChecker, + node: ts.Node, + type?: ts.Type, +): boolean { + type ??= checker.getTypeAtLocation(node); for (const ty of tsutils.unionTypeParts(checker.getApparentType(type))) { const then = ty.getProperty('then'); if (then === undefined) { diff --git a/packages/eslint-plugin/src/rules/no-restricted-imports.ts b/packages/eslint-plugin/src/rules/no-restricted-imports.ts index 1fbd584a1206..b1e2d229f6a7 100644 --- a/packages/eslint-plugin/src/rules/no-restricted-imports.ts +++ b/packages/eslint-plugin/src/rules/no-restricted-imports.ts @@ -8,6 +8,7 @@ import type { import type { ArrayOfStringOrObject, ArrayOfStringOrObjectPatterns, + RuleListener, } from 'eslint/lib/rules/no-restricted-imports'; import type { Ignore } from 'ignore'; import ignore from 'ignore'; @@ -211,6 +212,21 @@ function getRestrictedPatterns( return []; } +function shouldCreateRule( + baseRules: RuleListener, + options: Options, +): baseRules is Exclude> { + if (Object.keys(baseRules).length === 0 || options.length === 0) { + return false; + } + + if (!isOptionsArrayOfStringOrObject(options)) { + return !!(options[0].paths?.length || options[0].patterns?.length); + } + + return true; +} + export default createRule({ name: 'no-restricted-imports', meta: { @@ -228,7 +244,7 @@ export default createRule({ const rules = baseRule.create(context); const { options } = context; - if (options.length === 0) { + if (!shouldCreateRule(rules, options)) { return {}; } diff --git a/packages/eslint-plugin/src/rules/switch-exhaustiveness-check.ts b/packages/eslint-plugin/src/rules/switch-exhaustiveness-check.ts index 90172006589c..64ab5ef6b2e2 100644 --- a/packages/eslint-plugin/src/rules/switch-exhaustiveness-check.ts +++ b/packages/eslint-plugin/src/rules/switch-exhaustiveness-check.ts @@ -12,9 +12,22 @@ import { requiresQuoting, } from '../util'; -type MessageIds = 'switchIsNotExhaustive' | 'addMissingCases'; +interface SwitchMetadata { + readonly symbolName: string | undefined; + readonly missingBranchTypes: ts.Type[]; + readonly defaultCase: TSESTree.SwitchCase | undefined; + readonly isUnion: boolean; +} + type Options = [ { + /** + * If `true`, allow `default` cases on switch statements with exhaustive cases. + * + * @default true + */ + allowDefaultCaseForExhaustiveSwitch?: boolean; + /** * If `true`, require a `default` clause for switches on non-union types. * @@ -24,6 +37,11 @@ type Options = [ }, ]; +type MessageIds = + | 'switchIsNotExhaustive' + | 'dangerousDefaultCase' + | 'addMissingCases'; + export default createRule({ name: 'switch-exhaustiveness-check', meta: { @@ -36,28 +54,132 @@ export default createRule({ schema: [ { type: 'object', - additionalProperties: false, properties: { + allowDefaultCaseForExhaustiveSwitch: { + description: `If 'true', allow 'default' cases on switch statements with exhaustive cases.`, + type: 'boolean', + }, requireDefaultForNonUnion: { description: `If 'true', require a 'default' clause for switches on non-union types.`, type: 'boolean', }, }, + additionalProperties: false, }, ], messages: { switchIsNotExhaustive: 'Switch is not exhaustive. Cases not matched: {{missingBranches}}', + dangerousDefaultCase: + 'The switch statement is exhaustive, so the default case is unnecessary.', addMissingCases: 'Add branches for missing cases.', }, }, - defaultOptions: [{ requireDefaultForNonUnion: false }], - create(context, [{ requireDefaultForNonUnion }]) { + defaultOptions: [ + { + allowDefaultCaseForExhaustiveSwitch: true, + requireDefaultForNonUnion: false, + }, + ], + create( + context, + [{ allowDefaultCaseForExhaustiveSwitch, requireDefaultForNonUnion }], + ) { const sourceCode = getSourceCode(context); const services = getParserServices(context); const checker = services.program.getTypeChecker(); const compilerOptions = services.program.getCompilerOptions(); + function getSwitchMetadata(node: TSESTree.SwitchStatement): SwitchMetadata { + const defaultCase = node.cases.find( + switchCase => switchCase.test == null, + ); + + const discriminantType = getConstrainedTypeAtLocation( + services, + node.discriminant, + ); + + const symbolName = discriminantType.getSymbol()?.escapedName as + | string + | undefined; + + if (!discriminantType.isUnion()) { + return { + symbolName, + missingBranchTypes: [], + defaultCase, + isUnion: false, + }; + } + + const caseTypes = new Set(); + for (const switchCase of node.cases) { + // If the `test` property of the switch case is `null`, then we are on a + // `default` case. + if (switchCase.test == null) { + continue; + } + + const caseType = getConstrainedTypeAtLocation( + services, + switchCase.test, + ); + caseTypes.add(caseType); + } + + const unionTypes = tsutils.unionTypeParts(discriminantType); + const missingBranchTypes = unionTypes.filter( + unionType => !caseTypes.has(unionType), + ); + + return { + symbolName, + missingBranchTypes, + defaultCase, + isUnion: true, + }; + } + + function checkSwitchExhaustive( + node: TSESTree.SwitchStatement, + switchMetadata: SwitchMetadata, + ): void { + const { missingBranchTypes, symbolName, defaultCase } = switchMetadata; + + // We only trigger the rule if a `default` case does not exist, since that + // would disqualify the switch statement from having cases that exactly + // match the members of a union. + if (missingBranchTypes.length > 0 && defaultCase === undefined) { + context.report({ + node: node.discriminant, + messageId: 'switchIsNotExhaustive', + data: { + missingBranches: missingBranchTypes + .map(missingType => + tsutils.isTypeFlagSet(missingType, ts.TypeFlags.ESSymbolLike) + ? `typeof ${missingType.getSymbol()?.escapedName as string}` + : checker.typeToString(missingType), + ) + .join(' | '), + }, + suggest: [ + { + messageId: 'addMissingCases', + fix(fixer): TSESLint.RuleFix | null { + return fixSwitch( + fixer, + node, + missingBranchTypes, + symbolName?.toString(), + ); + }, + }, + ], + }); + } + } + function fixSwitch( fixer: TSESLint.RuleFixer, node: TSESTree.SwitchStatement, @@ -68,8 +190,8 @@ export default createRule({ node.cases.length > 0 ? node.cases[node.cases.length - 1] : null; const caseIndent = lastCase ? ' '.repeat(lastCase.loc.start.column) - : // if there are no cases, use indentation of the switch statement - // and leave it to user to format it correctly + : // If there are no cases, use indentation of the switch statement and + // leave it to the user to format it correctly. ' '.repeat(node.loc.start.column); const missingCases = []; @@ -78,14 +200,17 @@ export default createRule({ missingCases.push(`default: { throw new Error('default case') }`); continue; } - // While running this rule on checker.ts of TypeScript project + + // While running this rule on the "checker.ts" file of TypeScript, the // the fix introduced a compiler error due to: // + // ```ts // type __String = (string & { - // __escapedIdentifier: void; - // }) | (void & { - // __escapedIdentifier: void; - // }) | InternalSymbolName; + // __escapedIdentifier: void; + // }) | (void & { + // __escapedIdentifier: void; + // }) | InternalSymbolName; + // ``` // // The following check fixes it. if (missingBranchType.isIntersection()) { @@ -124,7 +249,7 @@ export default createRule({ return fixer.insertTextAfter(lastCase, `\n${fixString}`); } - // there were no existing cases + // There were no existing cases. const openingBrace = sourceCode.getTokenAfter( node.discriminant, isOpeningBraceToken, @@ -140,89 +265,60 @@ export default createRule({ ); } - function checkSwitchExhaustive(node: TSESTree.SwitchStatement): void { - const discriminantType = getConstrainedTypeAtLocation( - services, - node.discriminant, - ); - const symbolName = discriminantType.getSymbol()?.escapedName; - - if (discriminantType.isUnion()) { - const unionTypes = tsutils.unionTypeParts(discriminantType); - const caseTypes = new Set(); - for (const switchCase of node.cases) { - if (switchCase.test == null) { - // Switch has 'default' branch - do nothing. - return; - } - - caseTypes.add( - getConstrainedTypeAtLocation(services, switchCase.test), - ); - } + function checkSwitchUnnecessaryDefaultCase( + switchMetadata: SwitchMetadata, + ): void { + if (allowDefaultCaseForExhaustiveSwitch) { + return; + } - const missingBranchTypes = unionTypes.filter( - unionType => !caseTypes.has(unionType), - ); + const { missingBranchTypes, defaultCase } = switchMetadata; - if (missingBranchTypes.length === 0) { - // All cases matched - do nothing. - return; - } + if (missingBranchTypes.length === 0 && defaultCase !== undefined) { + context.report({ + node: defaultCase, + messageId: 'dangerousDefaultCase', + }); + } + } + function checkSwitchNoUnionDefaultCase( + node: TSESTree.SwitchStatement, + switchMetadata: SwitchMetadata, + ): void { + if (!requireDefaultForNonUnion) { + return; + } + + const { isUnion, defaultCase } = switchMetadata; + + if (!isUnion && defaultCase === undefined) { context.report({ node: node.discriminant, messageId: 'switchIsNotExhaustive', data: { - missingBranches: missingBranchTypes - .map(missingType => - tsutils.isTypeFlagSet(missingType, ts.TypeFlags.ESSymbolLike) - ? `typeof ${missingType.getSymbol()?.escapedName as string}` - : checker.typeToString(missingType), - ) - .join(' | '), + missingBranches: 'default', }, suggest: [ { messageId: 'addMissingCases', fix(fixer): TSESLint.RuleFix { - return fixSwitch( - fixer, - node, - missingBranchTypes, - symbolName?.toString(), - ); + return fixSwitch(fixer, node, [null]); }, }, ], }); - } else if (requireDefaultForNonUnion) { - const hasDefault = node.cases.some( - switchCase => switchCase.test == null, - ); - - if (!hasDefault) { - context.report({ - node: node.discriminant, - messageId: 'switchIsNotExhaustive', - data: { - missingBranches: 'default', - }, - suggest: [ - { - messageId: 'addMissingCases', - fix(fixer): TSESLint.RuleFix { - return fixSwitch(fixer, node, [null]); - }, - }, - ], - }); - } } } return { - SwitchStatement: checkSwitchExhaustive, + SwitchStatement(node): void { + const switchMetadata = getSwitchMetadata(node); + + checkSwitchExhaustive(node, switchMetadata); + checkSwitchUnnecessaryDefaultCase(switchMetadata); + checkSwitchNoUnionDefaultCase(node, switchMetadata); + }, }; }, }); diff --git a/packages/eslint-plugin/tests/rules/no-floating-promises.test.ts b/packages/eslint-plugin/tests/rules/no-floating-promises.test.ts index c89e4316dd94..434c9735a46d 100644 --- a/packages/eslint-plugin/tests/rules/no-floating-promises.test.ts +++ b/packages/eslint-plugin/tests/rules/no-floating-promises.test.ts @@ -222,7 +222,7 @@ async function test() { ` async function test() { class Thenable { - then(callback: () => {}): Thenable { + then(callback: () => void): Thenable { return new Thenable(); } } @@ -264,7 +264,7 @@ async function test() { ` async function test() { class CatchableThenable { - then(callback: () => {}, callback: () => {}): CatchableThenable { + then(callback: () => void, callback: () => void): CatchableThenable { return new CatchableThenable(); } } @@ -475,6 +475,35 @@ Promise.reject() .finally(() => {}); `, }, + { + code: ` +await Promise.all([Promise.resolve(), Promise.resolve()]); + `, + }, + { + code: ` +declare const promiseArray: Array>; +void promiseArray; + `, + }, + { + code: ` +[Promise.reject(), Promise.reject()].then(() => {}); + `, + }, + { + // Expressions aren't checked by this rule, so this just becomes an array + // of number | undefined, which is fine regardless of the ignoreVoid setting. + code: ` +[1, 2, void Promise.reject(), 3]; + `, + options: [{ ignoreVoid: false }], + }, + { + code: ` +['I', 'am', 'just', 'an', 'array']; + `, + }, ], invalid: [ @@ -997,7 +1026,7 @@ async function test() { code: ` async function test() { class CatchableThenable { - then(callback: () => {}, callback: () => {}): CatchableThenable { + then(callback: () => void, callback: () => void): CatchableThenable { return new CatchableThenable(); } } @@ -1651,5 +1680,131 @@ Promise.reject(new Error('message')).finally(() => {}); `, errors: [{ line: 2, messageId: 'floatingVoid' }], }, + { + code: ` +function _>>( + maybePromiseArray: S | undefined, +): void { + maybePromiseArray?.[0]; +} + `, + errors: [{ line: 5, messageId: 'floatingVoid' }], + }, + { + code: ` +[1, 2, 3].map(() => Promise.reject()); + `, + errors: [{ line: 2, messageId: 'floatingPromiseArrayVoid' }], + }, + { + code: ` +declare const array: unknown[]; +array.map(() => Promise.reject()); + `, + errors: [{ line: 3, messageId: 'floatingPromiseArrayVoid' }], + }, + { + code: ` +declare const promiseArray: Array>; +void promiseArray; + `, + options: [{ ignoreVoid: false }], + errors: [{ line: 3, messageId: 'floatingPromiseArray' }], + }, + { + code: ` +[1, 2, Promise.reject(), 3]; + `, + errors: [{ line: 2, messageId: 'floatingPromiseArrayVoid' }], + }, + { + code: ` +[1, 2, Promise.reject().catch(() => {}), 3]; + `, + errors: [{ line: 2, messageId: 'floatingPromiseArrayVoid' }], + }, + { + code: ` +const data = ['test']; +data.map(async () => { + await new Promise((_res, rej) => setTimeout(rej, 1000)); +}); + `, + errors: [{ line: 3, messageId: 'floatingPromiseArrayVoid' }], + }, + { + code: ` +function _>>>( + maybePromiseArrayArray: S | undefined, +): void { + maybePromiseArrayArray?.[0]; +} + `, + errors: [{ line: 5, messageId: 'floatingPromiseArrayVoid' }], + }, + { + code: ` +function f>>(a: T): void { + a; +} + `, + errors: [{ line: 3, messageId: 'floatingPromiseArrayVoid' }], + }, + { + code: ` +declare const a: Array> | undefined; +a; + `, + errors: [{ line: 3, messageId: 'floatingPromiseArrayVoid' }], + }, + { + code: ` +function f>>(a: T | undefined): void { + a; +} + `, + errors: [{ line: 3, messageId: 'floatingPromiseArrayVoid' }], + }, + { + code: ` +[Promise.reject()] as const; + `, + errors: [{ line: 2, messageId: 'floatingPromiseArrayVoid' }], + }, + { + code: ` +declare function cursed(): [Promise, Promise]; +cursed(); + `, + errors: [{ line: 3, messageId: 'floatingPromiseArrayVoid' }], + }, + { + code: ` +[ + 'Type Argument number ', + 1, + 'is not', + Promise.resolve(), + 'but it still is flagged', +] as const; + `, + errors: [{ line: 2, messageId: 'floatingPromiseArrayVoid' }], + }, + { + code: ` + declare const arrayOrPromiseTuple: + | Array + | [number, number, Promise, string]; + arrayOrPromiseTuple; + `, + errors: [{ line: 5, messageId: 'floatingPromiseArrayVoid' }], + }, + { + code: ` + declare const okArrayOrPromiseArray: Array | Array>; + okArrayOrPromiseArray; + `, + errors: [{ line: 3, messageId: 'floatingPromiseArrayVoid' }], + }, ], }); diff --git a/packages/eslint-plugin/tests/rules/no-restricted-imports.test.ts b/packages/eslint-plugin/tests/rules/no-restricted-imports.test.ts index fcbdcd625caa..0345cfa17eca 100644 --- a/packages/eslint-plugin/tests/rules/no-restricted-imports.test.ts +++ b/packages/eslint-plugin/tests/rules/no-restricted-imports.test.ts @@ -322,6 +322,35 @@ import type { foo } from 'import2/private/bar'; }, ], }, + { + code: "import foo from 'foo';", + options: [], + }, + { + code: "import foo from 'foo';", + options: [ + { + paths: [], + }, + ], + }, + { + code: "import foo from 'foo';", + options: [ + { + patterns: [], + }, + ], + }, + { + code: "import foo from 'foo';", + options: [ + { + paths: [], + patterns: [], + }, + ], + }, ], invalid: [ { diff --git a/packages/eslint-plugin/tests/rules/switch-exhaustiveness-check.test.ts b/packages/eslint-plugin/tests/rules/switch-exhaustiveness-check.test.ts index cf7f67917535..9a06ace1e0a9 100644 --- a/packages/eslint-plugin/tests/rules/switch-exhaustiveness-check.test.ts +++ b/packages/eslint-plugin/tests/rules/switch-exhaustiveness-check.test.ts @@ -222,7 +222,12 @@ switch (value) { return -1; } `, - options: [{ requireDefaultForNonUnion: true }], + options: [ + { + allowDefaultCaseForExhaustiveSwitch: true, + requireDefaultForNonUnion: true, + }, + ], }, ], invalid: [ @@ -627,7 +632,12 @@ switch (value) { return 1; } `, - options: [{ requireDefaultForNonUnion: true }], + options: [ + { + allowDefaultCaseForExhaustiveSwitch: true, + requireDefaultForNonUnion: true, + }, + ], errors: [ { messageId: 'switchIsNotExhaustive', @@ -724,5 +734,34 @@ switch (value) { }, ], }, + { + code: ` +type MyUnion = 'foo' | 'bar' | 'baz'; + +declare const myUnion: MyUnion; + +switch (myUnion) { + case 'foo': + case 'bar': + case 'baz': { + break; + } + default: { + break; + } +} + `, + options: [ + { + allowDefaultCaseForExhaustiveSwitch: false, + requireDefaultForNonUnion: false, + }, + ], + errors: [ + { + messageId: 'dangerousDefaultCase', + }, + ], + }, ], }); diff --git a/packages/eslint-plugin/tests/schema-snapshots/switch-exhaustiveness-check.shot b/packages/eslint-plugin/tests/schema-snapshots/switch-exhaustiveness-check.shot index 10996a21371f..6146dadc128b 100644 --- a/packages/eslint-plugin/tests/schema-snapshots/switch-exhaustiveness-check.shot +++ b/packages/eslint-plugin/tests/schema-snapshots/switch-exhaustiveness-check.shot @@ -8,6 +8,10 @@ exports[`Rule schemas should be convertible to TS types for documentation purpos { "additionalProperties": false, "properties": { + "allowDefaultCaseForExhaustiveSwitch": { + "description": "If 'true', allow 'default' cases on switch statements with exhaustive cases.", + "type": "boolean" + }, "requireDefaultForNonUnion": { "description": "If 'true', require a 'default' clause for switches on non-union types.", "type": "boolean" @@ -22,6 +26,8 @@ exports[`Rule schemas should be convertible to TS types for documentation purpos type Options = [ { + /** If 'true', allow 'default' cases on switch statements with exhaustive cases. */ + allowDefaultCaseForExhaustiveSwitch?: boolean; /** If 'true', require a 'default' clause for switches on non-union types. */ requireDefaultForNonUnion?: boolean; }, diff --git a/packages/eslint-plugin/typings/eslint-rules.d.ts b/packages/eslint-plugin/typings/eslint-rules.d.ts index 4490df6104be..5d301e04f2b6 100644 --- a/packages/eslint-plugin/typings/eslint-rules.d.ts +++ b/packages/eslint-plugin/typings/eslint-rules.d.ts @@ -1057,6 +1057,13 @@ declare module 'eslint/lib/rules/no-restricted-imports' { allowTypeImports?: boolean; }[] | string[]; + export type RuleListener = + | Record + | { + ImportDeclaration(node: TSESTree.ImportDeclaration): void; + ExportNamedDeclaration(node: TSESTree.ExportNamedDeclaration): void; + ExportAllDeclaration(node: TSESTree.ExportAllDeclaration): void; + }; } interface ObjectOfPathsAndPatterns { @@ -1074,11 +1081,7 @@ declare module 'eslint/lib/rules/no-restricted-imports' { | 'patterns' | 'patternWithCustomMessage', rule.ArrayOfStringOrObject | [ObjectOfPathsAndPatterns], - { - ImportDeclaration(node: TSESTree.ImportDeclaration): void; - ExportNamedDeclaration(node: TSESTree.ExportNamedDeclaration): void; - ExportAllDeclaration(node: TSESTree.ExportAllDeclaration): void; - } + rule.RuleListener >; export = rule; } diff --git a/packages/integration-tests/CHANGELOG.md b/packages/integration-tests/CHANGELOG.md index 9c16bcbac10d..ad94b7eea97a 100644 --- a/packages/integration-tests/CHANGELOG.md +++ b/packages/integration-tests/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [6.17.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.16.0...v6.17.0) (2024-01-01) + +**Note:** Version bump only for package @typescript-eslint/integration-tests + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + + + + + # [6.16.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.15.0...v6.16.0) (2023-12-25) **Note:** Version bump only for package @typescript-eslint/integration-tests diff --git a/packages/integration-tests/package.json b/packages/integration-tests/package.json index d83b7b4ec82e..1d10ec6d99d7 100644 --- a/packages/integration-tests/package.json +++ b/packages/integration-tests/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/integration-tests", - "version": "6.16.0", + "version": "6.17.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 af2fd6d22433..2e2a279c0b8a 100644 --- a/packages/parser/CHANGELOG.md +++ b/packages/parser/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [6.17.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.16.0...v6.17.0) (2024-01-01) + +**Note:** Version bump only for package @typescript-eslint/parser + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + + + + + # [6.16.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.15.0...v6.16.0) (2023-12-25) **Note:** Version bump only for package @typescript-eslint/parser diff --git a/packages/parser/package.json b/packages/parser/package.json index 051b0cf3cb88..0e5e0128f5d8 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/parser", - "version": "6.16.0", + "version": "6.17.0", "description": "An ESLint custom parser which leverages TypeScript ESTree", "files": [ "dist", @@ -51,10 +51,10 @@ "eslint": "^7.0.0 || ^8.0.0" }, "dependencies": { - "@typescript-eslint/scope-manager": "6.16.0", - "@typescript-eslint/types": "6.16.0", - "@typescript-eslint/typescript-estree": "6.16.0", - "@typescript-eslint/visitor-keys": "6.16.0", + "@typescript-eslint/scope-manager": "6.17.0", + "@typescript-eslint/types": "6.17.0", + "@typescript-eslint/typescript-estree": "6.17.0", + "@typescript-eslint/visitor-keys": "6.17.0", "debug": "^4.3.4" }, "devDependencies": { diff --git a/packages/repo-tools/CHANGELOG.md b/packages/repo-tools/CHANGELOG.md index ac3afffa5d55..e027a361df76 100644 --- a/packages/repo-tools/CHANGELOG.md +++ b/packages/repo-tools/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [6.17.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.16.0...v6.17.0) (2024-01-01) + +**Note:** Version bump only for package @typescript-eslint/repo-tools + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + + + + + # [6.16.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.15.0...v6.16.0) (2023-12-25) **Note:** Version bump only for package @typescript-eslint/repo-tools diff --git a/packages/repo-tools/package.json b/packages/repo-tools/package.json index a38da67822ce..06869c00d9ca 100644 --- a/packages/repo-tools/package.json +++ b/packages/repo-tools/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/repo-tools", - "version": "6.16.0", + "version": "6.17.0", "private": true, "scripts": { "//": "NOTE: intentionally no build step in this package", diff --git a/packages/rule-schema-to-typescript-types/CHANGELOG.md b/packages/rule-schema-to-typescript-types/CHANGELOG.md index 537180f63c35..fa11ee9cfbe6 100644 --- a/packages/rule-schema-to-typescript-types/CHANGELOG.md +++ b/packages/rule-schema-to-typescript-types/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [6.17.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.16.0...v6.17.0) (2024-01-01) + +**Note:** Version bump only for package @typescript-eslint/rule-schema-to-typescript-types + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + + + + + # [6.16.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.15.0...v6.16.0) (2023-12-25) **Note:** Version bump only for package @typescript-eslint/rule-schema-to-typescript-types diff --git a/packages/rule-schema-to-typescript-types/package.json b/packages/rule-schema-to-typescript-types/package.json index 216208cfcf03..3101a2421926 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": "6.16.0", + "version": "6.17.0", "private": true, "type": "commonjs", "exports": { @@ -34,8 +34,8 @@ }, "dependencies": { "@prettier/sync": "*", - "@typescript-eslint/type-utils": "6.16.0", - "@typescript-eslint/utils": "6.16.0", + "@typescript-eslint/type-utils": "6.17.0", + "@typescript-eslint/utils": "6.17.0", "natural-compare": "^1.4.0", "prettier": "^3.0.3" }, diff --git a/packages/rule-tester/CHANGELOG.md b/packages/rule-tester/CHANGELOG.md index da6d8ee1e1b8..2da077b38b5c 100644 --- a/packages/rule-tester/CHANGELOG.md +++ b/packages/rule-tester/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [6.17.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.16.0...v6.17.0) (2024-01-01) + +**Note:** Version bump only for package @typescript-eslint/rule-tester + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + + + + + # [6.16.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.15.0...v6.16.0) (2023-12-25) **Note:** Version bump only for package @typescript-eslint/rule-tester diff --git a/packages/rule-tester/package.json b/packages/rule-tester/package.json index 6f73acebe9ba..bd5ce69952ce 100644 --- a/packages/rule-tester/package.json +++ b/packages/rule-tester/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/rule-tester", - "version": "6.16.0", + "version": "6.17.0", "description": "Tooling to test ESLint rules", "files": [ "dist", @@ -47,8 +47,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": "6.16.0", - "@typescript-eslint/utils": "6.16.0", + "@typescript-eslint/typescript-estree": "6.17.0", + "@typescript-eslint/utils": "6.17.0", "ajv": "^6.10.0", "lodash.merge": "4.6.2", "semver": "^7.5.4" @@ -59,7 +59,7 @@ }, "devDependencies": { "@types/lodash.merge": "4.6.9", - "@typescript-eslint/parser": "6.16.0", + "@typescript-eslint/parser": "6.17.0", "chai": "^4.3.7", "mocha": "^10.0.0", "sinon": "^16.0.0", diff --git a/packages/scope-manager/CHANGELOG.md b/packages/scope-manager/CHANGELOG.md index 9ee5cdc13c0a..01d2c029f3d6 100644 --- a/packages/scope-manager/CHANGELOG.md +++ b/packages/scope-manager/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [6.17.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.16.0...v6.17.0) (2024-01-01) + +**Note:** Version bump only for package @typescript-eslint/scope-manager + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + + + + + # [6.16.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.15.0...v6.16.0) (2023-12-25) **Note:** Version bump only for package @typescript-eslint/scope-manager diff --git a/packages/scope-manager/package.json b/packages/scope-manager/package.json index 3d93b985807d..5eb2879ddb3c 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/scope-manager", - "version": "6.16.0", + "version": "6.17.0", "description": "TypeScript scope analyser for ESLint", "files": [ "dist", @@ -44,13 +44,13 @@ "typecheck": "npx nx typecheck" }, "dependencies": { - "@typescript-eslint/types": "6.16.0", - "@typescript-eslint/visitor-keys": "6.16.0" + "@typescript-eslint/types": "6.17.0", + "@typescript-eslint/visitor-keys": "6.17.0" }, "devDependencies": { "@prettier/sync": "*", "@types/glob": "*", - "@typescript-eslint/typescript-estree": "6.16.0", + "@typescript-eslint/typescript-estree": "6.17.0", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/type-utils/CHANGELOG.md b/packages/type-utils/CHANGELOG.md index 50c8a16235b0..a3a05045ea0d 100644 --- a/packages/type-utils/CHANGELOG.md +++ b/packages/type-utils/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [6.17.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.16.0...v6.17.0) (2024-01-01) + +**Note:** Version bump only for package @typescript-eslint/type-utils + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + + + + + # [6.16.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.15.0...v6.16.0) (2023-12-25) **Note:** Version bump only for package @typescript-eslint/type-utils diff --git a/packages/type-utils/package.json b/packages/type-utils/package.json index 3c7f7e277e76..e70770f8946c 100644 --- a/packages/type-utils/package.json +++ b/packages/type-utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/type-utils", - "version": "6.16.0", + "version": "6.17.0", "description": "Type utilities for working with TypeScript + ESLint together", "files": [ "dist", @@ -45,13 +45,13 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/typescript-estree": "6.16.0", - "@typescript-eslint/utils": "6.16.0", + "@typescript-eslint/typescript-estree": "6.17.0", + "@typescript-eslint/utils": "6.17.0", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" }, "devDependencies": { - "@typescript-eslint/parser": "6.16.0", + "@typescript-eslint/parser": "6.17.0", "ajv": "^6.10.0", "downlevel-dts": "*", "jest": "29.7.0", diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index fac93ffca4a3..b99fbeda9304 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [6.17.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.16.0...v6.17.0) (2024-01-01) + +**Note:** Version bump only for package @typescript-eslint/types + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + + + + + # [6.16.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.15.0...v6.16.0) (2023-12-25) **Note:** Version bump only for package @typescript-eslint/types diff --git a/packages/types/package.json b/packages/types/package.json index 2efea815928e..8ba3a83ea1a9 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/types", - "version": "6.16.0", + "version": "6.17.0", "description": "Types for the TypeScript-ESTree AST spec", "files": [ "dist", diff --git a/packages/typescript-estree/CHANGELOG.md b/packages/typescript-estree/CHANGELOG.md index 02bc54ff2548..74319e829469 100644 --- a/packages/typescript-estree/CHANGELOG.md +++ b/packages/typescript-estree/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [6.17.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.16.0...v6.17.0) (2024-01-01) + +**Note:** Version bump only for package @typescript-eslint/typescript-estree + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + + + + + # [6.16.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.15.0...v6.16.0) (2023-12-25) diff --git a/packages/typescript-estree/package.json b/packages/typescript-estree/package.json index 7f6a1c9d1e9f..cf1fa81448d2 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/typescript-estree", - "version": "6.16.0", + "version": "6.17.0", "description": "A parser that converts TypeScript source code into an ESTree compatible form", "files": [ "dist", @@ -52,8 +52,8 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "6.16.0", - "@typescript-eslint/visitor-keys": "6.16.0", + "@typescript-eslint/types": "6.17.0", + "@typescript-eslint/visitor-keys": "6.17.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 6b56fd026f3e..6b9e399f7728 100644 --- a/packages/utils/CHANGELOG.md +++ b/packages/utils/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [6.17.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.16.0...v6.17.0) (2024-01-01) + +**Note:** Version bump only for package @typescript-eslint/utils + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + + + + + # [6.16.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.15.0...v6.16.0) (2023-12-25) **Note:** Version bump only for package @typescript-eslint/utils diff --git a/packages/utils/package.json b/packages/utils/package.json index 3c1a45b81782..a2cde3734b57 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/utils", - "version": "6.16.0", + "version": "6.17.0", "description": "Utilities for working with TypeScript + ESLint together", "files": [ "dist", @@ -68,16 +68,16 @@ "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.16.0", - "@typescript-eslint/types": "6.16.0", - "@typescript-eslint/typescript-estree": "6.16.0", + "@typescript-eslint/scope-manager": "6.17.0", + "@typescript-eslint/types": "6.17.0", + "@typescript-eslint/typescript-estree": "6.17.0", "semver": "^7.5.4" }, "peerDependencies": { "eslint": "^7.0.0 || ^8.0.0" }, "devDependencies": { - "@typescript-eslint/parser": "6.16.0", + "@typescript-eslint/parser": "6.17.0", "downlevel-dts": "*", "jest": "29.7.0", "prettier": "^3.0.3", diff --git a/packages/visitor-keys/CHANGELOG.md b/packages/visitor-keys/CHANGELOG.md index 7e81135bed4e..33de12c9087c 100644 --- a/packages/visitor-keys/CHANGELOG.md +++ b/packages/visitor-keys/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [6.17.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.16.0...v6.17.0) (2024-01-01) + +**Note:** Version bump only for package @typescript-eslint/visitor-keys + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + + + + + # [6.16.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.15.0...v6.16.0) (2023-12-25) **Note:** Version bump only for package @typescript-eslint/visitor-keys diff --git a/packages/visitor-keys/package.json b/packages/visitor-keys/package.json index 0607e5cc02f2..f5dbe90d1874 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/visitor-keys", - "version": "6.16.0", + "version": "6.17.0", "description": "Visitor keys used to help traverse the TypeScript-ESTree AST", "files": [ "dist", @@ -45,7 +45,7 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "6.16.0", + "@typescript-eslint/types": "6.17.0", "eslint-visitor-keys": "^3.4.1" }, "devDependencies": { diff --git a/packages/website-eslint/CHANGELOG.md b/packages/website-eslint/CHANGELOG.md index 05e75d9d0357..7aa068e9eaa0 100644 --- a/packages/website-eslint/CHANGELOG.md +++ b/packages/website-eslint/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [6.17.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.16.0...v6.17.0) (2024-01-01) + +**Note:** Version bump only for package @typescript-eslint/website-eslint + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + + + + + # [6.16.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.15.0...v6.16.0) (2023-12-25) **Note:** Version bump only for package @typescript-eslint/website-eslint diff --git a/packages/website-eslint/package.json b/packages/website-eslint/package.json index beaa4c1c915a..0a3885c1eb94 100644 --- a/packages/website-eslint/package.json +++ b/packages/website-eslint/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/website-eslint", - "version": "6.16.0", + "version": "6.17.0", "private": true, "description": "ESLint which works in browsers.", "files": [ @@ -23,16 +23,16 @@ "typecheck": "tsc --noEmit" }, "dependencies": { - "@typescript-eslint/types": "6.16.0", - "@typescript-eslint/utils": "6.16.0" + "@typescript-eslint/types": "6.17.0", + "@typescript-eslint/utils": "6.17.0" }, "devDependencies": { "@eslint/js": "8.56.0", - "@typescript-eslint/eslint-plugin": "6.16.0", - "@typescript-eslint/parser": "6.16.0", - "@typescript-eslint/scope-manager": "6.16.0", - "@typescript-eslint/typescript-estree": "6.16.0", - "@typescript-eslint/visitor-keys": "6.16.0", + "@typescript-eslint/eslint-plugin": "6.17.0", + "@typescript-eslint/parser": "6.17.0", + "@typescript-eslint/scope-manager": "6.17.0", + "@typescript-eslint/typescript-estree": "6.17.0", + "@typescript-eslint/visitor-keys": "6.17.0", "esbuild": "~0.19.0", "eslint": "*", "esquery": "*", diff --git a/packages/website/CHANGELOG.md b/packages/website/CHANGELOG.md index 7643ddd57b90..2cf51364df2b 100644 --- a/packages/website/CHANGELOG.md +++ b/packages/website/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [6.17.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.16.0...v6.17.0) (2024-01-01) + +**Note:** Version bump only for package website + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + + + + + # [6.16.0](https://github.com/typescript-eslint/typescript-eslint/compare/v6.15.0...v6.16.0) (2023-12-25) diff --git a/packages/website/package.json b/packages/website/package.json index f3da86e3e98f..1f881fe25a16 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -1,6 +1,6 @@ { "name": "website", - "version": "6.16.0", + "version": "6.17.0", "private": true, "scripts": { "build": "docusaurus build", @@ -24,8 +24,8 @@ "@docusaurus/theme-common": "~2.4.1", "@mdx-js/react": "1.6.22", "@prettier/sync": "*", - "@typescript-eslint/parser": "6.16.0", - "@typescript-eslint/website-eslint": "6.16.0", + "@typescript-eslint/parser": "6.17.0", + "@typescript-eslint/website-eslint": "6.17.0", "clsx": "^2.0.0", "eslint": "*", "json-schema": "^0.4.0", @@ -50,9 +50,9 @@ "@types/react": "*", "@types/react-helmet": "^6.1.6", "@types/react-router-dom": "^5.3.3", - "@typescript-eslint/eslint-plugin": "6.16.0", - "@typescript-eslint/rule-schema-to-typescript-types": "6.16.0", - "@typescript-eslint/types": "6.16.0", + "@typescript-eslint/eslint-plugin": "6.17.0", + "@typescript-eslint/rule-schema-to-typescript-types": "6.17.0", + "@typescript-eslint/types": "6.17.0", "copy-webpack-plugin": "^11.0.0", "cross-fetch": "*", "globby": "^11.1.0", diff --git a/yarn.lock b/yarn.lock index 765726dc8bc6..682df21edaa7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5582,11 +5582,11 @@ __metadata: linkType: hard "@types/node@npm:^20.0.0": - version: 20.10.4 - resolution: "@types/node@npm:20.10.4" + version: 20.10.5 + resolution: "@types/node@npm:20.10.5" dependencies: undici-types: ~5.26.4 - checksum: 054b296417e771ab524bea63cf3289559c6bdf290d45428f7cc68e9b00030ff7a0ece47b8c99a26b4f47a443919813bcf42beadff2f0bea7d8125fa541d92eb0 + checksum: e216b679f545a8356960ce985a0e53c3a58fff0eacd855e180b9e223b8db2b5bd07b744a002b8c1f0c37f9194648ab4578533b5c12df2ec10cc02f61d20948d2 languageName: node linkType: hard @@ -5840,10 +5840,10 @@ __metadata: resolution: "@typescript-eslint/eslint-plugin-internal@workspace:packages/eslint-plugin-internal" dependencies: "@prettier/sync": "*" - "@typescript-eslint/rule-tester": 6.16.0 - "@typescript-eslint/scope-manager": 6.16.0 - "@typescript-eslint/type-utils": 6.16.0 - "@typescript-eslint/utils": 6.16.0 + "@typescript-eslint/rule-tester": 6.17.0 + "@typescript-eslint/scope-manager": 6.17.0 + "@typescript-eslint/type-utils": 6.17.0 + "@typescript-eslint/utils": 6.17.0 jest: 29.7.0 prettier: ^3.0.3 rimraf: "*" @@ -5855,8 +5855,8 @@ __metadata: resolution: "@typescript-eslint/eslint-plugin-tslint@workspace:packages/eslint-plugin-tslint" dependencies: "@types/lodash": "*" - "@typescript-eslint/parser": 6.16.0 - "@typescript-eslint/utils": 6.16.0 + "@typescript-eslint/parser": 6.17.0 + "@typescript-eslint/utils": 6.17.0 jest: 29.7.0 prettier: ^3.0.3 rimraf: "*" @@ -5867,7 +5867,7 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/eslint-plugin@6.16.0, @typescript-eslint/eslint-plugin@workspace:packages/eslint-plugin": +"@typescript-eslint/eslint-plugin@6.17.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: @@ -5876,12 +5876,12 @@ __metadata: "@types/debug": "*" "@types/marked": "*" "@types/natural-compare": "*" - "@typescript-eslint/rule-schema-to-typescript-types": 6.16.0 - "@typescript-eslint/rule-tester": 6.16.0 - "@typescript-eslint/scope-manager": 6.16.0 - "@typescript-eslint/type-utils": 6.16.0 - "@typescript-eslint/utils": 6.16.0 - "@typescript-eslint/visitor-keys": 6.16.0 + "@typescript-eslint/rule-schema-to-typescript-types": 6.17.0 + "@typescript-eslint/rule-tester": 6.17.0 + "@typescript-eslint/scope-manager": 6.17.0 + "@typescript-eslint/type-utils": 6.17.0 + "@typescript-eslint/utils": 6.17.0 + "@typescript-eslint/visitor-keys": 6.17.0 ajv: ^6.12.6 chalk: ^5.3.0 cross-fetch: "*" @@ -5920,15 +5920,15 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/parser@6.16.0, @typescript-eslint/parser@workspace:packages/parser": +"@typescript-eslint/parser@6.17.0, @typescript-eslint/parser@workspace:packages/parser": version: 0.0.0-use.local resolution: "@typescript-eslint/parser@workspace:packages/parser" dependencies: "@types/glob": "*" - "@typescript-eslint/scope-manager": 6.16.0 - "@typescript-eslint/types": 6.16.0 - "@typescript-eslint/typescript-estree": 6.16.0 - "@typescript-eslint/visitor-keys": 6.16.0 + "@typescript-eslint/scope-manager": 6.17.0 + "@typescript-eslint/types": 6.17.0 + "@typescript-eslint/typescript-estree": 6.17.0 + "@typescript-eslint/visitor-keys": 6.17.0 debug: ^4.3.4 downlevel-dts: "*" glob: "*" @@ -5959,26 +5959,26 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/rule-schema-to-typescript-types@6.16.0, @typescript-eslint/rule-schema-to-typescript-types@workspace:packages/rule-schema-to-typescript-types": +"@typescript-eslint/rule-schema-to-typescript-types@6.17.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: "@prettier/sync": "*" - "@typescript-eslint/type-utils": 6.16.0 - "@typescript-eslint/utils": 6.16.0 + "@typescript-eslint/type-utils": 6.17.0 + "@typescript-eslint/utils": 6.17.0 natural-compare: ^1.4.0 prettier: ^3.0.3 languageName: unknown linkType: soft -"@typescript-eslint/rule-tester@6.16.0, @typescript-eslint/rule-tester@workspace:packages/rule-tester": +"@typescript-eslint/rule-tester@6.17.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: "@types/lodash.merge": 4.6.9 - "@typescript-eslint/parser": 6.16.0 - "@typescript-eslint/typescript-estree": 6.16.0 - "@typescript-eslint/utils": 6.16.0 + "@typescript-eslint/parser": 6.17.0 + "@typescript-eslint/typescript-estree": 6.17.0 + "@typescript-eslint/utils": 6.17.0 ajv: ^6.10.0 chai: ^4.3.7 lodash.merge: 4.6.2 @@ -5992,15 +5992,15 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/scope-manager@6.16.0, @typescript-eslint/scope-manager@workspace:packages/scope-manager": +"@typescript-eslint/scope-manager@6.17.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: "@prettier/sync": "*" "@types/glob": "*" - "@typescript-eslint/types": 6.16.0 - "@typescript-eslint/typescript-estree": 6.16.0 - "@typescript-eslint/visitor-keys": 6.16.0 + "@typescript-eslint/types": 6.17.0 + "@typescript-eslint/typescript-estree": 6.17.0 + "@typescript-eslint/visitor-keys": 6.17.0 glob: "*" jest-specific-snapshot: "*" make-dir: "*" @@ -6019,13 +6019,13 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/type-utils@6.16.0, @typescript-eslint/type-utils@workspace:packages/type-utils": +"@typescript-eslint/type-utils@6.17.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: - "@typescript-eslint/parser": 6.16.0 - "@typescript-eslint/typescript-estree": 6.16.0 - "@typescript-eslint/utils": 6.16.0 + "@typescript-eslint/parser": 6.17.0 + "@typescript-eslint/typescript-estree": 6.17.0 + "@typescript-eslint/utils": 6.17.0 ajv: ^6.10.0 debug: ^4.3.4 downlevel-dts: "*" @@ -6042,7 +6042,7 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/types@6.16.0, @typescript-eslint/types@workspace:packages/types": +"@typescript-eslint/types@6.17.0, @typescript-eslint/types@workspace:packages/types": version: 0.0.0-use.local resolution: "@typescript-eslint/types@workspace:packages/types" dependencies: @@ -6131,14 +6131,14 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/typescript-estree@6.16.0, @typescript-eslint/typescript-estree@workspace:packages/typescript-estree": +"@typescript-eslint/typescript-estree@6.17.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: "@babel/code-frame": "*" "@babel/parser": "*" - "@typescript-eslint/types": 6.16.0 - "@typescript-eslint/visitor-keys": 6.16.0 + "@typescript-eslint/types": 6.17.0 + "@typescript-eslint/visitor-keys": 6.17.0 debug: ^4.3.4 glob: "*" globby: ^11.1.0 @@ -6177,17 +6177,17 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/utils@6.16.0, @typescript-eslint/utils@^6.0.0, @typescript-eslint/utils@workspace:packages/utils": +"@typescript-eslint/utils@6.17.0, @typescript-eslint/utils@^6.0.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 "@types/json-schema": ^7.0.12 "@types/semver": ^7.5.0 - "@typescript-eslint/parser": 6.16.0 - "@typescript-eslint/scope-manager": 6.16.0 - "@typescript-eslint/types": 6.16.0 - "@typescript-eslint/typescript-estree": 6.16.0 + "@typescript-eslint/parser": 6.17.0 + "@typescript-eslint/scope-manager": 6.17.0 + "@typescript-eslint/types": 6.17.0 + "@typescript-eslint/typescript-estree": 6.17.0 downlevel-dts: "*" jest: 29.7.0 prettier: ^3.0.3 @@ -6217,12 +6217,12 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/visitor-keys@6.16.0, @typescript-eslint/visitor-keys@workspace:packages/visitor-keys": +"@typescript-eslint/visitor-keys@6.17.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: "@types/eslint-visitor-keys": "*" - "@typescript-eslint/types": 6.16.0 + "@typescript-eslint/types": 6.17.0 downlevel-dts: "*" eslint-visitor-keys: ^3.4.1 jest: 29.7.0 @@ -6242,18 +6242,18 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/website-eslint@6.16.0, @typescript-eslint/website-eslint@workspace:packages/website-eslint": +"@typescript-eslint/website-eslint@6.17.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": 8.56.0 - "@typescript-eslint/eslint-plugin": 6.16.0 - "@typescript-eslint/parser": 6.16.0 - "@typescript-eslint/scope-manager": 6.16.0 - "@typescript-eslint/types": 6.16.0 - "@typescript-eslint/typescript-estree": 6.16.0 - "@typescript-eslint/utils": 6.16.0 - "@typescript-eslint/visitor-keys": 6.16.0 + "@typescript-eslint/eslint-plugin": 6.17.0 + "@typescript-eslint/parser": 6.17.0 + "@typescript-eslint/scope-manager": 6.17.0 + "@typescript-eslint/types": 6.17.0 + "@typescript-eslint/typescript-estree": 6.17.0 + "@typescript-eslint/utils": 6.17.0 + "@typescript-eslint/visitor-keys": 6.17.0 esbuild: ~0.19.0 eslint: "*" esquery: "*" @@ -10074,8 +10074,8 @@ __metadata: linkType: hard "eslint-plugin-import@npm:^2.27.5": - version: 2.29.0 - resolution: "eslint-plugin-import@npm:2.29.0" + version: 2.29.1 + resolution: "eslint-plugin-import@npm:2.29.1" dependencies: array-includes: ^3.1.7 array.prototype.findlastindex: ^1.2.3 @@ -10093,10 +10093,10 @@ __metadata: object.groupby: ^1.0.1 object.values: ^1.1.7 semver: ^6.3.1 - tsconfig-paths: ^3.14.2 + tsconfig-paths: ^3.15.0 peerDependencies: eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 - checksum: 19ee541fb95eb7a796f3daebe42387b8d8262bbbcc4fd8a6e92f63a12035f3d2c6cb8bc0b6a70864fa14b1b50ed6b8e6eed5833e625e16cb6bb98b665beff269 + checksum: e65159aef808136d26d029b71c8c6e4cb5c628e65e5de77f1eb4c13a379315ae55c9c3afa847f43f4ff9df7e54515c77ffc6489c6a6f81f7dd7359267577468c languageName: node linkType: hard @@ -15164,12 +15164,12 @@ __metadata: languageName: node linkType: hard -"nanoid@npm:^3.3.6": - version: 3.3.6 - resolution: "nanoid@npm:3.3.6" +"nanoid@npm:^3.3.7": + version: 3.3.7 + resolution: "nanoid@npm:3.3.7" bin: nanoid: bin/nanoid.cjs - checksum: 7d0eda657002738aa5206107bd0580aead6c95c460ef1bdd0b1a87a9c7ae6277ac2e9b945306aaa5b32c6dcb7feaf462d0f552e7f8b5718abfc6ead5c94a71b3 + checksum: d36c427e530713e4ac6567d488b489a36582ef89da1d6d4e3b87eded11eb10d7042a877958c6f104929809b2ab0bafa17652b076cdf84324aa75b30b722204f2 languageName: node linkType: hard @@ -17027,14 +17027,14 @@ __metadata: languageName: node linkType: hard -"postcss@npm:^8.3.11, postcss@npm:^8.4.13, postcss@npm:^8.4.14, postcss@npm:^8.4.21, postcss@npm:^8.4.28, postcss@npm:^8.4.7": - version: 8.4.31 - resolution: "postcss@npm:8.4.31" +"postcss@npm:^8.3.11, postcss@npm:^8.4.13, postcss@npm:^8.4.14, postcss@npm:^8.4.28, postcss@npm:^8.4.32, postcss@npm:^8.4.7": + version: 8.4.32 + resolution: "postcss@npm:8.4.32" dependencies: - nanoid: ^3.3.6 + nanoid: ^3.3.7 picocolors: ^1.0.0 source-map-js: ^1.0.2 - checksum: 1d8611341b073143ad90486fcdfeab49edd243377b1f51834dc4f6d028e82ce5190e4f11bb2633276864503654fb7cab28e67abdc0fbf9d1f88cad4a0ff0beea + checksum: 220d9d0bf5d65be7ed31006c523bfb11619461d296245c1231831f90150aeb4a31eab9983ac9c5c89759a3ca8b60b3e0d098574964e1691673c3ce5c494305ae languageName: node linkType: hard @@ -19373,14 +19373,14 @@ __metadata: linkType: hard "stylelint-order@npm:^6.0.3": - version: 6.0.3 - resolution: "stylelint-order@npm:6.0.3" + version: 6.0.4 + resolution: "stylelint-order@npm:6.0.4" dependencies: - postcss: ^8.4.21 + postcss: ^8.4.32 postcss-sorting: ^8.0.2 peerDependencies: - stylelint: ^14.0.0 || ^15.0.0 - checksum: dc2883a8a7918a752928f6cc2c860508e3f21c7189c0675ddba15056c683c234f5548f0c4a410e9a9ac0d2be8b4a4657e5674f01b6ad39f2b89053bf907aa744 + stylelint: ^14.0.0 || ^15.0.0 || ^16.0.1 + checksum: 66ed8a80b34b98994e38d75671766f102d47c73362495b77861f0648efcc75cf3ad6f30f988c3cf16c9747ac139087ef1ff71b3bea40f9c5e081a25ebeb34feb languageName: node linkType: hard @@ -19902,15 +19902,15 @@ __metadata: languageName: node linkType: hard -"tsconfig-paths@npm:^3.14.2": - version: 3.14.2 - resolution: "tsconfig-paths@npm:3.14.2" +"tsconfig-paths@npm:^3.15.0": + version: 3.15.0 + resolution: "tsconfig-paths@npm:3.15.0" dependencies: "@types/json5": ^0.0.29 json5: ^1.0.2 minimist: ^1.2.6 strip-bom: ^3.0.0 - checksum: a6162eaa1aed680537f93621b82399c7856afd10ec299867b13a0675e981acac4e0ec00896860480efc59fc10fd0b16fdc928c0b885865b52be62cadac692447 + checksum: 59f35407a390d9482b320451f52a411a256a130ff0e7543d18c6f20afab29ac19fbe55c360a93d6476213cc335a4d76ce90f67df54c4e9037f7d240920832201 languageName: node linkType: hard @@ -20171,23 +20171,23 @@ __metadata: languageName: node linkType: hard -"typescript@npm:5.3.2": - version: 5.3.2 - resolution: "typescript@npm:5.3.2" +"typescript@npm:5.3.3": + version: 5.3.3 + resolution: "typescript@npm:5.3.3" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: d92534dda639eb825db013203404c1fabca8ac630564283c9e7dc9e64fd9c9346c2de95ecebdf3e6e8c1c32941bca1cfe0da37877611feb9daf8feeaea58d230 + checksum: 2007ccb6e51bbbf6fde0a78099efe04dc1c3dfbdff04ca3b6a8bc717991862b39fd6126c0c3ebf2d2d98ac5e960bcaa873826bb2bb241f14277034148f41f6a2 languageName: node linkType: hard -"typescript@patch:typescript@npm%3A5.3.2#~builtin": - version: 5.3.2 - resolution: "typescript@patch:typescript@npm%3A5.3.2#~builtin::version=5.3.2&hash=e012d7" +"typescript@patch:typescript@npm%3A5.3.3#~builtin": + version: 5.3.3 + resolution: "typescript@patch:typescript@npm%3A5.3.3#~builtin::version=5.3.3&hash=e012d7" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 47b2e63418ea7ef7dd0bf359ee41c6fca852c680826089269c5d03673ead471e052b172561f377f9e51212054e5f0fe19dd58085ff7db7b168449a6af704c784 + checksum: 4e604a9e107ce0c23b16a2f8d79d0531d4d8fe9ebbb7a8c395c66998c39892f0e0a071ef0b0d4e66420a8ec2b8d6cfd9cdb29ba24f25b37cba072e9282376df9 languageName: node linkType: hard @@ -20987,11 +20987,11 @@ __metadata: "@types/react": "*" "@types/react-helmet": ^6.1.6 "@types/react-router-dom": ^5.3.3 - "@typescript-eslint/eslint-plugin": 6.16.0 - "@typescript-eslint/parser": 6.16.0 - "@typescript-eslint/rule-schema-to-typescript-types": 6.16.0 - "@typescript-eslint/types": 6.16.0 - "@typescript-eslint/website-eslint": 6.16.0 + "@typescript-eslint/eslint-plugin": 6.17.0 + "@typescript-eslint/parser": 6.17.0 + "@typescript-eslint/rule-schema-to-typescript-types": 6.17.0 + "@typescript-eslint/types": 6.17.0 + "@typescript-eslint/website-eslint": 6.17.0 clsx: ^2.0.0 copy-webpack-plugin: ^11.0.0 cross-fetch: "*"