chore: enable no-console eslint rule for tests and stories (#4816)
Re-enables no-console eslint rule in stories and tests files: - In stories, use `action` from '@storybook/addon-actions' or `fn` from '@storybook/test' instead of console. - In tests, console methods can be mocked like this: `global.console.error = jest.fn()`.
This commit is contained in:
@ -3,17 +3,4 @@ module.exports = {
|
||||
rules: {
|
||||
'no-console': 'error',
|
||||
},
|
||||
overrides: [
|
||||
{
|
||||
files: [
|
||||
'.storybook/**/*',
|
||||
'**/*.stories.tsx',
|
||||
'**/*.test.ts',
|
||||
'**/*.test.tsx',
|
||||
],
|
||||
rules: {
|
||||
'no-console': 'off',
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user