mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +00:00
fix(linter/no_empty_file): point to start of file instead of the entire file (#1105)
Since it may contain lots of comments, which gives us a screenful of comments
This commit is contained in:
parent
cb2407de24
commit
22c31cef3f
2 changed files with 24 additions and 23 deletions
|
|
@ -49,7 +49,7 @@ impl Rule for NoEmptyFile {
|
|||
return;
|
||||
}
|
||||
|
||||
ctx.diagnostic(NoEmptyFileDiagnostic(program.span));
|
||||
ctx.diagnostic(NoEmptyFileDiagnostic(Span::new(0, 0)));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10,141 +10,142 @@ expression: no_empty_file
|
|||
⚠ eslint-plugin-unicorn(no-empty-file): Empty files are not allowed.
|
||||
╭─[no_empty_file.tsx:1:1]
|
||||
1 │
|
||||
· ─
|
||||
· ▲
|
||||
╰────
|
||||
help: Delete this file or add some code to it.
|
||||
|
||||
⚠ eslint-plugin-unicorn(no-empty-file): Empty files are not allowed.
|
||||
╭─[no_empty_file.tsx:1:1]
|
||||
1 │
|
||||
· ────
|
||||
· ▲
|
||||
╰────
|
||||
help: Delete this file or add some code to it.
|
||||
|
||||
⚠ eslint-plugin-unicorn(no-empty-file): Empty files are not allowed.
|
||||
╭─[no_empty_file.tsx:1:1]
|
||||
1 │
|
||||
· ─
|
||||
· ▲
|
||||
╰────
|
||||
help: Delete this file or add some code to it.
|
||||
|
||||
⚠ eslint-plugin-unicorn(no-empty-file): Empty files are not allowed.
|
||||
╭─[no_empty_file.tsx:1:1]
|
||||
0 │
|
||||
· ─
|
||||
· ▲
|
||||
╰────
|
||||
help: Delete this file or add some code to it.
|
||||
|
||||
⚠ eslint-plugin-unicorn(no-empty-file): Empty files are not allowed.
|
||||
╭─[no_empty_file.tsx:1:1]
|
||||
1 │
|
||||
· ─
|
||||
· ▲
|
||||
╰────
|
||||
help: Delete this file or add some code to it.
|
||||
|
||||
⚠ eslint-plugin-unicorn(no-empty-file): Empty files are not allowed.
|
||||
╭─[no_empty_file.tsx:1:1]
|
||||
1 │ ╭─▶
|
||||
2 │ │
|
||||
3 │ ╰─▶
|
||||
1 │
|
||||
· ▲
|
||||
2 │
|
||||
3 │
|
||||
╰────
|
||||
help: Delete this file or add some code to it.
|
||||
|
||||
⚠ eslint-plugin-unicorn(no-empty-file): Empty files are not allowed.
|
||||
╭─[no_empty_file.tsx:1:1]
|
||||
1 │ // comment
|
||||
· ──────────
|
||||
· ▲
|
||||
╰────
|
||||
help: Delete this file or add some code to it.
|
||||
|
||||
⚠ eslint-plugin-unicorn(no-empty-file): Empty files are not allowed.
|
||||
╭─[no_empty_file.tsx:1:1]
|
||||
1 │ /* comment */
|
||||
· ─────────────
|
||||
· ▲
|
||||
╰────
|
||||
help: Delete this file or add some code to it.
|
||||
|
||||
⚠ eslint-plugin-unicorn(no-empty-file): Empty files are not allowed.
|
||||
╭─[no_empty_file.tsx:1:1]
|
||||
1 │ #!/usr/bin/env node
|
||||
· ───────────────────
|
||||
· ▲
|
||||
╰────
|
||||
help: Delete this file or add some code to it.
|
||||
|
||||
⚠ eslint-plugin-unicorn(no-empty-file): Empty files are not allowed.
|
||||
╭─[no_empty_file.tsx:1:1]
|
||||
1 │ 'use asm';
|
||||
· ──────────
|
||||
· ▲
|
||||
╰────
|
||||
help: Delete this file or add some code to it.
|
||||
|
||||
⚠ eslint-plugin-unicorn(no-empty-file): Empty files are not allowed.
|
||||
╭─[no_empty_file.tsx:1:1]
|
||||
1 │ 'use strict';
|
||||
· ─────────────
|
||||
· ▲
|
||||
╰────
|
||||
help: Delete this file or add some code to it.
|
||||
|
||||
⚠ eslint-plugin-unicorn(no-empty-file): Empty files are not allowed.
|
||||
╭─[no_empty_file.tsx:1:1]
|
||||
1 │ "use strict"
|
||||
· ────────────
|
||||
· ▲
|
||||
╰────
|
||||
help: Delete this file or add some code to it.
|
||||
|
||||
⚠ eslint-plugin-unicorn(no-empty-file): Empty files are not allowed.
|
||||
╭─[no_empty_file.tsx:1:1]
|
||||
1 │ ""
|
||||
· ──
|
||||
· ▲
|
||||
╰────
|
||||
help: Delete this file or add some code to it.
|
||||
|
||||
⚠ eslint-plugin-unicorn(no-empty-file): Empty files are not allowed.
|
||||
╭─[no_empty_file.tsx:1:1]
|
||||
1 │ ;
|
||||
· ─
|
||||
· ▲
|
||||
╰────
|
||||
help: Delete this file or add some code to it.
|
||||
|
||||
⚠ eslint-plugin-unicorn(no-empty-file): Empty files are not allowed.
|
||||
╭─[no_empty_file.tsx:1:1]
|
||||
1 │ ;;
|
||||
· ──
|
||||
· ▲
|
||||
╰────
|
||||
help: Delete this file or add some code to it.
|
||||
|
||||
⚠ eslint-plugin-unicorn(no-empty-file): Empty files are not allowed.
|
||||
╭─[no_empty_file.tsx:1:1]
|
||||
1 │ {}
|
||||
· ──
|
||||
· ▲
|
||||
╰────
|
||||
help: Delete this file or add some code to it.
|
||||
|
||||
⚠ eslint-plugin-unicorn(no-empty-file): Empty files are not allowed.
|
||||
╭─[no_empty_file.tsx:1:1]
|
||||
1 │ {;;}
|
||||
· ────
|
||||
· ▲
|
||||
╰────
|
||||
help: Delete this file or add some code to it.
|
||||
|
||||
⚠ eslint-plugin-unicorn(no-empty-file): Empty files are not allowed.
|
||||
╭─[no_empty_file.tsx:1:1]
|
||||
1 │ {{}}
|
||||
· ────
|
||||
· ▲
|
||||
╰────
|
||||
help: Delete this file or add some code to it.
|
||||
|
||||
⚠ eslint-plugin-unicorn(no-empty-file): Empty files are not allowed.
|
||||
╭─[no_empty_file.tsx:1:1]
|
||||
1 │ "";
|
||||
· ───
|
||||
· ▲
|
||||
╰────
|
||||
help: Delete this file or add some code to it.
|
||||
|
||||
⚠ eslint-plugin-unicorn(no-empty-file): Empty files are not allowed.
|
||||
╭─[no_empty_file.tsx:1:1]
|
||||
1 │ "use strict";
|
||||
· ─────────────
|
||||
· ▲
|
||||
╰────
|
||||
help: Delete this file or add some code to it.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue