@@ -36,14 +36,17 @@ tester.run('array-bracket-spacing', rule, {
36
36
invalid : [
37
37
{
38
38
code : '<template><div :attr="[ a]" /></template>' ,
39
+ output : '<template><div :attr="[a]" /></template>' ,
39
40
errors : [ "There should be no space after '['." ]
40
41
} ,
41
42
{
42
43
code : '<template><div :attr="[a ]" /></template>' ,
44
+ output : '<template><div :attr="[a]" /></template>' ,
43
45
errors : [ "There should be no space before ']'." ]
44
46
} ,
45
47
{
46
48
code : '<template><div :attr="[ a ]" /></template>' ,
49
+ output : '<template><div :attr="[a]" /></template>' ,
47
50
errors : [
48
51
"There should be no space after '['." ,
49
52
"There should be no space before ']'."
@@ -52,16 +55,19 @@ tester.run('array-bracket-spacing', rule, {
52
55
{
53
56
code : '<template><div :attr="[ a]" /></template>' ,
54
57
options : [ 'never' ] ,
58
+ output : '<template><div :attr="[a]" /></template>' ,
55
59
errors : [ "There should be no space after '['." ]
56
60
} ,
57
61
{
58
62
code : '<template><div :attr="[a ]" /></template>' ,
59
63
options : [ 'never' ] ,
64
+ output : '<template><div :attr="[a]" /></template>' ,
60
65
errors : [ "There should be no space before ']'." ]
61
66
} ,
62
67
{
63
68
code : '<template><div :attr="[ a ]" /></template>' ,
64
69
options : [ 'never' ] ,
70
+ output : '<template><div :attr="[a]" /></template>' ,
65
71
errors : [
66
72
"There should be no space after '['." ,
67
73
"There should be no space before ']'."
@@ -70,16 +76,28 @@ tester.run('array-bracket-spacing', rule, {
70
76
{
71
77
code : '<template><div :attr="[ a]" /></template>' ,
72
78
options : [ 'always' ] ,
79
+ output : '<template><div :attr="[ a ]" /></template>' ,
73
80
errors : [ "A space is required before ']'." ]
74
81
} ,
75
82
{
76
83
code : '<template><div :attr="[a ]" /></template>' ,
77
84
options : [ 'always' ] ,
85
+ output : '<template><div :attr="[ a ]" /></template>' ,
78
86
errors : [ "A space is required after '['." ]
79
87
} ,
80
88
{
81
89
code : '<template><div :attr="[a]" /></template>' ,
82
90
options : [ 'always' ] ,
91
+ output : '<template><div :attr="[ a ]" /></template>' ,
92
+ errors : [
93
+ "A space is required after '['." ,
94
+ "A space is required before ']'."
95
+ ]
96
+ } ,
97
+ {
98
+ code : '<template><div :[[attr]]="[a]" /></template>' ,
99
+ options : [ 'always' ] ,
100
+ output : '<template><div :[[attr]]="[ a ]" /></template>' ,
83
101
errors : [
84
102
"A space is required after '['." ,
85
103
"A space is required before ']'."
0 commit comments