eslint-plugin-primer-react 7.0.0-rc.ffaa602 → 7.0.1-rc.134f18c
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/.github/workflows/release_tracking.yml +1 -1
- package/CHANGELOG.md +14 -0
- package/README.md +1 -0
- package/docs/rules/no-deprecated-experimental-components.md +29 -0
- package/package-lock.json +421 -327
- package/package.json +3 -3
- package/src/configs/recommended.js +1 -2
- package/src/index.js +1 -0
- package/src/rules/__tests__/no-deprecated-experimental-components.test.js +44 -0
- package/src/rules/enforce-css-module-identifier-casing.js +1 -1
- package/src/rules/no-deprecated-experimental-components.js +68 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# eslint-plugin-primer-react
|
|
2
2
|
|
|
3
|
+
## 7.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#331](https://github.com/primer/eslint-plugin-primer-react/pull/331) [`82a7d03`](https://github.com/primer/eslint-plugin-primer-react/commit/82a7d037b92c02126c6bf0daba060b233ef94262) Thanks [@francinelucca](https://github.com/francinelucca)! - Update message for no-deprecated-experimental-components rule
|
|
8
|
+
|
|
9
|
+
- [#333](https://github.com/primer/eslint-plugin-primer-react/pull/333) [`c709c98`](https://github.com/primer/eslint-plugin-primer-react/commit/c709c98a84dc1ce978575136292063f3821b47cc) Thanks [@francinelucca](https://github.com/francinelucca)! - Update message for no-deprecated-experimental-components rule
|
|
10
|
+
|
|
11
|
+
- [#331](https://github.com/primer/eslint-plugin-primer-react/pull/331) [`82a7d03`](https://github.com/primer/eslint-plugin-primer-react/commit/82a7d037b92c02126c6bf0daba060b233ef94262) Thanks [@francinelucca](https://github.com/francinelucca)! - Removes primer-react/enforce-css-module-identifier-casing, primer-react/enforce-css-module-default-import from recommended set of rules.
|
|
12
|
+
|
|
3
13
|
## 7.0.0
|
|
4
14
|
|
|
5
15
|
### Major Changes
|
|
@@ -14,8 +24,12 @@
|
|
|
14
24
|
|
|
15
25
|
- [#258](https://github.com/primer/eslint-plugin-primer-react/pull/258) [`83f29f3`](https://github.com/primer/eslint-plugin-primer-react/commit/83f29f339999b9c21d95167bcc2680c1797cbab6) Thanks [@keithamus](https://github.com/keithamus)! - Add enforce-css-module-identifier-casing rule
|
|
16
26
|
|
|
27
|
+
- [#325](https://github.com/primer/eslint-plugin-primer-react/pull/325) [`f689fcc`](https://github.com/primer/eslint-plugin-primer-react/commit/f689fcc0ca3e5a2c4b76aa04ebb620c7c5786fdf) Thanks [@TylerJDev](https://github.com/TylerJDev)! - Add `no-deprecated-experimental-components` rule
|
|
28
|
+
|
|
17
29
|
### Patch Changes
|
|
18
30
|
|
|
31
|
+
- [#330](https://github.com/primer/eslint-plugin-primer-react/pull/330) [`1b70cf1`](https://github.com/primer/eslint-plugin-primer-react/commit/1b70cf108948d2c6818bbaddd69e5dfad5060e53) Thanks [@francinelucca](https://github.com/francinelucca)! - Add null check to enforce-css-module-identifier-casing.js. Corrects complex instances where ref.resolve is not available.
|
|
32
|
+
|
|
19
33
|
- [#314](https://github.com/primer/eslint-plugin-primer-react/pull/314) [`63ef9fd`](https://github.com/primer/eslint-plugin-primer-react/commit/63ef9fdf02a9c4b80528644a96fd81e366bce187) Thanks [@khiga8](https://github.com/khiga8)! - fix: Link to should be allowed to have tooltip
|
|
20
34
|
|
|
21
35
|
## 6.1.6
|
package/README.md
CHANGED
|
@@ -40,3 +40,4 @@ ESLint rules for Primer React
|
|
|
40
40
|
- [a11y-link-in-text-block](https://github.com/primer/eslint-plugin-primer-react/blob/main/docs/rules/a11y-link-in-text-block.md)
|
|
41
41
|
- [a11y-remove-disable-tooltip](https://github.com/primer/eslint-plugin-primer-react/blob/main/docs/rules/a11y-remove-disable-tooltip.md)
|
|
42
42
|
- [a11y-use-accessible-tooltip](https://github.com/primer/eslint-plugin-primer-react/blob/main/docs/rules/a11y-use-accessible-tooltip.md)
|
|
43
|
+
- [no-deprecated-experimental-components](https://github.com/primer/eslint-plugin-primer-react/blob/main/docs/rules/no-deprecated-experimental-components.md)
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# No deprecated experimental components
|
|
2
|
+
|
|
3
|
+
## Rule Details
|
|
4
|
+
|
|
5
|
+
This rule discourages the usage of specific imports from `@primer/react/experimental`.
|
|
6
|
+
|
|
7
|
+
👎 Examples of **incorrect** code for this rule
|
|
8
|
+
|
|
9
|
+
```jsx
|
|
10
|
+
import {SelectPanel} from '@primer/react/experimental'
|
|
11
|
+
|
|
12
|
+
function ExampleComponent() {
|
|
13
|
+
return <SelectPanel />
|
|
14
|
+
}
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
👍 Examples of **correct** code for this rule:
|
|
18
|
+
|
|
19
|
+
You can satisfy the rule by either converting to the non-experimental version:
|
|
20
|
+
|
|
21
|
+
```jsx
|
|
22
|
+
import {SelectPanel} from '@primer/react'
|
|
23
|
+
|
|
24
|
+
function ExampleComponent() {
|
|
25
|
+
return <SelectPanel />
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Or by removing usage of the component.
|