Skip to content

Commit b9c702a

Browse files
taearlsclaude
andcommitted
test(language_server): update snapshots for 1-based line indexing
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 2447b22 commit b9c702a

18 files changed

+97
-97
lines changed

crates/oxc_language_server/src/snapshots/fixtures_linter_astro@debugger.astro.snap

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,50 +5,50 @@ input_file: crates/oxc_language_server/fixtures/linter/astro/debugger.astro
55
code: "eslint(no-debugger)"
66
code_description.href: "https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-debugger.html"
77
message: "`debugger` statement is not allowed\nhelp: Remove the debugger statement"
8-
range: Range { start: Position { line: 1, character: 0 }, end: Position { line: 1, character: 8 } }
8+
range: Range { start: Position { line: 2, character: 0 }, end: Position { line: 2, character: 8 } }
99
related_information[0].message: ""
1010
related_information[0].location.uri: "file://<variable>/fixtures/linter/astro/debugger.astro"
11-
related_information[0].location.range: Range { start: Position { line: 1, character: 0 }, end: Position { line: 1, character: 8 } }
11+
related_information[0].location.range: Range { start: Position { line: 2, character: 0 }, end: Position { line: 2, character: 8 } }
1212
severity: Some(Warning)
1313
source: Some("oxc")
1414
tags: None
15-
fixed: Single(FixedContent { message: Some("Remove the debugger statement"), code: "", range: Range { start: Position { line: 1, character: 0 }, end: Position { line: 1, character: 8 } } })
15+
fixed: Single(FixedContent { message: Some("Remove the debugger statement"), code: "", range: Range { start: Position { line: 2, character: 0 }, end: Position { line: 2, character: 8 } } })
1616

1717

1818
code: "eslint(no-debugger)"
1919
code_description.href: "https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-debugger.html"
2020
message: "`debugger` statement is not allowed\nhelp: Remove the debugger statement"
21-
range: Range { start: Position { line: 10, character: 2 }, end: Position { line: 10, character: 10 } }
21+
range: Range { start: Position { line: 11, character: 2 }, end: Position { line: 11, character: 10 } }
2222
related_information[0].message: ""
2323
related_information[0].location.uri: "file://<variable>/fixtures/linter/astro/debugger.astro"
24-
related_information[0].location.range: Range { start: Position { line: 10, character: 2 }, end: Position { line: 10, character: 10 } }
24+
related_information[0].location.range: Range { start: Position { line: 11, character: 2 }, end: Position { line: 11, character: 10 } }
2525
severity: Some(Warning)
2626
source: Some("oxc")
2727
tags: None
28-
fixed: Single(FixedContent { message: Some("Remove the debugger statement"), code: "", range: Range { start: Position { line: 10, character: 2 }, end: Position { line: 10, character: 10 } } })
28+
fixed: Single(FixedContent { message: Some("Remove the debugger statement"), code: "", range: Range { start: Position { line: 11, character: 2 }, end: Position { line: 11, character: 10 } } })
2929

3030

3131
code: "eslint(no-debugger)"
3232
code_description.href: "https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-debugger.html"
3333
message: "`debugger` statement is not allowed\nhelp: Remove the debugger statement"
34-
range: Range { start: Position { line: 14, character: 2 }, end: Position { line: 14, character: 10 } }
34+
range: Range { start: Position { line: 15, character: 2 }, end: Position { line: 15, character: 10 } }
3535
related_information[0].message: ""
3636
related_information[0].location.uri: "file://<variable>/fixtures/linter/astro/debugger.astro"
37-
related_information[0].location.range: Range { start: Position { line: 14, character: 2 }, end: Position { line: 14, character: 10 } }
37+
related_information[0].location.range: Range { start: Position { line: 15, character: 2 }, end: Position { line: 15, character: 10 } }
3838
severity: Some(Warning)
3939
source: Some("oxc")
4040
tags: None
41-
fixed: Single(FixedContent { message: Some("Remove the debugger statement"), code: "", range: Range { start: Position { line: 14, character: 2 }, end: Position { line: 14, character: 10 } } })
41+
fixed: Single(FixedContent { message: Some("Remove the debugger statement"), code: "", range: Range { start: Position { line: 15, character: 2 }, end: Position { line: 15, character: 10 } } })
4242

