File tree Expand file tree Collapse file tree 5 files changed +5
-6
lines changed
src/components/CustomToolbars
shared/eslint-config-web-widgets Expand file tree Collapse file tree 5 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ export function preview(props: StarRatingPreviewProps): ReactElement {
2828 fullIcon = { fullIcon }
2929 maximumValue = { props . maximumStars ?? 5 }
3030 style = { parseStyle ( props . style ) }
31- value = { Number ( props . maximumStars ?? 5 ) - 1 }
31+ value = { ( props . maximumStars ?? 5 ) - 1 }
3232 />
3333 ) ;
3434}
Original file line number Diff line number Diff line change @@ -94,9 +94,9 @@ export function Rating(props: RatingProps): ReactElement {
9494 role = "radio"
9595 tabIndex = { index === Math . max ( props . value - 1 , 0 ) ? 0 : - 1 }
9696 >
97- { Number ( currentIndex ) <= props . value ? (
97+ { currentIndex <= props . value ? (
9898 props . fullIcon
99- ) : hover && currentIndex <= Number ( hover ) ? (
99+ ) : hover && currentIndex <= hover ? (
100100 < div className = "rating-item-hover" > { props . fullIcon } </ div >
101101 ) : (
102102 props . emptyIcon
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ function defineBasicGroups(widgetProps: Partial<RichTextContainerProps>): toolba
1313 const enabledGroups : Array < toolbarContentType | undefined > = Object . entries ( widgetProps ) . map ( ( [ prop , enabled ] ) => {
1414 if ( Object . hasOwn ( TOOLBAR_GROUP , prop ) && enabled ) {
1515 return {
16- children : TOOLBAR_GROUP [ prop . toString ( ) ]
16+ children : TOOLBAR_GROUP [ prop ]
1717 } ;
1818 } else {
1919 return undefined ;
Original file line number Diff line number Diff line change @@ -154,6 +154,7 @@ export default tseslint.config(
154154 "@typescript-eslint/no-empty-object-type" : "warn" ,
155155 "@typescript-eslint/no-unsafe-function-type" : "warn" ,
156156 "@typescript-eslint/no-wrapper-object-types" : "warn" ,
157+ "@typescript-eslint/no-unnecessary-type-conversion" : "error" ,
157158
158159 "@typescript-eslint/ban-ts-comment" : "warn" ,
159160 "@typescript-eslint/camelcase" : "off" ,
You can’t perform that action at this time.
0 commit comments