Skip to content

🎥 Make videos programmatically with React

fix eslint error

Jonny Burger59f1964c19a5
diff --git a/packages/cloudrun/package.json b/packages/cloudrun/package.json
index 03d584fb74..2f1da68851 100644
--- a/packages/cloudrun/package.json
+++ b/packages/cloudrun/package.json
@@ -31,7 +31,7 @@
"@types/node": "^18.11.2",
"@remotion/compositor-linux-x64-gnu": "workspace:*",
"@types/minimist": "1.2.2",
- "eslint": "8.25.0",
+ "eslint": "8.42.0",
"prettier": "^2.7.1",
"prettier-plugin-organize-imports": "^3.2.2",
"ts-node": "^10.8.0",
diff --git a/packages/cloudrun/src/api/check-if-service-exists.ts b/packages/cloudrun/src/api/check-if-service-exists.ts
index a4ef7305dc..f6bc3086f0 100644
--- a/packages/cloudrun/src/api/check-if-service-exists.ts
+++ b/packages/cloudrun/src/api/check-if-service-exists.ts
@@ -53,8 +53,6 @@ export const checkIfServiceExists = async ({
return response;
}
}
-
- return;
} catch (e: any) {
if (e.code === 7) {
Log.error(
diff --git a/packages/cloudrun/src/api/helpers/parse-service-name.ts b/packages/cloudrun/src/api/helpers/parse-service-name.ts
index 5159ce759f..cd3e824225 100644
--- a/packages/cloudrun/src/api/helpers/parse-service-name.ts
+++ b/packages/cloudrun/src/api/helpers/parse-service-name.ts
@@ -1,4 +1,4 @@
-import {GcpRegion} from '../../pricing/gcp-regions';
+import type {GcpRegion} from '../../pricing/gcp-regions';
export const getGcpParent = (region: GcpRegion) => {
const parent = `projects/${process.env.REMOTION_GCP_PROJECT_ID}/locations/${region}`;
@@ -13,7 +13,7 @@ export const parseServiceName = (
const shortServiceName = fullServiceName.replace(parent + '/services/', '');
const deployedRegion = fullServiceName.split('/')[3] as string;
- const matched = shortServiceName.match(/remotion\-(.*)\-mem([0-9])/);
+ const matched = shortServiceName.match(/remotion-(.*)-mem([0-9])/);
if (!matched) {
throw new Error(`Could not parse service name ${shortServiceName}`);
diff --git a/packages/cloudrun/src/api/render-media-on-cloudrun.ts b/packages/cloudrun/src/api/render-media-on-cloudrun.ts
index 5556a419bb..3321c3bf98 100644
--- a/packages/cloudrun/src/api/render-media-on-cloudrun.ts
+++ b/packages/cloudrun/src/api/render-media-on-cloudrun.ts
@@ -1,10 +1,5 @@
-import {ConfigInternals} from '@remotion/cli/src/config';
-import {
- ChromiumOptions,
- FrameRange,
- LogLevel,
- RenderInternals,
-} from '@remotion/renderer';
+import type {ChromiumOptions, FrameRange, LogLevel} from '@remotion/renderer';
+import {RenderInternals} from '@remotion/renderer';
import type {
CloudRunPayloadType,
ErrorResponsePayload,
@@ -156,7 +151,7 @@ export const renderMediaOnCloudrun = async ({
});
const verbose = RenderInternals.isEqualOrBelowLogLevel(
- ConfigInternals.Logging.getLogLevel(),
+ logLevel ?? 'info',
'verbose'
);
diff --git a/packages/cloudrun/src/api/render-still-on-cloudrun.ts b/packages/cloudrun/src/api/render-still-on-cloudrun.ts
index ba544f2a1c..1b5c3bcabb 100644
--- a/packages/cloudrun/src/api/render-still-on-cloudrun.ts
+++ b/packages/cloudrun/src/api/render-still-on-cloudrun.ts
@@ -1,9 +1,9 @@
-import {
+import type {
ChromiumOptions,
LogLevel,
- RenderInternals,
StillImageFormat,
} from '@remotion/renderer';
+import {RenderInternals} from '@remotion/renderer';
import type {
CloudRunPayloadType,
RenderStillOnCloudrunOutput,
diff --git a/packages/cloudrun/src/api/test/service-names.test.ts b/packages/cloudrun/src/api/test/service-names.test.ts
index 4c211bbfa1..e45eef3b81 100644
--- a/packages/cloudrun/src/api/test/service-names.test.ts
+++ b/packages/cloudrun/src/api/test/service-names.test.ts
@@ -1,6 +1,6 @@
import {VERSION} from 'remotion';
import {expect, test} from 'vitest';
-import {GcpRegion} from '../../pricing/gcp-regions';
+import type {GcpRegion} from '../../pricing/gcp-regions';
import {getGcpParent, parseServiceName} from '../helpers/parse-service-name';
import {speculateServiceName} from '../speculate-service-name';
diff --git a/packages/cloudrun/src/functions/render-still-single-thread.ts b/packages/cloudrun/src/functions/render-still-single-thread.ts
index 736723ed85..5882b8ac38 100644
--- a/packages/cloudrun/src/functions/render-still-single-thread.ts
+++ b/packages/cloudrun/src/functions/render-still-single-thread.ts
@@ -1,6 +1,7 @@
import type * as ff from '@google-cloud/functions-framework';
import {Storage} from '@google-cloud/storage';
-import {ChromiumOptions, RenderInternals} from '@remotion/renderer';
+import type {ChromiumOptions} from '@remotion/renderer';
+import {RenderInternals} from '@remotion/renderer';
import {Log} from '../cli/log';
import {randomHash} from '../shared/random-hash';
import {getCompositionFromBody} from './helpers/get-composition-from-body';
diff --git a/packages/cloudrun/src/gcpInstaller/gcpInstaller.tar b/packages/cloudrun/src/gcpInstaller/gcpInstaller.tar
index b62adf7a23..78823fd7c1 100644
Binary files a/packages/cloudrun/src/gcpInstaller/gcpInstaller.tar and b/packages/cloudrun/src/gcpInstaller/gcpInstaller.tar differ
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index be6714c4d8..c68f3ae5b4 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -347,7 +347,7 @@ importers:
devDependencies:
'@jonny/eslint-config':
specifier: 3.0.266
'@remotion/compositor-linux-x64-gnu':
specifier: workspace:*
version: link:../compositor-linux-x64-gnu
@@ -358,8 +358,8 @@ importers:
specifier: ^18.11.2
version: 18.14.6
eslint:
- specifier: 8.25.0
- version: 8.25.0
+ specifier: 8.42.0
+ version: 8.42.0
prettier:
specifier: ^2.7.1
version: 2.8.4
@@ -7767,23 +7767,6 @@ packages:
resolution: {integrity: sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ==}
engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0}
- /@eslint/[email protected]:
- resolution: {integrity: sha512-uj3pT6Mg+3t39fvLrj8iuCIJ38zKO9FpGtJ4BBJebJhEwjoT+KLVNCcHT5QC9NGRIEi7fZ0ZR8YRb884auB4Lg==}
- engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
- dependencies:
- ajv: 6.12.6
- debug: 4.3.4([email protected])
- espree: 9.5.2
- globals: 13.20.0
- ignore: 5.2.0
- import-fresh: 3.3.0
- js-yaml: 4.1.0
- minimatch: 3.1.2
- strip-json-comments: 3.1.1
- transitivePeerDependencies:
- - supports-color
- dev: true
-
resolution: {integrity: sha512-+5gy6OQfk+xx3q0d6jGZZC3f3KzAkXc/IanVxd1is/VIIziRqqt3ongQz0FiTUXqTk0c7aDB3OaFuKnuSoJicQ==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
@@ -7940,17 +7923,6 @@ packages:
'@hapi/hoek': 9.2.1
dev: false
- /@humanwhocodes/[email protected]:
- resolution: {integrity: sha512-MDl6D6sBsaV452/QSdX+4CXIjZhIcI0PELsxUjk4U828yd58vk3bTIvk/6w5FY+4hIy9sLW0sfrV7K7Kc++j/w==}
- engines: {node: '>=10.10.0'}
- dependencies:
- '@humanwhocodes/object-schema': 1.2.1
- debug: 4.3.4([email protected])
- minimatch: 3.1.2
- transitivePeerDependencies:
- - supports-color
- dev: true
-
/@humanwhocodes/[email protected]:
resolution: {integrity: sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==}
engines: {node: '>=10.10.0'}
@@ -7979,14 +7951,14 @@ packages:
chalk: 4.1.2
dev: true
resolution: {integrity: sha512-jtrgDIHcM+arLaGxuUlSIh3FrJFSrSjMHEQAFtcSeA/4iNXYjJHRbN9Q0vc8H3wwMNPYYvbxrbmC1zycaEAStQ==}
dependencies:
- '@typescript-eslint/eslint-plugin': 5.29.0(@typescript-eslint/[email protected])([email protected])([email protected])
- '@typescript-eslint/parser': 5.29.0([email protected])([email protected])
- eslint-plugin-10x: 1.5.2([email protected])
- eslint-plugin-react: 7.30.1([email protected])
- eslint-plugin-react-hooks: 4.6.0([email protected])
+ '@typescript-eslint/eslint-plugin': 5.29.0(@typescript-eslint/[email protected])([email protected])([email protected])
+ '@typescript-eslint/parser': 5.29.0([email protected])([email protected])
+ eslint-plugin-10x: 1.5.2([email protected])
+ eslint-plugin-react: 7.30.1([email protected])
+ eslint-plugin-react-hooks: 4.6.0([email protected])
transitivePeerDependencies:
- eslint
- supports-color
@@ -9537,7 +9509,7 @@ packages:
dev: false
optional: true
- /@typescript-eslint/[email protected](@typescript-eslint/[email protected])([email protected])([email protected]):
+ /@typescript-eslint/[email protected](@typescript-eslint/[email protected])([email protected])([email protected]):
resolution: {integrity: sha512-kgTsISt9pM53yRFQmLZ4npj99yGl3x3Pl7z4eA66OuTzAGC4bQB5H5fuLwPnqTKU3yyrrg4MIhjF17UYnL4c0w==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
@@ -9548,12 +9520,12 @@ packages:
typescript:
optional: true
dependencies:
- '@typescript-eslint/parser': 5.29.0([email protected])([email protected])
+ '@typescript-eslint/parser': 5.29.0([email protected])([email protected])
'@typescript-eslint/scope-manager': 5.29.0
- '@typescript-eslint/type-utils': 5.29.0([email protected])([email protected])
- '@typescript-eslint/utils': 5.29.0([email protected])([email protected])
+ '@typescript-eslint/type-utils': 5.29.0([email protected])([email protected])
+ '@typescript-eslint/utils': 5.29.0([email protected])([email protected])
debug: 4.3.4([email protected])
- eslint: 8.25.0
+ eslint: 8.42.0
functional-red-black-tree: 1.0.1
ignore: 5.2.0
regexpp: 3.2.0
@@ -9645,7 +9617,7 @@ packages:
- supports-color
dev: false
resolution: {integrity: sha512-ruKWTv+x0OOxbzIw9nW5oWlUopvP/IQDjB5ZqmTglLIoDTctLlAJpAQFpNPJP/ZI7hTT9sARBosEfaKbcFuECw==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
@@ -9659,7 +9631,7 @@ packages:
'@typescript-eslint/types': 5.29.0
'@typescript-eslint/typescript-estree': 5.29.0([email protected])
debug: 4.3.4([email protected])
- eslint: 8.25.0
+ eslint: 8.42.0
typescript: 4.7.2
transitivePeerDependencies:
- supports-color
@@ -9763,7 +9735,7 @@ packages:
'@typescript-eslint/visitor-keys': 5.59.9
dev: false
resolution: {integrity: sha512-JK6bAaaiJozbox3K220VRfCzLa9n0ib/J+FHIwnaV3Enw/TO267qe0pM1b1QrrEuy6xun374XEAsRlA86JJnyg==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
@@ -9773,9 +9745,9 @@ packages:
typescript:
optional: true
dependencies:
- '@typescript-eslint/utils': 5.29.0([email protected])([email protected])
+ '@typescript-eslint/utils': 5.29.0([email protected])([email protected])
debug: 4.3.4([email protected])
- eslint: 8.25.0
+ eslint: 8.42.0
tsutils: 3.21.0([email protected])
typescript: 4.7.2
transitivePeerDependencies:
@@ -10007,7 +9979,7 @@ packages:
- typescript
dev: false
resolution: {integrity: sha512-3Eos6uP1nyLOBayc/VUdKZikV90HahXE5Dx9L5YlSd/7ylQPXhLk1BYb29SDgnBnTp+jmSZUU0QxUiyHgW4p7A==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
@@ -10017,9 +9989,9 @@ packages:
'@typescript-eslint/scope-manager': 5.29.0
'@typescript-eslint/types': 5.29.0
'@typescript-eslint/typescript-estree': 5.29.0([email protected])
- eslint: 8.25.0
+ eslint: 8.42.0
eslint-scope: 5.1.1
- eslint-utils: 3.0.0([email protected])
+ eslint-utils: 3.0.0([email protected])
transitivePeerDependencies:
- supports-color
- typescript
@@ -13266,15 +13238,6 @@ packages:
optionalDependencies:
source-map: 0.6.1
- resolution: {integrity: sha512-SKVKlSJXJSU34Gw1m0Hp+PBO5az4zPIRU3+nC3Ya6x+nQ3Bq3kIfQUBH6dN811CawO6sacpc538IJAqTDSMSWQ==}
- peerDependencies:
- eslint: '>=7.8.0'
- dependencies:
- eslint: 8.25.0
- jsx-ast-utils: 2.4.1
- dev: true
-
resolution: {integrity: sha512-SKVKlSJXJSU34Gw1m0Hp+PBO5az4zPIRU3+nC3Ya6x+nQ3Bq3kIfQUBH6dN811CawO6sacpc538IJAqTDSMSWQ==}
peerDependencies:
@@ -13309,15 +13272,6 @@ packages:
eslint: 8.42.0
dev: true
- resolution: {integrity: sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==}
- engines: {node: '>=10'}
- peerDependencies:
- eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0
- dependencies:
- eslint: 8.25.0
- dev: true
-
resolution: {integrity: sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==}
engines: {node: '>=10'}
@@ -13349,29 +13303,6 @@ packages:
string.prototype.matchall: 4.0.6
dev: true
- resolution: {integrity: sha512-NbEvI9jtqO46yJA3wcRF9Mo0lF9T/jhdHqhCHXiXtD+Zcb98812wvokjWpU7Q4QH5edo6dmqrukxVvWWXHlsUg==}
- engines: {node: '>=4'}
- peerDependencies:
- eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8
- dependencies:
- array-includes: 3.1.6
- array.prototype.flatmap: 1.3.1
- doctrine: 2.1.0
- eslint: 8.25.0
- estraverse: 5.3.0
- jsx-ast-utils: 3.2.1
- minimatch: 3.1.2
- object.entries: 1.1.6
- object.fromentries: 2.0.6
- object.hasown: 1.1.2
- object.values: 1.1.6
- prop-types: 15.8.1
- resolve: 2.0.0-next.4
- semver: 6.3.0
- string.prototype.matchall: 4.0.8
- dev: true
-
resolution: {integrity: sha512-NbEvI9jtqO46yJA3wcRF9Mo0lF9T/jhdHqhCHXiXtD+Zcb98812wvokjWpU7Q4QH5edo6dmqrukxVvWWXHlsUg==}
engines: {node: '>=4'}
@@ -13467,14 +13398,6 @@ packages:
esrecurse: 4.3.0
estraverse: 4.3.0
- resolution: {integrity: sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==}
- engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
- dependencies:
- esrecurse: 4.3.0
- estraverse: 5.3.0
- dev: true
-
resolution: {integrity: sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
@@ -13482,16 +13405,6 @@ packages:
esrecurse: 4.3.0
estraverse: 5.3.0
- resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==}
- engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0}
- peerDependencies:
- eslint: '>=5'
- dependencies:
- eslint: 8.25.0
- eslint-visitor-keys: 2.1.0
- dev: true
-
resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==}
engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0}
@@ -13505,62 +13418,10 @@ packages:
resolution: {integrity: sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==}
engines: {node: '>=10'}
- resolution: {integrity: sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==}
- engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
- dev: true
-
resolution: {integrity: sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
- resolution: {integrity: sha512-DVlJOZ4Pn50zcKW5bYH7GQK/9MsoQG2d5eDH0ebEkE8PbgzTTmtt/VTH9GGJ4BfeZCpBLqFfvsjX35UacUL83A==}
- engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
- hasBin: true
- dependencies:
- '@eslint/eslintrc': 1.3.3
- '@humanwhocodes/config-array': 0.10.7
- '@humanwhocodes/module-importer': 1.0.1
- ajv: 6.12.6
- chalk: 4.1.2
- cross-spawn: 7.0.3
- debug: 4.3.4([email protected])
- doctrine: 3.0.0
- escape-string-regexp: 4.0.0
- eslint-scope: 7.1.1
- eslint-utils: 3.0.0([email protected])
- eslint-visitor-keys: 3.3.0
- espree: 9.4.0
- esquery: 1.5.0
- esutils: 2.0.3
- fast-deep-equal: 3.1.3
- file-entry-cache: 6.0.1
- find-up: 5.0.0
- glob-parent: 6.0.2
- globals: 13.20.0
- globby: 11.1.0
- grapheme-splitter: 1.0.4
- ignore: 5.2.0
- import-fresh: 3.3.0
- imurmurhash: 0.1.4
- is-glob: 4.0.3
- js-sdsl: 4.1.5
- js-yaml: 4.1.0
- json-stable-stringify-without-jsonify: 1.0.1
- levn: 0.4.1
- lodash.merge: 4.6.2
- minimatch: 3.1.2
- natural-compare: 1.4.0
- optionator: 0.9.1
- regexpp: 3.2.0
- strip-ansi: 6.0.1
- strip-json-comments: 3.1.1
- text-table: 0.2.0
- transitivePeerDependencies:
- - supports-color
- dev: true
-
resolution: {integrity: sha512-ulg9Ms6E1WPf67PHaEY4/6E2tEn5/f7FXGzr3t9cBMugOmf1INYvuUwwh1aXQN4MfJ6a5K2iNwP3w4AColvI9A==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
@@ -13613,15 +13474,6 @@ packages:
engines: {node: '>=6'}
dev: false
- resolution: {integrity: sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==}
- engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
- dependencies:
- acorn: 8.8.2
- acorn-jsx: 5.3.2([email protected])
- eslint-visitor-keys: 3.4.1
- dev: true
-
resolution: {integrity: sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
@@ -14589,6 +14441,7 @@ packages:
resolution: {integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==}
+ dev: false
resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==}
@@ -15681,10 +15534,6 @@ packages:
'@sideway/pinpoint': 2.0.0
dev: false
- resolution: {integrity: sha512-08bOAKweV2NUC1wqTtf3qZlnpOX/R2DU9ikpjOHs0H+ibQv3zpncVQg6um4uYtRtrwIX8M4Nh3ytK4HGlYAq7Q==}
- dev: true
-
resolution: {integrity: sha512-Smw4xcfIQ5LVjAOuJCvN/zIodzA/BBSsluuoSykP+lUvScIi4U6RJLfwHet5cxFnCswUjISV8oAXaqaJDY3chg==}
engines: {node: '>= 0.8'}