feat: Enable eslint-plugin-react with recommended settings & forbid button
Signed-off-by: Carlos Esteban Lopez <lcarlosesteb@vmware.com>
This commit is contained in:
committed by
Carlos Lopez
parent
7178f7d147
commit
fa85521b1e
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user