Skip to content

Commit 629fbc1

Browse files
committed
refactor(oxlint/lsp): rename unused disable directives message from "eslint-disable" to "oxlint-disable" (#21091)
1 parent 538d703 commit 629fbc1

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

apps/oxlint/src/lsp/error_with_position.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ pub fn create_unused_directives_report(
276276
match unused_comment.r#type {
277277
RuleCommentType::All => {
278278
reports.push(build_unused_disable_diagnostic_report(
279-
"Unused eslint-disable directive (no problems were reported).".to_string(),
279+
"Unused oxlint-disable directive (no problems were reported).".to_string(),
280280
span,
281281
severity,
282282
source_text,
@@ -288,7 +288,7 @@ pub fn create_unused_directives_report(
288288
for rule in rules {
289289
reports.push(build_unused_disable_diagnostic_report(
290290
format!(
291-
"Unused eslint-disable directive (no problems were reported from {}).",
291+
"Unused oxlint-disable directive (no problems were reported from {}).",
292292
rule.rule_name
293293
),
294294
rule.name_span,
@@ -307,10 +307,10 @@ pub fn create_unused_directives_report(
307307
for (rule_name, span) in unused_enable {
308308
let message = if let Some(rule_name) = rule_name {
309309
format!(
310-
"Unused eslint-enable directive (no matching eslint-disable directives were found for {rule_name})."
310+
"Unused oxlint-enable directive (no matching oxlint-disable directives were found for {rule_name})."
311311
)
312312
} else {
313-
"Unused eslint-enable directive (no matching eslint-disable directives were found)."
313+
"Unused oxlint-enable directive (no matching oxlint-disable directives were found)."
314314
.to_string()
315315
};
316316
reports.push(build_unused_disable_diagnostic_report(

apps/oxlint/src/lsp/snapshots/fixtures_lsp_unused_disabled_directives@test.js.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ tags: None
3131

3232
code: ""
3333
code_description.href: "None"
34-
message: "Unused eslint-disable directive (no problems were reported)."
34+
message: "Unused oxlint-disable directive (no problems were reported)."
3535
range: Range { start: Position { line: 0, character: 2 }, end: Position { line: 0, character: 56 } }
3636
related_information: None
3737
severity: Some(Error)
@@ -40,7 +40,7 @@ tags: None
4040

4141
code: ""
4242
code_description.href: "None"
43-
message: "Unused eslint-disable directive (no problems were reported from no-for-loop)."
43+
message: "Unused oxlint-disable directive (no problems were reported from no-for-loop)."
4444
range: Range { start: Position { line: 5, character: 41 }, end: Position { line: 5, character: 52 } }
4545
related_information: None
4646
severity: Some(Error)
@@ -49,7 +49,7 @@ tags: None
4949

5050
code: ""
5151
code_description.href: "None"
52-
message: "Unused eslint-disable directive (no problems were reported)."
52+
message: "Unused oxlint-disable directive (no problems were reported)."
5353
range: Range { start: Position { line: 8, character: 2 }, end: Position { line: 8, character: 52 } }
5454
related_information: None
5555
severity: Some(Error)

apps/oxlint/test/lsp/lint/__snapshots__/lint.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ exports[`LSP linting > config options > should apply config from unused-disable-
145145
unused-disable-directive-from-config/test.ts
146146
--- Diagnostics ---------
147147
> 1 | // oxlint-disable-next-line debugger
148-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Error: Unused eslint-disable directive (no problems were reported).
148+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Error: Unused oxlint-disable directive (no problems were reported).
149149
2 | console.log("This directive is not used");
150150
3 |
151151
--------------------"

0 commit comments

Comments
 (0)