Open mbaroukhcw opened 2 months ago
1.93.0
2.3.0
1.8.3
The vscode extension reports errors that the cli version of biome does not report
I made a minimal reproduction case here : https://github.com/mbaroukhcw/biomeunused
when running
$ ./node_modules/.bin/biome lint Checked 5 files in 1405Β΅s. No fixes applied.
there is no error.
But in vscode, I have an false error in the types.d.ts file
no error in the IDE.
No
https://github.com/mbaroukhcw/biomeunused
βββbiome_lsp::handlers::analysis::code_actions{uri=file:///home/mbaroukh/Documents/projets/sandbox/issuebiome/src/types.d.ts, range=Range { start: Position { line: 2, character: 1 }, end: Position { line: 2, character: 1 } }, only=None, diagnostics=[]} ββ 0ms DEBUG biome_service::workspace::server File capabilities: Js(JsFileSource { language: TypeScript { definition_file: false }, variant: Standard, module_kind: Module, version: ES2022, embedding_kind: None }) BiomePath { path: "/home/mbaroukh/Documents/projets/sandbox/issuebiome/src/types.d.ts" } ββ 0ms DEBUG biome_service::workspace The file has the following feature sets: β {Format: Supported, OrganizeImports: Supported, Search: FileNotSupported, Lint: Supported} ββ 0ms DEBUG biome_lsp::handlers::analysis Cursor range 33..33 ββ 0ms DEBUG biome_service::workspace::server File capabilities: Js(JsFileSource { language: TypeScript { definition_file: false }, variant: Standard, module_kind: Module, version: ES2022, embedding_kind: None }) BiomePath { path: "/home/mbaroukh/Documents/projets/sandbox/issuebiome/src/types.d.ts" } βββbiome_service::file_handlers::javascript::code_actions{} βββbiome_service::file_handlers::javascript::Code actions JavaScript{range=33..33, path=BiomePath { path: "/home/mbaroukh/Documents/projets/sandbox/issuebiome/src/types.d.ts" }} βββ βββ ββ 0ms DEBUG biome_lsp::handlers::analysis Pull actions result: PullActionsResult { actions: [] } ββ 0ms DEBUG biome_lsp::handlers::analysis Suggested actions: β [] βββ βββbiome_lsp::handlers::analysis::code_actions{uri=file:///home/mbaroukh/Documents/projets/sandbox/issuebiome/src/types.d.ts, range=Range { start: Position { line: 0, character: 5 }, end: Position { line: 0, character: 9 } }, only=Some([CodeActionKind("quickfix")]), diagnostics=[Diagnostic { range: Range { start: Position { line: 0, character: 5 }, end: Position { line: 0, character: 9 } }, severity: Some(Error), code: Some(String("lint/correctness/noUnusedVariables")), code_description: Some(CodeDescription { href: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("biomejs.dev")), port: None, path: "/linter/rules/no-unused-variables", query: None, fragment: None } }), source: Some("biome"), message: "This type alias is unused.", related_information: None, tags: None, data: None }]} ββ 0ms DEBUG biome_service::workspace::server File capabilities: Js(JsFileSource { language: TypeScript { definition_file: false }, variant: Standard, module_kind: Module, version: ES2022, embedding_kind: None }) BiomePath { path: "/home/mbaroukh/Documents/projets/sandbox/issuebiome/src/types.d.ts" } ββ 0ms DEBUG biome_service::workspace The file has the following feature sets: β {Lint: Supported, OrganizeImports: Supported, Format: Supported, Search: FileNotSupported} ββ 0ms DEBUG biome_lsp::handlers::analysis Cursor range 5..9 ββ 0ms DEBUG biome_service::workspace::server File capabilities: Js(JsFileSource { language: TypeScript { definition_file: false }, variant: Standard, module_kind: Module, version: ES2022, embedding_kind: None }) BiomePath { path: "/home/mbaroukh/Documents/projets/sandbox/issuebiome/src/types.d.ts" } βββbiome_service::file_handlers::javascript::code_actions{} βββbiome_service::file_handlers::javascript::Code actions JavaScript{range=5..9, path=BiomePath { path: "/home/mbaroukh/Documents/projets/sandbox/issuebiome/src/types.d.ts" }} ββ 0ms DEBUG biome_rowan::ast::batch pushing change... βββ βββ ββ 0ms DEBUG biome_lsp::handlers::analysis Pull actions result: PullActionsResult { actions: [CodeAction { category: Other("quickfix.suppressRule"), rule_name: Some(("correctness", "noUnusedVariables")), suggestion: CodeSuggestion { span: 0..5, applicability: Always, msg: "Suppress rule lint/correctness/noUnusedVariables", suggestion: TextEdit { dictionary: "// biome-ignore lint/correctness/noUnusedVariables: <explanation>\ntype User = {\n email: string\n}", ops: [DiffOp(Insert { range: 0..66 }), DiffOp(Equal { range: 66..71 }), DiffOp(Equal { range: 71..99 })] }, labels: [] } }] } ββ 0ms DEBUG biome_lsp::handlers::analysis Suggested actions: β [CodeAction(CodeAction { title: "Suppress rule lint/correctness/noUnusedVariables", kind: Some(CodeActionKind("quickfix.suppressRule.biome.correctness.noUnusedVariables")), diagnostics: Some([Diagnostic { range: Range { start: Position { line: 0, character: 5 }, end: Position { line: 0, character: 9 } }, severity: Some(Error), code: Some(String("lint/correctness/noUnusedVariables")), code_description: Some(CodeDescription { href: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("biomejs.dev")), port: None, path: "/linter/rules/no-unused-variables", query: None, fragment: None } }), source: Some("biome"), message: "This type alias is unused.", related_information: None, tags: None, data: None }]), edit: Some(WorkspaceEdit { changes: Some({Url { scheme: "file", cannot_be_a_base: false, username: "", password: None, host: None, port: None, path: "/home/mbaroukh/Documents/projets/sandbox/issuebiome/src/types.d.ts", query: None, fragment: None }: [TextEdit { range: Range { start: Position { line: 0, character: 0 }, end: Position { line: 0, character: 0 } }, new_text: "// biome-ignore lint/correctness/noUnusedVariables: <explanation>\n" }]}), document_changes: None, change_annotations: None }), command: None, is_preferred: None, disabled: None, data: None })] βββ ββ1183m INFO biome_lsp::server Starting Biome Language Server... βββbiome_lsp::server::biome/rage{params=RageParams} βββ
VS Code version
1.93.0
Extension version
2.3.0
Biome version
1.8.3
Operating system
Description
The vscode extension reports errors that the cli version of biome does not report
Steps to reproduce
I made a minimal reproduction case here : https://github.com/mbaroukhcw/biomeunused
when running
there is no error.
But in vscode, I have an false error in the types.d.ts file
Expected behavior
no error in the IDE.
Does this issue occur when using the CLI directly?
No
Link to a minimal reproduction
https://github.com/mbaroukhcw/biomeunused
Logs