Skip to content

Commit

Permalink
style: prettier and linting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nataliepina committed Jan 2, 2024
1 parent 5a91f9a commit 1961010
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,13 @@ module.exports = {
"@typescript-eslint/no-namespace": "error",
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-redundant-type-constituents": "off",
"@typescript-eslint/no-this-alias": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "off",
"@typescript-eslint/no-unnecessary-type-constraint": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-enum-comparison": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-unsafe-return": "off",
Expand Down
5 changes: 5 additions & 0 deletions packages/dropdownMenu/components/DropdownMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,12 @@ export interface DropdownMenuProps {
"data-cy"?: string;
}

// The purpose of `defaultItemToString` is to convert the selected item to a string for Downshift.
// The `item` parameter is intentionally allowed to be of type `any` to accommodate
// flexibility in handling different types or null values (representing deselection).
// The function extracts the value from `item.props.value` if `item` is truthy.
const defaultItemToString = (
// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
item: React.ReactElement<DropdownMenuItemProps> | any
) => (item ? item.props.value : "");

Expand Down
6 changes: 3 additions & 3 deletions packages/styleUtils/layout/gridList/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ export const gridColumnTemplate = columnCount => {
return acc;
}, {})
: columnCount
? `repeat(${columnCount}, minmax(0, 1fr))`
: `repeat(auto-fill, minmax(min(320px, 100%), 1fr));`;
// 👆explicitly setting the min to 0 so content doesn't overflow the grid cell
? `repeat(${columnCount}, minmax(0, 1fr))`
: `repeat(auto-fill, minmax(min(320px, 100%), 1fr));`;
// 👆 explicitly setting the min to 0 so content doesn't overflow the grid cell
// see: https://github.com/rachelandrew/cssgrid-ama/issues/25

return getResponsiveStyle("grid-template-columns", gridTemplateColumns);
Expand Down

0 comments on commit 1961010

Please sign in to comment.