@@ -40,7 +40,7 @@ export default [
4040 " react-refresh" : reactRefresh,
4141 },
4242 rules: {
43- " react-refresh/only-export-components" : " warn " ,
43+ " react-refresh/only-export-components" : " error " ,
4444 },
4545 },
4646];
@@ -52,7 +52,7 @@ export default [
5252{
5353 " plugins" : [" react-refresh" ],
5454 " rules" : {
55- " react-refresh/only-export-components" : " warn "
55+ " react-refresh/only-export-components" : " error "
5656 }
5757}
5858```
@@ -134,7 +134,7 @@ Example for [Remix](https://remix.run/docs/en/main/discussion/hot-module-replace
134134``` json
135135{
136136 "react-refresh/only-export-components" : [
137- " warn " ,
137+ " error " ,
138138 { "allowExportNames" : [" meta" , " links" , " headers" , " loader" , " action" ] }
139139 ]
140140}
@@ -151,7 +151,7 @@ This should be enabled if the fast refresh implementation correctly handles this
151151``` json
152152{
153153 "react-refresh/only-export-components" : [
154- " warn " ,
154+ " error " ,
155155 { "allowConstantExport" : true }
156156 ]
157157}
@@ -172,6 +172,6 @@ If your using JSX inside `.js` files (which I don't recommend because it forces
172172
173173``` json
174174{
175- "react-refresh/only-export-components" : [" warn " , { "checkJS" : true }]
175+ "react-refresh/only-export-components" : [" error " , { "checkJS" : true }]
176176}
177177```
0 commit comments