From 94c9d7d98cd5f855de95fdcdc1fc414c393fb31e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josh=20Goldberg=20=E2=9C=A8?= Date: Wed, 27 Nov 2024 03:18:36 -0500 Subject: [PATCH] docs: switch suggested severity from 'warn' to 'error' (#66) --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 095ea7f..defb494 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ export default [ "react-refresh": reactRefresh, }, rules: { - "react-refresh/only-export-components": "warn", + "react-refresh/only-export-components": "error", }, }, ]; @@ -52,7 +52,7 @@ export default [ { "plugins": ["react-refresh"], "rules": { - "react-refresh/only-export-components": "warn" + "react-refresh/only-export-components": "error" } } ``` @@ -134,7 +134,7 @@ Example for [Remix](https://remix.run/docs/en/main/discussion/hot-module-replace ```json { "react-refresh/only-export-components": [ - "warn", + "error", { "allowExportNames": ["meta", "links", "headers", "loader", "action"] } ] } @@ -151,7 +151,7 @@ This should be enabled if the fast refresh implementation correctly handles this ```json { "react-refresh/only-export-components": [ - "warn", + "error", { "allowConstantExport": true } ] } @@ -172,6 +172,6 @@ If your using JSX inside `.js` files (which I don't recommend because it forces ```json { - "react-refresh/only-export-components": ["warn", { "checkJS": true }] + "react-refresh/only-export-components": ["error", { "checkJS": true }] } ```