File tree Expand file tree Collapse file tree 4 files changed +7
-5
lines changed Expand file tree Collapse file tree 4 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -140,7 +140,7 @@ oxc_tasks_transform_checker = { path = "tasks/transform_checker" }
140140oxlint = { path = " apps/oxlint" }
141141
142142# Relaxed version so the user can decide which version to use.
143- napi = " 3.0.0-beta"
143+ napi = { version = " 3.0.0-beta" , features = [ " tokio_rt " ] }
144144napi-build = " 2.2.1"
145145napi-derive = " 3.0.0-beta"
146146
Original file line number Diff line number Diff line change 11/* auto-generated by NAPI-RS */
22/* eslint-disable */
3- export declare function lint ( ) : boolean
3+ export declare function lint ( ) : Promise < boolean >
Original file line number Diff line number Diff line change @@ -6,10 +6,10 @@ class Linter {
66 }
77}
88
9- function main ( ) {
9+ async function main ( ) {
1010 const linter = new Linter ( ) ;
1111
12- const result = linter . run ( ) ;
12+ const result = await linter . run ( ) ;
1313
1414 if ( ! result ) {
1515 process . exit ( 1 ) ;
Original file line number Diff line number Diff line change @@ -4,7 +4,9 @@ use napi_derive::napi;
44
55use oxlint:: lint as oxlint_lint;
66
7+ #[ expect( clippy:: allow_attributes) ]
8+ #[ allow( clippy:: trailing_empty_array, clippy:: unused_async) ] // https://github.com/napi-rs/napi-rs/issues/2758
79#[ napi]
8- pub fn lint ( ) -> bool {
10+ pub async fn lint ( ) -> bool {
911 oxlint_lint ( ) . report ( ) == ExitCode :: SUCCESS
1012}
You can’t perform that action at this time.
0 commit comments