Skip to content

Commit 9eb0d6e

Browse files
committed
style(linter): import Serialize at top level
1 parent f4d6790 commit 9eb0d6e

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

apps/oxlint/src/output_formatter/gitlab.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
use std::hash::{DefaultHasher, Hash, Hasher};
22

3+
use serde::Serialize;
4+
35
use oxc_diagnostics::{
46
Error, Severity,
57
reporter::{DiagnosticReporter, DiagnosticResult, Info},
@@ -10,19 +12,19 @@ use crate::output_formatter::InternalFormatter;
1012
#[derive(Debug, Default)]
1113
pub struct GitlabOutputFormatter;
1214

13-
#[derive(Debug, serde::Serialize)]
15+
#[derive(Debug, Serialize)]
1416
struct GitlabErrorLocationLinesJson {
1517
begin: usize,
1618
end: usize,
1719
}
1820

19-
#[derive(Debug, serde::Serialize)]
21+
#[derive(Debug, Serialize)]
2022
struct GitlabErrorLocationJson {
2123
path: String,
2224
lines: GitlabErrorLocationLinesJson,
2325
}
2426

25-
#[derive(Debug, serde::Serialize)]
27+
#[derive(Debug, Serialize)]
2628
struct GitlabErrorJson {
2729
description: String,
2830
check_name: String,

apps/oxlint/src/output_formatter/json.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
use std::cell::RefCell;
2-
use std::rc::Rc;
1+
use std::{cell::RefCell, rc::Rc};
2+
3+
use miette::JSONReportHandler;
4+
use serde::Serialize;
35

46
use oxc_diagnostics::{
57
Error,
68
reporter::{DiagnosticReporter, DiagnosticResult},
79
};
810
use oxc_linter::{RuleCategory, rules::RULES};
911

10-
use miette::JSONReportHandler;
11-
1212
use crate::output_formatter::InternalFormatter;
1313

1414
#[derive(Debug, Default)]
@@ -18,7 +18,7 @@ pub struct JsonOutputFormatter {
1818

1919
impl InternalFormatter for JsonOutputFormatter {
2020
fn all_rules(&self) -> Option<String> {
21-
#[derive(Debug, serde::Serialize)]
21+
#[derive(Debug, Serialize)]
2222
struct RuleInfoJson<'a> {
2323
scope: &'a str,
2424
value: &'a str,

0 commit comments

Comments
 (0)