diff --git a/apps/oxlint/src/output_formatter/gitlab.rs b/apps/oxlint/src/output_formatter/gitlab.rs index 83d494b0da1fe..98788abaf8e78 100644 --- a/apps/oxlint/src/output_formatter/gitlab.rs +++ b/apps/oxlint/src/output_formatter/gitlab.rs @@ -1,5 +1,7 @@ use std::hash::{DefaultHasher, Hash, Hasher}; +use serde::Serialize; + use oxc_diagnostics::{ Error, Severity, reporter::{DiagnosticReporter, DiagnosticResult, Info}, @@ -10,19 +12,19 @@ use crate::output_formatter::InternalFormatter; #[derive(Debug, Default)] pub struct GitlabOutputFormatter; -#[derive(Debug, serde::Serialize)] +#[derive(Debug, Serialize)] struct GitlabErrorLocationLinesJson { begin: usize, end: usize, } -#[derive(Debug, serde::Serialize)] +#[derive(Debug, Serialize)] struct GitlabErrorLocationJson { path: String, lines: GitlabErrorLocationLinesJson, } -#[derive(Debug, serde::Serialize)] +#[derive(Debug, Serialize)] struct GitlabErrorJson { description: String, check_name: String, diff --git a/apps/oxlint/src/output_formatter/json.rs b/apps/oxlint/src/output_formatter/json.rs index ae49add3b337d..095902056cbac 100644 --- a/apps/oxlint/src/output_formatter/json.rs +++ b/apps/oxlint/src/output_formatter/json.rs @@ -1,5 +1,7 @@ -use std::cell::RefCell; -use std::rc::Rc; +use std::{cell::RefCell, rc::Rc}; + +use miette::JSONReportHandler; +use serde::Serialize; use oxc_diagnostics::{ Error, @@ -7,8 +9,6 @@ use oxc_diagnostics::{ }; use oxc_linter::{RuleCategory, rules::RULES}; -use miette::JSONReportHandler; - use crate::output_formatter::InternalFormatter; #[derive(Debug, Default)] @@ -18,7 +18,7 @@ pub struct JsonOutputFormatter { impl InternalFormatter for JsonOutputFormatter { fn all_rules(&self) -> Option { - #[derive(Debug, serde::Serialize)] + #[derive(Debug, Serialize)] struct RuleInfoJson<'a> { scope: &'a str, value: &'a str,