@@ -16,8 +16,8 @@ full: true
16
16
17
17
## Core Rules
18
18
19
- | Rule | ✅ | Features | Description | React |
20
- | :--------------------------------------------------------------------------------- | :- | :------------ | :--------------------------------------------------------------------------------------------------- | :------: |
19
+ | Rule | ✅ | Features | Description | React |
20
+ | :----------------------------------------------------------------------------------- | :- | :------------ | :--------------------------------------------------------------------------------------------------- | :------: |
21
21
| [ ` ensure-forward-ref-using-ref ` ] ( ./ensure-forward-ref-using-ref ) | 1️⃣ | ` 🔍 ` | Requires that components wrapped with ` forwardRef ` must have a ` ref ` parameter. | |
22
22
| [ ` no-access-state-in-setstate ` ] ( ./no-access-state-in-setstate ) | 2️⃣ | ` 🔍 ` | Prevents accessing ` this.state ` inside ` setState ` calls. | |
23
23
| [ ` no-array-index-key ` ] ( ./no-array-index-key ) | 1️⃣ | ` 🔍 ` | Prevents using array ` index ` as ` key ` . | |
@@ -70,16 +70,16 @@ full: true
70
70
71
71
### Deprecated
72
72
73
- | Rule | Replaced by |
74
- | :--------------------------------------------------------------------------------- | :--------------------------------------------------------------------- |
75
- | [ ~~ ` jsx-uses-vars ` ~~ ] ( jsx-uses-vars ) | [ ` use-jsx-vars ` ] ( ./use-jsx-vars ) |
76
- | [ ~~ ` jsx-no-duplicate-props ` ~~ ] ( jsx-no-duplicate-props ) | [ ` no-duplicate-jsx-props ` ] ( ./no-duplicate-jsx-props ) |
77
- | [ ~~ ` no-complicated-conditional-rendering ` ~~ ] ( no-complicated-conditional-rendering ) | [ ` no-complex-conditional-rendering ` ] ( ./no-complex-conditional-rendering ) |
73
+ | Rule | Replaced by |
74
+ | :----------------------------------------------------------------------------- | :-- --------------------------------------------------------------------- |
75
+ | [ ` jsx-uses-vars ` ] ( jsx-uses-vars ) | [ ` use-jsx-vars ` ] ( ./use-jsx-vars ) |
76
+ | [ ` jsx-no-duplicate-props ` ] ( jsx-no-duplicate-props ) | [ ` no-duplicate-jsx-props ` ] ( ./no-duplicate-jsx-props ) |
77
+ | [ ` no-complicated-conditional-rendering ` ] ( no-complicated-conditional-rendering ) | [ ` no-complex-conditional-rendering ` ] ( ./no-complex-conditional-rendering ) |
78
78
79
79
## DOM Rules
80
80
81
- | Rule | ✅ | Features | Description |
82
- | :--------------------------------------------------------------------------------------------- | :- | :------------ | :-------------------------------------------------------------------------------------- |
81
+ | Rule | ✅ | Features | Description |
82
+ | :----------------------------------------------------------------------------------------------- | :- | :------------ | :-------------------------------------------------------------------------------------- |
83
83
| [ ` no-void-elements-with-children ` ] ( ./dom-no-void-elements-with-children ) | 2️⃣ | ` 🔍 ` | Prevents using ` children ` in void ` DOM elements ` . |
84
84
| [ ` no-dangerously-set-innerhtml-with-children ` ] ( ./dom-no-dangerously-set-innerhtml-with-children ) | 2️⃣ | ` 🔍 ` | Prevents ` DOM element ` using ` dangerouslySetInnerHTML ` and ` children ` at the same time. |
85
85
| [ ` no-dangerously-set-innerhtml ` ] ( ./dom-no-dangerously-set-innerhtml ) | 1️⃣ | ` 🔍 ` | Prevents ` DOM element ` using ` dangerouslySetInnerHTML ` . |
@@ -95,23 +95,23 @@ full: true
95
95
96
96
### Deprecated
97
97
98
- | Rule | Replaced by |
99
- | :--------------------------------------------------------------------------------- | :--------------------------------------------------------------------- |
100
- | [ ~~ ` dom-no-children-in-void-dom-elements ` ~~ ] ( dom-no-children-in-void-dom-elements ) | [ ` no-void-elements-with-children ` ] ( ./dom-no-void-elements-with-children ) |
98
+ | Rule | Replaced by |
99
+ | :----------------------------------------------------------------------------- | :-- --------------------------------------------------------------------- |
100
+ | [ ` dom-no-children-in-void-dom-elements ` ] ( dom-no-children-in-void-dom-elements ) | [ ` no-void-elements-with-children ` ] ( ./dom-no-void-elements-with-children ) |
101
101
102
102
## Web API Rules
103
103
104
- | Rule | ✅ | Features | Description |
105
- | :--------------------------------------------------------------- | :- | :------- | :---------------------------------------------------------------- |
104
+ | Rule | ✅ | Features | Description |
105
+ | :----------------------------------------------------------------- | :- | :------- | :---------------------------------------------------------------- |
106
106
| [ ` no-leaked-event-listener ` ] ( ./web-api-no-leaked-event-listener ) | 1️⃣ | ` 🔍 ` | Prevents leaked ` addEventListener ` in a component or custom Hook. |
107
107
| [ ` no-leaked-interval ` ] ( ./web-api-no-leaked-interval ) | 1️⃣ | ` 🔍 ` | Prevents leaked ` setInterval ` in a component or custom Hook. |
108
108
| [ ` no-leaked-resize-observer ` ] ( ./web-api-no-leaked-resize-observer ) | 1️⃣ | ` 🔍 ` | Prevents leaked ` ResizeObserver ` in a component or custom Hook. |
109
109
| [ ` no-leaked-timeout ` ] ( ./web-api-no-leaked-timeout ) | 1️⃣ | ` 🔍 ` | Prevents leaked ` setTimeout ` in a component or custom Hook. |
110
110
111
111
## Hooks Extra Rules
112
112
113
- | Rule | ✅ | Features | Description |
114
- | :------------------------------------------------------------------------------------------------- | :- | :------- | :----------------------------------------------------------------------------------------- |
113
+ | Rule | ✅ | Features | Description |
114
+ | :--------------------------------------------------------------------------------------------------- | :- | :------- | :----------------------------------------------------------------------------------------- |
115
115
| [ ` no-direct-set-state-in-use-effect ` ] ( ./hooks-extra-no-direct-set-state-in-use-effect ) | 1️⃣ | ` 🔍 ` | Disallow direct calls to the ` set ` function of ` useState ` in ` useEffect ` . |
116
116
| [ ` no-direct-set-state-in-use-layout-effect ` ] ( ./hooks-extra-no-direct-set-state-in-use-layout-effect ) | 0️⃣ | ` 🔍 ` | Disallow direct calls to the ` set ` function of ` useState ` in ` useLayoutEffect ` . |
117
117
| [ ` no-unnecessary-use-callback ` ] ( ./hooks-extra-no-unnecessary-use-callback ) | 0️⃣ | ` 🔍 ` | Disallow unnecessary usage of ` useCallback ` . |
@@ -121,26 +121,26 @@ full: true
121
121
122
122
### Deprecated
123
123
124
- | Rule | Replaced by |
125
- | :------------------------------------------------------------------------------------- | :----------------------------------------------------------------------- |
126
- | [ ~~ ` no-redundant-custom-hook ` ~~ ] ( hooks-extra-no-useless-custom-hooks ) | [ ` no-useless-custom-hooks ` ] ( ./hooks-extra-no-useless-custom-hooks ) |
127
- | [ ~~ ` ensure-custom-hooks-using-other-hooks ` ~~ ] ( hooks-extra-no-useless-custom-hooks ) | [ ` no-useless-custom-hooks ` ] ( ./hooks-extra-no-useless-custom-hooks ) |
128
- | [ ~~ ` ensure-use-memo-has-non-empty-deps ` ~~ ] ( ensure-use-memo-has-non-empty-deps ) | [ ` no-unnecessary-use-memo ` ] ( ./hooks-extra-no-unnecessary-use-memo ) |
129
- | [ ~~ ` ensure-use-callback-has-non-empty-deps ` ~~ ] ( ensure-use-callback-has-non-empty-deps ) | [ ` no-unnecessary-use-callback ` ] ( ./hooks-extra-no-unnecessary-use-callback ) |
124
+ | Rule | Replaced by |
125
+ | :--------------------------------------------------------------------------------- | :-- ----------------------------------------------------------------------- |
126
+ | [ ` no-redundant-custom-hook ` ] ( hooks-extra-no-useless-custom-hooks ) | [ ` no-useless-custom-hooks ` ] ( ./hooks-extra-no-useless-custom-hooks ) |
127
+ | [ ` ensure-custom-hooks-using-other-hooks ` ] ( hooks-extra-no-useless-custom-hooks ) | [ ` no-useless-custom-hooks ` ] ( ./hooks-extra-no-useless-custom-hooks ) |
128
+ | [ ` ensure-use-memo-has-non-empty-deps ` ] ( ensure-use-memo-has-non-empty-deps ) | [ ` no-unnecessary-use-memo ` ] ( ./hooks-extra-no-unnecessary-use-memo ) |
129
+ | [ ` ensure-use-callback-has-non-empty-deps ` ] ( ensure-use-callback-has-non-empty-deps ) | [ ` no-unnecessary-use-callback ` ] ( ./hooks-extra-no-unnecessary-use-callback ) |
130
130
131
131
## Naming Convention Rules
132
132
133
- | Rule | ✅ | Features | Description |
134
- | :----------------------------------------------------------- | :- | :------- | :------------------------------------------------------------------------------- |
133
+ | Rule | ✅ | Features | Description |
134
+ | :------------------------------------------------------------- | :- | :------- | :------------------------------------------------------------------------------- |
135
135
| [ ` component-name ` ] ( ./naming-convention-component-name ) | 0️⃣ | ` 🔍 ` ` ⚙️ ` | Enforces naming conventions for components. |
136
136
| [ ` filename ` ] ( ./naming-convention-filename ) | 0️⃣ | ` 🔍 ` ` ⚙️ ` | Enforces naming convention for JSX files. |
137
137
| [ ` filename-extension ` ] ( ./naming-convention-filename-extension ) | 0️⃣ | ` 🔍 ` ` ⚙️ ` | Enforces consistent use of the JSX file extension. |
138
138
| [ ` use-state ` ] ( ./naming-convention-use-state ) | 0️⃣ | ` 🔍 ` | Enforces destructuring and symmetric naming of ` useState ` hook value and setter. |
139
139
140
140
## Debug Rules
141
141
142
- | Rule | ✅ | Features | Description |
143
- | :----------------------------------------------- | :- | :------- | :------------------------------------------------------- |
142
+ | Rule | ✅ | Features | Description |
143
+ | :------------------------------------------------- | :- | :------- | :------------------------------------------------------- |
144
144
| [ ` class-component ` ] ( ./debug-class-component ) | 0️⃣ | ` 🐞 ` | Reports all class components. |
145
145
| [ ` function-component ` ] ( ./debug-function-component ) | 0️⃣ | ` 🐞 ` | Reports all function components. |
146
146
| [ ` hook ` ] ( ./debug-hook ) | 0️⃣ | ` 🐞 ` | Reports all react hooks. |
0 commit comments