From 57520ca5f4c5e27943e636c52c469f907c1d31d9 Mon Sep 17 00:00:00 2001 From: Alexandre Philibeaux Date: Fri, 9 Sep 2022 16:18:25 +0000 Subject: [PATCH] feat(eslint): add jsx-runtime react --- .eslintrc | 10 ++-------- packages/eslint-config-react/shared.js | 7 ++++++- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.eslintrc b/.eslintrc index b91cdefad..f8cbfaffb 100644 --- a/.eslintrc +++ b/.eslintrc @@ -12,9 +12,7 @@ { "devDependencies": ["**/__tests__/*", "rollup.config.mjs"] } - ], - "react/jsx-uses-react": "off", - "react/react-in-jsx-scope": "off" + ] }, "overrides": [ { @@ -22,11 +20,7 @@ "parserOptions": { "project": ["tsconfig.json"] }, - "extends": ["./packages/eslint-config-react/typescript.js"], - "rules": { - "react/jsx-uses-react": "off", - "react/react-in-jsx-scope": "off" - } + "extends": ["./packages/eslint-config-react/typescript.js"] } ] } diff --git a/packages/eslint-config-react/shared.js b/packages/eslint-config-react/shared.js index abcf5544e..a7efe5d35 100644 --- a/packages/eslint-config-react/shared.js +++ b/packages/eslint-config-react/shared.js @@ -1,7 +1,12 @@ /* eslint-disable sort-keys */ module.exports = { - extends: ['airbnb/hooks', 'prettier', 'plugin:eslint-comments/recommended'], + extends: [ + 'airbnb/hooks', + 'prettier', + 'plugin:eslint-comments/recommended', + 'plugin:react/jsx-runtime', + ], rules: { 'import/order': [ // https://github.com/import-js/eslint-plugin-import/blob/master/docs/rules/order.md