Skip to content

Commit 7e83840

Browse files
authored
Merge branch 'master' into test/strict/dot-location
2 parents d5d9adb + a2bfcb5 commit 7e83840

15 files changed

+1124
-254
lines changed

tests/lib/rules/block-tag-newline.js

Lines changed: 80 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,16 @@ tester.run('block-tag-newline', rule, {
5353
{
5454
message: "A line break is required after '<template>'.",
5555
line: 1,
56-
column: 11
56+
column: 11,
57+
endLine: 1,
58+
endColumn: 11
5759
},
5860
{
5961
message: "A line break is required after '<script>'.",
6062
line: 3,
61-
column: 9
63+
column: 9,
64+
endLine: 3,
65+
endColumn: 9
6266
}
6367
]
6468
},
@@ -69,12 +73,16 @@ tester.run('block-tag-newline', rule, {
6973
{
7074
message: "A line break is required before '</template>'.",
7175
line: 2,
72-
column: 8
76+
column: 8,
77+
endLine: 2,
78+
endColumn: 8
7379
},
7480
{
7581
message: "A line break is required before '</script>'.",
7682
line: 4,
77-
column: 6
83+
column: 6,
84+
endLine: 4,
85+
endColumn: 6
7886
}
7987
]
8088
},
@@ -86,22 +94,30 @@ tester.run('block-tag-newline', rule, {
8694
{
8795
message: "A line break is required after '<template>'.",
8896
line: 1,
89-
column: 11
97+
column: 11,
98+
endLine: 1,
99+
endColumn: 11
90100
},
91101
{
92102
message: "A line break is required before '</template>'.",
93103
line: 2,
94-
column: 7
104+
column: 7,
105+
endLine: 2,
106+
endColumn: 7
95107
},
96108
{
97109
message: "A line break is required after '<script>'.",
98110
line: 3,
99-
column: 9
111+
column: 9,
112+
endLine: 3,
113+
endColumn: 9
100114
},
101115
{
102116
message: "A line break is required before '</script>'.",
103117
line: 4,
104-
column: 6
118+
column: 6,
119+
endLine: 4,
120+
endColumn: 6
105121
}
106122
]
107123
},
@@ -113,22 +129,30 @@ tester.run('block-tag-newline', rule, {
113129
{
114130
message: "There should be no line break after '<template>'.",
115131
line: 1,
116-
column: 11
132+
column: 11,
133+
endLine: 2,
134+
endColumn: 1
117135
},
118136
{
119137
message: "There should be no line break after '<template>'.",
120138
line: 3,
121-
column: 7
139+
column: 7,
140+
endLine: 4,
141+
endColumn: 1
122142
},
123143
{
124144
message: "There should be no line break after '<script>'.",
125145
line: 5,
126-
column: 9
146+
column: 9,
147+
endLine: 6,
148+
endColumn: 1
127149
},
128150
{
129151
message: "There should be no line break after '<script>'.",
130152
line: 6,
131-
column: 6
153+
column: 6,
154+
endLine: 7,
155+
endColumn: 1
132156
}
133157
]
134158
},
@@ -141,22 +165,30 @@ tester.run('block-tag-newline', rule, {
141165
{
142166
message: "A line break is required after '<template>'.",
143167
line: 1,
144-
column: 11
168+
column: 11,
169+
endLine: 1,
170+
endColumn: 11
145171
},
146172
{
147173
message: "A line break is required before '</template>'.",
148174
line: 2,
149-
column: 7
175+
column: 7,
176+
endLine: 2,
177+
endColumn: 7
150178
},
151179
{
152180
message: "A line break is required after '<script>'.",
153181
line: 3,
154-
column: 9
182+
column: 9,
183+
endLine: 3,
184+
endColumn: 9
155185
},
156186
{
157187
message: "A line break is required before '</script>'.",
158188
line: 3,
159-
column: 14
189+
column: 14,
190+
endLine: 3,
191+
endColumn: 14
160192
}
161193
]
162194
},
@@ -170,25 +202,33 @@ tester.run('block-tag-newline', rule, {
170202
message:
171203
"Expected 1 line break after '<template>', but 2 line breaks found.",
172204
line: 1,
173-
column: 11
205+
column: 11,
206+
endLine: 3,
207+
endColumn: 1
174208
},
175209
{
176210
message:
177211
"Expected 1 line break before '</template>', but 2 line breaks found.",
178212
line: 3,
179-
column: 8
213+
column: 8,
214+
endLine: 5,
215+
endColumn: 1
180216
},
181217
{
182218
message:
183219
"Expected 1 line break after '<script>', but 2 line breaks found.",
184220
line: 6,
185-
column: 9
221+
column: 9,
222+
endLine: 8,
223+
endColumn: 1
186224
},
187225
{
188226
message:
189227
"Expected 1 line break before '</script>', but 2 line breaks found.",
190228
line: 9,
191-
column: 6
229+
column: 6,
230+
endLine: 11,
231+
endColumn: 1
192232
}
193233
]
194234
},
@@ -204,13 +244,17 @@ tester.run('block-tag-newline', rule, {
204244
message:
205245
"Expected 2 line breaks after '<template>', but 3 line breaks found.",
206246
line: 1,
207-
column: 11
247+
column: 11,
248+
endLine: 4,
249+
endColumn: 1
208250
},
209251
{
210252
message:
211253
"Expected 2 line breaks before '</script>', but 3 line breaks found.",
212254
line: 10,
213-
column: 6
255+
column: 6,
256+
endLine: 13,
257+
endColumn: 1
214258
}
215259
]
216260
},
@@ -231,8 +275,20 @@ tester.run('block-tag-newline', rule, {
231275
}
232276
],
233277
errors: [
234-
"There should be no line break after '<script>'.",
235-
"A line break is required before '</docs>'."
278+
{
279+
message: "There should be no line break after '<script>'.",
280+
line: 5,
281+
column: 6,
282+
endLine: 8,
283+
endColumn: 1
284+
},
285+
{
286+
message: "A line break is required before '</docs>'.",
287+
line: 9,
288+
column: 2,
289+
endLine: 9,
290+
endColumn: 2
291+
}
236292
]
237293
}
238294
]

