@keeex/eslint-config 1.7.3 → 1.7.4
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/src/config/typescript.js +7 -18
package/package.json
CHANGED
package/src/config/typescript.js
CHANGED
|
@@ -138,19 +138,6 @@ const rulesBase = {
|
|
|
138
138
|
};
|
|
139
139
|
|
|
140
140
|
module.exports = {
|
|
141
|
-
settings: (presetConfig, allOptions) => {
|
|
142
|
-
if (useTypes(presetConfig) && allOptions["import"]) {
|
|
143
|
-
return {
|
|
144
|
-
"import/parsers": {"@typescript-eslint/parser": [".ts", ".tsx"]},
|
|
145
|
-
"import/resolver": {
|
|
146
|
-
"typescript": {
|
|
147
|
-
alwaysTryTypes: true,
|
|
148
|
-
project: presetConfig,
|
|
149
|
-
},
|
|
150
|
-
},
|
|
151
|
-
};
|
|
152
|
-
}
|
|
153
|
-
},
|
|
154
141
|
overrides: [
|
|
155
142
|
{
|
|
156
143
|
files: [
|
|
@@ -186,14 +173,16 @@ module.exports = {
|
|
|
186
173
|
];
|
|
187
174
|
},
|
|
188
175
|
rules: (presetOptions, allOptions) => {
|
|
176
|
+
// There seem to be no way for now to have import understand that ".js" imports should refer
|
|
177
|
+
// to ".ts" files.
|
|
178
|
+
// Either it complains about needing the ".ts" suffix (which is wrong) or it enforces having
|
|
179
|
+
// an extension, but doesn't actually resolve the file (since we disable the ts-specific
|
|
180
|
+
// resolver).
|
|
181
|
+
// If this change in the future, restore full ts-resolver support from import plugin.
|
|
189
182
|
const importOverride = allOptions.import
|
|
190
183
|
? {
|
|
191
184
|
"import/no-unresolved": "off",
|
|
192
|
-
"import/
|
|
193
|
-
"error",
|
|
194
|
-
"always",
|
|
195
|
-
{"ts": "never"},
|
|
196
|
-
],
|
|
185
|
+
"import/no-cycle": "off",
|
|
197
186
|
}
|
|
198
187
|
: undefined;
|
|
199
188
|
const typesOverride = useTypes(presetOptions)
|