@remotion/eslint-plugin 2.6.11 → 2.6.14

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.
@@ -1,5 +1,5 @@
1
- @remotion/eslint-plugin:build: cache hit, replaying output 5b40179ec63e0150
2
- @remotion/eslint-plugin:build: 
3
- @remotion/eslint-plugin:build: > @remotion/eslint-plugin@2.6.10 build /Users/jonathanburger/remotion/packages/eslint-plugin
4
- @remotion/eslint-plugin:build: > tsc -d
5
- @remotion/eslint-plugin:build: 
1
+ @remotion/eslint-plugin:build: cache hit, replaying output f0580f6d7ec299cd
2
+ @remotion/eslint-plugin:build: 
3
+ @remotion/eslint-plugin:build: > @remotion/eslint-plugin@2.6.13 build /Users/jonathanburger/remotion/packages/eslint-plugin
4
+ @remotion/eslint-plugin:build: > tsc -d
5
+ @remotion/eslint-plugin:build: 
@@ -1,24 +1,24 @@
1
- @remotion/eslint-plugin:test: cache hit, replaying output 58b1a7f5757d89fc
2
- @remotion/eslint-plugin:test: 
3
- @remotion/eslint-plugin:test: > @remotion/eslint-plugin@2.6.7 test /Users/jonathanburger/remotion/packages/eslint-plugin
4
- @remotion/eslint-plugin:test: > jest
5
- @remotion/eslint-plugin:test: 
6
- @remotion/eslint-plugin:test: watchman warning: Recrawled this watch 45 times, most recently because:
7
- @remotion/eslint-plugin:test: MustScanSubDirs UserDroppedTo resolve, please review the information on
8
- @remotion/eslint-plugin:test: https://facebook.github.io/watchman/docs/troubleshooting.html#recrawl
9
- @remotion/eslint-plugin:test: To clear this warning, run:
10
- @remotion/eslint-plugin:test: `watchman watch-del '/Users/jonathanburger/remotion' ; watchman watch-project '/Users/jonathanburger/remotion'`
11
- @remotion/eslint-plugin:test: 
12
- @remotion/eslint-plugin:test: PASS src/tests/no-mp4-import.test.ts (37.191 s)
13
- @remotion/eslint-plugin:test: PASS src/tests/volume-callback.test.ts (38.252 s)
14
- @remotion/eslint-plugin:test: PASS src/tests/no-duration-frames-infinity.test.ts (38.646 s)
15
- @remotion/eslint-plugin:test: PASS src/tests/warn-native-image-tag.test.ts (38.51 s)
16
- @remotion/eslint-plugin:test: PASS src/tests/even-dimensions.test.ts (38.766 s)
17
- @remotion/eslint-plugin:test: PASS src/tests/no-math-random.test.ts (38.949 s)
18
- @remotion/eslint-plugin:test: PASS src/tests/no-string-assets.test.ts (40.023 s)
19
- @remotion/eslint-plugin:test: 
20
- @remotion/eslint-plugin:test: Test Suites: 7 passed, 7 total
21
- @remotion/eslint-plugin:test: Tests: 38 passed, 38 total
22
- @remotion/eslint-plugin:test: Snapshots: 0 total
23
- @remotion/eslint-plugin:test: Time: 41.514 s
24
- @remotion/eslint-plugin:test: Ran all test suites.
1
+ @remotion/eslint-plugin:test: cache hit, replaying output b9b7623d2958b882
2
+ @remotion/eslint-plugin:test: 
3
+ @remotion/eslint-plugin:test: > @remotion/eslint-plugin@2.6.12 test /Users/jonathanburger/remotion/packages/eslint-plugin
4
+ @remotion/eslint-plugin:test: > jest
5
+ @remotion/eslint-plugin:test: 
6
+ @remotion/eslint-plugin:test: watchman warning: Recrawled this watch 3 times, most recently because:
7
+ @remotion/eslint-plugin:test: MustScanSubDirs UserDroppedTo resolve, please review the information on
8
+ @remotion/eslint-plugin:test: https://facebook.github.io/watchman/docs/troubleshooting.html#recrawl
9
+ @remotion/eslint-plugin:test: To clear this warning, run:
10
+ @remotion/eslint-plugin:test: `watchman watch-del '/Users/jonathanburger/remotion' ; watchman watch-project '/Users/jonathanburger/remotion'`
11
+ @remotion/eslint-plugin:test: 
12
+ @remotion/eslint-plugin:test: PASS src/tests/no-string-assets.test.ts (17.528 s)
13
+ @remotion/eslint-plugin:test: PASS src/tests/warn-native-image-tag.test.ts (17.774 s)
14
+ @remotion/eslint-plugin:test: PASS src/tests/no-duration-frames-infinity.test.ts (18.288 s)
15
+ @remotion/eslint-plugin:test: PASS src/tests/no-mp4-import.test.ts (18.918 s)
16
+ @remotion/eslint-plugin:test: PASS src/tests/volume-callback.test.ts (19.171 s)
17
+ @remotion/eslint-plugin:test: PASS src/tests/even-dimensions.test.ts (19.917 s)
18
+ @remotion/eslint-plugin:test: PASS src/tests/no-math-random.test.ts (19.832 s)
19
+ @remotion/eslint-plugin:test: 
20
+ @remotion/eslint-plugin:test: Test Suites: 7 passed, 7 total
21
+ @remotion/eslint-plugin:test: Tests: 39 passed, 39 total
22
+ @remotion/eslint-plugin:test: Snapshots: 0 total
23
+ @remotion/eslint-plugin:test: Time: 21.202 s
24
+ @remotion/eslint-plugin:test: Ran all test suites.
@@ -1 +1 @@
1
- {"version":3,"file":"no-string-assets.d.ts","sourceRoot":"","sources":["../../src/rules/no-string-assets.ts"],"names":[],"mappings":";AAeA,wBAsEG"}
1
+ {"version":3,"file":"no-string-assets.d.ts","sourceRoot":"","sources":["../../src/rules/no-string-assets.ts"],"names":[],"mappings":";AAeA,wBAmFG"}
@@ -33,10 +33,20 @@ exports.default = createRule({
33
33
  return;
34
34
  }
35
35
  const value = node.value;
36
- if (!value || value.type !== "Literal") {
36
+ // src={"some string"}
37
+ const insideCurlyBraces = value &&
38
+ value.type === "JSXExpressionContainer" &&
39
+ value.expression.type === "Literal";
40
+ if (!value || (value.type !== "Literal" && !insideCurlyBraces)) {
37
41
  return;
38
42
  }
39
- const stringValue = value.value;
43
+ const stringValue = value &&
44
+ value.type === "JSXExpressionContainer" &&
45
+ value.expression.type === "Literal"
46
+ ? value.expression.value
47
+ : value.type === "Literal"
48
+ ? value.value
49
+ : null;
40
50
  if (typeof stringValue !== "string") {
41
51
  return;
42
52
  }
@@ -1 +1 @@
1
- {"version":3,"file":"no-string-assets.js","sourceRoot":"","sources":["../../src/rules/no-string-assets.ts"],"names":[],"mappings":";;AAAA,oDAAuD;AAEvD,MAAM,UAAU,GAAG,mBAAW,CAAC,WAAW,CAAC,CAAC,IAAI,EAAE,EAAE;IAClD,OAAO,0CAA0C,CAAC;AACpD,CAAC,CAAC,CAAC;AAMH,MAAM,cAAc,GAAG;IACrB,0FAA0F;I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K,OAAO;oBACrB,IAAI,CAAC,IAAI,KAAK,OAAO;oBACrB,IAAI,CAAC,IAAI,KAAK,OAAO;oBACrB,IAAI,CAAC,IAAI,KAAK,OAAO;oBACrB,IAAI,CAAC,IAAI,KAAK,QAAQ,EACtB;oBACA,mCAAmC;oBACnC,IAAI,WAAW,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE;wBACrC,OAAO;qBACR;oBACD,IAAI,WAAW,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE;wBACtC,OAAO;qBACR;oBACD,IAAI,WAAW,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE;wBACnC,OAAO;qBACR;oBACD,OAAO,CAAC,MAAM,CAAC;wBACb,SAAS,EAAE,gBAAgB;wBAC3B,IAAI;qBACL,CAAC,CAAC;iBACJ;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"no-string-assets.js","sourceRoot":"","sources":["../../src/rules/no-string-assets.ts"],"names":[],"mappings":";;AAAA,oDAAuD;AAEvD,MAAM,UAAU,GAAG,mBAAW,CAAC,WAAW,CAAC,CAAC,IAAI,EAAE,EAAE;IAClD,OAAO,0CAA0C,CAAC;AACpD,CAAC,CAAC,CAAC;AAMH,MAAM,cAAc,GAAG;IACrB,0FAA0F;IAC1F,2CAA2C;CAC5C,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb,kBAAe,UAAU,CAAsB;IAC7C,IAAI,EAAE,kBAAkB;IACxB,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACJ,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,MAAM;SACpB;QACD,OAAO,EAAE,SAAS;QAClB,MAAM,EAAE,EAAE;QACV,QAAQ,EAAE;YACR,cAAc,EAAE,cAAc;SAC/B;KACF;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,EAAE,CAAC,OAAO,EAAE,EAAE;QAClB,OAAO;YACL,YAAY,EAAE,CAA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rB,IAAI,CAAC,IAAI,KAAK,OAAO;oBACrB,IAAI,CAAC,IAAI,KAAK,OAAO;oBACrB,IAAI,CAAC,IAAI,KAAK,OAAO;oBACrB,IAAI,CAAC,IAAI,KAAK,QAAQ,EACtB;oBACA,mCAAmC;oBACnC,IAAI,WAAW,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE;wBACrC,OAAO;qBACR;oBACD,IAAI,WAAW,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE;wBACtC,OAAO;qBACR;oBACD,IAAI,WAAW,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE;wBACnC,OAAO;qBACR;oBACD,OAAO,CAAC,MAAM,CAAC;wBACb,SAAS,EAAE,gBAAgB;wBAC3B,IAAI;qBACL,CAAC,CAAC;iBACJ;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/eslint-plugin",
3
- "version": "2.6.11",
3
+ "version": "2.6.14",
4
4
  "description": "A set of rules helping you avoid common pitfalls in Remotion.",
5
5
  "scripts": {
6
6
  "build": "tsc -d",
@@ -21,5 +21,5 @@
21
21
  "typescript": "^4.5.5"
22
22
  },
23
23
  "private": false,
24
- "gitHead": "fc0286013a2997409781caf2f03c1c2ebf595db7"
24
+ "gitHead": "32d6b9e13e0f7aa9a5b391b41ff82b90f97f378e"
25
25
  }