@remotion/eslint-plugin 4.0.256 → 4.0.258
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/esm/index.mjs +1 -1
- package/dist/index.js +0 -3
- package/package.json +1 -1
- package/dist/rules/no-mp4-import.d.ts +0 -2
- package/dist/rules/no-mp4-import.js +0 -61
package/dist/esm/index.mjs
CHANGED
|
@@ -91732,7 +91732,7 @@ var require_rule_tester = __commonJS((exports, module) => {
|
|
|
91732
91732
|
var { Linter, SourceCodeFixer, interpolate } = require_linter2();
|
|
91733
91733
|
var CodePath = require_code_path();
|
|
91734
91734
|
var ajv = require_ajv2()({ strictDefaults: true });
|
|
91735
|
-
var espreePath = __require.resolve("espree");
|
|
91735
|
+
var espreePath = __require.resolve("/Users/jonathanburger/remotion/node_modules/.pnpm/espree@9.6.1/node_modules/espree/dist/espree.cjs");
|
|
91736
91736
|
var parserSymbol = Symbol.for("eslint.RuleTester.parser");
|
|
91737
91737
|
var { SourceCode } = require_source_code2();
|
|
91738
91738
|
var testerDefaultConfig = { rules: {} };
|
package/dist/index.js
CHANGED
|
@@ -7,7 +7,6 @@ const even_dimensions_1 = __importDefault(require("./rules/even-dimensions"));
|
|
|
7
7
|
const no_background_image_1 = __importDefault(require("./rules/no-background-image"));
|
|
8
8
|
const no_duration_frames_infinity_1 = __importDefault(require("./rules/no-duration-frames-infinity"));
|
|
9
9
|
const no_from_0_1 = __importDefault(require("./rules/no-from-0"));
|
|
10
|
-
const no_mp4_import_1 = __importDefault(require("./rules/no-mp4-import"));
|
|
11
10
|
const no_string_assets_1 = __importDefault(require("./rules/no-string-assets"));
|
|
12
11
|
const staticfile_no_relative_1 = __importDefault(require("./rules/staticfile-no-relative"));
|
|
13
12
|
const staticfile_no_remote_1 = __importDefault(require("./rules/staticfile-no-remote"));
|
|
@@ -16,7 +15,6 @@ const v4_import_1 = __importDefault(require("./rules/v4-import"));
|
|
|
16
15
|
const volume_callback_1 = __importDefault(require("./rules/volume-callback"));
|
|
17
16
|
const warn_native_media_tag_1 = __importDefault(require("./rules/warn-native-media-tag"));
|
|
18
17
|
const rules = {
|
|
19
|
-
'no-mp4-import': no_mp4_import_1.default,
|
|
20
18
|
'warn-native-media-tag': warn_native_media_tag_1.default,
|
|
21
19
|
'deterministic-randomness': deterministic_randomness_1.default,
|
|
22
20
|
'no-string-assets': no_string_assets_1.default,
|
|
@@ -35,7 +33,6 @@ module.exports = {
|
|
|
35
33
|
configs: {
|
|
36
34
|
recommended: {
|
|
37
35
|
rules: {
|
|
38
|
-
'@remotion/no-mp4-import': 'off',
|
|
39
36
|
'@remotion/warn-native-media-tag': 'error',
|
|
40
37
|
'@remotion/deterministic-randomness': 'error',
|
|
41
38
|
'@remotion/no-string-assets': 'error',
|
package/package.json
CHANGED
|
@@ -1,61 +0,0 @@
|
|
|
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://github.com/remotion-dev/remotion`;
|
|
6
|
-
});
|
|
7
|
-
const NoMP4Import = 'Importing MP4 will work while you are previewing the video, but will not work while rendering since Puppeteer does not include the codecs necessary for MP4 videos. Convert the video to WebM first.';
|
|
8
|
-
const rule = createRule({
|
|
9
|
-
name: 'no-mp4-import',
|
|
10
|
-
meta: {
|
|
11
|
-
type: 'problem',
|
|
12
|
-
docs: {
|
|
13
|
-
description: NoMP4Import,
|
|
14
|
-
recommended: 'warn',
|
|
15
|
-
},
|
|
16
|
-
fixable: undefined,
|
|
17
|
-
schema: [],
|
|
18
|
-
messages: {
|
|
19
|
-
NoMP4Import,
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
defaultOptions: [],
|
|
23
|
-
create: (context) => {
|
|
24
|
-
return {
|
|
25
|
-
ImportDeclaration: (node) => {
|
|
26
|
-
if (node.source.raw.includes('.mp4')) {
|
|
27
|
-
context.report({
|
|
28
|
-
messageId: 'NoMP4Import',
|
|
29
|
-
node,
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
CallExpression: (node) => {
|
|
34
|
-
var _a, _b, _c, _d;
|
|
35
|
-
// @ts-expect-error
|
|
36
|
-
if (node.callee.name !== 'require') {
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
// @ts-expect-error
|
|
40
|
-
const firstArgument = (_d = (_c = (_b = (_a = node.callee) === null || _a === void 0 ? void 0 : _a.parent) === null || _b === void 0 ? void 0 : _b.arguments) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.raw;
|
|
41
|
-
if (!firstArgument) {
|
|
42
|
-
const sourceCode = context.getSourceCode().getText(node);
|
|
43
|
-
if (sourceCode.includes('.mp4')) {
|
|
44
|
-
context.report({
|
|
45
|
-
messageId: 'NoMP4Import',
|
|
46
|
-
node,
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
if (firstArgument.includes('.mp4')) {
|
|
52
|
-
context.report({
|
|
53
|
-
messageId: 'NoMP4Import',
|
|
54
|
-
node,
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
};
|
|
59
|
-
},
|
|
60
|
-
});
|
|
61
|
-
exports.default = rule;
|