eslint-plugin-primer-react 4.2.0 → 5.0.0-rc.2db7a42
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 +6 -0
- package/docs/rules/new-css-color-vars.md +2 -2
- package/package-lock.json +14804 -0
- package/package.json +1 -1
- package/src/configs/recommended.js +0 -1
- package/src/index.js +0 -1
- package/src/rules/__tests__/new-color-css-vars.test.js +90 -98
- package/src/rules/new-color-css-vars.js +2 -2
- package/docs/rules/new-color-css-vars-have-fallback.md +0 -25
- package/src/rules/__tests__/new-css-vars-have-fallback.test.js +0 -31
- package/src/rules/new-color-css-vars-have-fallback.js +0 -87
- package/src/utils/new-color-css-vars-map.json +0 -326
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# eslint-plugin-primer-react
|
|
2
2
|
|
|
3
|
+
## 5.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#172](https://github.com/primer/eslint-plugin-primer-react/pull/172) [`8e24d66`](https://github.com/primer/eslint-plugin-primer-react/commit/8e24d660065b3c690a14d826580c793d7b305068) Thanks [@langermank](https://github.com/langermank)! - [Breaking] Remove `new-color-css-vars-have-fallback`
|
|
8
|
+
|
|
3
9
|
## 4.2.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
CSS variables are allowed within the `sx` prop in Primer React components. However, the legacy color CSS variables are
|
|
4
4
|
deprecated in favor of the new CSS variables introduced in Primitives v8. This rule will warn you if you are using the
|
|
5
|
-
deprecated color CSS variables in the `sx` prop, and autofix it
|
|
5
|
+
deprecated color CSS variables in the `sx` prop, and autofix it.
|
|
6
6
|
|
|
7
7
|
## Rule Details
|
|
8
8
|
|
|
@@ -36,5 +36,5 @@ one based on the property. We only check `sx` because `stylelint` is used to lin
|
|
|
36
36
|
👍 Examples of **correct** code for this rule:
|
|
37
37
|
|
|
38
38
|
```jsx
|
|
39
|
-
<Button sx={{color: 'var(--fgColor-muted
|
|
39
|
+
<Button sx={{color: 'var(--fgColor-muted)'}}>Test</Button>
|
|
40
40
|
```
|