We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5e428a4 commit 47fad0eCopy full SHA for 47fad0e
crates/oxc_linter/src/rules/unicorn/no_empty_file.rs
@@ -74,7 +74,9 @@ fn has_triple_slash_directive(ctx: &LintContext<'_>) -> bool {
74
continue;
75
}
76
let text = ctx.source_range(comment.content_span());
77
- if text.starts_with("///") {
+
78
+ // `comment.content_span` doesn't include the leading `//` of the comment
79
+ if text.starts_with('/') {
80
return true;
81
82
@@ -110,6 +112,7 @@ fn test() {
110
112
r"(() => {})()",
111
113
"(() => {})();",
114
"/* eslint-disable no-empty-file */",
115
+ r#"/// <reference types="vite/client" />"#,
116
];
117
118
let fail = vec![
0 commit comments