feat: Enable eslint-plugin-react with recommended settings & forbid button

Signed-off-by: Carlos Esteban Lopez <lcarlosesteb@vmware.com>
This commit is contained in:
Carlos Esteban Lopez
2022-12-05 16:55:17 -05:00
committed by Carlos Lopez
parent 7178f7d147
commit fa85521b1e
+12
View File
@@ -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 <Button> instead' },
],
},
],
},
parserOptions: {
ecmaFeatures: {
jsx: true,