4343

4444
code: "eslint(no-debugger)"
4545
code_description.href: "https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-debugger.html"
4646
message: "`debugger` statement is not allowed\nhelp: Remove the debugger statement"
47-
range: Range { start: Position { line: 18, character: 2 }, end: Position { line: 18, character: 10 } }
47+
range: Range { start: Position { line: 19, character: 2 }, end: Position { line: 19, character: 10 } }
4848
related_information[0].message: ""
4949
related_information[0].location.uri: "file://<variable>/fixtures/linter/astro/debugger.astro"
50-
related_information[0].location.range: Range { start: Position { line: 18, character: 2 }, end: Position { line: 18, character: 10 } }
50+
related_information[0].location.range: Range { start: Position { line: 19, character: 2 }, end: Position { line: 19, character: 10 } }
5151
severity: Some(Warning)
5252
source: Some("oxc")
5353
tags: None
54-
fixed: Single(FixedContent { message: Some("Remove the debugger statement"), code: "", range: Range { start: Position { line: 18, character: 2 }, end: Position { line: 18, character: 10 } } })
54+
fixed: Single(FixedContent { message: Some("Remove the debugger statement"), code: "", range: Range { start: Position { line: 19, character: 2 }, end: Position { line: 19, character: 10 } } })

crates/oxc_language_server/src/snapshots/fixtures_linter_cross_module@debugger.ts.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ input_file: crates/oxc_language_server/fixtures/linter/cross_module/debugger.ts
55
code: "eslint(no-debugger)"
66
code_description.href: "https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-debugger.html"
77
message: "`debugger` statement is not allowed\nhelp: Remove the debugger statement"
8-
range: Range { start: Position { line: 1, character: 0 }, end: Position { line: 1, character: 9 } }
8+
range: Range { start: Position { line: 2, character: 0 }, end: Position { line: 2, character: 9 } }
99
related_information[0].message: ""
1010
related_information[0].location.uri: "file://<variable>/fixtures/linter/cross_module/debugger.ts"
11-
related_information[0].location.range: Range { start: Position { line: 1, character: 0 }, end: Position { line: 1, character: 9 } }
11+
related_information[0].location.range: Range { start: Position { line: 2, character: 0 }, end: Position { line: 2, character: 9 } }
1212
severity: Some(Warning)
1313
source: Some("oxc")
1414
tags: None
15-
fixed: Single(FixedContent { message: Some("Remove the debugger statement"), code: "", range: Range { start: Position { line: 1, character: 0 }, end: Position { line: 1, character: 9 } } })
15+
fixed: Single(FixedContent { message: Some("Remove the debugger statement"), code: "", range: Range { start: Position { line: 2, character: 0 }, end: Position { line: 2, character: 9 } } })

crates/oxc_language_server/src/snapshots/fixtures_linter_cross_module@dep-a.ts.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ input_file: crates/oxc_language_server/fixtures/linter/cross_module/dep-a.ts
55
code: "eslint-plugin-import(no-cycle)"
66
code_description.href: "https://oxc.rs/docs/guide/usage/linter/rules/import/no-cycle.html"
77
message: "Dependency cycle detected\nhelp: These paths form a cycle: \n-> ./dep-b.ts - fixtures/linter/cross_module/dep-b.ts\n-> ./dep-a.ts - fixtures/linter/cross_module/dep-a.ts"
8-
range: Range { start: Position { line: 1, character: 18 }, end: Position { line: 1, character: 30 } }
8+
range: Range { start: Position { line: 2, character: 18 }, end: Position { line: 2, character: 30 } }
99
related_information[0].message: ""
1010
related_information[0].location.uri: "file://<variable>/fixtures/linter/cross_module/dep-a.ts"
11-
related_information[0].location.range: Range { start: Position { line: 1, character: 18 }, end: Position { line: 1, character: 30 } }
11+
related_information[0].location.range: Range { start: Position { line: 2, character: 18 }, end: Position { line: 2, character: 30 } }
1212
severity: Some(Error)
1313
source: Some("oxc")
1414
tags: None

