@@ -70,12 +70,11 @@ pub struct OnlyExportComponentsConfig {
7070
7171// NOTE: Ensure this is always kept in sync with OnlyExportComponentsConfig
7272#[ derive( Debug , Default , Deserialize , Serialize , JsonSchema ) ]
73- #[ serde( default ) ]
73+ #[ serde( default , rename_all = "camelCase" ) ]
7474struct OnlyExportComponentsOptionsJson {
7575 /// Treat specific named exports as HMR-safe (useful for frameworks that hot-replace
7676 /// certain exports). For example, in Remix:
7777 /// `{ "allowExportNames": ["meta", "links", "headers", "loader", "action"] }`
78- #[ serde( rename = "allowExportNames" ) ]
7978 allow_export_names : Option < Vec < String > > ,
8079 /// Allow exporting primitive constants (string/number/boolean/template literal)
8180 /// alongside component exports without triggering a violation. Recommended when your
@@ -87,7 +86,6 @@ struct OnlyExportComponentsOptionsJson {
8786 /// export const VERSION = "3";
8887 /// export const Foo = () => null;
8988 /// ```
90- #[ serde( rename = "allowConstantExport" ) ]
9189 allow_constant_export : Option < bool > ,
9290 /// If you export components wrapped in custom higher-order components, list their
9391 /// identifiers here to avoid false positives.
@@ -106,7 +104,7 @@ declare_oxc_lint!(
106104 /// that Fast Refresh (a.k.a. hot reloading) can safely preserve component state.
107105 /// Concretely, it validates the shape of your module’s exports and common entrypoints
108106 /// (e.g. `createRoot(...).render(<App />)`) to match what integrations like
109- /// `react-refresh` expect. The rule name is `react-refresh/only-export-components`.
107+ /// `react-refresh` expect.
110108 ///
111109 /// ### Why is this bad?
112110 ///
0 commit comments