Skip to content

Commit 3fa90aa

Browse files
chore(deps): update typescript-eslint monorepo to v8 (major) (#836)
This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@typescript-eslint/eslint-plugin](https://typescript-eslint.io/packages/eslint-plugin) ([source](https://redirect.github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin)) | [`^7.18.0` -> `^8.0.0`](https://renovatebot.com/diffs/npm/@typescript-eslint%2feslint-plugin/7.18.0/8.14.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@typescript-eslint%2feslint-plugin/8.14.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@typescript-eslint%2feslint-plugin/8.14.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@typescript-eslint%2feslint-plugin/7.18.0/8.14.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@typescript-eslint%2feslint-plugin/7.18.0/8.14.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@typescript-eslint/parser](https://typescript-eslint.io/packages/parser) ([source](https://redirect.github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser)) | [`^7.18.0` -> `^8.0.0`](https://renovatebot.com/diffs/npm/@typescript-eslint%2fparser/7.18.0/8.14.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@typescript-eslint%2fparser/8.14.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@typescript-eslint%2fparser/8.14.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@typescript-eslint%2fparser/7.18.0/8.14.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@typescript-eslint%2fparser/7.18.0/8.14.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [typescript-eslint](https://typescript-eslint.io/packages/typescript-eslint) ([source](https://redirect.github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint)) | [`^7.18.0` -> `^8.0.0`](https://renovatebot.com/diffs/npm/typescript-eslint/7.18.0/8.14.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/typescript-eslint/8.14.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/typescript-eslint/8.14.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/typescript-eslint/7.18.0/8.14.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/typescript-eslint/7.18.0/8.14.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>typescript-eslint/typescript-eslint (@&#8203;typescript-eslint/eslint-plugin)</summary> ### [`v8.14.0`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#8140-2024-11-11) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.13.0...v8.14.0) ##### 🚀 Features - **eslint-plugin:** \[await-thenable] report unnecessary `await using` statements ([#&#8203;10209](https://redirect.github.com/typescript-eslint/typescript-eslint/pull/10209)) - **eslint-plugin:** \[no-confusing-void-expression] add an option to ignore void<->void ([#&#8203;10067](https://redirect.github.com/typescript-eslint/typescript-eslint/pull/10067)) ##### 🩹 Fixes - **scope-manager:** fix asserted increments not being marked as write references ([#&#8203;10271](https://redirect.github.com/typescript-eslint/typescript-eslint/pull/10271)) - **eslint-plugin:** \[no-misused-promises] improve report loc for methods ([#&#8203;10216](https://redirect.github.com/typescript-eslint/typescript-eslint/pull/10216)) - **eslint-plugin:** \[no-unnecessary-condition] improve error message for literal comparisons ([#&#8203;10194](https://redirect.github.com/typescript-eslint/typescript-eslint/pull/10194)) ##### ❤️ Thank You - Gyumong [@&#8203;Gyumong](https://redirect.github.com/Gyumong) - Jan Ochwat [@&#8203;janek515](https://redirect.github.com/janek515) - Kirk Waiblinger [@&#8203;kirkwaiblinger](https://redirect.github.com/kirkwaiblinger) - Ronen Amiel 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. ### [`v8.13.0`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#8130-2024-11-04) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.12.2...v8.13.0) ##### 🚀 Features - **eslint-plugin:** \[only-throw-error] add allow option ([#&#8203;10221](https://redirect.github.com/typescript-eslint/typescript-eslint/pull/10221)) - **eslint-plugin:** \[prefer-nullish-coalescing] add option `ignoreBooleanCoercion` ([#&#8203;9924](https://redirect.github.com/typescript-eslint/typescript-eslint/pull/9924)) - **eslint-plugin:** disable `no-class-assign` rule in `eslint-recommended` config ([#&#8203;10250](https://redirect.github.com/typescript-eslint/typescript-eslint/pull/10250)) ##### 🩹 Fixes - **eslint-plugin:** \[switch-exhaustiveness-check] add support for covering a missing property with `undefined` ([#&#8203;10232](https://redirect.github.com/typescript-eslint/typescript-eslint/pull/10232)) - **eslint-plugin:** \[consistent-type-definitions] don't leave trailing parens when fixing type to interface ([#&#8203;10235](https://redirect.github.com/typescript-eslint/typescript-eslint/pull/10235)) - **eslint-plugin:** \[no-deprecated] report when exported class implements/extends deprecated entity ([#&#8203;10259](https://redirect.github.com/typescript-eslint/typescript-eslint/pull/10259)) - **eslint-plugin:** \[no-deprecated] report on deprecated variables used inside dynamic imports ([#&#8203;10261](https://redirect.github.com/typescript-eslint/typescript-eslint/pull/10261)) - **eslint-plugin:** \[no-unnecessary-condition] falsey bigint should be falsey ([#&#8203;10205](https://redirect.github.com/typescript-eslint/typescript-eslint/pull/10205)) ##### ❤️ Thank You - auvred [@&#8203;auvred](https://redirect.github.com/auvred) - Kim Sang Du [@&#8203;developer-bandi](https://redirect.github.com/developer-bandi) - Kirk Waiblinger [@&#8203;kirkwaiblinger](https://redirect.github.com/kirkwaiblinger) - Mark de Dios [@&#8203;peanutenthusiast](https://redirect.github.com/peanutenthusiast) - Ronen Amiel - YeonJuan [@&#8203;yeonjuan](https://redirect.github.com/yeonjuan) 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. ### [`v8.12.2`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#8122-2024-10-29) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.12.1...v8.12.2) ##### 🩹 Fixes - **eslint-plugin:** \[switch-exhaustiveness-check] invert `considerDefaultExhaustiveForUnions` ([#&#8203;10223](https://redirect.github.com/typescript-eslint/typescript-eslint/pull/10223)) ##### ❤️ Thank You - Kirk Waiblinger [@&#8203;kirkwaiblinger](https://redirect.github.com/kirkwaiblinger) 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. ### [`v8.12.1`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#8121-2024-10-28) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.12.0...v8.12.1) This was a version bump only for eslint-plugin 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. ### [`v8.12.0`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#8120-2024-10-28) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.11.0...v8.12.0) ##### 🚀 Features - **eslint-plugin:** \[no-base-to-string] handle String() ([#&#8203;10005](https://redirect.github.com/typescript-eslint/typescript-eslint/pull/10005)) - **eslint-plugin:** \[switch-exhaustiveness-check] add allowDefaultCaseMatchUnionMember option ([#&#8203;9954](https://redirect.github.com/typescript-eslint/typescript-eslint/pull/9954)) - **eslint-plugin:** \[consistent-indexed-object-style] report mapped types ([#&#8203;10160](https://redirect.github.com/typescript-eslint/typescript-eslint/pull/10160)) - **eslint-plugin:** \[prefer-nullish-coalescing] add support for assignment expressions ([#&#8203;10152](https://redirect.github.com/typescript-eslint/typescript-eslint/pull/10152)) ##### ❤️ Thank You - Abraham Guo - Kim Sang Du [@&#8203;developer-bandi](https://redirect.github.com/developer-bandi) - Kirk Waiblinger [@&#8203;kirkwaiblinger](https://redirect.github.com/kirkwaiblinger) - YeonJuan [@&#8203;yeonjuan](https://redirect.github.com/yeonjuan) 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. ### [`v8.11.0`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#8110-2024-10-21) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.10.0...v8.11.0) ##### 🚀 Features - **eslint-plugin:** \[no-unnecessary-type-parameters] add suggestion fixer ([#&#8203;10149](https://redirect.github.com/typescript-eslint/typescript-eslint/pull/10149)) - **eslint-plugin:** \[no-base-to-string] add support for catching toLocaleString ([#&#8203;10138](https://redirect.github.com/typescript-eslint/typescript-eslint/pull/10138)) ##### 🩹 Fixes - **eslint-plugin:** \[class-literal-property-style] don't report nodes with `override` keyword ([#&#8203;10135](https://redirect.github.com/typescript-eslint/typescript-eslint/pull/10135)) ##### ❤️ Thank You - Kirk Waiblinger [@&#8203;kirkwaiblinger](https://redirect.github.com/kirkwaiblinger) - Yukihiro Hasegawa [@&#8203;y-hsgw](https://redirect.github.com/y-hsgw) 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. ### [`v8.10.0`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#8100-2024-10-17) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.9.0...v8.10.0) ##### 🚀 Features - support TypeScript 5.6 ([#&#8203;9972](https://redirect.github.com/typescript-eslint/typescript-eslint/pull/9972)) ##### ❤️ Thank You - Josh Goldberg ✨ 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. ### [`v8.9.0`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#890-2024-10-14) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.8.1...v8.9.0) ##### 🩹 Fixes - **eslint-plugin:** \[no-unnecessary-type-parameters] cannot assume variables are either type or value - **scope-manager:** \[no-use-before-define] do not treat nested namespace aliases as variable references - **eslint-plugin:** \[return-await] sync the behavior with await-thenable - **eslint-plugin:** \[prefer-literal-enum-member] report a different error message when `allowBitwiseExpressions` is enabled - **eslint-plugin:** \[no-loop-func] sync from upstream base rule - **eslint-plugin:** \[no-unused-vars] never report the naming of an enum member - **eslint-plugin:** correct use-at-your-own-risk type definitions - **eslint-plugin:** handle unions in await...for ##### ❤️ Thank You - Abraham Guo - Anna Bocharova - Arya Emami - auvred - Joshua Chen - Kirk Waiblinger - Lotfi Meklati - mdm317 - Ronen Amiel - Sukka - YeonJuan 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. ### [`v8.8.1`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#881-2024-10-07) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.8.0...v8.8.1) ##### 🩹 Fixes - **eslint-plugin:** stop warning on [@&#8203;ts-nocheck](https://redirect.github.com/ts-nocheck) comments which aren't at the beginning of the file ##### ❤️ Thank You - Brad Zacher - Ronen Amiel - WhitePiano 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. ### [`v8.8.0`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#880-2024-09-30) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.7.0...v8.8.0) ##### 🚀 Features - **eslint-plugin:** \[no-unnecessary-condition] add checkTypePredicates - **eslint-plugin:** \[return-await] check for-await loop iteree ##### 🩹 Fixes - remove `export type *` in d.ts to support TS<5.0 - **eslint-plugin:** \[no-unnecessary-template-expression] should underline template syntax with squiggly lines - **type-utils:** check for type parameters on `isBuiltinSymbolLikeRecurser()` - **eslint-plugin:** \[no-deprecated] max callstack exceeded when class implements itself - **eslint-plugin:** \[no-misused-promises] check contextual type - **eslint-plugin:** \[prefer-literal-enum-member] allow nested bitwise operations ##### ❤️ Thank You - auvred - Josh Goldberg ✨ - Kirk Waiblinger - Ronen Amiel - Tarun Chauhan - YeonJuan 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. ### [`v8.7.0`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#870-2024-09-23) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.6.0...v8.7.0) ##### 🚀 Features - **eslint-plugin:** \[no-unsafe-call] check calls of Function - **eslint-plugin:** \[consistent-type-exports] check `export *` exports to see if all exported members are types ##### 🩹 Fixes - **eslint-plugin:** properly coerce all types to string in `getStaticMemberAccessValue` - **eslint-plugin:** \[no-deprecated] report on imported deprecated variables - **eslint-plugin:** \[no-confusing-non-null-assertion] check !in and !instanceof ##### ❤️ Thank You - Abraham Guo - auvred - Brian Donovan - Kirk Waiblinger 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. ### [`v8.6.0`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#860-2024-09-16) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.5.0...v8.6.0) ##### 🚀 Features - add `allow` option for `restrict-template-expressions` - **type-utils:** isNullableType add Void logic - **eslint-plugin:** \[no-unnecessary-condition] check switch cases - **eslint-plugin:** \[no-misused-promises] check array predicate return ##### 🩹 Fixes - **eslint-plugin:** \[no-deprecated] don't report recursive types in destructuring assignment twice - **eslint-plugin:** \[no-deprecated] report on deprecated variables used in destructuring assignment - **eslint-plugin:** \[no-deprecated] report on deprecated properties with function-like types - **eslint-plugin:** \[no-unnecessary-condition] properly reflect multiple negations in message ##### ❤️ Thank You - Abraham Guo - auvred - Josh Goldberg ✨ - Kim Sang Du - YeonJuan 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. ### [`v8.5.0`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#850-2024-09-09) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.4.0...v8.5.0) ##### 🚀 Features - **eslint-plugin:** \[no-duplicate-type-constituents] prevent unnecessary \` - **eslint-plugin:** \[no-unsafe-argument] differentiate error types ##### 🩹 Fixes - **eslint-plugin:** \[no-unnecessary-type-assertion] fix TSNonNullExpression fixer - **eslint-plugin:** \[no-misused-promises] handle static method - **eslint-plugin:** \[no-unnecessary-type-parameters] fix AST quick path scope analysis - **eslint-plugin:** \[consistent-type-assertions] access parser services lazily ##### ❤️ Thank You - [`f44da95`](https://redirect.github.com/typescript-eslint/typescript-eslint/commit/f44da958e) - Josh Goldberg ✨ - Kirk Waiblinger - YeonJuan 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. ### [`v8.4.0`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#840-2024-09-02) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.3.0...v8.4.0) This was a version bump only for eslint-plugin 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. ### [`v8.3.0`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#830-2024-08-26) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.2.0...v8.3.0) ##### 🚀 Features - **eslint-plugin:** \[no-deprecation] add rule ##### 🩹 Fixes - **eslint-plugin:** \[no-unnecessary-template-expression] add missing parentheses in autofix - **eslint-plugin:** \[no-unnecessary-type-parameters] check mapped alias type arguments - **utils:** add `TSDeclareFunction` to `functionTypeTypes` - **ast-spec:** use `Expression` in argument of `ThrowStatement` ##### ❤️ Thank You - Abraham Guo - Daichi Kamiyama - Josh Goldberg ✨ - Kim Sang Du - Sukka - Vida Xie 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. ### [`v8.2.0`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#820-2024-08-19) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.1.0...v8.2.0) ##### 🚀 Features - **eslint-plugin:** add suggestion to `require-await` to remove `async` keyword ##### 🩹 Fixes - **eslint-plugin:** \[use-unknown-in-catch-callback-variable] flag second argument of `.then` - **eslint-plugin:** \[no-unnecessary-type-assertion] conflict with TS for variables used before assignment - **eslint-plugin:** delete \[] in message if ReadOnly\<string\[]> is detected - **eslint-plugin:** \[no-redundant-type-constituents] differentiate a types-error any from a true any - **eslint-plugin:** \[no-unnecessary-type-parameters] check mapped constraint types if necessary - **eslint-plugin:** \[no-unsafe-enum-comparison] add logic to see through intersections ##### ❤️ Thank You - Abraham Guo - Dave - Jake Bailey - James - Josh Goldberg ✨ - liuxingbaoyu - Yukihiro Hasegawa - Yutong Zhu 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. ### [`v8.1.0`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#810-2024-08-12) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.0.1...v8.1.0) ##### 🚀 Features - **eslint-plugin:** \[no-floating-promises] enable "add await" suggestion if ignoreVoid is true - **typescript-estree:** restrict variable declarator definite/init combinations - **eslint-plugin:** \[no-unsafe-return] check promise any - **eslint-plugin:** \[no-misused-promises] check subtype methods against heritage type methods ##### 🩹 Fixes - **eslint-plugin:** \[no-unsafe-enum-comparison] typo in test - **eslint-plugin:** \[no-unnecessary-type-parameters] skip checking function bodies for AST references - **eslint-plugin:** \[member-ordering] get accessor member name & take into account `abstract` and decorator - **eslint-plugin:** \[prefer-optional-chain] wrong parenthesis fix output - **eslint-plugin:** \[no-unnecessary-type-parameters] clarify message ##### ❤️ Thank You - Aly Thobani - Brad Zacher - James - Josh Goldberg ✨ - Joshua Chen - Olivier Zalmanski - YeonJuan - Yukihiro Hasegawa 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. ### [`v8.0.1`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#801-2024-08-05) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.0.0...v8.0.1) ##### 🩹 Fixes - **eslint-plugin:** \[no-unused-vars] ignore imports used only as types ##### ❤️ Thank You - Jake Bailey 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. ### [`v8.0.0`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#800-2024-07-31) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v7.18.0...v8.0.0) ##### 🚀 Features - stricter parent types for the AST - **typescript-estree:** split TSMappedType typeParameter into constraint and key - **eslint-plugin:** remove formatting/layout rules - **eslint-plugin:** \[prefer-nullish-coalescing] change ignoreConditionalTests default to true - **eslint-plugin:** deprecate no-loss-of-precision extension rule - **eslint-plugin:** \[no-unused-vars] align catch behavior to ESLint 9 - **typescript-estree:** rename automaticSingleRunInference to disallowAutomaticSingleRunInference - **utils:** allow specifying additional rule meta.docs in RuleCreator - **eslint-plugin:** split no-empty-object-type out from ban-types and no-empty-interfaces - **rule-tester:** support multipass fixes - **typescript-estree:** stabilize EXPERIMENTAL_useProjectService as projectService - **eslint-plugin:** remove deprecated no-throw-literal rule - **eslint-plugin:** apply initial config changes for v8 - **eslint-plugin:** remove no-useless-template-literals - **eslint-plugin:** \[no-floating-promises] add 'allowForKnownSafeCalls' option - **eslint-plugin:** replace ban-types with no-restricted-types, no-unsafe-function-type, no-wrapper-object-types - **eslint-plugin:** \[no-unused-vars] add `reportUnusedIgnorePattern` option - **eslint-plugin:** \[no-unused-vars] support `ignoreClassWithStaticInitBlock` - **eslint-plugin:** \[no-unused-vars] handle comma operator for assignments, treat for-of the same as for-in - **eslint-plugin:** \[no-unused-vars] report if var used only in typeof - **eslint-plugin:** \[no-floating-promises] disable checkThenables by default for v8 - **rule-tester:** switched to flat config - **eslint-plugin:** \[no-unnecessary-type-parameters] promote to strict ##### 🩹 Fixes - correct eslint-plugin's peerDependency on parser@8 - disable `projectService` in `disabled-type-checked` shared config - **typescript-estree:** add TSEnumBody node for TSEnumDeclaration body - **eslint-plugin:** include alpha pre-releases in parser peer dependency - **eslint-plugin:** correct rules.d.ts types to not rely on non-existent imports - **eslint-plugin:** remove duplicate import `RuleModuleWithMetaDocs` - **type-utils:** also check declared modules for package names in TypeOrValueSpecifier - **eslint-plugin:** \[no-unnecessary-template-expression] do not render escaped strings in autofixes - **eslint-plugin:** \[no-unused-vars] incorporate upstream changes around caught errors report messages - **eslint-plugin:** \[no-misused-promises] perf: avoid getting types of variables/functions if the annotated type is obviously not a function - **rule-tester:** provide Linter a cwd in its constructor ##### ❤️ Thank You - Abraham Guo - Alfred Ringstad - auvred - Brad Zacher - Christopher Aubut - Collin Bachman - James Henry - Josh Goldberg - Josh Goldberg ✨ - Kirk Waiblinger - StyleShit - Victor Lin - Yukihiro Hasegawa 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.18.0 (2024-07-29) ##### 🩹 Fixes - **eslint-plugin:** \[no-unnecessary-type-assertion] prevent runtime error when asserting a variable declared in default TS lib - **eslint-plugin:** \[unbound-method] report on destructuring in function parameters - **eslint-plugin:** \[no-duplicate-type-constituents] shouldn't report on error types - **eslint-plugin:** \[strict-boolean-expressions] support branded booleans ##### ❤️ Thank You - auvred - Oliver Salzburg - Vinccool96 - Yukihiro Hasegawa 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.17.0 (2024-07-22) ##### 🚀 Features - **eslint-plugin:** backport no-unsafe-function type, no-wrapper-object-types from v8 to v7 - **eslint-plugin:** \[return-await] add option to report in error-handling scenarios only, and deprecate "never" ##### 🩹 Fixes - **eslint-plugin:** \[no-floating-promises] check top-level type assertions (and more) - **eslint-plugin:** \[strict-boolean-expressions] consider assertion function argument a boolean context - **eslint-plugin:** \[no-unnecessary-condition] false positive on optional private field ##### ❤️ Thank You - Armano - Josh Goldberg ✨ - Kirk Waiblinger - StyleShit 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.16.1 (2024-07-15) ##### 🩹 Fixes - **eslint-plugin:** \[no-unnecessary-type-parameters] descend into all parts of mapped types in no-unnecessary-type-parameters ##### ❤️ Thank You - Dan Vanderkam 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.16.0 (2024-07-08) ##### 🚀 Features - **rule-tester:** stricter rule test validations - **eslint-plugin:** \[no-unnecessary-parameter-property-assignment] add new rule - **eslint-plugin:** add support for nested namespaces to unsafe-member-access - **eslint-plugin:** \[no-floating-promises] add checkThenables option ##### 🩹 Fixes - **deps:** update dependency [@&#8203;eslint-community/regexpp](https://redirect.github.com/eslint-community/regexpp) to v4.11.0 - **eslint-plugin:** \[no-floating-promises] add `suggestions` to tests from [#&#8203;9263](https://redirect.github.com/typescript-eslint/typescript-eslint/issues/9263) `checkThenables` - **website:** react key error on internal pages of website - **eslint-plugin:** \[restrict-template-expressions] don't report tuples if `allowArray` option is enabled ##### ❤️ Thank You - Abraham Guo - auvred - Josh Goldberg ✨ - Juan Sanchez - Vinccool96 - YeonJuan - Yukihiro Hasegawa 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.15.0 (2024-07-01) ##### 🚀 Features - **eslint-plugin:** \[array-type] detect `Readonly<string[]>` 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) ##### 🩹 Fixes - **eslint-plugin:** \[prefer-nullish-coalescing] treat enums and literals as their underlying primitive types - **eslint-plugin:** \[prefer-nullish-coalescing] ensure ternary fix does not remove parens ##### ❤️ Thank You - Jake Bailey 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.0 (2024-06-24) ##### 🚀 Features - support TypeScript 5.5 ##### 🩹 Fixes - **eslint-plugin:** \[no-extraneous-class] handle abstract members - **eslint-plugin:** \[prefer-nullish-coalescing] handle intersected primitive types - **eslint-plugin:** \[no-invalid-this] support AccessorProperty ##### ❤️ Thank You - Brad Zacher - cm-ayf - Jake Bailey - James Zhan - Joshua Chen - yoshi2no 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.13.1 (2024-06-17) ##### 🩹 Fixes - **eslint-plugin:** \[prefer-readonly] refine report locations - **eslint-plugin:** \[return-await] support explicit resource management - **eslint-plugin:** \[no-unsafe-member-access] differentiate a types-error any from a true any ##### ❤️ Thank You - Kirk Waiblinger - Yukihiro Hasegawa 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.13.0 (2024-06-10) ##### 🚀 Features - **typescript-estree:** require `import = require()` argument to be a string literal - **typescript-estree:** forbid `.body`, `.async`, `.generator` on `declare function` - **eslint-plugin:** \[no-dynamic-delete] allow all string literals as index ##### 🩹 Fixes - **ast-spec:** function-call-like callee should be Expression not LeftHandSideExpression - **scope-manager:** handle index signature in class - **eslint-plugin:** \[init-declarations] refine report locations - **eslint-plugin:** \[no-base-to-string] make error message more nuanced - **eslint-plugin:** \[no-unsafe-assignment] be more specific about error types - **eslint-plugin:** \[no-magic-numbers] fix implementation of the `ignore` option ##### ❤️ Thank You - Fotis Papadogeorgopoulos - Joshua Chen - Kirk Waiblinger - Tobiloba Adedeji - Vinccool96 - YeonJuan 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.12.0 (2024-06-03) ##### 🚀 Features - **eslint-plugin:** \[no-useless-template-literals] rename to `no-useless-template-expression` (deprecate `no-useless-template-literals`) - **rule-tester:** check for parsing errors in suggestion fixes - **rule-tester:** port `checkDuplicateTestCases` from ESLint - **eslint-plugin:** \[no-floating-promises] add option 'allowForKnownSafePromises' ##### 🩹 Fixes - no-useless-template-expression -> no-unnecessary-template-expression - **eslint-plugin:** \[no-unnecessary-type-assertion] combine template literal check with `const` variable check - **eslint-plugin:** \[dot-notation] fix false positive when accessing private/protected property with optional chaining - **eslint-plugin:** \[explicit-member-accessibility] refine report locations - **eslint-plugin:** \[no-unnecessary-type-assertion] declares are always defined, so always check `declare`s - **eslint-plugin:** \[prefer-literal-enum-member] allow using member it self on allowBitwiseExpressions - **eslint-plugin:** \[return-await] clean up in-try-catch detection and make autofixes safe - **eslint-plugin:** \[member-ordering] also TSMethodSignature can be get/set ##### ❤️ Thank You - Abraham Guo - Han Yeong-woo - Joshua Chen - Kim Sang Du - Kirk Waiblinger - YeonJuan 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.11.0 (2024-05-27) ##### 🚀 Features - **eslint-plugin:** deprecate prefer-ts-expect-error in favor of ban-ts-comment ##### 🩹 Fixes - **eslint-plugin:** \[consistent-type-assertions] prevent syntax errors on arrow functions ##### ❤️ Thank You - Abraham Guo - auvred - Dom Armstrong - Kirk Waiblinger 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.10.0 (2024-05-20) ##### 🚀 Features - **eslint-plugin:** \[sort-type-constituents] support case sensitive sorting ##### 🩹 Fixes - **eslint-plugin:** \[prefer-regexp-exec] fix heuristic to check whether regex may contain global flag ##### ❤️ Thank You - auvred - Emanuel Hoogeveen - jsfm01 - Kirk Waiblinger 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.9.0 (2024-05-13) ##### 🩹 Fixes - **eslint-plugin:** \[explicit-function-return-types] fix false positive on default parameters ##### ❤️ Thank You - Kirk Waiblinger - Sheetal Nandi - 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.8.0 (2024-04-29) ##### 🩹 Fixes - **eslint-plugin:** \[no-unsafe-argument] handle tagged templates - **eslint-plugin:** \[prefer-optional-chain] suggests optional chaining during strict null equality check - **eslint-plugin:** \[consistent-type-assertions] handle tagged templates - **eslint-plugin:** \[no-unsafe-return] handle union types - **eslint-plugin:** \[no-unused-vars] clear error report range ##### ❤️ Thank You - auvred - Josh Goldberg ✨ - jsfm01 - Kim Sang Du - YeonJuan 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.7.1 (2024-04-22) ##### 🩹 Fixes - **eslint-plugin:** \[no-unsafe-assignment] handle shorthand property assignment - **eslint-plugin:** \[explicit-function-return-type] fix checking wrong ancestor's return type - **eslint-plugin:** \[prefer-optional-chain] only look at left operand for `requireNullish` - **eslint-plugin:** \[no-for-in-array] refine report location - **eslint-plugin:** \[no-unnecessary-type-assertion] allow non-null assertion for void type ##### ❤️ Thank You - Abraham Guo - Kirk Waiblinger - YeonJuan 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.7.0 (2024-04-15) ##### 🚀 Features - **eslint-plugin:** replace `no-new-symbol` with `no-new-native-nonconstructor` ##### ❤️ Thank You - Dave - Josh Goldberg ✨ 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.6.0 (2024-04-08) ##### 🚀 Features - bump npm dependency ranges ##### ❤️ Thank You - Abraham Guo - auvred - Brad Zacher 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.5.0 (2024-04-01) ##### 🩹 Fixes - **eslint-plugin:** \[no-floating-promises] handle TaggedTemplateExpression - **eslint-plugin:** \[no-unnecessary-type-assertion] handle exactOptionalPropertyTypes compiler option ##### ❤️ Thank You - Brad Zacher - Kim Sang Du - Mark de Dios - Naru - YeonJuan 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.4.0 (2024-03-25) ##### 🚀 Features - **eslint-plugin:** \[consistent-type-imports] ignore files with decorators, experimentalDecorators, and emitDecoratorMetadata - **eslint-plugin:** \[no-unnecessary-type-arguments] handle tagged templates - **eslint-plugin:** deprecate no-throw-literal and add a renamed only-throw-error ##### 🩹 Fixes - **eslint-plugin:** \[prefer-optional-chain] address multipart nullish checks false positive - **eslint-plugin:** \[prefer-optional-chain] properly disambiguate between `boolean` and `false` - **eslint-plugin:** \[no-unnecessary-type-assertion] avoid remove const casting on template literals with expressions inside ##### ❤️ Thank You - Abraham Guo - Brad Zacher - Josh Goldberg ✨ - Kim Sang Du - Kirk Waiblinger - Marco Pasqualetti - YeonJuan 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.3.1 (2024-03-18) ##### 🩹 Fixes - **eslint-plugin:** \[no-floating-promises] revert disable of ignoreVoid in strict config ##### ❤️ Thank You - Josh Goldberg ✨ 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.3.0 (2024-03-18) ##### 🚀 Features - **eslint-plugin:** \[restrict-template-expressions] add `allowArray` option - **eslint-plugin:** add meta.docs.recommended setting for strict config options - **eslint-plugin:** add rule `use-unknown-in-catch-callback-variables` - **eslint-plugin:** \[prefer-reduce-type-parameter] supports tuple, union, intersection ##### 🩹 Fixes - correct `engines.node` constraints in `package.json` - **eslint-plugin:** \[unbound-method] check method definition in object literal using longhand form - **eslint-plugin:** \[consistent-type-imports] handle imports without specifiers - **eslint-plugin:** \[no-redundant-type-constituents] incorrectly marks & string as redundant - **eslint-plugin:** \[no-unnecessary-qualifier] handle merge namespace with enum - **eslint-plugin:** \[no-unused-expressions] false negatives when using assertions - **eslint-plugin:** \[ban-ts-comment] more accurate handling of multiline comments - **eslint-plugin:** \[explicit-function-return-type, explicit-module-boundary-types] improved checking for allowHigherOrderFunctions option - **eslint-plugin:** \[class-literal-property-style] ignore property assigned in constructor - **eslint-plugin:** \[no-unnecessary-type-assertion] fix false negative for const variable declarations ##### ❤️ Thank You - Abraham Guo - Alexu - Arka Pratim Chaudhuri - auvred - Derrick Isaacson - fnx - Josh Goldberg ✨ - Kirk Waiblinger - Marta Cardoso - Michaël De Boey - Tristan Rasmussen - YeonJuan 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.2.0 (2024-03-11) ##### 🚀 Features - support TS 5.4 - **eslint-plugin:** \[prefer-string-starts-ends-with] add allowSingleElementEquality option ##### 🩹 Fixes - **eslint-plugin:** expose \*-type-checked-only configs for extension - **eslint-plugin:** \[member-ordering] report alphabetical sorting for all groups instead of just the first failing group - **eslint-plugin:** \[no-var-requires, no-require-imports] support template literal - **eslint-plugin:** \[no-useless-template-literals] detect TemplateLiteral - **eslint-plugin:** \[no-unnecessary-condition] handle union array and tuple type - **eslint-plugin:** \[prefer-find] support ternary branches in prefer-find ##### ❤️ Thank You - Arka Pratim Chaudhuri - auvred - Chris Plummer - Fotis Papadogeorgopoulos - Josh Goldberg ✨ - Kirk Waiblinger - Wayne Zhang - YeonJuan 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.1.1 (2024-03-04) This was a version bump only for eslint-plugin 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.1.0 (2024-02-26) ##### 🚀 Features - **eslint-plugin:** add \*-type-checked-only configs - **eslint-plugin:** \[naming-convention] support the auto-accessor syntax - **eslint-plugin:** \[consistent-return] add new rule ##### 🩹 Fixes - **eslint-plugin:** \[prefer-optional-chan] allow typeof for avoiding reference error - **eslint-plugin:** \[no-misused-promises] improve check union types - **eslint-plugin:** \[no-use-before-define] fix false positive type reference in as, satisfies ##### ❤️ Thank You - Arka Pratim Chaudhuri - Josh Goldberg ✨ - YeonJuan 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.0.2 (2024-02-19) ##### 🩹 Fixes - fix tsconfig-less check errors, fix `@types/eslint` incompatibilities, add tests ##### ❤️ Thank You - Brad Zacher - Gareth Jones 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.0.1 (2024-02-12) ##### 🩹 Fixes - **eslint-plugin:** update peer dep for parser ##### ❤️ Thank You - Tim Dorr 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. </details> <details> <summary>typescript-eslint/typescript-eslint (@&#8203;typescript-eslint/parser)</summary> ### [`v8.14.0`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#8140-2024-11-11) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.13.0...v8.14.0) 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. ### [`v8.13.0`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#8130-2024-11-04) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.12.2...v8.13.0) 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. ### [`v8.12.2`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#8122-2024-10-29) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.12.1...v8.12.2) 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. ### [`v8.12.1`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#8121-2024-10-28) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.12.0...v8.12.1) 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. ### [`v8.12.0`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#8120-2024-10-28) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.11.0...v8.12.0) 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. ### [`v8.11.0`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#8110-2024-10-21) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.10.0...v8.11.0) 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. ### [`v8.10.0`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#8100-2024-10-17) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.9.0...v8.10.0) ##### 🚀 Features - support TypeScript 5.6 ([#&#8203;9972](https://redirect.github.com/typescript-eslint/typescript-eslint/pull/9972)) ##### ❤️ Thank You - Josh Goldberg ✨ 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. ### [`v8.9.0`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#890-2024-10-14) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.8.1...v8.9.0) 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. ### [`v8.8.1`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#881-2024-10-07) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.8.0...v8.8.1) 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. ### [`v8.8.0`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#880-2024-09-30) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.7.0...v8.8.0) 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. ### [`v8.7.0`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#870-2024-09-23) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.6.0...v8.7.0) 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. ### [`v8.6.0`](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.5.0...343710e0b68868836ae01c0271472adcea4f1676) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.5.0...v8.6.0) ### [`v8.5.0`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#850-2024-09-09) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.4.0...v8.5.0) 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. ### [`v8.4.0`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#840-2024-09-02) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.3.0...v8.4.0) 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. ### [`v8.3.0`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#830-2024-08-26) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.2.0...v8.3.0) 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. ### [`v8.2.0`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#820-2024-08-19) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.1.0...v8.2.0) 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. ### [`v8.1.0`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#810-2024-08-12) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.0.1...v8.1.0) 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. ### [`v8.0.1`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#801-2024-08-05) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v8.0.0...v8.0.1) 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. ### [`v8.0.0`](https://redirect.github.com/typescript-eslint/typescript-eslint/blob/HEAD/packages/parser/CHANGELOG.md#800-2024-07-31) [Compare Source](https://redirect.github.com/typescript-eslint/typescript-eslint/compare/v7.18.0...v8.0.0) ##### 🚀 Features - **parser:** always enable comment, loc, range, tokens - **typescript-estree:** stabilize EXPERIMENTAL_useProjectService as projectService ##### ❤️ Thank You - Abraham Guo - Alfred Ringstad - auvred - Brad Zacher - Christopher Aubut - Collin Bachman - James Henry - Josh Goldberg - Josh Goldberg ✨ - Kirk Waiblinger - StyleShit - Victor Lin - Yukihiro Hasegawa 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.18.0 (2024-07-29) 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.17.0 (2024-07-22) 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.16.1 (2024-07-15) 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.16.0 (2024-07-08) ##### 🩹 Fixes - **deps:** update dependency [@&#8203;eslint-community/regexpp](https://redirect.github.com/eslint-community/regexpp) to v4.11.0 - **website:** react key error on internal pages of website ##### ❤️ Thank You - Abraham Guo - auvred - Josh Goldberg ✨ - Juan Sanchez - Vinccool96 - YeonJuan - Yukihiro Hasegawa 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.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. 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.0 (2024-06-24) ##### 🚀 Features - support TypeScript 5.5 ##### ❤️ Thank You - Brad Zacher - cm-ayf - Jake Bailey - James Zhan - Joshua Chen - yoshi2no 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.13.1 (2024-06-17) 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.13.0 (2024-06-10) ##### 🚀 Features - **parser, typescript-estree:** export withoutProjectParserOptions utility ##### ❤️ Thank You - Fotis Papadogeorgopoulos - Joshua Chen - Kirk Waiblinger - Tobiloba Adedeji - Vinccool96 - YeonJuan 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 we </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/sveltejs/eslint-plugin-svelte). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM5LjExLjUiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbXX0=--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: yosuke ota <[email protected]>
1 parent 5da98c9 commit 3fa90aa

File tree

17 files changed

+118
-65
lines changed

17 files changed

+118
-65
lines changed

.changeset/quiet-toys-burn.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'eslint-plugin-svelte': minor
3+
---
4+
5+
feat: support for typescript-eslint v8 to `svelte/indent` rule

package.json

+16-16
Original file line numberDiff line numberDiff line change
@@ -15,34 +15,34 @@
1515
},
1616
"devDependencies": {
1717
"@changesets/changelog-github": "^0.5.0",
18-
"@changesets/cli": "^2.27.9",
19-
"@changesets/get-release-plan": "^4.0.4",
20-
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.0",
18+
"@changesets/cli": "^2.27.10",
19+
"@changesets/get-release-plan": "^4.0.5",
20+
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
2121
"@ota-meshi/eslint-plugin": "^0.17.5",
2222
"@types/eslint": "^9.6.1",
23-
"@typescript-eslint/eslint-plugin": "^7.18.0",
24-
"@typescript-eslint/parser": "^7.18.0",
23+
"@typescript-eslint/eslint-plugin": "^8.16.0",
24+
"@typescript-eslint/parser": "^8.16.0",
2525
"env-cmd": "^10.1.0",
2626
"eslint": "~9.14.0",
2727
"eslint-config-prettier": "^9.1.0",
2828
"eslint-formatter-friendly": "^7.0.0",
29-
"eslint-plugin-eslint-plugin": "^6.2.0",
30-
"eslint-plugin-jsdoc": "^50.4.1",
29+
"eslint-plugin-eslint-plugin": "^6.3.2",
30+
"eslint-plugin-jsdoc": "^50.6.0",
3131
"eslint-plugin-json-schema-validator": "^5.1.3",
32-
"eslint-plugin-jsonc": "^2.16.0",
32+
"eslint-plugin-jsonc": "^2.18.2",
3333
"eslint-plugin-markdown": "^5.1.0",
3434
"eslint-plugin-mdx": "^3.1.5",
35-
"eslint-plugin-n": "^17.11.1",
35+
"eslint-plugin-n": "^17.14.0",
3636
"eslint-plugin-node-dependencies": "^0.12.0",
3737
"eslint-plugin-prettier": "^5.2.1",
38-
"eslint-plugin-regexp": "^2.6.0",
39-
"eslint-plugin-yml": "^1.14.0",
40-
"npm-run-all2": "^7.0.0",
41-
"prettier": "^3.3.3",
42-
"prettier-plugin-svelte": "^3.2.7",
38+
"eslint-plugin-regexp": "^2.7.0",
39+
"eslint-plugin-yml": "^1.15.0",
40+
"npm-run-all2": "^7.0.1",
41+
"prettier": "^3.4.1",
42+
"prettier-plugin-svelte": "^3.3.2",
4343
"rimraf": "^6.0.1",
44-
"typescript": "~5.7.0",
45-
"typescript-eslint": "^7.18.0"
44+
"typescript": "~5.7.2",
45+
"typescript-eslint": "^8.16.0"
4646
},
4747
"publishConfig": {
4848
"access": "public"

packages/eslint-plugin-svelte/package.json

+23-23
Original file line numberDiff line numberDiff line change
@@ -56,52 +56,52 @@
5656
}
5757
},
5858
"dependencies": {
59-
"@eslint-community/eslint-utils": "^4.4.0",
60-
"@jridgewell/sourcemap-codec": "^1.4.15",
61-
"eslint-compat-utils": "^0.6.0",
59+
"@eslint-community/eslint-utils": "^4.4.1",
60+
"@jridgewell/sourcemap-codec": "^1.5.0",
61+
"eslint-compat-utils": "^0.6.3",
6262
"esutils": "^2.0.3",
6363
"known-css-properties": "^0.35.0",
64-
"postcss": "^8.4.38",
64+
"postcss": "^8.4.49",
6565
"postcss-load-config": "^3.1.4",
6666
"postcss-safe-parser": "^6.0.0",
6767
"postcss-selector-parser": "^7.0.0",
68-
"semver": "^7.6.2",
68+
"semver": "^7.6.3",
6969
"svelte-eslint-parser": "^1.0.0-0"
7070
},
7171
"devDependencies": {
72-
"@babel/core": "^7.25.8",
73-
"@babel/eslint-parser": "^7.25.8",
74-
"@babel/plugin-proposal-function-bind": "^7.25.8",
75-
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.0",
72+
"@babel/core": "^7.26.0",
73+
"@babel/eslint-parser": "^7.25.9",
74+
"@babel/plugin-proposal-function-bind": "^7.25.9",
75+
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
7676
"@types/babel__core": "^7.20.5",
7777
"@types/eslint-utils": "^3.0.5",
7878
"@types/esutils": "^2.0.2",
7979
"@types/json-schema": "^7.0.15",
80-
"@types/less": "^3.0.6",
81-
"@types/mocha": "^10.0.9",
82-
"@types/node": "^22.0.0",
80+
"@types/less": "^3.0.7",
81+
"@types/mocha": "^10.0.10",
82+
"@types/node": "^22.10.0",
8383
"@types/postcss-safe-parser": "^5.0.4",
8484
"@types/semver": "^7.5.8",
8585
"@types/stylus": "^0.48.43",
86-
"acorn": "^8.13.0",
86+
"acorn": "^8.14.0",
8787
"assert": "^2.1.0",
8888
"esbuild": "^0.24.0",
8989
"esbuild-register": "^3.6.0",
90-
"eslint-scope": "^8.1.0",
90+
"eslint-scope": "^8.2.0",
9191
"eslint-typegen": "^0.3.2",
92-
"eslint-visitor-keys": "^4.1.0",
93-
"espree": "^10.2.0",
94-
"less": "^4.2.0",
95-
"mocha": "^10.7.3",
92+
"eslint-visitor-keys": "^4.2.0",
93+
"espree": "^10.3.0",
94+
"less": "^4.2.1",
95+
"mocha": "^10.8.2",
9696
"nyc": "^17.1.0",
97-
"postcss-nested": "^7.0.0",
98-
"sass": "^1.79.5",
97+
"postcss-nested": "^7.0.2",
98+
"sass": "^1.81.0",
9999
"source-map-js": "^1.2.1",
100100
"stylus": "^0.64.0",
101-
"svelte": "^5.0.0",
102-
"svelte-i18n": "^4.0.0",
101+
"svelte": "^5.2.9",
102+
"svelte-i18n": "^4.0.1",
103103
"type-coverage": "^2.29.7",
104-
"yaml": "^2.6.0"
104+
"yaml": "^2.6.1"
105105
},
106106
"publishConfig": {
107107
"access": "public"

packages/eslint-plugin-svelte/src/rules/indent-helpers/es.ts

+8-2
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,10 @@ export function defineVisitor(context: IndentContext): NodeListener {
195195
visitor.BreakStatement(node);
196196
},
197197
CallExpression(node: TSESTree.CallExpression) {
198-
const typeArguments = node.typeArguments ?? node.typeParameters;
198+
const typeArguments =
199+
node.typeArguments ??
200+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Support old typescript-eslint
201+
(node as any).typeParameters;
199202
const firstToken = sourceCode.getFirstToken(node);
200203
const leftParenToken = sourceCode.getTokenAfter(typeArguments || node.callee, {
201204
filter: isOpeningParenToken,
@@ -706,7 +709,10 @@ export function defineVisitor(context: IndentContext): NodeListener {
706709
visitor.MethodDefinition(node);
707710
},
708711
NewExpression(node: TSESTree.NewExpression) {
709-
const typeArguments = node.typeArguments ?? node.typeParameters;
712+
const typeArguments =
713+
node.typeArguments ??
714+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Support old typescript-eslint
715+
(node as any).typeParameters;
710716
const newToken = sourceCode.getFirstToken(node);
711717
const calleeTokens = getFirstAndLastTokens(sourceCode, node.callee);
712718
offsets.setOffsetToken(calleeTokens.firstToken, 1, newToken);

packages/eslint-plugin-svelte/src/rules/indent-helpers/ts.ts

+41-7
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,10 @@ export function defineVisitor(context: IndentContext): NodeListener {
6262
// or
6363
// const ErrorMap = Map<string, Error>
6464
// ^^^^^^^^^^^^^^^^^^
65-
const typeArguments = node.typeArguments ?? node.typeParameters;
65+
const typeArguments =
66+
node.typeArguments ??
67+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Support old typescript-eslint
68+
(node as any).typeParameters;
6669
if (typeArguments) {
6770
const firstToken = sourceCode.getFirstToken(node);
6871
offsets.setOffsetToken(sourceCode.getFirstToken(typeArguments), 1, firstToken);
@@ -254,20 +257,34 @@ export function defineVisitor(context: IndentContext): NodeListener {
254257
// {[key in foo]: bar}
255258
const leftBraceToken = sourceCode.getFirstToken(node);
256259

257-
const leftBracketToken = sourceCode.getTokenBefore(node.typeParameter)!;
258-
const rightBracketToken = sourceCode.getTokenAfter(node.nameType || node.typeParameter)!;
260+
const leftBracketToken = sourceCode.getTokenBefore(node.key || node.typeParameter)!;
261+
const rightBracketToken = sourceCode.getTokenAfter(
262+
node.nameType || node.constraint || node.typeParameter
263+
)!;
259264
offsets.setOffsetToken(
260265
[...sourceCode.getTokensBetween(leftBraceToken, leftBracketToken), leftBracketToken],
261266
1,
262267
leftBraceToken
263268
);
264269
offsets.setOffsetElementList(
265-
[node.typeParameter, node.nameType],
270+
[node.key, node.constraint, node.typeParameter, node.nameType],
266271
leftBracketToken,
267272
rightBracketToken,
268273
1
269274
);
270275

276+
if (node.key && node.constraint) {
277+
const firstToken = sourceCode.getFirstToken(node.key);
278+
offsets.setOffsetToken(
279+
[
280+
...sourceCode.getTokensBetween(firstToken, node.constraint),
281+
sourceCode.getFirstToken(node.constraint)
282+
],
283+
1,
284+
firstToken
285+
);
286+
}
287+
271288
const rightBraceToken = sourceCode.getLastToken(node);
272289
if (node.typeAnnotation) {
273290
const typeAnnotationToken = sourceCode.getFirstToken(node.typeAnnotation);
@@ -402,7 +419,10 @@ export function defineVisitor(context: IndentContext): NodeListener {
402419
TSClassImplements(node: TSESTree.TSClassImplements | TSESTree.TSInterfaceHeritage) {
403420
// class C implements T {}
404421
// ^
405-
const typeArguments = node.typeArguments ?? node.typeParameters;
422+
const typeArguments =
423+
node.typeArguments ??
424+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Support old typescript-eslint
425+
(node as any).typeParameters;
406426
if (typeArguments) {
407427
offsets.setOffsetToken(
408428
sourceCode.getFirstToken(typeArguments),
@@ -427,6 +447,14 @@ export function defineVisitor(context: IndentContext): NodeListener {
427447
const leftBraceToken = sourceCode.getTokenAfter(idTokens.lastToken)!;
428448
const rightBraceToken = sourceCode.getLastToken(node);
429449
offsets.setOffsetToken(leftBraceToken, 0, firstToken);
450+
if (node.members)
451+
offsets.setOffsetElementList(node.members, leftBraceToken, rightBraceToken, 1);
452+
},
453+
TSEnumBody(node: TSESTree.TSEnumBody) {
454+
// enum E {...}
455+
// ^^^^^
456+
const leftBraceToken = sourceCode.getFirstToken(node);
457+
const rightBraceToken = sourceCode.getLastToken(node);
430458
offsets.setOffsetElementList(node.members, leftBraceToken, rightBraceToken, 1);
431459
},
432460
TSModuleDeclaration(node: TSESTree.TSModuleDeclaration) {
@@ -677,7 +705,10 @@ export function defineVisitor(context: IndentContext): NodeListener {
677705
},
678706
TSImportType(node: TSESTree.TSImportType) {
679707
// import('foo').B
680-
const typeArguments = node.typeArguments ?? node.typeParameters;
708+
const typeArguments =
709+
node.typeArguments ??
710+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Support old typescript-eslint
711+
(node as any).typeParameters;
681712
const firstToken = sourceCode.getFirstToken(node);
682713
const leftParenToken = sourceCode.getTokenAfter(firstToken, {
683714
filter: isOpeningParenToken,
@@ -1057,7 +1088,10 @@ export function defineVisitor(context: IndentContext): NodeListener {
10571088
sourceCode.getFirstToken(node.id || node)
10581089
);
10591090
}
1060-
const superTypeArguments = node.superTypeArguments ?? node.superTypeParameters;
1091+
const superTypeArguments =
1092+
node.superTypeArguments ??
1093+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Support old typescript-eslint
1094+
(node as any).superTypeParameters;
10611095
if (superTypeArguments != null && node.superClass != null) {
10621096
offsets.setOffsetToken(
10631097
sourceCode.getFirstToken(superTypeArguments),

packages/eslint-plugin-svelte/src/rules/require-event-dispatcher-types.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,11 @@ export default createRule('require-event-dispatcher-types', {
4242
}
4343
})) {
4444
const node = n as TSESTree.CallExpression;
45-
if ((node.typeArguments ?? node.typeParameters) === undefined) {
45+
if (
46+
(node.typeArguments ??
47+
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- Support old typescript-eslint
48+
(node as any).typeParameters) === undefined
49+
) {
4650
context.report({ node, messageId: 'missingTypeParameter' });
4751
}
4852
}

packages/eslint-plugin-svelte/src/shared/svelte-compile-warns/transform/babel.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export function transform(
4343
output: output.code!,
4444
mappings: output.map!.mappings
4545
};
46-
} catch (_e) {
46+
} catch {
4747
return null;
4848
}
4949
}

packages/eslint-plugin-svelte/src/shared/svelte-compile-warns/transform/less.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export function transform(
5050
output: output.css,
5151
mappings: JSON.parse(output.map).mappings
5252
};
53-
} catch (_e) {
53+
} catch {
5454
return null;
5555
}
5656
}

packages/eslint-plugin-svelte/src/shared/svelte-compile-warns/transform/postcss.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export function transform(
4949
output: result.content,
5050
mappings: result.map.toJSON().mappings
5151
};
52-
} catch (_e) {
52+
} catch {
5353
// console.log(e)
5454
return null;
5555
}

packages/eslint-plugin-svelte/src/shared/svelte-compile-warns/transform/sass.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export function transform(
3939
output: output.css,
4040
mappings: output.sourceMap!.mappings
4141
};
42-
} catch (_e) {
42+
} catch {
4343
return null;
4444
}
4545
}

packages/eslint-plugin-svelte/src/shared/svelte-compile-warns/transform/stylus.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export function transform(
4545
output,
4646
mappings: (style as unknown as { sourcemap: RawSourceMap }).sourcemap.mappings
4747
};
48-
} catch (_e) {
48+
} catch {
4949
return null;
5050
}
5151
}

packages/eslint-plugin-svelte/src/types-for-node.ts

+8-6
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ export type ASTNodeListener = {
135135
TSEmptyBodyFunctionExpression?: (
136136
node: TSESTree.TSEmptyBodyFunctionExpression & ASTNodeWithParent
137137
) => void;
138+
TSEnumBody?: (node: TSESTree.TSEnumBody & ASTNodeWithParent) => void;
138139
TSEnumDeclaration?: (node: TSESTree.TSEnumDeclaration & ASTNodeWithParent) => void;
139140
TSEnumMember?: (node: TSESTree.TSEnumMember & ASTNodeWithParent) => void;
140141
TSExportAssignment?: (node: TSESTree.TSExportAssignment & ASTNodeWithParent) => void;
@@ -143,16 +144,16 @@ export type ASTNodeListener = {
143144
node: TSESTree.TSExternalModuleReference & ASTNodeWithParent
144145
) => void;
145146
TSFunctionType?: (node: TSESTree.TSFunctionType & ASTNodeWithParent) => void;
146-
TSInstantiationExpression?: (
147-
node: TSESTree.TSInstantiationExpression & ASTNodeWithParent
148-
) => void;
149147
TSImportEqualsDeclaration?: (
150148
node: TSESTree.TSImportEqualsDeclaration & ASTNodeWithParent
151149
) => void;
152150
TSImportType?: (node: TSESTree.TSImportType & ASTNodeWithParent) => void;
153151
TSIndexedAccessType?: (node: TSESTree.TSIndexedAccessType & ASTNodeWithParent) => void;
154152
TSIndexSignature?: (node: TSESTree.TSIndexSignature & ASTNodeWithParent) => void;
155153
TSInferType?: (node: TSESTree.TSInferType & ASTNodeWithParent) => void;
154+
TSInstantiationExpression?: (
155+
node: TSESTree.TSInstantiationExpression & ASTNodeWithParent
156+
) => void;
156157
TSInterfaceBody?: (node: TSESTree.TSInterfaceBody & ASTNodeWithParent) => void;
157158
TSInterfaceDeclaration?: (node: TSESTree.TSInterfaceDeclaration & ASTNodeWithParent) => void;
158159
TSInterfaceHeritage?: (node: TSESTree.TSInterfaceHeritage & ASTNodeWithParent) => void;
@@ -354,6 +355,7 @@ export type TSNodeListener = {
354355
TSEmptyBodyFunctionExpression?: (
355356
node: TSESTree.TSEmptyBodyFunctionExpression & ASTNodeWithParent
356357
) => void;
358+
TSEnumBody?: (node: TSESTree.TSEnumBody & ASTNodeWithParent) => void;
357359
TSEnumDeclaration?: (node: TSESTree.TSEnumDeclaration & ASTNodeWithParent) => void;
358360
TSEnumMember?: (node: TSESTree.TSEnumMember & ASTNodeWithParent) => void;
359361
TSExportAssignment?: (node: TSESTree.TSExportAssignment & ASTNodeWithParent) => void;
@@ -362,16 +364,16 @@ export type TSNodeListener = {
362364
node: TSESTree.TSExternalModuleReference & ASTNodeWithParent
363365
) => void;
364366
TSFunctionType?: (node: TSESTree.TSFunctionType & ASTNodeWithParent) => void;
365-
TSInstantiationExpression?: (
366-
node: TSESTree.TSInstantiationExpression & ASTNodeWithParent
367-
) => void;
368367
TSImportEqualsDeclaration?: (
369368
node: TSESTree.TSImportEqualsDeclaration & ASTNodeWithParent
370369
) => void;
371370
TSImportType?: (node: TSESTree.TSImportType & ASTNodeWithParent) => void;
372371
TSIndexedAccessType?: (node: TSESTree.TSIndexedAccessType & ASTNodeWithParent) => void;
373372
TSIndexSignature?: (node: TSESTree.TSIndexSignature & ASTNodeWithParent) => void;
374373
TSInferType?: (node: TSESTree.TSInferType & ASTNodeWithParent) => void;
374+
TSInstantiationExpression?: (
375+
node: TSESTree.TSInstantiationExpression & ASTNodeWithParent
376+
) => void;
375377
TSInterfaceBody?: (node: TSESTree.TSInterfaceBody & ASTNodeWithParent) => void;
376378
TSInterfaceDeclaration?: (node: TSESTree.TSInterfaceDeclaration & ASTNodeWithParent) => void;
377379
TSInterfaceHeritage?: (node: TSESTree.TSInterfaceHeritage & ASTNodeWithParent) => void;

packages/eslint-plugin-svelte/src/utils/get-package-json.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function readPackageJson(dir: string): PackageJson | null {
3535
data.filePath = filePath;
3636
return data;
3737
}
38-
} catch (_err) {
38+
} catch {
3939
// do nothing.
4040
}
4141

packages/eslint-plugin-svelte/src/utils/svelte-kit.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function hasSvelteKit(filePath: string): boolean {
5555
return Boolean(
5656
packageJson.dependencies?.['@sveltejs/kit'] ?? packageJson.devDependencies?.['@sveltejs/kit']
5757
);
58-
} catch (_e) {
58+
} catch {
5959
return false;
6060
}
6161
}

packages/eslint-plugin-svelte/tests/src/rules/@typescript-eslint/no-unnecessary-condition.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ const tester = new RuleTester({
1111
ts: '@typescript-eslint/parser',
1212
js: 'espree'
1313
},
14-
project: RULES_PROJECT
14+
project: RULES_PROJECT,
15+
disallowAutomaticSingleRunInference: true
1516
}
1617
}
1718
});

0 commit comments

Comments
 (0)