crates/oxc_language_server/src/snapshots/fixtures_linter_cross_module_extended_config@dep-a.ts.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ input_file: crates/oxc_language_server/fixtures/linter/cross_module_extended_con
55
code: "eslint-plugin-import(no-cycle)"
66
code_description.href: "https://oxc.rs/docs/guide/usage/linter/rules/import/no-cycle.html"
77
message: "Dependency cycle detected\nhelp: These paths form a cycle: \n-> ./dep-b.ts - fixtures/linter/cross_module_extended_config/dep-b.ts\n-> ./dep-a.ts - fixtures/linter/cross_module_extended_config/dep-a.ts"
8-
range: Range { start: Position { line: 1, character: 18 }, end: Position { line: 1, character: 30 } }
8+
range: Range { start: Position { line: 2, character: 18 }, end: Position { line: 2, character: 30 } }
99
related_information[0].message: ""
1010
related_information[0].location.uri: "file://<variable>/fixtures/linter/cross_module_extended_config/dep-a.ts"
11-
related_information[0].location.range: Range { start: Position { line: 1, character: 18 }, end: Position { line: 1, character: 30 } }
11+
related_information[0].location.range: Range { start: Position { line: 2, character: 18 }, end: Position { line: 2, character: 30 } }
1212
severity: Some(Error)
1313
source: Some("oxc")
1414
tags: None

crates/oxc_language_server/src/snapshots/fixtures_linter_cross_module_nested_config@folder_folder-dep-a.ts.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ input_file: crates/oxc_language_server/fixtures/linter/cross_module_nested_confi
55
code: "eslint-plugin-import(no-cycle)"
66
code_description.href: "https://oxc.rs/docs/guide/usage/linter/rules/import/no-cycle.html"
77
message: "Dependency cycle detected\nhelp: These paths form a cycle: \n-> ./folder-dep-b.ts - fixtures/linter/cross_module_nested_config/folder/folder-dep-b.ts\n-> ./folder-dep-a.ts - fixtures/linter/cross_module_nested_config/folder/folder-dep-a.ts"
8-
range: Range { start: Position { line: 1, character: 18 }, end: Position { line: 1, character: 37 } }
8+
range: Range { start: Position { line: 2, character: 18 }, end: Position { line: 2, character: 37 } }
99
related_information[0].message: ""
1010
related_information[0].location.uri: "file://<variable>/fixtures/linter/cross_module_nested_config/folder/folder-dep-a.ts"
11-
related_information[0].location.range: Range { start: Position { line: 1, character: 18 }, end: Position { line: 1, character: 37 } }
11+
related_information[0].location.range: Range { start: Position { line: 2, character: 18 }, end: Position { line: 2, character: 37 } }
1212
severity: Some(Error)
1313
source: Some("oxc")
1414
tags: None

crates/oxc_language_server/src/snapshots/fixtures_linter_deny_no_console@hello_world.js.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ input_file: crates/oxc_language_server/fixtures/linter/deny_no_console/hello_wor
55
code: "eslint(no-console)"
66
code_description.href: "https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-console.html"
77
message: "Unexpected console statement.\nhelp: Delete this console statement."
8-
range: Range { start: Position { line: 0, character: 0 }, end: Position { line: 0, character: 11 } }
8+
range: Range { start: Position { line: 1, character: 0 }, end: Position { line: 1, character: 11 } }
99
related_information[0].message: ""
1010
related_information[0].location.uri: "file://<variable>/fixtures/linter/deny_no_console/hello_world.js"
11-
related_information[0].location.range: Range { start: Position { line: 0, character: 0 }, end: Position { line: 0, character: 11 } }
11+
related_information[0].location.range: Range { start: Position { line: 1, character: 0 }, end: Position { line: 1, character: 11 } }
1212
severity: Some(Error)
1313
source: Some("oxc")
1414
tags: None

crates/oxc_language_server/src/snapshots/fixtures_linter_ignore_patterns@another_config_not-ignored-file.ts.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ input_file: crates/oxc_language_server/fixtures/linter/ignore_patterns/another_c
55
code: "eslint(no-debugger)"
66
code_description.href: "https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-debugger.html"
77
message: "`debugger` statement is not allowed\nhelp: Remove the debugger statement"
8-
range: Range { start: Position { line: 0, character: 0 }, end: Position { line: 0, character: 9 } }
8+
range: Range { start: Position { line: 1, character: 0 }, end: Position { line: 1, character: 9 } }
99
related_information[0].message: ""
1010
related_information[0].location.uri: "file://<variable>/fixtures/linter/ignore_patterns/another_config/not-ignored-file.ts"
11-
related_information[0].location.range: Range { start: Position { line: 0, character: 0 }, end: Position { line: 0, character: 9 } }
11+
related_information[0].location.range: Range { start: Position { line: 1, character: 0 }, end: Position { line: 1, character: 9 } }
1212
severity: Some(Error)
1313
source: Some("oxc")
1414
tags: None
15-
fixed: Single(FixedContent { message: Some("Remove the debugger statement"), code: "", range: Range { start: Position { line: 0, character: 0 }, end: Position { line: 0, character: 9 } } })
15+
fixed: Single(FixedContent { message: Some("Remove the debugger statement"), code: "", range: Range { start: Position { line: 1, character: 0 }, end: Position { line: 1, character: 9 } } })

crates/oxc_language_server/src/snapshots/fixtures_linter_issue_9958@issue.ts.snap

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ input_file: crates/oxc_language_server/fixtures/linter/issue_9958/issue.ts
55
code: "eslint(no-extra-boolean-cast)"
66
code_description.href: "https://oxc.rs/docs/guide/usage/linter/rules/eslint/no-extra-boolean-cast.html"
77
message: "Redundant double negation\nhelp: Remove the double negation as it will already be coerced to a boolean"
8-
range: Range { start: Position { line: 3, character: 14 }, end: Position { line: 3, character: 17 } }
8+
range: Range { start: Position { line: 4, character: 14 }, end: Position { line: 4, character: 17 } }
99
related_information[0].message: ""
1010
related_information[0].location.uri: "file://<variable>/fixtures/linter/issue_9958/issue.ts"
11-
related_information[0].location.range: Range { start: Position { line: 3, character: 14 }, end: Position { line: 3, character: 17 } }
11+
related_information[0].location.range: Range { start: Position { line: 4, character: 14 }, end: Position { line: 4, character: 17 } }
1212
severity: Some(Error)
1313
source: Some("oxc")
1414
tags: None
@@ -18,26 +18,26 @@ fixed: None
1818
code: "typescript-eslint(no-non-null-asserted-optional-chain)"
1919
code_description.href: "https://oxc.rs/docs/guide/usage/linter/rules/typescript/no-non-null-asserted-optional-chain.html"
2020
message: "Optional chain expressions can return undefined by design: using a non-null assertion is unsafe and wrong.\nhelp: Remove the non-null assertion."
21-
range: Range { start: Position { line: 11, character: 18 }, end: Position { line: 11, character: 19 } }
21+
range: Range { start: Position { line: 12, character: 18 }, end: Position { line: 12, character: 19 } }
2222
related_information[0].message: "non-null assertion made after optional chain"
2323
related_information[0].location.uri: "file://<variable>/fixtures/linter/issue_9958/issue.ts"
24-
related_information[0].location.range: Range { start: Position { line: 11, character: 21 }, end: Position { line: 11, character: 22 } }
24+
related_information[0].location.range: Range { start: Position { line: 12, character: 21 }, end: Position { line: 12, character: 22 } }
2525
related_information[1].message: "optional chain used"
2626
related_information[1].location.uri: "file://<variable>/fixtures/linter/issue_9958/issue.ts"
27-
related_information[1].location.range: Range { start: Position { line: 11, character: 18 }, end: Position { line: 11, character: 19 } }
27+
related_information[1].location.range: Range { start: Position { line: 12, character: 18 }, end: Position { line: 12, character: 19 } }
2828
severity: Some(Error)
2929
source: Some("oxc")
3030
tags: None
31-
fixed: Single(FixedContent { message: Some("Delete this code."), code: "", range: Range { start: Position { line: 11, character: 21 }, end: Position { line: 11, character: 22 } } })
31+
fixed: Single(FixedContent { message: Some("Delete this code."), code: "", range: Range { start: Position { line: 12, character: 21 }, end: Position { line: 12, character: 22 } } })
3232

