-
-
Notifications
You must be signed in to change notification settings - Fork 483
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to use this configuration to format JSX.Element #185
Comments
I want to use it too |
+1 |
for react, you can use eslint-config-standard-jsx {
"extends": ["standard-jsx", "@antfu/eslint-config-react"]
} |
My solution is to turn off the {
"indent": "off",
"@typescript-eslint/indent": ["error", 2, {
SwitchCase: 1,
VariableDeclarator: 1,
outerIIFEBody: 1,
MemberExpression: 1,
FunctionDeclaration: { parameters: 1, body: 1 },
FunctionExpression: { parameters: 1, body: 1 },
CallExpression: { arguments: 1 },
ArrayExpression: 1,
ObjectExpression: 1,
ImportDeclaration: 1,
flatTernaryExpressions: false,
ignoreComments: false,
offsetTernaryExpressions: true
}],
} |
Since we have migrated to that flat config, it would be much easier to compose JSX support. If anyone has made a robust JSX/TSX config that could work generally for React/Solid/Vue JSX, then I'd be happy to have it built in. |
Related: eslint-stylistic/eslint-stylistic#12 |
Supported in |
eslint-config/packages/eslint-config-basic/standard.js
Line 76 in 656f91a
I want to autofix indent in the JSX Element of the tsx file, but it doesn't work. and then i saw that the configuration ignored the indent rules related to JSX Element
I would like to ask why this configuration is necessary
When I configure it this way, my jsx element indent will work normally
The text was updated successfully, but these errors were encountered: