@wkovacs64/eslint-config 7.1.0 → 7.2.1
Sign up to get free protection for your applications and to get access to all the features.
- package/index.js +20 -17
- package/package.json +3 -2
package/index.js
CHANGED
@@ -116,8 +116,7 @@ export const config = [
|
|
116
116
|
}
|
117
117
|
: null,
|
118
118
|
|
119
|
-
// react-hook rules are applicable in ts/js/tsx/jsx, but only with React as a
|
120
|
-
// dep
|
119
|
+
// react-hook rules are applicable in ts/js/tsx/jsx, but only with React as a dep
|
121
120
|
hasReact
|
122
121
|
? {
|
123
122
|
files: ['**/*.ts?(x)', '**/*.js?(x)'],
|
@@ -131,14 +130,18 @@ export const config = [
|
|
131
130
|
}
|
132
131
|
: null,
|
133
132
|
|
134
|
-
// JS and
|
133
|
+
// JS, JSX, and CJS files
|
135
134
|
{
|
136
|
-
files: ['**/*.js
|
135
|
+
files: ['**/*.{js,jsx,cjs}'],
|
136
|
+
// most of these rules are useful for JS but not TS because TS handles these better
|
137
137
|
rules: {
|
138
|
-
//
|
139
|
-
//
|
140
|
-
//
|
141
|
-
//
|
138
|
+
// Blocked by https://github.com/import-js/eslint-plugin-import/issues/2132
|
139
|
+
// 'import/no-unresolved': [
|
140
|
+
// ERROR,
|
141
|
+
// {
|
142
|
+
// ignore: ['^#icons/icon', '^~/icons/icon', './icons-sprite.svg'],
|
143
|
+
// },
|
144
|
+
// ],
|
142
145
|
'no-unused-vars': [
|
143
146
|
WARN,
|
144
147
|
{
|
@@ -181,15 +184,15 @@ export const config = [
|
|
181
184
|
},
|
182
185
|
],
|
183
186
|
'@typescript-eslint/consistent-type-definitions': OFF,
|
184
|
-
|
185
|
-
'@typescript-eslint/consistent-type-imports': [
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
],
|
187
|
+
// Note: use this rule _OR_ verbatimModuleSyntax in tsconfig.json - not both
|
188
|
+
// '@typescript-eslint/consistent-type-imports': [
|
189
|
+
// ERROR,
|
190
|
+
// {
|
191
|
+
// prefer: 'type-imports',
|
192
|
+
// disallowTypeAnnotations: true,
|
193
|
+
// fixStyle: 'inline-type-imports',
|
194
|
+
// },
|
195
|
+
// ],
|
193
196
|
'@typescript-eslint/explicit-module-boundary-types': OFF,
|
194
197
|
'@typescript-eslint/naming-convention': [
|
195
198
|
ERROR,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@wkovacs64/eslint-config",
|
3
|
-
"version": "7.1
|
3
|
+
"version": "7.2.1",
|
4
4
|
"description": "@wKovacs64 ESLint config",
|
5
5
|
"keywords": [
|
6
6
|
"eslint",
|
@@ -18,7 +18,8 @@
|
|
18
18
|
"type": "module",
|
19
19
|
"main": "index.js",
|
20
20
|
"exports": {
|
21
|
-
".": "./index.js"
|
21
|
+
".": "./index.js",
|
22
|
+
"./package.json": "./package.json"
|
22
23
|
},
|
23
24
|
"files": [
|
24
25
|
"index.js"
|