diff --git a/.changeset/shaggy-coins-boil.md b/.changeset/shaggy-coins-boil.md new file mode 100644 index 00000000..095b934d --- /dev/null +++ b/.changeset/shaggy-coins-boil.md @@ -0,0 +1,5 @@ +--- +"eslint-plugin-primer-react": patch +--- + +Replace references to `@primer/components` with `@primer/react` diff --git a/CHANGELOG.md b/CHANGELOG.md index 8269d1eb..cf69121c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,7 +36,7 @@ ```js /* eslint primer-react/no-deprecated-colors: ["warn", {"checkAllStrings": true}] */ - import {Box} from '@primer/components' + import {Box} from '@primer/react' function ExampleComponent() { const styles = { @@ -51,7 +51,7 @@ ### Patch Changes -- [#7](https://github.com/primer/eslint-plugin-primer-react/pull/7) [`d9dfb8d`](https://github.com/primer/eslint-plugin-primer-react/commit/d9dfb8de6d6dc42efe606517db7a0dd90d5c5578) Thanks [@colebemis](https://github.com/colebemis)! - Add `skipImportCheck` option. By default, the `no-deprecated-colors` rule will only check for deprecated colors used in functions and components that are imported from `@primer/components`. You can disable this behavior by setting `skipImportCheck` to `true`. This is useful for linting custom components that pass color-related props down to Primer React components. +- [#7](https://github.com/primer/eslint-plugin-primer-react/pull/7) [`d9dfb8d`](https://github.com/primer/eslint-plugin-primer-react/commit/d9dfb8de6d6dc42efe606517db7a0dd90d5c5578) Thanks [@colebemis](https://github.com/colebemis)! - Add `skipImportCheck` option. By default, the `no-deprecated-colors` rule will only check for deprecated colors used in functions and components that are imported from `@primer/react`. You can disable this behavior by setting `skipImportCheck` to `true`. This is useful for linting custom components that pass color-related props down to Primer React components. * [#6](https://github.com/primer/eslint-plugin-primer-react/pull/6) [`dd14594`](https://github.com/primer/eslint-plugin-primer-react/commit/dd14594b05e4d800baa76771f5b911d77352a983) Thanks [@colebemis](https://github.com/colebemis)! - The `no-deprecated-colors` rule can now find deprecated colors in the following cases: diff --git a/docs/rules/no-deprecated-colors.md b/docs/rules/no-deprecated-colors.md index 98468d9f..818282cc 100644 --- a/docs/rules/no-deprecated-colors.md +++ b/docs/rules/no-deprecated-colors.md @@ -12,7 +12,7 @@ This rule disallows references to color variables that are deprecated in [Primer ```jsx /* eslint primer-react/no-deprecated-colors: "error" */ -import {Box, themeGet} from '@primer/components' +import {Box, themeGet} from '@primer/react' import styled from 'styled-components' const SystemPropExample() = () => Incorrect @@ -30,7 +30,7 @@ const ThemeGetExample = styled.div` ```jsx /* eslint primer-react/no-deprecated-colors: "error" */ -import {Box, themeGet} from '@primer/components' +import {Box, themeGet} from '@primer/react' import styled from 'styled-components' const SystemPropExample() = () => Correct @@ -48,11 +48,11 @@ const ThemeGetExample = styled.div` - `skipImportCheck` (default: `false`) - By default, the `no-deprecated-colors` rule will only check for deprecated colors used in functions and components that are imported from `@primer/components`. You can disable this behavior by setting `skipImportCheck` to `true`. This is useful for linting custom components that pass color-related props down to Primer React components. + By default, the `no-deprecated-colors` rule will only check for deprecated colors used in functions and components that are imported from `@primer/react`. You can disable this behavior by setting `skipImportCheck` to `true`. This is useful for linting custom components that pass color-related props down to Primer React components. ```js /* eslint primer-react/no-deprecated-colors: ["warn", {"skipImportCheck": true}] */ - import {Box} from '@primer/components' + import {Box} from '@primer/react' function MyBox({color, children}) { return {children} @@ -70,7 +70,7 @@ const ThemeGetExample = styled.div` ```js /* eslint primer-react/no-deprecated-colors: ["warn", {"checkAllStrings": true}] */ - import {Box} from '@primer/components' + import {Box} from '@primer/react' function ExampleComponent() { const styles = { diff --git a/docs/rules/no-system-props.md b/docs/rules/no-system-props.md index 0bc2f706..957c6599 100644 --- a/docs/rules/no-system-props.md +++ b/docs/rules/no-system-props.md @@ -14,7 +14,7 @@ This rule disallows the use of any styled-system prop on Primer components, as t ```jsx /* eslint primer-react/no-system-props: "error" */ -import {Button} from '@primer/components' +import {Button} from '@primer/react'