diff --git a/package.json b/package.json index bc08966..820c492 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "eslint-config-gev", - "version": "4.6.1", + "version": "4.6.2", "description": "Curated ESLint configs for TS, JS, Next, React, and React Native projects", "author": "SrBrahma", "main": "index.js", diff --git a/react.js b/react.js index 9070a44..2c0f7f7 100644 --- a/react.js +++ b/react.js @@ -13,5 +13,11 @@ module.exports = { ], rules: { ...require("./shared-react.js"), + /** https://www.npmjs.com/package/eslint-plugin-react-refresh */ + "react-refresh/only-export-components": [ + "warn", + // Only Vite supports this. + { allowConstantExport: true }, + ], }, } diff --git a/shared-react.js b/shared-react.js index c47b4c2..c754cdf 100644 --- a/shared-react.js +++ b/shared-react.js @@ -36,11 +36,4 @@ module.exports = { * https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-fragments.md */ "react/jsx-fragments": "warn", - - /** https://www.npmjs.com/package/eslint-plugin-react-refresh */ - "react-refresh/only-export-components": [ - "warn", - // Only Vite supports this. - { allowConstantExport: true }, - ], }