File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
crates/oxc_linter/src/config Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -149,6 +149,9 @@ impl Oxlintrc {
149149 Ok ( config)
150150 }
151151
152+ /// # Errors
153+ ///
154+ /// * Parse Failure
152155 pub fn from_string ( json_string : & str ) -> Result < Self , OxcDiagnostic > {
153156 let json = serde_json:: from_str :: < serde_json:: Value > ( json_string)
154157 . unwrap_or ( serde_json:: Value :: Null ) ;
Original file line number Diff line number Diff line change @@ -288,10 +288,10 @@ impl Oxc {
288288 let semantic = Rc :: new ( semantic_ret. semantic ) ;
289289 let lint_config = if linter_options. config . is_some ( ) {
290290 let oxlintrc =
291- Oxlintrc :: from_string ( & linter_options. config . clone ( ) . unwrap ( ) . to_string ( ) )
291+ Oxlintrc :: from_string ( & linter_options. config . as_ref ( ) . unwrap ( ) . to_string ( ) )
292292 . unwrap_or_default ( ) ;
293293 let config_builder =
294- ConfigStoreBuilder :: from_oxlintrc ( false , oxlintrc. clone ( ) ) . unwrap_or_default ( ) ;
294+ ConfigStoreBuilder :: from_oxlintrc ( false , oxlintrc) . unwrap_or_default ( ) ;
295295 config_builder. build ( )
296296 } else {
297297 ConfigStoreBuilder :: default ( ) . build ( )
You can’t perform that action at this time.
0 commit comments