Skip to content

Commit

Permalink
fix(indent): ignore jsx, SwitchCase: 1 (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
taiyme authored Mar 6, 2025
1 parent 6da9bee commit 0e90553
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/configs/react/stylistic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export const reactStylisticRules = {
'@stylistic/jsx/jsx-equals-spacing': ['warn', 'never'],
'@stylistic/jsx/jsx-first-prop-new-line': ['warn', 'multiline-multiprop'],
'@stylistic/jsx/jsx-function-call-newline': ['warn', 'multiline'],
'@stylistic/jsx/jsx-indent': ['warn', 2],
'@stylistic/jsx/jsx-indent-props': ['warn', 2],
'@stylistic/jsx/jsx-max-props-per-line': ['warn', {
maximum: {
Expand Down
5 changes: 4 additions & 1 deletion src/configs/typescript/stylistic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,10 @@ export const typescriptStylisticRules = {
after: true,
}],
'@stylistic/ts/function-call-spacing': ['error', 'never'],
'@stylistic/ts/indent': ['warn', 2],
'@stylistic/ts/indent': ['warn', 2, {
ignoredNodes: ['JSXElement', 'JSXElement *'],
SwitchCase: 1,
}],
'@stylistic/ts/key-spacing': ['warn', {
beforeColon: false,
afterColon: true,
Expand Down

0 comments on commit 0e90553

Please sign in to comment.