11#![ expect( clippy:: self_named_module_files) ] // for rules.rs
22
3- use std:: { path:: Path , rc:: Rc } ;
3+ use std:: {
4+ mem,
5+ path:: Path ,
6+ ptr:: { self , NonNull } ,
7+ rc:: Rc ,
8+ } ;
49
510use oxc_allocator:: Allocator ;
6- use oxc_ast:: ast_kind:: AST_TYPE_MAX ;
11+ use oxc_ast:: { ast :: Program , ast_kind:: AST_TYPE_MAX } ;
712use oxc_ast_macros:: ast;
813use oxc_ast_visit:: utf8_to_utf16:: Utf8ToUtf16 ;
914use oxc_data_structures:: box_macros:: boxed_array;
15+ use oxc_diagnostics:: OxcDiagnostic ;
1016use oxc_semantic:: AstNode ;
11-
12- #[ cfg( test) ]
13- mod tester;
17+ use oxc_span:: Span ;
1418
1519mod ast_util;
1620mod config;
@@ -41,6 +45,9 @@ mod generated {
4145mod rule_runner_impls;
4246}
4347
48+ #[ cfg( test) ]
49+ mod tester;
50+
4451pub use crate :: {
4552 config:: {
4653BuiltinLintPlugins , Config , ConfigBuilderError , ConfigStore , ConfigStoreBuilder ,
@@ -66,7 +73,7 @@ pub use crate::{
6673use crate :: {
6774 config:: { LintConfig , OxlintEnv , OxlintGlobals , OxlintSettings } ,
6875 context:: ContextHost ,
69- fixer:: { Fixer , Message } ,
76+ fixer:: { Fixer , Message , PossibleFixes } ,
7077 rules:: RuleEnum ,
7178 utils:: iter_possible_jest_call_node,
7279} ;
@@ -328,17 +335,6 @@ impl Linter {
328335ctx_host : & mut Rc < ContextHost < ' a > > ,
329336allocator : & ' a Allocator ,
330337) {
331- use std:: {
332- mem,
333- ptr:: { self , NonNull } ,
334- } ;
335-
336- use oxc_ast:: ast:: Program ;
337- use oxc_diagnostics:: OxcDiagnostic ;
338- use oxc_span:: Span ;
339-
340- use crate :: fixer:: PossibleFixes ;
341-
342338if external_rules. is_empty ( ) {
343339return ;
344340}
@@ -465,13 +461,14 @@ impl RawTransferMetadata {
465461
466462#[ cfg( test) ]
467463mod test{
464+ use std:: fs;
465+
466+ use project_root:: get_project_root;
467+
468468use super :: Oxlintrc ;
469469
470470#[ test]
471471fn test_schema_json ( ) {
472- use std:: fs;
473-
474- use project_root:: get_project_root;
475472let path =get_project_root ( ) . unwrap ( ) . join ( "npm/oxlint/configuration_schema.json" ) ;
476473let schema = schemars:: schema_for!( Oxlintrc ) ;
477474let json = serde_json:: to_string_pretty ( & schema) . unwrap ( ) ;