diff --git a/fixtures/input/tsx.tsx b/fixtures/input/tsx.tsx
index 2373cd25b6..fd98041291 100644
--- a/fixtures/input/tsx.tsx
+++ b/fixtures/input/tsx.tsx
@@ -12,5 +12,10 @@ export function jsx2() {
Block Text
+
+ Mixed
+
Foo
+ Text
Bar
+
a >
}
diff --git a/fixtures/output/all/tsx.tsx b/fixtures/output/all/tsx.tsx
index d6d5e7c324..e11ecab172 100644
--- a/fixtures/output/all/tsx.tsx
+++ b/fixtures/output/all/tsx.tsx
@@ -4,14 +4,24 @@ export function Component1() {
export function jsx2() {
const props = { a: 1, b: 2 }
- return (
- Inline Text
-
- Block Text
-
- )
+ return (
+
+
+ Inline Text
+
+
+ Block Text
+
+
+ Mixed
+
Foo
+ Text
+
Bar
+
+
+ )
}
diff --git a/fixtures/output/tab-double-quotes/tsx.tsx b/fixtures/output/tab-double-quotes/tsx.tsx
index 6f746046b8..90d79cbaf4 100644
--- a/fixtures/output/tab-double-quotes/tsx.tsx
+++ b/fixtures/output/tab-double-quotes/tsx.tsx
@@ -4,14 +4,24 @@ export function Component1() {
export function jsx2() {
const props = { a: 1, b: 2 }
- return (
- Inline Text
-
- Block Text
-
- )
+ return (
+
+
+ Inline Text
+
+
+ Block Text
+
+
+ Mixed
+
Foo
+ Text
+
Bar
+
+
+ )
}
diff --git a/fixtures/output/ts-override/tsx.tsx b/fixtures/output/ts-override/tsx.tsx
index d6d5e7c324..e11ecab172 100644
--- a/fixtures/output/ts-override/tsx.tsx
+++ b/fixtures/output/ts-override/tsx.tsx
@@ -4,14 +4,24 @@ export function Component1() {
export function jsx2() {
const props = { a: 1, b: 2 }
- return (
- Inline Text
-
- Block Text
-
- )
+ return (
+
+
+ Inline Text
+
+
+ Block Text
+
+
+ Mixed
+
Foo
+ Text
+
Bar
+
+
+ )
}
diff --git a/src/configs/stylistic.ts b/src/configs/stylistic.ts
index 09b1771cf3..99ec8b6140 100644
--- a/src/configs/stylistic.ts
+++ b/src/configs/stylistic.ts
@@ -128,16 +128,39 @@ export function stylistic(options: StylisticConfig = {}): ConfigItem[] {
...jsx
? {
'style/jsx-child-element-spacing': 'error',
- 'style/jsx-closing-bracket-location': ['error', 'line-aligned'],
+ 'style/jsx-closing-bracket-location': 'error',
+ 'style/jsx-closing-tag-location': 'error',
+ 'style/jsx-curly-brace-presence': ['error', { propElementValues: 'always' }],
'style/jsx-curly-newline': 'error',
- 'style/jsx-curly-spacing': ['error', 'never', { allowMultiline: true }],
+ 'style/jsx-curly-spacing': ['error', 'never'],
'style/jsx-equals-spacing': 'error',
'style/jsx-first-prop-new-line': 'error',
- 'style/jsx-indent': ['error', indent],
+ 'style/jsx-indent': ['error', indent, { checkAttributes: true, indentLogicalExpressions: true }],
'style/jsx-indent-props': ['error', indent],
+ 'style/jsx-max-props-per-line': ['error', { maximum: 1, when: 'multiline' }],
+ 'style/jsx-one-expression-per-line': ['error', { allow: 'single-child' }],
'style/jsx-quotes': 'error',
- 'style/jsx-tag-spacing': 'error',
- 'style/jsx-wrap-multilines': 'error',
+ 'style/jsx-tag-spacing': [
+ 'error',
+ {
+ afterOpening: 'never',
+ beforeClosing: 'never',
+ beforeSelfClosing: 'always',
+ closingSlash: 'never',
+ },
+ ],
+ 'style/jsx-wrap-multilines': [
+ 'error',
+ {
+ arrow: 'parens-new-line',
+ assignment: 'parens-new-line',
+ condition: 'parens-new-line',
+ declaration: 'parens-new-line',
+ logical: 'parens-new-line',
+ prop: 'parens-new-line',
+ return: 'parens-new-line',
+ },
+ ],
}
: {},
},