diff --git a/.changeset/curvy-pears-perform.md b/.changeset/curvy-pears-perform.md deleted file mode 100644 index 5895b4c..0000000 --- a/.changeset/curvy-pears-perform.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -"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 Hello - } - ``` diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a5390d..c2dd907 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,26 @@ # eslint-plugin-primer-react +## 0.5.0 + +### Minor Changes + +- [#10](https://github.com/primer/eslint-plugin-primer-react/pull/10) [`31d069b`](https://github.com/primer/eslint-plugin-primer-react/commit/31d069b0d210c53862de30757ecdfd2222e098b5) Thanks [@colebemis](https://github.com/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. + + ```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 Hello + } + ``` + ## 0.4.2 ### Patch Changes diff --git a/package.json b/package.json index 38d6523..bd1ce8a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "eslint-plugin-primer-react", - "version": "0.4.2", + "version": "0.5.0", "description": "ESLint rules for Primer React", "main": "src/index.js", "scripts": {