@interface-technologies/eslint-config 0.5.0 → 4.0.0
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/index.cjs +18 -4
- package/package.json +1 -1
package/index.cjs
CHANGED
|
@@ -19,7 +19,7 @@ module.exports = {
|
|
|
19
19
|
'prettier',
|
|
20
20
|
],
|
|
21
21
|
plugins: ['promise', '@typescript-eslint', 'jest', 'jest-dom', 'testing-library'],
|
|
22
|
-
ignorePatterns: ['*.js', '*.cjs', 'dist/'],
|
|
22
|
+
ignorePatterns: ['*.js', '*.cjs', '*.d.ts', 'dist/'],
|
|
23
23
|
settings: {
|
|
24
24
|
'import/resolver': {
|
|
25
25
|
typescript: {},
|
|
@@ -59,6 +59,19 @@ module.exports = {
|
|
|
59
59
|
'no-void': 'off',
|
|
60
60
|
radix: 'off',
|
|
61
61
|
|
|
62
|
+
'no-restricted-imports': [
|
|
63
|
+
'error',
|
|
64
|
+
{
|
|
65
|
+
paths: [
|
|
66
|
+
{
|
|
67
|
+
name: 'react-router-dom',
|
|
68
|
+
importNames: ['useLocation'],
|
|
69
|
+
message: 'Use location from useReady instead.',
|
|
70
|
+
},
|
|
71
|
+
],
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
|
|
62
75
|
'@typescript-eslint/explicit-function-return-type': [
|
|
63
76
|
'warn',
|
|
64
77
|
{ allowExpressions: true },
|
|
@@ -102,9 +115,7 @@ module.exports = {
|
|
|
102
115
|
'**/*.test.ts?(x)',
|
|
103
116
|
'**/*.stories.ts?(x)',
|
|
104
117
|
'**/__devHelpers__/**/*',
|
|
105
|
-
'**/__DevHelpers__/**/*',
|
|
106
118
|
'**/__testHelpers__/**/*',
|
|
107
|
-
'**/__TestHelpers__/**/*',
|
|
108
119
|
],
|
|
109
120
|
},
|
|
110
121
|
],
|
|
@@ -129,7 +140,10 @@ module.exports = {
|
|
|
129
140
|
'react/destructuring-assignment': 'off',
|
|
130
141
|
'react/jsx-props-no-spreading': 'off',
|
|
131
142
|
'react/prop-types': 'off',
|
|
132
|
-
'react/function-component-definition': [
|
|
143
|
+
'react/function-component-definition': [
|
|
144
|
+
'error',
|
|
145
|
+
{ unnamedComponents: 'arrow-function' },
|
|
146
|
+
],
|
|
133
147
|
'react/require-default-props': 'off',
|
|
134
148
|
'react/state-in-constructor': 'off',
|
|
135
149
|
'react/static-property-placement': ['error', 'static public field'],
|
package/package.json
CHANGED