kristerkari / stylelint-config-react-native-styled-components

Shareable stylelint config for styled components when using React Native
MIT License
28 stars 1 forks source link

Maybe some false positives? #240

Open tfreitas90 opened 2 months ago

tfreitas90 commented 2 months ago

I came across with this some things that it could be false positives because they are read by react-native with styled-components.

  1. theme.spacers.XXXL = "48px"

    padding: ${({theme}) => `${theme.spacers.XXXL} 0`};

this unit is not supported when using styled-components with React Native unit-allowed-list

2.

const btnSize = (small?: boolean) => (small ? '32px' : '48px');

export const BtnComponent = styled(View)<{small?: boolean}>`
  height: ${({small}) => btnSize(small)};
`;

this function is not supported when using styled-components with React Native function-allowed-list

3.

export const TopContent = styled(View)`
  horizontal-padding: ${({theme}) => theme.spacers.M};
`;

Unexpected unknown property "horizontal-padding" react-native/css-property-no-unknown

4.

width: 80px; // Fix Android problem X

Unknown word CssSyntaxError

gbhasha commented 1 month ago

Any update on this...?