eslint-plugin-primer-react 0.0.0-2021820204334 → 0.4.2-rc.ddd5385

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,10 +1,24 @@
1
1
  # eslint-plugin-primer-react
2
2
 
3
- ## 0.0.0-2021820204334
3
+ ## 0.4.2
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - Fake entry to force publishing
7
+ - [#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.
8
+
9
+ * [#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:
10
+
11
+ - Nested `sx` properties:
12
+
13
+ ```jsx
14
+ <Box sx={{'&:hover': {bg: 'bg.primary'}}}>
15
+ ```
16
+
17
+ - Functions in `sx` prop:
18
+
19
+ ```jsx
20
+ <Box sx={{boxShadow: theme => `0 1px 2px ${theme.colors.text.primary}`}}>
21
+ ```
8
22
 
9
23
  ## 0.4.1
10
24
 
@@ -44,7 +44,8 @@ const ThemeGetExample = styled.div`
44
44
 
45
45
  - `skipImportCheck` (default: `false`)
46
46
 
47
- 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 that pass color-related props down to Primer React components.
47
+ 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.
48
+
48
49
 
49
50
  ```
50
51
  "primer-react/no-deprecated-colors": ["warn", {"skipImportCheck": true}]