eslint: update rules for jsx

This commit is contained in:
undefined committed 2025-08-13 04:38:53 +08:00
1 parent a3128c001f
commit ce945c317d
2 files changed
+57 -30

No files matched your search

+11 -24
View File
@@ -182,37 +182,24 @@ const base = (option, ...args) => antfu(
arguments: 1,
},
flatTernaryExpressions: false,
FunctionDeclaration: {
body: 1,
parameters: 1,
},
FunctionExpression: {
body: 1,
parameters: 1,
},
FunctionDeclaration: { body: 1, parameters: 1, returnType: 1 },
FunctionExpression: { body: 1, parameters: 1, returnType: 1 },
ignoreComments: false,
ignoredNodes: [
// 'JSXElement',
// 'JSXElement > *',
// 'JSXAttribute',
// 'JSXIdentifier',
// 'JSXNamespacedName',
// 'JSXMemberExpression',
// 'JSXSpreadAttribute',
// 'JSXExpressionContainer',
// 'JSXOpeningElement',
// 'JSXClosingElement',
// 'JSXFragment',
// 'JSXOpeningFragment',
// 'JSXClosingFragment',
'JSXText',
// 'JSXEmptyExpression',
// 'JSXSpreadChild',
'TSUnionType',
'TSIntersectionType',
'TSTypeParameterInstantiation',
'FunctionExpression > .params[decorators.length > 0]',
'FunctionExpression > .params > :matches(Decorator, :not(:first-child))',
'Punctuator',
],
ImportDeclaration: 1,
// MemberExpression: 1,
ObjectExpression: 1,
// offsetTernaryExpressions: true,
outerIIFEBody: 1,
SwitchCase: 1,
// tabLength: option.stylistic?.indent ?? 4,
VariableDeclarator: 1,
}],
'style/jsx-closing-bracket-location': 'off',