@@ -18,7 +18,7 @@ use oxc_linter::{
1818} ;
1919
2020use crate :: {
21- DEFAULT_OXLINTRC ,
21+ DEFAULT_OXLINTRC_NAME ,
2222 cli:: { CliRunResult , LintCommand , MiscOptions , ReportUnusedDirectives , WarningOptions } ,
2323 output_formatter:: { LintCommandInfo , OutputFormatter } ,
2424 walk:: Walk ,
@@ -571,7 +571,7 @@ impl CliRunner {
571571 // when no config is provided, it will search for the default file names in the current working directory
572572 // when no file is found, the default configuration is returned
573573 fn find_oxlint_config ( cwd : & Path , config : Option < & PathBuf > ) -> Result < Oxlintrc , OxcDiagnostic > {
574- let path: & Path = config. map_or ( DEFAULT_OXLINTRC . as_ref ( ) , PathBuf :: as_ref) ;
574+ let path: & Path = config. map_or ( DEFAULT_OXLINTRC_NAME . as_ref ( ) , PathBuf :: as_ref) ;
575575 let full_path = cwd. join ( path) ;
576576
577577 if config. is_some ( ) || full_path. exists ( ) {
@@ -583,7 +583,7 @@ impl CliRunner {
583583 /// Looks in a directory for an oxlint config file and returns the path if it exists.
584584 /// Does not validate the file or apply the default config file.
585585 fn find_oxlint_config_path_in_directory ( dir : & Path ) -> Option < PathBuf > {
586- let possible_config_path = dir. join ( DEFAULT_OXLINTRC ) ;
586+ let possible_config_path = dir. join ( DEFAULT_OXLINTRC_NAME ) ;
587587 if possible_config_path. is_file ( ) { Some ( possible_config_path) } else { None }
588588 }
589589}
@@ -613,7 +613,7 @@ mod test {
613613 use std:: { fs, path:: PathBuf } ;
614614
615615 use super :: CliRunner ;
616- use crate :: { DEFAULT_OXLINTRC , tester:: Tester } ;
616+ use crate :: { DEFAULT_OXLINTRC_NAME , tester:: Tester } ;
617617 use oxc_linter:: rules:: RULES ;
618618
619619 // lints the full directory of fixtures,
@@ -989,14 +989,14 @@ mod test {
989989
990990 #[ test]
991991 fn test_init_config ( ) {
992- assert ! ( !fs:: exists( DEFAULT_OXLINTRC ) . unwrap( ) ) ;
992+ assert ! ( !fs:: exists( DEFAULT_OXLINTRC_NAME ) . unwrap( ) ) ;
993993
994994 let args = & [ "--init" ] ;
995995 Tester :: new ( ) . with_cwd ( "fixtures" . into ( ) ) . test ( args) ;
996996
997- assert ! ( fs:: exists( DEFAULT_OXLINTRC ) . unwrap( ) ) ;
997+ assert ! ( fs:: exists( DEFAULT_OXLINTRC_NAME ) . unwrap( ) ) ;
998998
999- fs:: remove_file ( DEFAULT_OXLINTRC ) . unwrap ( ) ;
999+ fs:: remove_file ( DEFAULT_OXLINTRC_NAME ) . unwrap ( ) ;
10001000 }
10011001
10021002 #[ test]
0 commit comments