From fa85521b1ee6e4b9edf0f6a2e73e7c77df5f75e2 Mon Sep 17 00:00:00 2001 From: Carlos Esteban Lopez Date: Mon, 5 Dec 2022 16:55:17 -0500 Subject: [PATCH] feat: Enable eslint-plugin-react with recommended settings & forbid button Signed-off-by: Carlos Esteban Lopez --- packages/cli/config/eslint-factory.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/cli/config/eslint-factory.js b/packages/cli/config/eslint-factory.js index a40aa79fb3..ef1305f6d4 100644 --- a/packages/cli/config/eslint-factory.js +++ b/packages/cli/config/eslint-factory.js @@ -215,8 +215,20 @@ function createConfigForRole(dir, role, extraConfig = {}) { ...extraConfig, extends: [ '@spotify/eslint-config-react', + 'plugin:react/recommended', ...(extraConfig.extends ?? []), ], + rules: { + ...extraConfig.rules, + 'react/forbid-elements': [ + 1, + { + forbid: [ + { element: 'button', message: 'use MUI