Skip to content

v0.5.0

Compare
Choose a tag to compare
@primer-css primer-css released this 24 Sep 22:47
· 391 commits to main since this release
f408f42

Minor Changes

  • #10 31d069b Thanks @colebemis! - Add a checkAllStrings option to the no-deprecated-colors rule.

    If checkAllStrings is set to true, the no-deprecated-colors rule will check for deprecated colors in all strings. This is useful for catching uses of deprecated colors outside system props and the sx prop.

    /* eslint primer-react/no-deprecated-colors: ["warn", {"checkAllStrings": true}] */
    import {Box} from '@primer/components'
    
    function ExampleComponent() {
      const styles = {
        // Enabling `checkAllStrings` will find deprecated colors used like this:
        color: 'text.primary'
      }
      return <Box sx={styles}>Hello</Box>
    }