You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|| 🔧 ||[react/jsx-space-before-closing](docs/rules/jsx-space-before-closing.md)| Enforce spacing before closing bracket in JSX |
221
+
|| 🔧 ||[react/jsx-space-before-closing](docs/rules/jsx-space-before-closing.md)| Enforce spacing before closing bracket in JSX. ❌ This rule is deprecated.|
222
222
|| 🔧 ||[react/jsx-tag-spacing](docs/rules/jsx-tag-spacing.md)| Enforce whitespace in and around the JSX opening and closing brackets |
223
223
| ✔ |||[react/jsx-uses-react](docs/rules/jsx-uses-react.md)| Disallow React to be incorrectly marked as unused |
224
224
| ✔ |||[react/jsx-uses-vars](docs/rules/jsx-uses-vars.md)| Disallow variables used in JSX to be incorrectly marked as unused |
Copy file name to clipboardExpand all lines: docs/rules/jsx-space-before-closing.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
# Enforce spacing before closing bracket in JSX (react/jsx-space-before-closing)
2
2
3
-
🔧 This rule is automatically fixable using the `--fix`[flag](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) on the command line.
3
+
❌ This rule is deprecated. Please use the `"beforeSelfClosing"` option of the [jsx-tag-spacing](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-tag-spacing.md) rule instead.
4
4
5
-
**Deprecation notice**: This rule is deprecated. Please use the `"beforeSelfClosing"` option of the [jsx-tag-spacing](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-tag-spacing.md) rule instead.
5
+
🔧 This rule is automatically fixable using the `--fix`[flag](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) on the command line.
6
6
7
7
Enforce or forbid spaces before the closing bracket of self-closing JSX elements.
Copy file name to clipboardExpand all lines: tests/index.js
+13-1
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,7 @@ describe('all rule files should be exported by the plugin', () => {
24
24
25
25
describe('rule documentation files have the correct content',()=>{
26
26
constMESSAGES={
27
+
deprecated: '❌ This rule is deprecated.',
27
28
fixable: '🔧 This rule is automatically fixable using the `--fix` [flag](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) on the command line.',
28
29
hasSuggestions: '💡 This rule provides editor [suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).',
29
30
};
@@ -42,6 +43,11 @@ describe('rule documentation files have the correct content', () => {
42
43
// Decide which notices should be shown at the top of the doc.
43
44
constexpectedNotices=[];
44
45
constunexpectedNotices=[];
46
+
if(rule.meta.deprecated){
47
+
expectedNotices.push('deprecated');
48
+
}else{
49
+
unexpectedNotices.push('deprecated');
50
+
}
45
51
if(rule.meta.fixable){
46
52
expectedNotices.push('fixable');
47
53
}else{
@@ -57,7 +63,13 @@ describe('rule documentation files have the correct content', () => {
57
63
letcurrentLineNumber=1;
58
64
expectedNotices.forEach((expectedNotice)=>{
59
65
assert.strictEqual(documentLines[currentLineNumber],'',`includes blank line ahead of ${expectedNotice} notice`);
0 commit comments