Move default props to default parameters - simple cases

React throws a deprecation warning for defaultProps.
This commit refactors default props to default values in easy-to-fix cases.

[MAILPOET-6108]
This commit is contained in:
Rostislav Wolny
2024-06-13 16:57:04 +02:00
committed by Jan Lysý
parent b19c30d203
commit a3514377c8
59 changed files with 438 additions and 669 deletions

View File

@@ -47,6 +47,7 @@ module.exports = [
'no-only-tests/no-only-tests': 2,
'class-methods-use-this': 0,
'react/jsx-props-no-spreading': 0,
'react/require-default-props': 0, // deprecated in react 18.3.1
'import/extensions': 0, // we wouldn't be able to import jQuery without this line
'import/prefer-default-export': 0, // we want to stop using default exports and start using named exports
'import/no-default-export': 1, // no default exports