3333

3434
code: "None"
3535
code_description.href: "None"
3636
message: "non-null assertion made after optional chain"
37-
range: Range { start: Position { line: 11, character: 21 }, end: Position { line: 11, character: 22 } }
37+
range: Range { start: Position { line: 12, character: 21 }, end: Position { line: 12, character: 22 } }
3838
related_information[0].message: "original diagnostic"
3939
related_information[0].location.uri: "file://<variable>/fixtures/linter/issue_9958/issue.ts"
40-
related_information[0].location.range: Range { start: Position { line: 11, character: 18 }, end: Position { line: 11, character: 19 } }
40+
related_information[0].location.range: Range { start: Position { line: 12, character: 18 }, end: Position { line: 12, character: 19 } }
4141
severity: Some(Hint)
4242
source: Some("oxc")
4343
tags: None

crates/oxc_language_server/src/snapshots/fixtures_linter_lint_on_run_on_save@on-save.ts.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ input_file: crates/oxc_language_server/fixtures/linter/lint_on_run/on_save/on-sa
55
code: "typescript-eslint(no-floating-promises)"
66
code_description.href: "None"
77
message: "Promises must be awaited.\nhelp: The promise must end with a call to .catch, or end with a call to .then with a rejection handler, or be explicitly marked as ignored with the `void` operator."
8-
range: Range { start: Position { line: 7, character: 0 }, end: Position { line: 7, character: 32 } }
8+
range: Range { start: Position { line: 8, character: 0 }, end: Position { line: 8, character: 32 } }
99
related_information[0].message: ""
1010
related_information[0].location.uri: "file://<variable>/fixtures/linter/lint_on_run/on_save/on-save.ts"
11-
related_information[0].location.range: Range { start: Position { line: 7, character: 0 }, end: Position { line: 7, character: 32 } }
11+
related_information[0].location.range: Range { start: Position { line: 8, character: 0 }, end: Position { line: 8, character: 32 } }
1212
severity: Some(Warning)
1313
source: Some("oxc")
1414
tags: None
15-
fixed: Multiple([FixedContent { message: Some("Promises must be awaited."), code: "void ", range: Range { start: Position { line: 7, character: 0 }, end: Position { line: 7, character: 0 } } }, FixedContent { message: Some("Promises must be awaited."), code: "await ", range: Range { start: Position { line: 7, character: 0 }, end: Position { line: 7, character: 0 } } }])
15+
fixed: Multiple([FixedContent { message: Some("Promises must be awaited."), code: "void ", range: Range { start: Position { line: 8, character: 0 }, end: Position { line: 8, character: 0 } } }, FixedContent { message: Some("Promises must be awaited."), code: "await ", range: Range { start: Position { line: 8, character: 0 }, end: Position { line: 8, character: 0 } } }])

0 commit comments

Comments
 (0)