From 8b8d7086651a28df4afa26a3732061beb5a58929 Mon Sep 17 00:00:00 2001 From: shulaoda <165626830+shulaoda@users.noreply.github.com> Date: Wed, 9 Apr 2025 16:15:23 +0000 Subject: [PATCH] perf(linter): replace `phf_set` with `array` in `nextjs/no-typos` (#10336) Related to #10076 --- crates/oxc_linter/src/rules/nextjs/no_typos.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/crates/oxc_linter/src/rules/nextjs/no_typos.rs b/crates/oxc_linter/src/rules/nextjs/no_typos.rs index 0f4c44a1013d8..6992edf2bae8b 100644 --- a/crates/oxc_linter/src/rules/nextjs/no_typos.rs +++ b/crates/oxc_linter/src/rules/nextjs/no_typos.rs @@ -5,7 +5,6 @@ use oxc_ast::{ use oxc_diagnostics::OxcDiagnostic; use oxc_macros::declare_oxc_lint; use oxc_span::Span; -use phf::phf_set; use crate::{ AstNode, @@ -42,11 +41,8 @@ declare_oxc_lint!( pending ); -const NEXTJS_DATA_FETCHING_FUNCTIONS: phf::Set<&'static str> = phf_set! { - "getStaticProps", - "getStaticPaths", - "getServerSideProps", -}; +const NEXTJS_DATA_FETCHING_FUNCTIONS: [&str; 3] = + ["getStaticProps", "getStaticPaths", "getServerSideProps"]; // 0 is the exact match const THRESHOLD: i32 = 1;