@apdesign/code-style-react 1.2.5 → 1.2.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/eslint/.eslintrc.build.js +5 -1
- package/eslint/.eslintrc.js +6 -4
- package/package.json +1 -1
|
@@ -17,9 +17,11 @@ module.exports = {
|
|
|
17
17
|
plugins: ['@typescript-eslint', 'import', 'jsx-a11y', 'react', 'react-hooks'],
|
|
18
18
|
rules: {
|
|
19
19
|
'arrow-body-style': 'off',
|
|
20
|
+
'array-callback-return': 'warn',
|
|
20
21
|
|
|
21
22
|
camelcase: 'off',
|
|
22
23
|
'class-methods-use-this': 'off',
|
|
24
|
+
'consistent-return': 'warn',
|
|
23
25
|
|
|
24
26
|
'dot-notation': 'warn',
|
|
25
27
|
|
|
@@ -28,8 +30,8 @@ module.exports = {
|
|
|
28
30
|
'import/extensions': 'off',
|
|
29
31
|
'import/prefer-default-export': 'off',
|
|
30
32
|
'import/newline-after-import': 'warn',
|
|
31
|
-
'react/jsx-curly-brace-presence': 'warn',
|
|
32
33
|
|
|
34
|
+
'jsx-a11y/anchor-is-valid': 'warn',
|
|
33
35
|
'jsx-a11y/click-events-have-key-events': 'off',
|
|
34
36
|
'jsx-a11y/no-static-element-interactions': 'off',
|
|
35
37
|
'jsx-a11y/no-noninteractive-element-interactions': 'off',
|
|
@@ -55,6 +57,8 @@ module.exports = {
|
|
|
55
57
|
'react/self-closing-comp': 'off',
|
|
56
58
|
'react/jsx-no-useless-fragment': 'off',
|
|
57
59
|
'react/no-array-index-key': 'warn',
|
|
60
|
+
'react/jsx-curly-brace-presence': 'warn',
|
|
61
|
+
'react/destructuring-assignment': ['warn', 'always'],
|
|
58
62
|
|
|
59
63
|
'spaced-comment': 'warn',
|
|
60
64
|
|
package/eslint/.eslintrc.js
CHANGED
|
@@ -20,6 +20,7 @@ module.exports = {
|
|
|
20
20
|
|
|
21
21
|
camelcase: 'off',
|
|
22
22
|
'class-methods-use-this': 'off',
|
|
23
|
+
'consistent-return': 'warn',
|
|
23
24
|
|
|
24
25
|
'dot-notation': 'warn',
|
|
25
26
|
|
|
@@ -29,6 +30,7 @@ module.exports = {
|
|
|
29
30
|
'import/prefer-default-export': 'off',
|
|
30
31
|
'import/newline-after-import': 'warn',
|
|
31
32
|
|
|
33
|
+
'jsx-a11y/anchor-is-valid': 'warn',
|
|
32
34
|
'jsx-a11y/click-events-have-key-events': 'off',
|
|
33
35
|
'jsx-a11y/no-static-element-interactions': 'off',
|
|
34
36
|
'jsx-a11y/no-noninteractive-element-interactions': 'off',
|
|
@@ -61,7 +63,7 @@ module.exports = {
|
|
|
61
63
|
'@typescript-eslint/no-explicit-any': 'warn',
|
|
62
64
|
|
|
63
65
|
'no-use-before-define': 'off',
|
|
64
|
-
'@typescript-eslint/no-use-before-define': ['
|
|
66
|
+
'@typescript-eslint/no-use-before-define': ['error'],
|
|
65
67
|
|
|
66
68
|
'no-unused-vars': 'off',
|
|
67
69
|
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
|
|
@@ -70,10 +72,10 @@ module.exports = {
|
|
|
70
72
|
'@typescript-eslint/no-useless-constructor': 'error',
|
|
71
73
|
|
|
72
74
|
'no-shadow': 'off',
|
|
73
|
-
'@typescript-eslint/no-shadow': '
|
|
75
|
+
'@typescript-eslint/no-shadow': 'error',
|
|
74
76
|
|
|
75
|
-
'no-empty-function': ['
|
|
76
|
-
'no-param-reassign': ['
|
|
77
|
+
'no-empty-function': ['error', { allow: ['constructors', 'arrowFunctions'] }],
|
|
78
|
+
'no-param-reassign': ['error', { props: true, ignorePropertyModificationsFor: ['draft'] }],
|
|
77
79
|
'no-restricted-syntax': [
|
|
78
80
|
'warn',
|
|
79
81
|
{
|