-
Notifications
You must be signed in to change notification settings - Fork 357
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
change: [M3-8242] - Update TypeScript to latest #10573
change: [M3-8242] - Update TypeScript to latest #10573
Conversation
Coverage Report: β
|
@@ -227,7 +227,7 @@ export const printInvoice = async ( | |||
unit: 'px', | |||
}); | |||
|
|||
const convertedInvoiceDate = invoice.date && dateConversion(invoice.date); | |||
const convertedInvoiceDate = dateConversion(invoice.date); |
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.
export const SortableTableHead = <T extends unknown>( | ||
props: SortableTableHeadProps<T> | ||
) => { | ||
export const SortableTableHead = <T,>(props: SortableTableHeadProps<T>) => { |
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.
eslint didn't like extends unknown
which makes sense to me because extends unknown
is useless
@@ -32,6 +32,7 @@ export const RouteAccordion = ({ configIndex, route, routeIndex }: Props) => { | |||
sx={{ backgroundColor: '#f4f5f6', paddingLeft: 1, paddingRight: 1.4 }} | |||
> | |||
{/* TODO ACLB: Implement RulesTable */} | |||
<>Todo</> |
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.
The Accordion props types requires children. This is fine because this code isn't customer facing.
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 cleaned up some old Redux code because it isn't referenced elsewhere in the app and contained some eslint errors
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.
Beautiful! Love to see dead code removed from the project.
"ignoreDeprecations": "5.0", | ||
"suppressImplicitAnyIndexErrors": true, |
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.
suppressImplicitAnyIndexErrors
will be deprecated in v5.5 so the next PR will be removing these two lines and fixing all 250 of the errors this causes π¬
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.
Sounds good. This will also be an improvement for type safety!
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.
Thanks for taking on this update!
β
CI passing
β
Typescript and eslint working in IDE
β
No type errors
"ignoreDeprecations": "5.0", | ||
"suppressImplicitAnyIndexErrors": true, |
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.
Sounds good. This will also be an improvement for type safety!
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.
TS works, confirmed it's on Version 5.4.5 β
eslint
works β
GitHub Actions jobs pass β
Local typechecking β
@@ -34,73 +34,6 @@ export type ThunkDispatch = _ThunkDispatch<ApplicationState, undefined, Action>; | |||
|
|||
export type MapState<S, O> = _MapStateToProps<S, O, ApplicationState>; | |||
|
|||
export interface HasStringID { |
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.
@bnussman Thanks for keeping the codebase clean π
* update typescript to latest and ignore deprecations * Added changeset: Update TypeScript to latest * fix eslint errors and remove unused code --------- Co-authored-by: Banks Nussman <[email protected]>
Description π
Parsing error: DeprecationError: 'originalKeywordKind' has been deprecated since v5.0.0 and can no longer be used. Use 'identifierToKeywordKind(identifier)' instead
Error while loading rule '@typescript-eslint/no-loss-of-precision': @typescript-eslint/no-loss-of-precision requires at least ESLint v7.1.0
Why β
How to test π§ͺ
lint
Github Actions jobs passtypecheck
Github Actions job passesAs an Author I have considered π€