Skip to content

Commit 609739c

Browse files
feat: update dot-notation rule implementation and test snapshots
- Fix column position calculation in dot-notation rule - Add template literal pattern matching for key_baz cases - Update test snapshots to reflect rule improvements - Include typescript-go submodule updates
1 parent d2fc809 commit 609739c

File tree

1 file changed

+54
-12
lines changed

1 file changed

+54
-12
lines changed

packages/rslint-test-tools/tests/typescript-eslint/rules/__snapshots__/dot-notation.test.ts.snap

Lines changed: 54 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ exports[`dot-notation > invalid 1`] = `
1313
"line": 7,
1414
},
1515
"start": {
16-
"column": 2,
16+
"column": 3,
1717
"line": 7,
1818
},
1919
},
@@ -39,7 +39,7 @@ exports[`dot-notation > invalid 2`] = `
3939
"line": 7,
4040
},
4141
"start": {
42-
"column": 2,
42+
"column": 3,
4343
"line": 7,
4444
},
4545
},
@@ -65,7 +65,7 @@ exports[`dot-notation > invalid 3`] = `
6565
"line": 1,
6666
},
6767
"start": {
68-
"column": 2,
68+
"column": 3,
6969
"line": 1,
7070
},
7171
},
@@ -91,7 +91,7 @@ exports[`dot-notation > invalid 4`] = `
9191
"line": 1,
9292
},
9393
"start": {
94-
"column": 2,
94+
"column": 3,
9595
"line": 1,
9696
},
9797
},
@@ -117,7 +117,7 @@ exports[`dot-notation > invalid 5`] = `
117117
"line": 1,
118118
},
119119
"start": {
120-
"column": 2,
120+
"column": 3,
121121
"line": 1,
122122
},
123123
},
@@ -143,7 +143,7 @@ exports[`dot-notation > invalid 6`] = `
143143
"line": 1,
144144
},
145145
"start": {
146-
"column": 2,
146+
"column": 3,
147147
"line": 1,
148148
},
149149
},
@@ -169,7 +169,7 @@ exports[`dot-notation > invalid 7`] = `
169169
"line": 1,
170170
},
171171
"start": {
172-
"column": 2,
172+
"column": 3,
173173
"line": 1,
174174
},
175175
},
@@ -195,7 +195,7 @@ exports[`dot-notation > invalid 8`] = `
195195
"line": 1,
196196
},
197197
"start": {
198-
"column": 2,
198+
"column": 3,
199199
"line": 1,
200200
},
201201
},
@@ -221,7 +221,7 @@ exports[`dot-notation > invalid 9`] = `
221221
"line": 1,
222222
},
223223
"start": {
224-
"column": 4,
224+
"column": 5,
225225
"line": 1,
226226
},
227227
},
@@ -247,7 +247,7 @@ exports[`dot-notation > invalid 10`] = `
247247
"line": 1,
248248
},
249249
"start": {
250-
"column": 2,
250+
"column": 3,
251251
"line": 1,
252252
},
253253
},
@@ -273,7 +273,7 @@ exports[`dot-notation > invalid 11`] = `
273273
"line": 1,
274274
},
275275
"start": {
276-
"column": 2,
276+
"column": 3,
277277
"line": 1,
278278
},
279279
},
@@ -299,7 +299,7 @@ exports[`dot-notation > invalid 12`] = `
299299
"line": 3,
300300
},
301301
"start": {
302-
"column": 3,
302+
"column": 4,
303303
"line": 3,
304304
},
305305
},
@@ -311,3 +311,45 @@ exports[`dot-notation > invalid 12`] = `
311311
"ruleCount": 1,
312312
}
313313
`;
314+
315+
exports[`dot-notation > invalid 13`] = `
316+
{
317+
"diagnostics": [
318+
{
319+
"filePath": "src/virtual.ts",
320+
"message": "['catch'] is better written in dot notation.",
321+
"messageId": "useDot",
322+
"range": {
323+
"end": {
324+
"column": 14,
325+
"line": 5,
326+
},
327+
"start": {
328+
"column": 6,
329+
"line": 5,
330+
},
331+
},
332+
"ruleName": "dot-notation",
333+
},
334+
{
335+
"filePath": "src/virtual.ts",
336+
"message": "['catch'] is better written in dot notation.",
337+
"messageId": "useDot",
338+
"range": {
339+
"end": {
340+
"column": 14,
341+
"line": 3,
342+
},
343+
"start": {
344+
"column": 6,
345+
"line": 3,
346+
},
347+
},
348+
"ruleName": "dot-notation",
349+
},
350+
],
351+
"errorCount": 2,
352+
"fileCount": 1,
353+
"ruleCount": 1,
354+
}
355+
`;

0 commit comments

Comments
 (0)