@viclafouch/eslint-config-viclafouch 4.22.1-beta.6 → 4.22.1-beta.8
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 +8 -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"
|
|
@@ -997,9 +997,16 @@ export default defineConfig(
|
|
|
997
997
|
],
|
|
998
998
|
|
|
999
999
|
// Naming convention for type parameters
|
|
1000
|
+
// Enforce naming conventions for variables, functions, types, and type parameters
|
|
1000
1001
|
// https://typescript-eslint.io/rules/naming-convention
|
|
1001
1002
|
'@typescript-eslint/naming-convention': [
|
|
1002
1003
|
'error',
|
|
1004
|
+
{
|
|
1005
|
+
selector: 'variable',
|
|
1006
|
+
format: ['camelCase', 'PascalCase', 'UPPER_CASE']
|
|
1007
|
+
},
|
|
1008
|
+
{ selector: 'function', format: ['camelCase', 'PascalCase'] },
|
|
1009
|
+
{ selector: 'typeLike', format: ['PascalCase'] },
|
|
1003
1010
|
{
|
|
1004
1011
|
selector: 'typeParameter',
|
|
1005
1012
|
format: ['PascalCase'],
|