Skip to content

Commit

Permalink
fix(jsx): turn off style/jsx-child-element-spacing to avoid conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Oct 11, 2023
1 parent 8549a69 commit f4a07f4
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 1 deletion.
3 changes: 3 additions & 0 deletions fixtures/input/tsx.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,8 @@ export function jsx2() {
<div>Foo</div>
Text<b > Bar</b>
</div>
<p>
foo<i>bar</i><b>baz</b>
</p>
</ a >
}
5 changes: 5 additions & 0 deletions fixtures/output/all/tsx.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ export function jsx2() {
Text
<b> Bar</b>
</div>
<p>
foo
<i>bar</i>
<b>baz</b>
</p>
</a>
)
}
5 changes: 5 additions & 0 deletions fixtures/output/tab-double-quotes/tsx.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ export function jsx2() {
Text
<b> Bar</b>
</div>
<p>
foo
<i>bar</i>
<b>baz</b>
</p>
</a>
)
}
5 changes: 5 additions & 0 deletions fixtures/output/ts-override/tsx.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ export function jsx2() {
Text
<b> Bar</b>
</div>
<p>
foo
<i>bar</i>
<b>baz</b>
</p>
</a>
)
}
1 change: 0 additions & 1 deletion src/configs/stylistic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ export function stylistic(options: StylisticConfig = {}): ConfigItem[] {

...jsx
? {
'style/jsx-child-element-spacing': 'error',
'style/jsx-closing-bracket-location': 'error',
'style/jsx-closing-tag-location': 'error',
'style/jsx-curly-brace-presence': ['error', { propElementValues: 'always' }],
Expand Down

0 comments on commit f4a07f4

Please sign in to comment.