-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update typescript-eslint monorepo to v7 (major) #518
Update typescript-eslint monorepo to v7 (major) #518
Conversation
⚠ Artifact update problemRenovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is. ♻ Renovate will retry this branch, including artifacts, only when one of the following happens:
The artifact failure details are included below: File name: package-lock.json
|
0b7bdeb
to
28ac139
Compare
11a29c7
to
d05d4ff
Compare
bb71266
to
5686bc5
Compare
ed5a7eb
to
526f08e
Compare
e1e043e
to
4970011
Compare
Edited/Blocked NotificationRenovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR. You can manually request rebase by checking the rebase/retry box above. ⚠ Warning: custom changes will be lost. |
…o default 'camelCase'. Set no naming convention for imports. No need.
…mps all other type designations anyway so it was pointless.
…irective." This reverts commit dbfe610.
…n scenarios where types self reference recursively the index signature must be used otherwise ts throws errors.
…hy not to use function type instead of interface.
…se it's supposed to be more concise and easier to read.
boolean is unioned with null | undefined. So that means it wants to change from || to ?? when the value could be true | false | null. ?? doesn't have the same effect as || in that scenario and I can't think of a situation where someone would want to use ?? when that happens.
Reviewed the change log for changes. Made the necessary update due to rule changes and other changes in the changelog. I think this is ready to be merged. @shawnmcknight I guess I'll just close the PR for |
.eslintrc.js
Outdated
@@ -139,11 +142,14 @@ module.exports = { | |||
], | |||
'@typescript-eslint/consistent-type-imports': ['error', { prefer: 'type-imports' }], | |||
|
|||
// disable consistent indexed object style. both are used in mvom |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use Record
and the index signature. The Record
is good in most scenarios as used in mvom
but,
TypeScript will report errors about recursive type reference in scenarios like in Schema.ts
where SchemaDefinition
references SchemaTypeDefinition
and SchemaTypeDefinition
references SchemaDefinition
.
I think turning the rule off is better than trying to force one or the other. I think I liked the use of Record
where it made sense and the use the index signature where needed as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to see a global enforcement of consistency and an override of the rule where it's not possible to use that. It looks like its by design that Record
cannot circularly reference itself: microsoft/TypeScript#33050 (comment)
However, for those scenarios where that's not the case, it would be better to have consistency and enforce the rule.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed the override to the turn the rule off. I updated where possible to use Record
and provided an override for where not possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall. I do think we should have the rule enabled for consistency and override it where we can't use it due to the circular reference issue. Just a few other minor notes as well.
.eslintrc.js
Outdated
@@ -176,9 +185,22 @@ module.exports = { | |||
'@typescript-eslint/restrict-template-expressions': 'off', | |||
'@typescript-eslint/unbound-method': 'off', | |||
|
|||
// override @typescript-eslint/stylistic-type-checked to ignore consistent-indexed-object-style. Both are used as required. | |||
'@typescript-eslint/consistent-indexed-object-style': 'off', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we did need to disable this rule, we shouldn't have to disable it in both the jsTsGlobs
override and the tsGlobs
override. The jsTsGlobs
override should have covered both.
But as noted previously, I think we should enable the rule.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved this to jsTsGlobs
I understood your comment as still wanting the override. if that's not the case, I will remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My comment was on @typescript-eslint/consistent-indexed-object-style
which you turned off
in both the jsTsGlobs
and the tsGlobs
. Since tsGlobs
is a subset of jsTsGlobs
you effectively turned the rule off twice. Since you were going to change this anyway, it was to provide an understanding that you were doing something redundant.
However, it seems like you've moved the prefer-nullish-coalescing
rule to jsTsGlobs
, but that wasn't the one I commented on. That rule requires type checking, which isn't enabled for jsTsGlobs
. It has to be moved back.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh ok gotcha. Thank you. I moved prefer-nullish-coalescing
back to tsGlobs.
.eslintrc.js
Outdated
], | ||
|
||
// ban non-null assertions | ||
'@typescript-eslint/no-non-null-assertion': 'error', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I usually try to group related rules or keep them at least alphabetically ordered. So I would flip-flop these two for readability.
…ency is preferred with overrides for scenarios where consistency cannot be upheld.
@shawnmcknight I think I resolved most of your comments. I may have misunderstood one of them. I think this is ready for another look. Thank you for the review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to move the nullish coalescing rule back.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
This PR contains the following updates:
5.62.0
->7.7.0
5.62.0
->7.7.0
17.1.0
->18.0.0
Release Notes
typescript-eslint/typescript-eslint (@typescript-eslint/eslint-plugin)
v7.7.0
Compare Source
🚀 Features
no-new-symbol
withno-new-native-nonconstructor
❤️ Thank You
You can read about our versioning strategy and releases on our website.
v7.6.0
Compare Source
🚀 Features
❤️ Thank You
You can read about our versioning strategy and releases on our website.
v7.5.0
Compare Source
🩹 Fixes
eslint-plugin: [no-floating-promises] handle TaggedTemplateExpression
eslint-plugin: [no-unnecessary-type-assertion] handle exactOptionalPropertyTypes compiler option
❤️ Thank You
You can read about our versioning strategy and releases on our website.
v7.4.0
Compare Source
🚀 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
andfalse
eslint-plugin: [no-unnecessary-type-assertion] avoid remove const casting on template literals with expressions inside
❤️ Thank You
You can read about our versioning strategy and releases on our website.
v7.3.1
Compare Source
🩹 Fixes
❤️ Thank You
You can read about our versioning strategy and releases on our website.
v7.3.0
Compare Source
🚀 Features
eslint-plugin: [restrict-template-expressions] add
allowArray
optioneslint-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 inpackage.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
You can read about our versioning strategy and releases on our website.
v7.2.0
Compare Source
🚀 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
You can read about our versioning strategy and releases on our website.
v7.1.1
Compare Source
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 and releases on our website.
v7.1.0
Compare Source
🚀 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
You can read about our versioning strategy and releases on our website.
v7.0.2
Compare Source
🩹 Fixes
@types/eslint
incompatibilities, add tests❤️ Thank You
You can read about our versioning strategy and releases on our website.
v7.0.1
Compare Source
🩹 Fixes
❤️ Thank You
You can read about our versioning strategy and releases on our website.
v7.0.0
Compare Source
🚀 Features
add support for flat configs
🩹 Fixes
❤️ Thank You
You can read about our versioning strategy and releases on our website.
6.21.0 (2024-02-05)
🚀 Features
export plugin metadata
allow
parserOptions.project: false
eslint-plugin: add rule prefer-find
🩹 Fixes
eslint-plugin: [no-unused-vars] don't report on types referenced in export assignment expression
eslint-plugin: [switch-exhaustiveness-check] better support for intersections, infinite types, non-union values
eslint-plugin: [consistent-type-imports] dont report on types used in export assignment expressions
eslint-plugin: [no-unnecessary-condition] handle left-hand optional with exactOptionalPropertyTypes option
eslint-plugin: [class-literal-property-style] allow getter when same key setter exists
eslint-plugin: [no-unnecessary-type-assertion] provide valid fixes for assertions with extra tokens before
as
keyword❤️ Thank You
You can read about our versioning strategy and releases on our website.
6.20.0 (2024-01-29)
🚀 Features
🩹 Fixes
eslint-plugin: [no-useless-template-literals] incorrect bigint autofix result
eslint-plugin: [prefer-nullish-coalescing] treat any/unknown as non-nullable
eslint-plugin: [no-useless-template-literals] report Infinity & NaN
eslint-plugin: [prefer-readonly] disable checking accessors
❤️ Thank You
You can read about our versioning strategy and releases on our website.
6.19.1 (2024-01-22)
🩹 Fixes
type-utils: preventing isUnsafeAssignment infinite recursive calls
eslint-plugin: [no-unnecessary-condition] fix false positive for type variable
❤️ Thank You
You can read about our versioning strategy and releases on our website.
6.19.0 (2024-01-15)
🚀 Features
eslint-plugin: [prefer-promise-reject-errors] add rule
eslint-plugin: [no-array-delete] add new rule
eslint-plugin: [no-useless-template-literals] add fix suggestions
🩹 Fixes
eslint-plugin: [no-unnecessary-type-assertion] detect unnecessary non-null-assertion on a call expression
eslint-plugin: [no-unnecesary-type-assertion] treat unknown/any as nullable
❤️ Thank You
You can read about our versioning strategy and releases on our website.
6.18.1 (2024-01-08)
🩹 Fixes
eslint-plugin: [no-non-null-assertion] provide valid fix when member access is on next line
eslint-plugin: [no-unnecessary-condition] improve checking optional callee
eslint-plugin: [prefer-readonly] support modifiers of unions and intersections
eslint-plugin: [switch-exhaustiveness-check] fix new allowDefaultCaseForExhaustiveSwitch option
❤️ Thank You
You can read about our versioning strategy and releases on our website.
6.18.0 (2024-01-06)
🚀 Features
typescript-estree: throw on invalid update expressions
eslint-plugin: [no-var-requires, no-require-imports] allow option
❤️ Thank You
You can read about our versioning strategy and releases on our website.
v6.21.0
Compare Source
🚀 Features
export plugin metadata
allow
parserOptions.project: false
eslint-plugin: add rule prefer-find
🩹 Fixes
eslint-plugin: [no-unused-vars] don't report on types referenced in export assignment expression
eslint-plugin: [switch-exhaustiveness-check] better support for intersections, infinite types, non-union values
eslint-plugin: [consistent-type-imports] dont report on types used in export assignment expressions
eslint-plugin: [no-unnecessary-condition] handle left-hand optional with exactOptionalPropertyTypes option
eslint-plugin: [class-literal-property-style] allow getter when same key setter exists
eslint-plugin: [no-unnecessary-type-assertion] provide valid fixes for assertions with extra tokens before
as
keyword❤️ Thank You
You can read about our versioning strategy and releases on our website.
v6.20.0
Compare Source
🚀 Features
🩹 Fixes
eslint-plugin: [no-useless-template-literals] incorrect bigint autofix result
eslint-plugin: [prefer-nullish-coalescing] treat any/unknown as non-nullable
eslint-plugin: [no-useless-template-literals] report Infinity & NaN
eslint-plugin: [prefer-readonly] disable checking accessors
❤️ Thank You
You can read about our versioning strategy and releases on our website.
v6.19.1
Compare Source
🩹 Fixes
type-utils: preventing isUnsafeAssignment infinite recursive calls
eslint-plugin: [no-unnecessary-condition] fix false positive for type variable
❤️ Thank You
You can read about our versioning strategy and releases on our website.
v6.19.0
Compare Source
🚀 Features
eslint-plugin: [prefer-promise-reject-errors] add rule
eslint-plugin: [no-array-delete] add new rule
eslint-plugin: [no-useless-template-literals] add fix suggestions
🩹 Fixes
eslint-plugin: [no-unnecessary-type-assertion] detect unnecessary non-null-assertion on a call expression
eslint-plugin: [no-unnecesary-type-assertion] treat unknown/any as nullable
❤️ Thank You
You can read about our versioning strategy and releases on our website.
v6.18.1
Compare Source
🩹 Fixes
eslint-plugin: [no-non-null-assertion] provide valid fix when member access is on next line
eslint-plugin: [no-unnecessary-condition] improve checking optional callee
eslint-plugin: [prefer-readonly] support modifiers of unions and intersections
eslint-plugin: [switch-exhaustiveness-check] fix new allowDefaultCaseForExhaustiveSwitch option
❤️ Thank You
You can read about our versioning strategy and releases on our website.
v6.18.0
Compare Source
🚀 Features
typescript-estree: throw on invalid update expressions
eslint-plugin: [no-var-requires, no-require-imports] allow option
❤️ Thank You
You can read about our versioning strategy and releases on our website.
v6.17.0
Compare Source
Bug Fixes
patterns
orpaths
in options are empty (#8108) (675e987)Features
default
case on an already exhaustiveswitch
(#7539) (6a219bd)You can read about our versioning strategy and releases on our website.
v6.16.0
Compare Source
Bug Fixes
Features
You can read about our versioning strategy and releases on our website.
v6.15.0
Compare Source
Features
You can read about our versioning strategy and releases on our website.
v6.14.0
Compare Source
Bug Fixes
no-unsafe-unary-minus
(#7998) (705370a)Features
You can read about our versioning strategy and releases on our website.
6.13.2 (2023-12-04)
Note: Version bump only for package @typescript-eslint/eslint-plugin
You can read about our versioning strategy and releases on our website.
6.13.1 (2023-11-28)
Note: Version bump only for package @typescript-eslint/eslint-plugin
You can read about our versioning strategy and releases on our website.
v6.13.2
Compare Source
Note: Version bump only for package @typescript-eslint/eslint-plugin
You can read about our versioning strategy and releases on our website.
v6.13.1
Compare Source
Note: Version bump only for package @typescript-eslint/eslint-plugin
You can read about our versioning strategy and releases on our website.
v6.13.0
Compare Source
Note: Version bump only for package @typescript-eslint/eslint-plugin
You can read about our versioning strategy and releases on our website.
v6.12.0
Compare Source
Bug Fixes
ignoreClassesThatImplementAnInterface
is set (#7705) (155aa1f)Features
You can read about our versioning strategy and releases on our website.
v6.11.0
Compare Source
Bug Fixes
allowTypedFunctionExpressions
(#7553) (be2777c)Features
no-unsafe-unary-minus
rule (#7390) (c4709c2)CodePath
selector types (#7551) (99a026f)You can read about our versioning strategy and releases on our website.
v6.10.0
Compare Source
Bug Fixes
Features
You can read about our versioning strategy and releases on our website.
6.9.1 (2023-10-30)
Bug Fixes
You can read about our versioning strategy and releases on our website.
v6.9.1
Compare Source
Bug Fixes
You can read about our versioning strategy and releases on our website.
v6.9.0
Compare Source
Bug Fixes
Features
this: void
parameter (#7696) (6398d3f), closes #7538You can read about our versioning strategy and releases on our website.
v6.8.0
Compare Source
Bug Fixes
Features
prefer-destructuring
(#7117) (3c6379b)You can read about our versioning strategy and releases on our website.
6.7.5 (2023-10-09)
Bug Fixes
You can read about our versioning strategy and releases on our website.
6.7.4 (2023-10-02)
Note: Version bump only for package @typescript-eslint/eslint-plugin
You can read about our versioning strategy and releases on our website.
6.7.3 (2023-09-25)
Note: Version bump only for package @typescript-eslint/eslint-plugin
You can read about our versioning strategy and releases on our website.
6.7.2 (2023-09-18)
Note: Version bump only for package @typescript-eslint/eslint-plugin
You can read about our versioning strategy and releases on our website.
6.7.1 (2023-09-18)
Note: Version bump only for package @typescript-eslint/eslint-plugin
You can read about our versioning strategy and releases on our website.
v6.7.5
Compare Source
Bug Fixes
You can read about our versioning strategy and releases on our website.
v6.7.4
Compare Source
Note: Version bump only for package @typescript-eslint/eslint-plugin
You can read about our versioning strategy and releases on our website.
v6.7.3
Compare Source
Note: Version bump only for package @typescript-eslint/eslint-plugin
You can read about our versioning strategy and releases on our website.
v6.7.2
Compare Source
Note: Version bump only for package @typescript-eslint/eslint-plugin
You can read about our versioning strategy and releases on our website.
v6.7.0
Compare Source
Bug Fixes
Features
You can read about our versioning strategy and releases on our website.
v6.6.0
Compare Source
Bug Fixes
You can read about our versioning strategy and releases on our website.
v6.5.0
Compare Source
Bug Fixes
You can read about our versioning strategy and releases on our website.
6.4.1 (2023-08-21)
Bug Fixes
You can read about our versioning strategy and releases on our website.
v6.4.1
Compare Source
Bug Fixes
You can read about our versioning strategy and releases on our website.
v6.4.0
Compare Source
Bug Fixes
You can read about our versioning strategy and releases on our website.
v6.3.0
Compare Source
Bug Fixes
allowTypeImports
enabled (#7379) (cc9a46d)Features
ignorePrimitives
option to betrue
(#7331) (dfcafae)Reverts
You can read about our versioning strategy and releases on our website.
6.2.1 (2023-07-31)
Bug Fixes
You can read about our versioning strategy and releases on our website.
v6.2.1
Compare Source
Bug Fixes
You can read about our versioning strategy and releases on our website.
v6.2.0
Compare Source
Bug Fixes
Features
You can read about our versioning strategy and releases on our website.
v6.1.0
Compare Source
Bug Fixes
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ 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.
This PR has been generated by Mend Renovate. View repository job log here.