@remotion/eslint-config 4.0.55 → 4.0.57
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/dist/patch-eslint.js +22 -4
- package/package.json +2 -2
package/dist/patch-eslint.js
CHANGED
|
@@ -20,6 +20,8 @@ const allowESLintShareableConfig = () => {
|
|
|
20
20
|
!!ex &&
|
|
21
21
|
"code" in ex &&
|
|
22
22
|
ex.code === "MODULE_NOT_FOUND";
|
|
23
|
+
// error: "The argument 'filename' must be a file URL object, file URL string, or absolute path string. Received ''"
|
|
24
|
+
const isInvalidImporterPath = (ex) => (ex === null || ex === void 0 ? void 0 : ex.code) === "ERR_INVALID_ARG_VALUE";
|
|
23
25
|
// Module path for eslintrc.cjs
|
|
24
26
|
// Example: ".../@eslint/eslintrc/dist/eslintrc.cjs"
|
|
25
27
|
let eslintrcBundlePath = undefined;
|
|
@@ -199,8 +201,16 @@ const allowESLintShareableConfig = () => {
|
|
|
199
201
|
const originalResolve = ModuleResolver.resolve;
|
|
200
202
|
try {
|
|
201
203
|
ModuleResolver.resolve = function (moduleName, _relativeToPath) {
|
|
202
|
-
|
|
203
|
-
|
|
204
|
+
try {
|
|
205
|
+
// resolve using importerPath instead of relativeToPath
|
|
206
|
+
return originalResolve.call(this, moduleName, importerPath);
|
|
207
|
+
}
|
|
208
|
+
catch (e) {
|
|
209
|
+
if (isModuleResolutionError(e) || isInvalidImporterPath(e)) {
|
|
210
|
+
return originalResolve.call(this, moduleName, _relativeToPath);
|
|
211
|
+
}
|
|
212
|
+
throw e;
|
|
213
|
+
}
|
|
204
214
|
};
|
|
205
215
|
return originalLoadPlugin.apply(this, arguments);
|
|
206
216
|
}
|
|
@@ -215,8 +225,16 @@ const allowESLintShareableConfig = () => {
|
|
|
215
225
|
const originalResolve = ModuleResolver.resolve;
|
|
216
226
|
try {
|
|
217
227
|
ModuleResolver.resolve = function (moduleName, _relativeToPath) {
|
|
218
|
-
|
|
219
|
-
|
|
228
|
+
try {
|
|
229
|
+
// resolve using ctx.filePath instead of relativeToPath
|
|
230
|
+
return originalResolve.call(this, moduleName, ctx.filePath);
|
|
231
|
+
}
|
|
232
|
+
catch (e) {
|
|
233
|
+
if (isModuleResolutionError(e) || isInvalidImporterPath(e)) {
|
|
234
|
+
return originalResolve.call(this, moduleName, _relativeToPath);
|
|
235
|
+
}
|
|
236
|
+
throw e;
|
|
237
|
+
}
|
|
220
238
|
};
|
|
221
239
|
return originalLoadPlugin.apply(this, arguments);
|
|
222
240
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/eslint-config",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.57",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"files": [
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"eslint-plugin-10x": "1.5.2",
|
|
18
18
|
"eslint-plugin-react": "7.32.2",
|
|
19
19
|
"eslint-plugin-react-hooks": "4.6.0",
|
|
20
|
-
"@remotion/eslint-plugin": "4.0.
|
|
20
|
+
"@remotion/eslint-plugin": "4.0.57"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"eslint": ">=7.15.0"
|