@viclafouch/eslint-config-viclafouch 4.22.1-beta.6 → 4.22.1-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/rules/react.mjs +2 -2
- package/rules/typescript.mjs +1 -1
package/package.json
CHANGED
package/rules/react.mjs
CHANGED
|
@@ -401,7 +401,7 @@ export default [
|
|
|
401
401
|
// https://github.com/jsx-eslint/eslint-plugin-react/blob/v7.35.0/docs/rules/jsx-props-no-spread-multi.md
|
|
402
402
|
'react/jsx-props-no-spread-multi': 'off',
|
|
403
403
|
|
|
404
|
-
// Disallow destructured imports from React and ReactDOM - use React.useState, React.useEffect, etc.
|
|
404
|
+
// Disallow destructured imports from React and ReactDOM - use React.useState, React.useEffect, React.ReactNode, etc.
|
|
405
405
|
// Disallow useMemo and useCallback unless proven performance problem
|
|
406
406
|
// https://eslint.org/docs/latest/rules/no-restricted-syntax
|
|
407
407
|
'no-restricted-syntax': [
|
|
@@ -409,7 +409,7 @@ export default [
|
|
|
409
409
|
{
|
|
410
410
|
selector: 'ImportDeclaration[source.value="react"] ImportSpecifier',
|
|
411
411
|
message:
|
|
412
|
-
'Use React.useState, React.
|
|
412
|
+
'Use React.useState, React.ReactNode, etc. instead of destructuring React imports.'
|
|
413
413
|
},
|
|
414
414
|
{
|
|
415
415
|
selector:
|
package/rules/typescript.mjs
CHANGED
|
@@ -113,7 +113,7 @@ export default defineConfig(
|
|
|
113
113
|
// https://eslint.org/docs/latest/rules/max-lines-per-function
|
|
114
114
|
'max-lines-per-function': [
|
|
115
115
|
'error',
|
|
116
|
-
{ max:
|
|
116
|
+
{ max: 250, skipBlankLines: true, skipComments: true }
|
|
117
117
|
],
|
|
118
118
|
|
|
119
119
|
// Enforce that class methods use "this"
|