Skip to content

Commit

Permalink
refactor: update styled-components to v6 (#266)
Browse files Browse the repository at this point in the history
Add $prefix on custom props of styled components.
Remove or replace invalid styles.
Remove types.d.ts declaration file, which was messing types.
Update tsconfig to allow js.
Update types which were messed up by the declaration file, to reflect the real type.
Add prop types to js components to fix sonar warning. They should be helpful when migrating to typescript.
Add some FIXME comment where the types are too messed up, and additional knowledge/refactor is required to fix them.
Remove unused files.
Remove invalid, unused props.
Split StyledListItem to one simpler styled component and the EnhancedListItem, which takes care of setting the right color for the styled component. Replace its usages.

Refs: CO-1610
  • Loading branch information
beawar authored Dec 19, 2024
1 parent 921f2b1 commit 2eda4bc
Show file tree
Hide file tree
Showing 37 changed files with 507 additions and 381 deletions.
10 changes: 9 additions & 1 deletion jest-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,15 @@ jest.setTimeout(10000);
failOnConsole({
...getFailOnConsoleDefaultConfig(),
shouldFailOnWarn: false,
silenceMessage: (message): boolean => message.includes(JEST_MOCKED_ERROR)
silenceMessage: (message): boolean =>
message.includes(JEST_MOCKED_ERROR) ||
// FIXME: these are caused by the wrong usage of the ChipInput, where all the data should
// go in the value of the chip, not the chip itself.
message.includes('Received `false` for a non-boolean attribute `duplicated`') ||
message.includes('React does not recognize the `firstName` prop on a DOM element') ||
message.includes('React does not recognize the `lastName` prop on a DOM element') ||
message.includes('React does not recognize the `fullName` prop on a DOM element') ||
message.includes('React does not recognize the `isGroup` prop on a DOM element')
});

beforeAll(() => {
Expand Down
Loading

0 comments on commit 2eda4bc

Please sign in to comment.