lint: Use rule excluding test files

Signed-off-by: Carlos Esteban Lopez <lcarlosesteb@vmware.com>
This commit is contained in:
Carlos Esteban Lopez
2022-12-15 00:08:22 -05:00
parent 3c70fb6dc5
commit e5831e96d2
+16 -6
View File
@@ -45,12 +45,6 @@ module.exports = {
"CallExpression[arguments.length=0] > MemberExpression[property.name='toUpperCase']",
},
],
'react/forbid-elements': [
1,
{
forbid: [{ element: 'button', message: 'use MUI <Button> instead' }],
},
],
'testing-library/await-async-query': 'error',
'testing-library/await-async-utils': 'error',
'testing-library/no-await-sync-query': 'error',
@@ -243,4 +237,20 @@ module.exports = {
}),
].flat(),
},
overrides: [
{
files: ['**/*.[jt]s?(x)'],
excludedFiles: '**/*.{test,spec}.[jt]s?(x)',
rules: {
'react/forbid-elements': [
1,
{
forbid: [
{ element: 'button', message: 'use MUI <Button> instead' },
],
},
],
},
},
],
};