tests/lib/rules/brace-style.js

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ tester.run('brace-style', rule, {
4040
{
4141
message:
4242
'Opening curly brace does not appear on the same line as controlling statement.',
43-
line: 4
43+
line: 4,
44+
column: 11,
45+
endLine: 4,
46+
endColumn: 12
4447
}
4548
]
4649
},
@@ -58,12 +61,18 @@ tester.run('brace-style', rule, {
5861
errors: [
5962
{
6063
message: 'Statement inside of curly braces should be on next line.',
61-
line: 3
64+
line: 3,
65+
column: 38,
66+
endLine: 3,
67+
endColumn: 39
6268
},
6369
{
6470
message:
6571
'Closing curly brace should be on the same line as opening curly brace or on the line after the previous block.',
66-
line: 3
72+
line: 3,
73+
column: 53,
74+
endLine: 3,
75+
endColumn: 54
6776
}
6877
]
6978
},
@@ -74,11 +83,19 @@ return(1)
7483
})()" /></template>`,
7584
errors: [
7685
{
77-
message: 'Statement inside of curly braces should be on next line.'
86+
message: 'Statement inside of curly braces should be on next line.',
87+
line: 1,
88+
column: 57,
89+
endLine: 1,
90+
endColumn: 58
7891
},
7992
{
8093
message:
81-
'Closing curly brace should be on the same line as opening curly brace or on the line after the previous block.'
94+
'Closing curly brace should be on the same line as opening curly brace or on the line after the previous block.',
95+
line: 1,
96+
column: 67,
97+
endLine: 1,
98+
endColumn: 68
8299
}
83100
]
84101
}

tests/lib/rules/camelcase.js

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ tester.run('camelcase', rule, {
3434
errors: [
3535
{
3636
message: "Identifier 'my_pref' is not in camel case.",
37-
line: 3
37+
line: 3,
38+
column: 25,
39+
endLine: 3,
40+
endColumn: 32
3841
}
3942
]
4043
},
@@ -48,7 +51,10 @@ tester.run('camelcase', rule, {
4851
errors: [
4952
{
5053
message: "Identifier 'my_pref' is not in camel case.",
51-
line: 4
54+
line: 4,
55+
column: 21,
56+
endLine: 4,
57+
endColumn: 28
5258
}
5359
]
5460
},
@@ -62,7 +68,10 @@ tester.run('camelcase', rule, {
6268
errors: [
6369
{
6470
message: "Identifier 'my_pref' is not in camel case.",
65-
line: 4
71+
line: 4,
72+
column: 21,
73+
endLine: 4,
74+
endColumn: 28
6675
}
6776
]
6877
}

tests/lib/rules/comma-dangle.js

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,10 @@ tester.run('comma-dangle', rule, {
6363
errors: [
6464
{
6565
message: 'Unexpected trailing comma.',
66-
line: 3
66+
line: 3,
67+
column: 41,
68+
endLine: 3,
69+
endColumn: 42
6770
}
6871
]
6972
},
@@ -84,7 +87,10 @@ tester.run('comma-dangle', rule, {
8487
errors: [
8588
{
8689
message: 'Unexpected trailing comma.',
87-
line: 3
90+
line: 3,
91+
column: 40,
92+
endLine: 3,
93+
endColumn: 41
8894
}
8995
]
9096
},
@@ -113,11 +119,17 @@ tester.run('comma-dangle', rule, {
113119
errors: [
114120
{
115121
message: 'Unexpected trailing comma.',
116-
line: 4
122+
line: 4,
123+
column: 21,
124+
endLine: 4,
125+
endColumn: 22
117126
},
118127
{
119128
message: 'Missing trailing comma.',
120-
line: 7
129+
line: 7,
130+
column: 16,
131+
endLine: 8,
132+
endColumn: 1
121133
}
122134
]
123135
},
@@ -132,7 +144,11 @@ tester.run('comma-dangle', rule, {
132144
</template>`,
133145
errors: [
134146
{
135-
message: 'Unexpected trailing comma.'
147+
message: 'Unexpected trailing comma.',
148+
line: 3,
149+
column: 23,
150+
endLine: 3,
151+
endColumn: 24
136152
}
137153
]
138154
},
@@ -148,7 +164,11 @@ tester.run('comma-dangle', rule, {
148164
options: ['always'],
149165
errors: [
150166
{
151-
message: 'Missing trailing comma.'
167+
message: 'Missing trailing comma.',
168+
line: 3,
169+
column: 23,
170+
endLine: 3,
171+
endColumn: 24
152172
}
153173
]
154174
}

0 commit comments

Comments
 (0)