File tree Expand file tree Collapse file tree 4 files changed +47
-3
lines changed
packages/plugins/eslint-plugin-react-x/src/rules Expand file tree Collapse file tree 4 files changed +47
-3
lines changed Original file line number Diff line number Diff line change @@ -28,16 +28,27 @@ Disallow duplicate props in JSX elements.
2828### Failing
2929
3030``` tsx
31- <Hello name = " John" name = " Doe" />;
31+ <Hello name = " John" name = " Doe" />
3232```
3333
3434### Passing
3535
3636``` tsx
37- <Hello name = " John" />;
37+ <Hello name = " John" />
3838```
3939
4040## Implementation
4141
4242- [ Rule source] ( https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x/src/rules/jsx-no-duplicate-props.ts )
4343- [ Test source] ( https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x/src/rules/jsx-no-duplicate-props.spec.ts )
44+
45+ ---
46+
47+ ## See Also
48+
49+ - [ ` jsx-no-undef ` ] ( ./jsx-no-undef ) \
50+ Prevents using variables in JSX that are not defined in the scope.
51+ - [ ` jsx-uses-vars ` ] ( ./jsx-uses-vars ) \
52+ Marks variables used in JSX elements as used.
53+ - [ ` jsx-uses-react ` ] ( ./jsx-uses-react ) \
54+ Marks React variables as used when JSX is used.
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ react-x/jsx-no-undef
1616
1717## Description
1818
19- This rule is used to prevent the use of undefined variables in JSX. It checks for any undefined variables in the JSX code and reports them as errors .
19+ Prevents using variables in JSX that are not defined in the scope .
2020
2121## Examples
2222
@@ -43,3 +43,14 @@ const button = <MyButton />;
4343
4444- [ Rule source] ( https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x/src/rules/jsx-no-undef.ts )
4545- [ Test source] ( https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x/src/rules/jsx-no-undef.spec.ts )
46+
47+ ---
48+
49+ ## See Also
50+
51+ - [ ` jsx-uses-vars ` ] ( ./jsx-uses-vars ) \
52+ Marks variables used in JSX elements as used.
53+ - [ ` jsx-uses-react ` ] ( ./jsx-uses-react ) \
54+ Marks React variables as used when JSX is used.
55+ - [ ` jsx-no-duplicated-props ` ] ( ./jsx-no-duplicate-props ) \
56+ Disallow duplicate props in JSX elements.
Original file line number Diff line number Diff line change @@ -63,3 +63,14 @@ const Hello = <div>Hello</div>;
6363
6464- [ Rule source] ( https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x/src/rules/jsx-uses-react.ts )
6565- [ Test source] ( https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x/src/rules/jsx-uses-react.spec.ts )
66+
67+ ---
68+
69+ ## See Also
70+
71+ - [ ` jsx-no-undef ` ] ( ./jsx-no-undef ) \
72+ Prevents using variables in JSX that are not defined in the scope.
73+ - [ ` jsx-uses-vars ` ] ( ./jsx-uses-vars ) \
74+ Marks variables used in JSX elements as used.
75+ - [ ` jsx-no-duplicated-props ` ] ( ./jsx-no-duplicate-props ) \
76+ Disallow duplicate props in JSX elements.
Original file line number Diff line number Diff line change @@ -46,3 +46,14 @@ import Hello from "./Hello";
4646
4747- [ Rule source] ( https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x/src/rules/jsx-uses-vars.ts )
4848- [ Test source] ( https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x/src/rules/jsx-uses-vars.spec.ts )
49+
50+ ---
51+
52+ ## See Also
53+
54+ - [ ` jsx-no-undef ` ] ( ./jsx-no-undef ) \
55+ Prevents using variables in JSX that are not defined in the scope.
56+ - [ ` jsx-uses-react ` ] ( ./jsx-uses-react ) \
57+ Marks React variables as used when JSX is used.
58+ - [ ` jsx-no-duplicated-props ` ] ( ./jsx-no-duplicate-props ) \
59+ Disallow duplicate props in JSX elements.
You can’t perform that action at this time.
0 commit comments