eslint-plugin-use-agnostic 1.6.3 → 1.6.4

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.
@@ -47,6 +47,9 @@ Indeed, Server Functions Modules have no business exporting JSX. `,
47
47
  return {
48
48
  ImportDeclaration: (node) =>
49
49
  importsFlow(context, node, currentFileEffectiveDirective),
50
+ // that should work
51
+ ImportExpression: (node) =>
52
+ importsFlow(context, node, currentFileEffectiveDirective),
50
53
  ExportNamedDeclaration: (node) =>
51
54
  reExportsFlow(context, node, currentFileEffectiveDirective),
52
55
  ExportAllDeclaration: (node) =>
@@ -57,6 +57,9 @@ Please include a Strategy that corresponds to the kind of module this export wou
57
57
  return {
58
58
  ImportDeclaration: (node) =>
59
59
  importsFlow(context, node, verifiedCommentedDirective),
60
+ // that should work
61
+ ImportExpression: (node) =>
62
+ importsFlow(context, node, verifiedCommentedDirective),
60
63
  ExportNamedDeclaration: (node) =>
61
64
  allExportsFlow(context, node, verifiedCommentedDirective),
62
65
  ExportAllDeclaration: (node) =>
@@ -97,9 +97,7 @@ export const getCommentedDirectiveFromSourceCode = (sourceCode) => {
97
97
  const rawFirstComment = allComments[0];
98
98
 
99
99
  const firstComment =
100
- rawFirstComment.type === "Shebang"
101
- ? sourceCode.getAllComments()[1]
102
- : rawFirstComment;
100
+ rawFirstComment.type === "Shebang" ? allComments[1] : rawFirstComment;
103
101
 
104
102
  // returns null early if there is no such first comment
105
103
  if (!firstComment) return null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-use-agnostic",
3
- "version": "1.6.3",
3
+ "version": "1.6.4",
4
4
  "description": "Highlights problematic server-client imports in projects made with the Fullstack React Architecture.",
5
5
  "keywords": [
6
6
  "eslint",