@remotion/eslint-config 4.0.497 → 4.0.498
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 +27 -1
- package/package.json +3 -3
package/dist/patch-eslint.js
CHANGED
|
@@ -15,6 +15,20 @@ exports.allowESLintShareableConfig = void 0;
|
|
|
15
15
|
//
|
|
16
16
|
const fs_1 = __importDefault(require("fs"));
|
|
17
17
|
const path_1 = __importDefault(require("path"));
|
|
18
|
+
const getMinEslintVersion = () => {
|
|
19
|
+
const packageJson = JSON.parse(fs_1.default.readFileSync(path_1.default.join(__dirname, '..', 'package.json'), 'utf8'));
|
|
20
|
+
const isV5Package = Number(packageJson.version.split('.')[0]) >= 5;
|
|
21
|
+
try {
|
|
22
|
+
const { NoReactInternals } = require('remotion/no-react');
|
|
23
|
+
if (NoReactInternals.ENABLE_V5_BREAKING_CHANGES) {
|
|
24
|
+
return NoReactInternals.MIN_ESLINT_VERSION;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
catch (_a) {
|
|
28
|
+
// @remotion/eslint-config can be installed without remotion.
|
|
29
|
+
}
|
|
30
|
+
return isV5Package ? '8.57.0' : null;
|
|
31
|
+
};
|
|
18
32
|
const allowESLintShareableConfig = () => {
|
|
19
33
|
const isModuleResolutionError = (ex) => typeof ex === 'object' &&
|
|
20
34
|
Boolean(ex) &&
|
|
@@ -181,11 +195,23 @@ const allowESLintShareableConfig = () => {
|
|
|
181
195
|
.toString();
|
|
182
196
|
const eslintPackageObject = JSON.parse(eslintPackageJson);
|
|
183
197
|
const eslintPackageVersion = eslintPackageObject.version;
|
|
184
|
-
const versionMatch = /^([0-9]+)\./.exec(eslintPackageVersion);
|
|
198
|
+
const versionMatch = /^([0-9]+)\.([0-9]+)\./.exec(eslintPackageVersion);
|
|
185
199
|
if (!versionMatch) {
|
|
186
200
|
throw new Error('Unable to parse ESLint version: ' + eslintPackageVersion);
|
|
187
201
|
}
|
|
188
202
|
const eslintMajorVersion = Number(versionMatch[1]);
|
|
203
|
+
const eslintMinorVersion = Number(versionMatch[2]);
|
|
204
|
+
const minEslintVersion = getMinEslintVersion();
|
|
205
|
+
if (minEslintVersion !== null) {
|
|
206
|
+
const minVersionMatch = /^([0-9]+)\.([0-9]+)\./.exec(minEslintVersion);
|
|
207
|
+
const minMajorVersion = Number(minVersionMatch[1]);
|
|
208
|
+
const minMinorVersion = Number(minVersionMatch[2]);
|
|
209
|
+
if (eslintMajorVersion < minMajorVersion ||
|
|
210
|
+
(eslintMajorVersion === minMajorVersion &&
|
|
211
|
+
eslintMinorVersion < minMinorVersion)) {
|
|
212
|
+
throw new Error(`Remotion 5 requires ESLint ${minEslintVersion} or later. You currently have ESLint ${eslintPackageVersion}.`);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
189
215
|
if (!(eslintMajorVersion >= 6 && eslintMajorVersion <= 9)) {
|
|
190
216
|
throw new Error('The patch-eslint.js script has only been tested with ESLint version 6.x, 7.x, and 8.x, and 9.x.' +
|
|
191
217
|
` (Your version: ${eslintPackageVersion})\n` +
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/eslint-config"
|
|
4
4
|
},
|
|
5
5
|
"name": "@remotion/eslint-config",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.498",
|
|
7
7
|
"description": "Default configuration for Remotion templates (ESLint <= 8)",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"files": [
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
"eslint": ">=7.15.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@remotion/eslint-plugin": "4.0.
|
|
28
|
+
"@remotion/eslint-plugin": "4.0.498",
|
|
29
29
|
"@typescript-eslint/eslint-plugin": "6.21.0",
|
|
30
30
|
"@typescript-eslint/parser": "6.21.0",
|
|
31
31
|
"eslint-plugin-react": "7.37.4",
|
|
32
32
|
"eslint-plugin-react-hooks": "4.6.0",
|
|
33
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
33
|
+
"@remotion/eslint-config-internal": "4.0.498",
|
|
34
34
|
"eslint": "9.19.0",
|
|
35
35
|
"@typescript/native-preview": "7.0.0-dev.20260217.1"
|
|
36
36
|
},
|