@@ -4,8 +4,8 @@ import { pluginAntfu, pluginStylistic } from '../plugins'
4
4
export function stylistic ( options : StylisticConfig = { } ) : ConfigItem [ ] {
5
5
const {
6
6
indent = 2 ,
7
- quotes = 'single' ,
8
7
jsx = true ,
8
+ quotes = 'single' ,
9
9
} = options
10
10
11
11
return [
@@ -23,6 +23,7 @@ export function stylistic(options: StylisticConfig = {}): ConfigItem[] {
23
23
'curly' : [ 'error' , 'multi-or-nest' , 'consistent' ] ,
24
24
25
25
'style/array-bracket-spacing' : [ 'error' , 'never' ] ,
26
+ 'style/arrow-parens' : [ 'error' , 'as-needed' , { requireForBlockBody : true } ] ,
26
27
'style/arrow-spacing' : [ 'error' , { after : true , before : true } ] ,
27
28
'style/block-spacing' : [ 'error' , 'always' ] ,
28
29
'style/brace-style' : [ 'error' , 'stroustrup' , { allowSingleLine : true } ] ,
@@ -35,14 +36,9 @@ export function stylistic(options: StylisticConfig = {}): ConfigItem[] {
35
36
'style/indent' : [ 'error' , indent , {
36
37
ArrayExpression : 1 ,
37
38
CallExpression : { arguments : 1 } ,
39
+ flatTernaryExpressions : false ,
38
40
FunctionDeclaration : { body : 1 , parameters : 1 } ,
39
41
FunctionExpression : { body : 1 , parameters : 1 } ,
40
- ImportDeclaration : 1 ,
41
- MemberExpression : 1 ,
42
- ObjectExpression : 1 ,
43
- SwitchCase : 1 ,
44
- VariableDeclarator : 1 ,
45
- flatTernaryExpressions : false ,
46
42
ignoreComments : false ,
47
43
ignoredNodes : [
48
44
'TemplateLiteral *' ,
@@ -67,10 +63,14 @@ export function stylistic(options: StylisticConfig = {}): ConfigItem[] {
67
63
'FunctionExpression > .params > :matches(Decorator, :not(:first-child))' ,
68
64
'ClassBody.body > PropertyDefinition[decorators.length > 0] > .key' ,
69
65
] ,
66
+ ImportDeclaration : 1 ,
67
+ MemberExpression : 1 ,
68
+ ObjectExpression : 1 ,
70
69
offsetTernaryExpressions : true ,
71
70
outerIIFEBody : 1 ,
71
+ SwitchCase : 1 ,
72
+ VariableDeclarator : 1 ,
72
73
} ] ,
73
-
74
74
'style/key-spacing' : [ 'error' , { afterColon : true , beforeColon : false } ] ,
75
75
'style/keyword-spacing' : [ 'error' , { after : true , before : true } ] ,
76
76
'style/lines-between-class-members' : [ 'error' , 'always' , { exceptAfterSingleLine : true } ] ,
@@ -95,7 +95,6 @@ export function stylistic(options: StylisticConfig = {}): ConfigItem[] {
95
95
'style/no-trailing-spaces' : 'error' ,
96
96
'style/no-whitespace-before-property' : 'error' ,
97
97
'style/object-curly-spacing' : [ 'error' , 'always' ] ,
98
- 'style/object-property-newline' : [ 'error' , { allowMultiplePropertiesPerLine : true } ] ,
99
98
'style/operator-linebreak' : [ 'error' , 'before' ] ,
100
99
'style/padded-blocks' : [ 'error' , { blocks : 'never' , classes : 'never' , switches : 'never' } ] ,
101
100
'style/quote-props' : [ 'error' , 'consistent-as-needed' ] ,
0 commit comments