Skip to content

Commit

Permalink
Create curvy-pears-perform.md
Browse files Browse the repository at this point in the history
  • Loading branch information
colebemis authored Sep 24, 2021
1 parent 445faf3 commit 31d069b
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .changeset/curvy-pears-perform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
"eslint-plugin-primer-react": minor
---

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.

```js
/* 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>
}
```

0 comments on commit 31d069b

Please sign in to comment.