@remotion/eslint-plugin 4.0.0-alpha4 → 4.0.0-alpha5

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/index.d.ts CHANGED
@@ -12,6 +12,7 @@ declare const _default: {
12
12
  "staticfile-no-relative": import("@typescript-eslint/utils/dist/ts-eslint/Rule").RuleModule<"RelativePathStaticFile" | "AbsoluteStaticFile" | "PublicStaticFile", [], import("@typescript-eslint/utils/dist/ts-eslint/Rule").RuleListener>;
13
13
  "staticfile-no-remote": import("@typescript-eslint/utils/dist/ts-eslint/Rule").RuleModule<"RelativePathStaticFile", [], import("@typescript-eslint/utils/dist/ts-eslint/Rule").RuleListener>;
14
14
  "no-background-image": import("@typescript-eslint/utils/dist/ts-eslint/Rule").RuleModule<"BackgroundImage", [], import("@typescript-eslint/utils/dist/ts-eslint/Rule").RuleListener>;
15
+ "v4-config-import": import("@typescript-eslint/utils/dist/ts-eslint/Rule").RuleModule<"ImportConfig", [], import("@typescript-eslint/utils/dist/ts-eslint/Rule").RuleListener>;
15
16
  };
16
17
  configs: {
17
18
  recommended: {
@@ -28,6 +29,7 @@ declare const _default: {
28
29
  "@remotion/staticfile-no-relative": string;
29
30
  "@remotion/staticfile-no-remote": string;
30
31
  "@remotion/no-background-image": string;
32
+ "@remotion/v4-config-import": string;
31
33
  };
32
34
  };
33
35
  };
package/dist/index.js CHANGED
@@ -14,6 +14,7 @@ const staticfile_no_remote_1 = __importDefault(require("./rules/staticfile-no-re
14
14
  const use_gif_component_1 = __importDefault(require("./rules/use-gif-component"));
15
15
  const volume_callback_1 = __importDefault(require("./rules/volume-callback"));
16
16
  const warn_native_media_tag_1 = __importDefault(require("./rules/warn-native-media-tag"));
17
+ const v4_import_1 = __importDefault(require("./rules/v4-import"));
17
18
  const rules = {
18
19
  "no-mp4-import": no_mp4_import_1.default,
19
20
  "warn-native-media-tag": warn_native_media_tag_1.default,
@@ -27,6 +28,7 @@ const rules = {
27
28
  "staticfile-no-relative": staticfile_no_relative_1.default,
28
29
  "staticfile-no-remote": staticfile_no_remote_1.default,
29
30
  "no-background-image": no_background_image_1.default,
31
+ "v4-config-import": v4_import_1.default,
30
32
  };
31
33
  module.exports = {
32
34
  rules,
@@ -45,6 +47,7 @@ module.exports = {
45
47
  "@remotion/staticfile-no-relative": "error",
46
48
  "@remotion/staticfile-no-remote": "error",
47
49
  "@remotion/no-background-image": "error",
50
+ "@remotion/v4-config-import": "error",
48
51
  },
49
52
  },
50
53
  },
@@ -0,0 +1,2 @@
1
+ declare const rule: import("@typescript-eslint/utils/dist/ts-eslint/Rule").RuleModule<"ImportConfig", [], import("@typescript-eslint/utils/dist/ts-eslint/Rule").RuleListener>;
2
+ export default rule;
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const utils_1 = require("@typescript-eslint/utils");
4
+ const createRule = utils_1.ESLintUtils.RuleCreator(() => {
5
+ return `https://v4.remotion.dev/docs/4-0-migration`;
6
+ });
7
+ const ImportConfig = "Update the import to the new V4 location: import {Config} from '@remotion/cli/config'";
8
+ const rule = createRule({
9
+ name: "v4-config-import",
10
+ meta: {
11
+ type: "problem",
12
+ docs: {
13
+ description: ImportConfig,
14
+ recommended: "warn",
15
+ },
16
+ fixable: undefined,
17
+ schema: [],
18
+ messages: {
19
+ ImportConfig,
20
+ },
21
+ },
22
+ defaultOptions: [],
23
+ create: (context) => {
24
+ return {
25
+ ImportDeclaration: (node) => {
26
+ if (node.source.value !== "remotion") {
27
+ return;
28
+ }
29
+ const config = node.specifiers.find((s) => s.type === "ImportSpecifier" && s.imported.name === "Config");
30
+ if (config) {
31
+ context.report({
32
+ messageId: "ImportConfig",
33
+ node,
34
+ });
35
+ }
36
+ },
37
+ };
38
+ },
39
+ });
40
+ exports.default = rule;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/eslint-plugin",
3
- "version": "4.0.0-alpha4",
3
+ "version": "4.0.0-alpha5",
4
4
  "description": "A set of rules helping you avoid common pitfalls in Remotion.",
5
5
  "main": "dist/index.js",
6
6
  "bugs": {