We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 82b4fb7 commit 5317452Copy full SHA for 5317452
docs/rules/jsx-curly-spacing.md
@@ -107,6 +107,25 @@ The following patterns are not warnings:
107
<Hello name={ {firstname: 'John', lastname: 'Doe'} } />;
108
```
109
110
+#### Alternative
111
+
112
+When setting the `alternative` option to `true` you must collapse the curly braces:
113
114
+```json
115
+"jsx-curly-spacing": [2, "always", {"alternative": true}]
116
+```
117
118
+When `"always"` is used and `alternative` is `true`, the following pattern is not warnings:
119
120
+```js
121
+<App foo={{ bar: true, baz: true }} />;
122
123
124
+When `"always"` is used and `alternative` is `true`, the following pattern is considered warnings:
125
126
127
+<App foo={ {bar: true, baz: true} } />;
128
129
130
## When Not To Use It
131
0 commit comments