Skip to content

Commit 7474b85

Browse files
authored
Merge branch 'master' into test/strict/func-call-spacing
2 parents c556c1a + 0720339 commit 7474b85

File tree

5 files changed

+276
-55
lines changed

5 files changed

+276
-55
lines changed

tests/lib/rules/enforce-style-attribute.js

Lines changed: 45 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,23 @@ tester.run('enforce-style-attribute', rule, {
6363
code: `<template></template><script></script><style></style>`,
6464
errors: [
6565
{
66-
message: 'Plain <style> tags are not allowed. Allowed: scoped.'
66+
message: 'Plain <style> tags are not allowed. Allowed: scoped.',
67+
line: 1,
68+
column: 39,
69+
endLine: 1,
70+
endColumn: 54
6771
}
6872
]
6973
},
7074
{
7175
code: `<template></template><script></script><style module></style>`,
7276
errors: [
7377
{
74-
message: 'The module attribute is not allowed. Allowed: scoped.'
78+
message: 'The module attribute is not allowed. Allowed: scoped.',
79+
line: 1,
80+
column: 39,
81+
endLine: 1,
82+
endColumn: 61
7583
}
7684
]
7785
},
@@ -81,7 +89,11 @@ tester.run('enforce-style-attribute', rule, {
8189
options: [{ allow: ['scoped'] }],
8290
errors: [
8391
{
84-
message: 'Plain <style> tags are not allowed. Allowed: scoped.'
92+
message: 'Plain <style> tags are not allowed. Allowed: scoped.',
93+
line: 1,
94+
column: 39,
95+
endLine: 1,
96+
endColumn: 54
8597
}
8698
]
8799
},
@@ -90,7 +102,11 @@ tester.run('enforce-style-attribute', rule, {
90102
options: [{ allow: ['scoped'] }],
91103
errors: [
92104
{
93-
message: 'The module attribute is not allowed. Allowed: scoped.'
105+
message: 'The module attribute is not allowed. Allowed: scoped.',
106+
line: 1,
107+
column: 39,
108+
endLine: 1,
109+
endColumn: 61
94110
}
95111
]
96112
},
@@ -100,7 +116,11 @@ tester.run('enforce-style-attribute', rule, {
100116
options: [{ allow: ['module'] }],
101117
errors: [
102118
{
103-
message: 'Plain <style> tags are not allowed. Allowed: module.'
119+
message: 'Plain <style> tags are not allowed. Allowed: module.',
120+
line: 1,
121+
column: 39,
122+
endLine: 1,
123+
endColumn: 54
104124
}
105125
]
106126
},
@@ -109,7 +129,11 @@ tester.run('enforce-style-attribute', rule, {
109129
options: [{ allow: ['module'] }],
110130
errors: [
111131
{
112-
message: 'The scoped attribute is not allowed. Allowed: module.'
132+
message: 'The scoped attribute is not allowed. Allowed: module.',
133+
line: 1,
134+
column: 39,
135+
endLine: 1,
136+
endColumn: 61
113137
}
114138
]
115139
},
@@ -120,7 +144,11 @@ tester.run('enforce-style-attribute', rule, {
120144
errors: [
121145
{
122146
message:
123-
'Plain <style> tags are not allowed. Allowed: module, scoped.'
147+
'Plain <style> tags are not allowed. Allowed: module, scoped.',
148+
line: 1,
149+
column: 39,
150+
endLine: 1,
151+
endColumn: 54
124152
}
125153
]
126154
},
@@ -130,7 +158,11 @@ tester.run('enforce-style-attribute', rule, {
130158
errors: [
131159
{
132160
message:
133-
'The module attribute is not allowed. Allowed: plain, scoped.'
161+
'The module attribute is not allowed. Allowed: plain, scoped.',
162+
line: 1,
163+
column: 39,
164+
endLine: 1,
165+
endColumn: 61
134166
}
135167
]
136168
},
@@ -140,7 +172,11 @@ tester.run('enforce-style-attribute', rule, {
140172
errors: [
141173
{
142174
message:
143-
'The scoped attribute is not allowed. Allowed: module, plain.'
175+
'The scoped attribute is not allowed. Allowed: module, plain.',
176+
line: 1,
177+
column: 39,
178+
endLine: 1,
179+
endColumn: 61
144180
}
145181
]
146182
}

tests/lib/rules/eqeqeq.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@ tester.run('eqeqeq', rule, {
3535
output: `<template><div :attr="a === 1" /></template>`
3636
}
3737
]
38-
: null
38+
: null,
39+
line: 1,
40+
column: 25,
41+
endLine: 1,
42+
endColumn: 27
3943
}
4044
]
4145
},
@@ -62,7 +66,11 @@ tester.run('eqeqeq', rule, {
6266
</style>`
6367
}
6468
]
65-
: null
69+
: null,
70+
line: 4,
71+
column: 25,
72+
endLine: 4,
73+
endColumn: 27
6674
}
6775
]
6876
}

tests/lib/rules/first-attribute-linebreak.js

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,9 @@ name="John Doe"
161161
{
162162
message: 'Expected a linebreak before this attribute.',
163163
line: 8,
164-
column: 20
164+
column: 20,
165+
endLine: 8,
166+
endColumn: 35
165167
}
166168
]
167169
},
@@ -203,12 +205,16 @@ name="John Doe"
203205
{
204206
message: 'Expected no linebreak before this attribute.',
205207
line: 4,
206-
column: 11
208+
column: 11,
209+
endLine: 4,
210+
endColumn: 26
207211
},
208212
{
209213
message: 'Expected no linebreak before this attribute.',
210214
line: 13,
211-
column: 11
215+
column: 11,
216+
endLine: 13,
217+
endColumn: 26
212218
}
213219
]
214220
},
@@ -254,12 +260,16 @@ name="John Doe"
254260
{
255261
message: 'Expected a linebreak before this attribute.',
256262
line: 8,
257-
column: 20
263+
column: 20,
264+
endLine: 8,
265+
endColumn: 35
258266
},
259267
{
260268
message: 'Expected a linebreak before this attribute.',
261269
line: 15,
262-
column: 20
270+
column: 20,
271+
endLine: 15,
272+
endColumn: 35
263273
}
264274
]
265275
}

tests/lib/rules/html-button-has-type.js

Lines changed: 58 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@ ruleTester.run('html-button-has-type', rule, {
5858
errors: [
5959
{
6060
message: 'Missing an explicit type attribute for button.',
61-
column: 11
61+
column: 11,
62+
line: 1,
63+
endLine: 1,
64+
endColumn: 19
6265
}
6366
]
6467
},
@@ -68,7 +71,10 @@ ruleTester.run('html-button-has-type', rule, {
6871
errors: [
6972
{
7073
message: 'A value must be set for button type attribute.',
71-
column: 24
74+
column: 24,
75+
line: 1,
76+
endLine: 1,
77+
endColumn: 26
7278
}
7379
]
7480
},
@@ -78,7 +84,10 @@ ruleTester.run('html-button-has-type', rule, {
7884
errors: [
7985
{
8086
message: 'A value must be set for button type attribute.',
81-
column: 19
87+
column: 19,
88+
line: 1,
89+
endLine: 1,
90+
endColumn: 23
8291
}
8392
]
8493
},
@@ -88,7 +97,10 @@ ruleTester.run('html-button-has-type', rule, {
8897
errors: [
8998
{
9099
message: 'foo is an invalid value for button type attribute.',
91-
column: 24
100+
column: 24,
101+
line: 1,
102+
endLine: 1,
103+
endColumn: 29
92104
}
93105
]
94106
},
@@ -99,7 +111,10 @@ ruleTester.run('html-button-has-type', rule, {
99111
errors: [
100112
{
101113
message: 'button is a forbidden value for button type attribute.',
102-
column: 24
114+
column: 24,
115+
line: 1,
116+
endLine: 1,
117+
endColumn: 32
103118
}
104119
]
105120
},
@@ -110,7 +125,10 @@ ruleTester.run('html-button-has-type', rule, {
110125
errors: [
111126
{
112127
message: 'submit is a forbidden value for button type attribute.',
113-
column: 24
128+
column: 24,
129+
line: 1,
130+
endLine: 1,
131+
endColumn: 32
114132
}
115133
]
116134
},
@@ -121,7 +139,10 @@ ruleTester.run('html-button-has-type', rule, {
121139
errors: [
122140
{
123141
message: 'reset is a forbidden value for button type attribute.',
124-
column: 24
142+
column: 24,
143+
line: 1,
144+
endLine: 1,
145+
endColumn: 31
125146
}
126147
]
127148
},
@@ -137,17 +158,23 @@ ruleTester.run('html-button-has-type', rule, {
137158
{
138159
message: 'button is a forbidden value for button type attribute.',
139160
line: 2,
140-
column: 30
161+
column: 30,
162+
endLine: 2,
163+
endColumn: 38
141164
},
142165
{
143166
message: 'submit is a forbidden value for button type attribute.',
144167
line: 3,
145-
column: 30
168+
column: 30,
169+
endLine: 3,
170+
endColumn: 38
146171
},
147172
{
148173
message: 'reset is a forbidden value for button type attribute.',
149174
line: 4,
150-
column: 30
175+
column: 30,
176+
endLine: 4,
177+
endColumn: 37
151178
}
152179
]
153180
},
@@ -165,17 +192,23 @@ ruleTester.run('html-button-has-type', rule, {
165192
{
166193
message: 'reset is a forbidden value for button type attribute.',
167194
line: 4,
168-
column: 30
195+
column: 30,
196+
endLine: 4,
197+
endColumn: 37
169198
},
170199
{
171200
message: 'A value must be set for button type attribute.',
172201
line: 5,
173-
column: 30
202+
column: 30,
203+
endLine: 5,
204+
endColumn: 32
174205
},
175206
{
176207
message: 'foo is an invalid value for button type attribute.',
177208
line: 6,
178-
column: 30
209+
column: 30,
210+
endLine: 6,
211+
endColumn: 35
179212
}
180213
]
181214
},
@@ -185,11 +218,17 @@ ruleTester.run('html-button-has-type', rule, {
185218
errors: [
186219
{
187220
message: 'Missing an explicit type attribute for button.',
188-
column: 11
221+
column: 11,
222+
line: 1,
223+
endLine: 1,
224+
endColumn: 19
189225
},
190226
{
191227
message: 'Missing an explicit type attribute for button.',
192-
column: 39
228+
column: 39,
229+
line: 1,
230+
endLine: 1,
231+
endColumn: 47
193232
}
194233
]
195234
},
@@ -199,7 +238,10 @@ ruleTester.run('html-button-has-type', rule, {
199238
errors: [
200239
{
201240
message: 'A value must be set for button type attribute.',
202-
column: 25
241+
column: 25,
242+
line: 1,
243+
endLine: 1,
244+
endColumn: 27
203245
}
204246
]
205247
}

0 commit comments

Comments
 (0)