eslint-plugin-primer-react 4.1.3-rc.90c8886 → 4.2.0-rc.e40fda1
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_canary.yml +1 -1
- package/.github/workflows/release_candidate.yml +1 -1
- package/CHANGELOG.md +7 -1
- package/README.md +1 -0
- package/docs/rules/no-deprecated-props.md +48 -0
- package/package-lock.json +423 -519
- package/package.json +3 -3
- package/src/configs/recommended.js +1 -0
- package/src/index.js +1 -0
- package/src/rules/__tests__/no-deprecated-props.test.js +121 -0
- package/src/rules/no-deprecated-props.js +62 -0
|
@@ -49,7 +49,7 @@ jobs:
|
|
|
49
49
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
50
50
|
|
|
51
51
|
- name: Output canary version number
|
|
52
|
-
uses: actions/github-script@
|
|
52
|
+
uses: actions/github-script@v7.0.1
|
|
53
53
|
with:
|
|
54
54
|
script: |
|
|
55
55
|
const package = require(`${process.env.GITHUB_WORKSPACE}/package.json`)
|
|
@@ -44,7 +44,7 @@ jobs:
|
|
|
44
44
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
45
45
|
|
|
46
46
|
- name: Output release candidate version number
|
|
47
|
-
uses: actions/github-script@
|
|
47
|
+
uses: actions/github-script@v7.0.1
|
|
48
48
|
with:
|
|
49
49
|
script: |
|
|
50
50
|
const package = require(`${process.env.GITHUB_WORKSPACE}/package.json`)
|
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
# eslint-plugin-primer-react
|
|
2
2
|
|
|
3
|
-
## 4.
|
|
3
|
+
## 4.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#156](https://github.com/primer/eslint-plugin-primer-react/pull/156) [`15cfbb4`](https://github.com/primer/eslint-plugin-primer-react/commit/15cfbb4a261c44418404249cc33e279bce25b2b7) Thanks [@broccolinisoup](https://github.com/broccolinisoup)! - Add no-deprecated-props rule
|
|
4
8
|
|
|
5
9
|
### Patch Changes
|
|
6
10
|
|
|
11
|
+
- [#166](https://github.com/primer/eslint-plugin-primer-react/pull/166) [`4c3d9b4`](https://github.com/primer/eslint-plugin-primer-react/commit/4c3d9b4e761733ac52f4d624a94996a4379c37ca) Thanks [@chadfawcett](https://github.com/chadfawcett)! - Move eslint-plugin-github to dependencies
|
|
12
|
+
|
|
7
13
|
- [#152](https://github.com/primer/eslint-plugin-primer-react/pull/152) [`7baeb96`](https://github.com/primer/eslint-plugin-primer-react/commit/7baeb9684cc5f84847f004fee282a3362517d7d0) Thanks [@siddharthkp](https://github.com/siddharthkp)! - no-system-props: Add option to ignore specific component names
|
|
8
14
|
|
|
9
15
|
## 4.1.2
|
package/README.md
CHANGED
|
@@ -37,3 +37,4 @@ ESLint rules for Primer React
|
|
|
37
37
|
- [a11y-tooltip-interactive-trigger](https://github.com/primer/eslint-plugin-primer-react/blob/main/docs/rules/a11y-tooltip-interactive-trigger.md)
|
|
38
38
|
- [a11y-explicit-heading](https://github.com/primer/eslint-plugin-primer-react/blob/main/docs/rules/a11y-explicit-heading.md)
|
|
39
39
|
- [new-css-color-vars](https://github.com/primer/eslint-plugin-primer-react/blob/main/docs/rules/new-css-color-vars.md)
|
|
40
|
+
- [no-deprecated-props](https://github.com/primer/eslint-plugin-primer-react/blob/main/docs/rules/no-deprecated-props.md)
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
## Rule Details
|
|
2
|
+
|
|
3
|
+
This rule enforces to use the recommended API (`ActionList.GroupHeading`) component over the deprecated prop (`title` prop on `ActionList.Group`) for ActionList component.
|
|
4
|
+
|
|
5
|
+
👎 Examples of **incorrect** code for this rule:
|
|
6
|
+
|
|
7
|
+
```jsx
|
|
8
|
+
/* eslint primer-react/no-deprecated-props: "error" */
|
|
9
|
+
import {ActionList} from '@primer/react'
|
|
10
|
+
|
|
11
|
+
const App = () => (
|
|
12
|
+
<ActionList>
|
|
13
|
+
<ActionList.Group title="Group heading">
|
|
14
|
+
<ActionList.Item>Item 1</ActionList.Item>
|
|
15
|
+
</ActionList.Group>
|
|
16
|
+
</ActionList>
|
|
17
|
+
)
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
👍 Examples of **correct** code for this rule:
|
|
21
|
+
|
|
22
|
+
```jsx
|
|
23
|
+
/* eslint primer-react/no-deprecated-props: "error" */
|
|
24
|
+
import {ActionList} from '@primer/react'
|
|
25
|
+
|
|
26
|
+
const App = () => (
|
|
27
|
+
<ActionList>
|
|
28
|
+
<ActionList.Group>
|
|
29
|
+
<ActionList.GroupHeading as="h2">Group heading</ActionList.GroupHeading>
|
|
30
|
+
<ActionList.Item>Item 1</ActionList.Item>
|
|
31
|
+
</ActionList.Group>
|
|
32
|
+
</ActionList>
|
|
33
|
+
)
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
```jsx
|
|
37
|
+
/* eslint primer-react/no-deprecated-props: "error" */
|
|
38
|
+
import {ActionList} from '@primer/react'
|
|
39
|
+
|
|
40
|
+
const App = () => (
|
|
41
|
+
<ActionList role="lisbox">
|
|
42
|
+
<ActionList.Group>
|
|
43
|
+
<ActionList.GroupHeading>Group heading</ActionList.GroupHeading>
|
|
44
|
+
<ActionList.Item>Item 1</ActionList.Item>
|
|
45
|
+
</ActionList.Group>
|
|
46
|
+
</ActionList>
|
|
47
|
+
)
|
|
48
|
+
```
|