oxlint-appsync 0.1.0 → 0.1.1

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/README.md CHANGED
@@ -73,7 +73,7 @@ export default [
73
73
  | `appsync/no-update-operators` | Disallow `++` and `--` |
74
74
  | `appsync/no-bitwise-not` | Disallow bitwise NOT (`~`) |
75
75
  | `appsync/no-in-operator` | Disallow `in` (use `Object.hasOwn`) |
76
- | `appsync/no-function-arguments` | Disallow passing functions as call arguments |
76
+ | `appsync/no-function-arguments` | Disallow passing function references as call arguments (inline arrow callbacks are allowed) |
77
77
 
78
78
  ## Development
79
79
 
package/dist/index.js CHANGED
@@ -119,13 +119,24 @@ var no_for_loop_default = defineAppsyncRule({
119
119
  });
120
120
  //#endregion
121
121
  //#region src/rules/no-function-arguments.ts
122
- const FUNCTION_ARGUMENT_TYPES = /* @__PURE__ */ new Set([
123
- "FunctionDeclaration",
124
- "FunctionExpression",
125
- "ArrowFunctionExpression"
126
- ]);
127
- function isFunctionArgument(node) {
128
- return FUNCTION_ARGUMENT_TYPES.has(node.type);
122
+ function definitionCreatesFunction(def) {
123
+ if (def.type === "FunctionName") return true;
124
+ if (def.type === "Variable" && def.node.type === "VariableDeclarator") {
125
+ const init = def.node.init;
126
+ if (!init) return false;
127
+ return init.type === "FunctionExpression" || init.type === "ArrowFunctionExpression";
128
+ }
129
+ return false;
130
+ }
131
+ function isFunctionReference(node, context) {
132
+ if (node.type === "FunctionExpression") return true;
133
+ if (node.type !== "Identifier") return false;
134
+ let scope = context.sourceCode.getScope(node);
135
+ while (scope) {
136
+ if (scope.set.get(node.name)?.defs.some(definitionCreatesFunction)) return true;
137
+ scope = scope.upper;
138
+ }
139
+ return false;
129
140
  }
130
141
  //#endregion
131
142
  //#region src/rules/index.ts
@@ -139,13 +150,16 @@ const rules = {
139
150
  "no-function-arguments": defineAppsyncRule({
140
151
  meta: {
141
152
  type: "problem",
142
- docs: { description: "Disallow passing functions as call arguments in AppSync resolvers" },
143
- messages: { default: "Passing functions as arguments is not supported in the AppSync JS runtime" },
153
+ docs: { description: "Disallow passing function references as call arguments in AppSync resolvers" },
154
+ messages: { default: "Passing a function reference as an argument is not supported in the AppSync JS runtime; use an inline arrow function instead" },
144
155
  schema: []
145
156
  },
146
157
  createOnce(context) {
147
158
  return { CallExpression(node) {
148
- for (const argument of node.arguments) if (argument.type !== "SpreadElement" && isFunctionArgument(argument)) reportDefault(context, argument);
159
+ for (const argument of node.arguments) {
160
+ if (argument.type === "SpreadElement") continue;
161
+ if (isFunctionReference(argument, context)) reportDefault(context, argument);
162
+ }
149
163
  } };
150
164
  }
151
165
  }),
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["noAsyncAwait","noBitwiseNot","noClasses","noContinue","noDoWhile","noForLoop","noFunctionArguments","noGenerators","noInOperator","noInstanceof","noLabeledStatement","noNew","noStringConstructor","noThis","noThrow","noTry","noUpdateOperators","noWhile"],"sources":["../src/rules/types.ts","../src/rules/utils.ts","../src/rules/no-async-await.ts","../src/rules/no-bitwise-not.ts","../src/rules/no-classes.ts","../src/rules/no-continue.ts","../src/rules/no-do-while.ts","../src/rules/no-for-loop.ts","../src/rules/no-function-arguments.ts","../src/rules/no-generators.ts","../src/rules/no-in-operator.ts","../src/rules/no-instanceof.ts","../src/rules/no-labeled-statement.ts","../src/rules/no-new.ts","../src/rules/no-string-constructor.ts","../src/rules/no-this.ts","../src/rules/no-throw.ts","../src/rules/no-try.ts","../src/rules/no-update-operators.ts","../src/rules/no-while.ts","../src/rules/index.ts","../src/plugin.ts","../src/index.ts"],"sourcesContent":["import type { Rule } from \"eslint\";\n\nexport type AppsyncRuleModule = {\n meta: Rule.RuleMetaData;\n createOnce: (context: Rule.RuleContext) => Rule.RuleListener;\n};\n\nexport function defineAppsyncRule(rule: AppsyncRuleModule): AppsyncRuleModule {\n return rule;\n}\n","import type { Rule } from \"eslint\";\n\ntype NodeWithType = { type: string };\n\nexport function isIdentifier(\n node: NodeWithType | null | undefined,\n name: string,\n): boolean {\n return node?.type === \"Identifier\" && (node as { name: string }).name === name;\n}\n\nexport function reportDefault(\n context: Rule.RuleContext,\n node: Rule.Node,\n messageId = \"default\",\n): void {\n context.report({ node, messageId });\n}\n","import { defineAppsyncRule } from \"./types.js\";\nimport { reportDefault } from \"./utils.js\";\n\nexport default defineAppsyncRule({\n meta: {\n type: \"problem\",\n docs: {\n description:\n \"Disallow async functions and await expressions in AppSync resolvers\",\n },\n messages: {\n default:\n \"Promises and async/await are not supported in the AppSync JS runtime\",\n },\n schema: [],\n },\n createOnce(context) {\n const reportAsyncFunction = (node: { async?: boolean }) => {\n if (node.async) {\n reportDefault(context, node as never);\n }\n };\n\n return {\n AwaitExpression(node) {\n reportDefault(context, node);\n },\n FunctionDeclaration: reportAsyncFunction,\n FunctionExpression: reportAsyncFunction,\n ArrowFunctionExpression: reportAsyncFunction,\n };\n },\n});\n","import { defineAppsyncRule } from \"./types.js\";\nimport { reportDefault } from \"./utils.js\";\n\nexport default defineAppsyncRule({\n meta: {\n type: \"problem\",\n docs: {\n description: \"Disallow the bitwise NOT (~) operator in AppSync resolvers\",\n },\n messages: {\n default: \"The ~ operator is not supported in the AppSync JS runtime\",\n },\n schema: [],\n },\n createOnce(context) {\n return {\n UnaryExpression(node) {\n if (node.operator === \"~\") {\n reportDefault(context, node);\n }\n },\n };\n },\n});\n","import { defineAppsyncRule } from \"./types.js\";\nimport { reportDefault } from \"./utils.js\";\n\nexport default defineAppsyncRule({\n meta: {\n type: \"problem\",\n docs: {\n description: \"Disallow class declarations and expressions in AppSync resolvers\",\n },\n messages: {\n default: \"Classes are not supported in the AppSync JS runtime\",\n },\n schema: [],\n },\n createOnce(context) {\n return {\n ClassDeclaration(node) {\n reportDefault(context, node);\n },\n ClassExpression(node) {\n reportDefault(context, node);\n },\n };\n },\n});\n","import { defineAppsyncRule } from \"./types.js\";\nimport { reportDefault } from \"./utils.js\";\n\nexport default defineAppsyncRule({\n meta: {\n type: \"problem\",\n docs: {\n description: \"Disallow continue statements in AppSync resolvers\",\n },\n messages: {\n default: \"continue statements are not supported in the AppSync JS runtime\",\n },\n schema: [],\n },\n createOnce(context) {\n return {\n ContinueStatement(node) {\n reportDefault(context, node);\n },\n };\n },\n});\n","import { defineAppsyncRule } from \"./types.js\";\nimport { reportDefault } from \"./utils.js\";\n\nexport default defineAppsyncRule({\n meta: {\n type: \"problem\",\n docs: {\n description: \"Disallow do-while loops in AppSync resolvers\",\n },\n messages: {\n default: \"do-while loops are not supported in the AppSync JS runtime\",\n },\n schema: [],\n },\n createOnce(context) {\n return {\n DoWhileStatement(node) {\n reportDefault(context, node);\n },\n };\n },\n});\n","import { defineAppsyncRule } from \"./types.js\";\nimport { reportDefault } from \"./utils.js\";\n\nexport default defineAppsyncRule({\n meta: {\n type: \"problem\",\n docs: {\n description:\n \"Disallow C-style for loops in AppSync resolvers (for-in and for-of are allowed)\",\n },\n messages: {\n default:\n \"Only for-in and for-of loops are supported in the AppSync JS runtime\",\n },\n schema: [],\n },\n createOnce(context) {\n return {\n ForStatement(node) {\n reportDefault(context, node);\n },\n };\n },\n});\n","import type { Rule } from \"eslint\";\nimport { defineAppsyncRule } from \"./types.js\";\nimport { reportDefault } from \"./utils.js\";\n\nconst FUNCTION_ARGUMENT_TYPES = new Set([\n \"FunctionDeclaration\",\n \"FunctionExpression\",\n \"ArrowFunctionExpression\",\n]);\n\nfunction isFunctionArgument(node: Rule.Node): boolean {\n return FUNCTION_ARGUMENT_TYPES.has(node.type);\n}\n\nexport default defineAppsyncRule({\n meta: {\n type: \"problem\",\n docs: {\n description:\n \"Disallow passing functions as call arguments in AppSync resolvers\",\n },\n messages: {\n default:\n \"Passing functions as arguments is not supported in the AppSync JS runtime\",\n },\n schema: [],\n },\n createOnce(context) {\n return {\n CallExpression(node) {\n for (const argument of node.arguments) {\n if (argument.type !== \"SpreadElement\" && isFunctionArgument(argument)) {\n reportDefault(context, argument);\n }\n }\n },\n };\n },\n});\n","import { defineAppsyncRule } from \"./types.js\";\nimport { reportDefault } from \"./utils.js\";\n\nexport default defineAppsyncRule({\n meta: {\n type: \"problem\",\n docs: {\n description: \"Disallow generator functions in AppSync resolvers\",\n },\n messages: {\n default: \"Generators are not supported in the AppSync JS runtime\",\n },\n schema: [],\n },\n createOnce(context) {\n const reportGenerator = (node: { generator?: boolean }) => {\n if (node.generator) {\n reportDefault(context, node as never);\n }\n };\n\n return {\n FunctionDeclaration: reportGenerator,\n FunctionExpression: reportGenerator,\n };\n },\n});\n","import { defineAppsyncRule } from \"./types.js\";\nimport { reportDefault } from \"./utils.js\";\n\nexport default defineAppsyncRule({\n meta: {\n type: \"problem\",\n docs: {\n description: \"Disallow the in operator in AppSync resolvers\",\n },\n messages: {\n default:\n \"The in operator is not supported in the AppSync JS runtime; use Object.hasOwn instead\",\n },\n schema: [],\n },\n createOnce(context) {\n return {\n BinaryExpression(node) {\n if (node.operator === \"in\") {\n reportDefault(context, node);\n }\n },\n };\n },\n});\n","import { defineAppsyncRule } from \"./types.js\";\nimport { reportDefault } from \"./utils.js\";\n\nexport default defineAppsyncRule({\n meta: {\n type: \"problem\",\n docs: {\n description: \"Disallow the instanceof operator in AppSync resolvers\",\n },\n messages: {\n default: \"The instanceof operator is not supported in the AppSync JS runtime\",\n },\n schema: [],\n },\n createOnce(context) {\n return {\n BinaryExpression(node) {\n if (node.operator === \"instanceof\") {\n reportDefault(context, node);\n }\n },\n };\n },\n});\n","import { defineAppsyncRule } from \"./types.js\";\nimport { reportDefault } from \"./utils.js\";\n\nexport default defineAppsyncRule({\n meta: {\n type: \"problem\",\n docs: {\n description: \"Disallow labeled statements in AppSync resolvers\",\n },\n messages: {\n default: \"Labeled statements are not supported in the AppSync JS runtime\",\n },\n schema: [],\n },\n createOnce(context) {\n return {\n LabeledStatement(node) {\n reportDefault(context, node);\n },\n };\n },\n});\n","import { defineAppsyncRule } from \"./types.js\";\nimport { reportDefault } from \"./utils.js\";\n\nexport default defineAppsyncRule({\n meta: {\n type: \"problem\",\n docs: {\n description: \"Disallow the new operator in AppSync resolvers\",\n },\n messages: {\n default: \"The new operator is not supported in the AppSync JS runtime\",\n },\n schema: [],\n },\n createOnce(context) {\n return {\n NewExpression(node) {\n reportDefault(context, node);\n },\n };\n },\n});\n","import { defineAppsyncRule } from \"./types.js\";\nimport { isIdentifier, reportDefault } from \"./utils.js\";\n\nexport default defineAppsyncRule({\n meta: {\n type: \"problem\",\n docs: {\n description:\n \"Disallow using String() to stringify values in AppSync resolvers\",\n },\n messages: {\n default:\n \"Do not use String() to stringify variables in the AppSync JS runtime\",\n },\n schema: [],\n },\n createOnce(context) {\n return {\n CallExpression(node) {\n if (isIdentifier(node.callee, \"String\")) {\n reportDefault(context, node);\n }\n },\n NewExpression(node) {\n if (isIdentifier(node.callee, \"String\")) {\n reportDefault(context, node);\n }\n },\n };\n },\n});\n","import { defineAppsyncRule } from \"./types.js\";\nimport { reportDefault } from \"./utils.js\";\n\nexport default defineAppsyncRule({\n meta: {\n type: \"problem\",\n docs: {\n description: \"Disallow this expressions in AppSync resolvers\",\n },\n messages: {\n default: \"this is not supported in the AppSync JS runtime\",\n },\n schema: [],\n },\n createOnce(context) {\n return {\n ThisExpression(node) {\n reportDefault(context, node);\n },\n };\n },\n});\n","import { defineAppsyncRule } from \"./types.js\";\nimport { reportDefault } from \"./utils.js\";\n\nexport default defineAppsyncRule({\n meta: {\n type: \"problem\",\n docs: {\n description: \"Disallow throw statements in AppSync resolvers\",\n },\n messages: {\n default: \"throw statements are not supported in the AppSync JS runtime\",\n },\n schema: [],\n },\n createOnce(context) {\n return {\n ThrowStatement(node) {\n reportDefault(context, node);\n },\n };\n },\n});\n","import { defineAppsyncRule } from \"./types.js\";\nimport { reportDefault } from \"./utils.js\";\n\nexport default defineAppsyncRule({\n meta: {\n type: \"problem\",\n docs: {\n description:\n \"Disallow try/catch/finally statements in AppSync resolvers\",\n },\n messages: {\n default:\n \"try/catch/finally statements are not supported in the AppSync JS runtime\",\n },\n schema: [],\n },\n createOnce(context) {\n return {\n TryStatement(node) {\n reportDefault(context, node);\n },\n };\n },\n});\n","import { defineAppsyncRule } from \"./types.js\";\nimport { reportDefault } from \"./utils.js\";\n\nexport default defineAppsyncRule({\n meta: {\n type: \"problem\",\n docs: {\n description: \"Disallow ++ and -- operators in AppSync resolvers\",\n },\n messages: {\n default: \"++ and -- operators are not supported in the AppSync JS runtime\",\n },\n schema: [],\n },\n createOnce(context) {\n return {\n UpdateExpression(node) {\n reportDefault(context, node);\n },\n };\n },\n});\n","import { defineAppsyncRule } from \"./types.js\";\nimport { reportDefault } from \"./utils.js\";\n\nexport default defineAppsyncRule({\n meta: {\n type: \"problem\",\n docs: {\n description: \"Disallow while loops in AppSync resolvers\",\n },\n messages: {\n default: \"while loops are not supported in the AppSync JS runtime\",\n },\n schema: [],\n },\n createOnce(context) {\n return {\n WhileStatement(node) {\n reportDefault(context, node);\n },\n };\n },\n});\n","import noAsyncAwait from \"./no-async-await.js\";\nimport noBitwiseNot from \"./no-bitwise-not.js\";\nimport noClasses from \"./no-classes.js\";\nimport noContinue from \"./no-continue.js\";\nimport noDoWhile from \"./no-do-while.js\";\nimport noForLoop from \"./no-for-loop.js\";\nimport noFunctionArguments from \"./no-function-arguments.js\";\nimport noGenerators from \"./no-generators.js\";\nimport noInOperator from \"./no-in-operator.js\";\nimport noInstanceof from \"./no-instanceof.js\";\nimport noLabeledStatement from \"./no-labeled-statement.js\";\nimport noNew from \"./no-new.js\";\nimport noStringConstructor from \"./no-string-constructor.js\";\nimport noThis from \"./no-this.js\";\nimport noThrow from \"./no-throw.js\";\nimport noTry from \"./no-try.js\";\nimport noUpdateOperators from \"./no-update-operators.js\";\nimport noWhile from \"./no-while.js\";\nimport type { AppsyncRuleModule } from \"./types.js\";\n\nconst rules = {\n \"no-async-await\": noAsyncAwait,\n \"no-bitwise-not\": noBitwiseNot,\n \"no-classes\": noClasses,\n \"no-continue\": noContinue,\n \"no-do-while\": noDoWhile,\n \"no-for-loop\": noForLoop,\n \"no-function-arguments\": noFunctionArguments,\n \"no-generators\": noGenerators,\n \"no-in-operator\": noInOperator,\n \"no-instanceof\": noInstanceof,\n \"no-labeled-statement\": noLabeledStatement,\n \"no-new\": noNew,\n \"no-string-constructor\": noStringConstructor,\n \"no-this\": noThis,\n \"no-throw\": noThrow,\n \"no-try\": noTry,\n \"no-update-operators\": noUpdateOperators,\n \"no-while\": noWhile,\n} satisfies Record<string, AppsyncRuleModule>;\n\nexport type AppsyncRuleName = keyof typeof rules;\n\nexport default rules;\n","import { eslintCompatPlugin } from \"@oxlint/plugins\";\nimport rules from \"./rules/index.js\";\n\nexport const plugin = eslintCompatPlugin({\n meta: {\n name: \"appsync\",\n },\n rules,\n});\n\nexport const recommended = Object.fromEntries(\n Object.keys(rules).map((ruleName) => [`appsync/${ruleName}`, \"error\"]),\n) as Record<`appsync/${keyof typeof rules}`, \"error\">;\n","import { plugin, recommended } from \"./plugin.js\";\n\nexport { plugin, recommended };\nexport default plugin;\n"],"mappings":";;AAOA,SAAgB,kBAAkB,MAA4C;CAC5E,OAAO;AACT;;;ACLA,SAAgB,aACd,MACA,MACS;CACT,OAAO,MAAM,SAAS,gBAAiB,KAA0B,SAAS;AAC5E;AAEA,SAAgB,cACd,SACA,MACA,YAAY,WACN;CACN,QAAQ,OAAO;EAAE;EAAM;CAAU,CAAC;AACpC;;;ACdA,IAAA,yBAAe,kBAAkB;CAC/B,MAAM;EACJ,MAAM;EACN,MAAM,EACJ,aACE,sEACJ;EACA,UAAU,EACR,SACE,uEACJ;EACA,QAAQ,CAAC;CACX;CACA,WAAW,SAAS;EAClB,MAAM,uBAAuB,SAA8B;GACzD,IAAI,KAAK,OACP,cAAc,SAAS,IAAa;EAExC;EAEA,OAAO;GACL,gBAAgB,MAAM;IACpB,cAAc,SAAS,IAAI;GAC7B;GACA,qBAAqB;GACrB,oBAAoB;GACpB,yBAAyB;EAC3B;CACF;AACF,CAAC;;;AC7BD,IAAA,yBAAe,k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GACA,QAAQ,CAAC;EACX;EACA,WAAW,SAAS;GAClB,OAAO,EACL,eAAe,MAAM;IACnB,cAAc,SAAS,IAAI;GAC7B,EACF;EACF;CACF,CIccC;CACZ,UHjCa,kBAAkB;EAC/B,MAAM;GACJ,MAAM;GACN,MAAM,EACJ,aACE,6DACJ;GACA,UAAU,EACR,SACE,2EACJ;GACA,QAAQ,CAAC;EACX;EACA,WAAW,SAAS;GAClB,OAAO,EACL,aAAa,MAAM;IACjB,cAAc,SAAS,IAAI;GAC7B,EACF;EACF;CACF,CGaYC;CACV,uBFlCa,kBAAkB;EAC/B,MAAM;GACJ,MAAM;GACN,MAAM,EACJ,aAAa,oDACf;GACA,UAAU,EACR,SAAS,kEACX;GACA,QAAQ,CAAC;EACX;EACA,WAAW,SAAS;GAClB,OAAO,EACL,iBAAiB,MAAM;IACrB,cAAc,SAAS,IAAI;GAC7B,EACF;EACF;CACF,CEgByBC;CACvB,YDnCa,kBAAkB;EAC/B,MAAM;GACJ,MAAM;GACN,MAAM,EACJ,aAAa,4CACf;GACA,UAAU,EACR,SAAS,0DACX;GACA,QAAQ,CAAC;EACX;EACA,WAAW,SAAS;GAClB,OAAO,EACL,eAAe,MAAM;IACnB,cAAc,SAAS,IAAI;GAC7B,EACF;EACF;CACF,CCiBcC;AACd;;;ACpCA,MAAa,SAAS,mBAAmB;CACvC,MAAM,EACJ,MAAM,UACR;CACA;AACF,CAAC;AAED,MAAa,cAAc,OAAO,YAChC,OAAO,KAAK,KAAK,CAAC,CAAC,KAAK,aAAa,CAAC,WAAW,YAAY,OAAO,CAAC,CACvE;;;ACTA,IAAA,cAAe"}
1
+ {"version":3,"file":"index.js","names":["noAsyncAwait","noBitwiseNot","noClasses","noContinue","noDoWhile","noForLoop","noFunctionArguments","noGenerators","noInOperator","noInstanceof","noLabeledStatement","noNew","noStringConstructor","noThis","noThrow","noTry","noUpdateOperators","noWhile"],"sources":["../src/rules/types.ts","../src/rules/utils.ts","../src/rules/no-async-await.ts","../src/rules/no-bitwise-not.ts","../src/rules/no-classes.ts","../src/rules/no-continue.ts","../src/rules/no-do-while.ts","../src/rules/no-for-loop.ts","../src/rules/no-function-arguments.ts","../src/rules/no-generators.ts","../src/rules/no-in-operator.ts","../src/rules/no-instanceof.ts","../src/rules/no-labeled-statement.ts","../src/rules/no-new.ts","../src/rules/no-string-constructor.ts","../src/rules/no-this.ts","../src/rules/no-throw.ts","../src/rules/no-try.ts","../src/rules/no-update-operators.ts","../src/rules/no-while.ts","../src/rules/index.ts","../src/plugin.ts","../src/index.ts"],"sourcesContent":["import type { Rule } from \"eslint\";\n\nexport type AppsyncRuleModule = {\n meta: Rule.RuleMetaData;\n createOnce: (context: Rule.RuleContext) => Rule.RuleListener;\n};\n\nexport function defineAppsyncRule(rule: AppsyncRuleModule): AppsyncRuleModule {\n return rule;\n}\n","import type { Rule } from \"eslint\";\n\ntype NodeWithType = { type: string };\n\nexport function isIdentifier(\n node: NodeWithType | null | undefined,\n name: string,\n): boolean {\n return node?.type === \"Identifier\" && (node as { name: string }).name === name;\n}\n\nexport function reportDefault(\n context: Rule.RuleContext,\n node: Rule.Node,\n messageId = \"default\",\n): void {\n context.report({ node, messageId });\n}\n","import { defineAppsyncRule } from \"./types.js\";\nimport { reportDefault } from \"./utils.js\";\n\nexport default defineAppsyncRule({\n meta: {\n type: \"problem\",\n docs: {\n description:\n \"Disallow async functions and await expressions in AppSync resolvers\",\n },\n messages: {\n default:\n \"Promises and async/await are not supported in the AppSync JS runtime\",\n },\n schema: [],\n },\n createOnce(context) {\n const reportAsyncFunction = (node: { async?: boolean }) => {\n if (node.async) {\n reportDefault(context, node as never);\n }\n };\n\n return {\n AwaitExpression(node) {\n reportDefault(context, node);\n },\n FunctionDeclaration: reportAsyncFunction,\n FunctionExpression: reportAsyncFunction,\n ArrowFunctionExpression: reportAsyncFunction,\n };\n },\n});\n","import { defineAppsyncRule } from \"./types.js\";\nimport { reportDefault } from \"./utils.js\";\n\nexport default defineAppsyncRule({\n meta: {\n type: \"problem\",\n docs: {\n description: \"Disallow the bitwise NOT (~) operator in AppSync resolvers\",\n },\n messages: {\n default: \"The ~ operator is not supported in the AppSync JS runtime\",\n },\n schema: [],\n },\n createOnce(context) {\n return {\n UnaryExpression(node) {\n if (node.operator === \"~\") {\n reportDefault(context, node);\n }\n },\n };\n },\n});\n","import { defineAppsyncRule } from \"./types.js\";\nimport { reportDefault } from \"./utils.js\";\n\nexport default defineAppsyncRule({\n meta: {\n type: \"problem\",\n docs: {\n description: \"Disallow class declarations and expressions in AppSync resolvers\",\n },\n messages: {\n default: \"Classes are not supported in the AppSync JS runtime\",\n },\n schema: [],\n },\n createOnce(context) {\n return {\n ClassDeclaration(node) {\n reportDefault(context, node);\n },\n ClassExpression(node) {\n reportDefault(context, node);\n },\n };\n },\n});\n","import { defineAppsyncRule } from \"./types.js\";\nimport { reportDefault } from \"./utils.js\";\n\nexport default defineAppsyncRule({\n meta: {\n type: \"problem\",\n docs: {\n description: \"Disallow continue statements in AppSync resolvers\",\n },\n messages: {\n default: \"continue statements are not supported in the AppSync JS runtime\",\n },\n schema: [],\n },\n createOnce(context) {\n return {\n ContinueStatement(node) {\n reportDefault(context, node);\n },\n };\n },\n});\n","import { defineAppsyncRule } from \"./types.js\";\nimport { reportDefault } from \"./utils.js\";\n\nexport default defineAppsyncRule({\n meta: {\n type: \"problem\",\n docs: {\n description: \"Disallow do-while loops in AppSync resolvers\",\n },\n messages: {\n default: \"do-while loops are not supported in the AppSync JS runtime\",\n },\n schema: [],\n },\n createOnce(context) {\n return {\n DoWhileStatement(node) {\n reportDefault(context, node);\n },\n };\n },\n});\n","import { defineAppsyncRule } from \"./types.js\";\nimport { reportDefault } from \"./utils.js\";\n\nexport default defineAppsyncRule({\n meta: {\n type: \"problem\",\n docs: {\n description:\n \"Disallow C-style for loops in AppSync resolvers (for-in and for-of are allowed)\",\n },\n messages: {\n default:\n \"Only for-in and for-of loops are supported in the AppSync JS runtime\",\n },\n schema: [],\n },\n createOnce(context) {\n return {\n ForStatement(node) {\n reportDefault(context, node);\n },\n };\n },\n});\n","import type { Rule } from \"eslint\";\nimport { defineAppsyncRule } from \"./types.js\";\nimport { reportDefault } from \"./utils.js\";\n\nfunction definitionCreatesFunction(def: Rule.Scope.Definition): boolean {\n if (def.type === \"FunctionName\") {\n return true;\n }\n\n if (def.type === \"Variable\" && def.node.type === \"VariableDeclarator\") {\n const init = def.node.init;\n if (!init) {\n return false;\n }\n\n return (\n init.type === \"FunctionExpression\" ||\n init.type === \"ArrowFunctionExpression\"\n );\n }\n\n return false;\n}\n\nfunction isFunctionReference(\n node: Rule.Node,\n context: Rule.RuleContext,\n): boolean {\n if (node.type === \"FunctionExpression\") {\n return true;\n }\n\n if (node.type !== \"Identifier\") {\n return false;\n }\n\n let scope: Rule.Scope.Scope | null = context.sourceCode.getScope(node);\n while (scope) {\n const variable = scope.set.get(node.name);\n if (variable?.defs.some(definitionCreatesFunction)) {\n return true;\n }\n scope = scope.upper;\n }\n\n return false;\n}\n\nexport default defineAppsyncRule({\n meta: {\n type: \"problem\",\n docs: {\n description:\n \"Disallow passing function references as call arguments in AppSync resolvers\",\n },\n messages: {\n default:\n \"Passing a function reference as an argument is not supported in the AppSync JS runtime; use an inline arrow function instead\",\n },\n schema: [],\n },\n createOnce(context) {\n return {\n CallExpression(node) {\n for (const argument of node.arguments) {\n if (argument.type === \"SpreadElement\") {\n continue;\n }\n\n if (isFunctionReference(argument, context)) {\n reportDefault(context, argument);\n }\n }\n },\n };\n },\n});\n","import { defineAppsyncRule } from \"./types.js\";\nimport { reportDefault } from \"./utils.js\";\n\nexport default defineAppsyncRule({\n meta: {\n type: \"problem\",\n docs: {\n description: \"Disallow generator functions in AppSync resolvers\",\n },\n messages: {\n default: \"Generators are not supported in the AppSync JS runtime\",\n },\n schema: [],\n },\n createOnce(context) {\n const reportGenerator = (node: { generator?: boolean }) => {\n if (node.generator) {\n reportDefault(context, node as never);\n }\n };\n\n return {\n FunctionDeclaration: reportGenerator,\n FunctionExpression: reportGenerator,\n };\n },\n});\n","import { defineAppsyncRule } from \"./types.js\";\nimport { reportDefault } from \"./utils.js\";\n\nexport default defineAppsyncRule({\n meta: {\n type: \"problem\",\n docs: {\n description: \"Disallow the in operator in AppSync resolvers\",\n },\n messages: {\n default:\n \"The in operator is not supported in the AppSync JS runtime; use Object.hasOwn instead\",\n },\n schema: [],\n },\n createOnce(context) {\n return {\n BinaryExpression(node) {\n if (node.operator === \"in\") {\n reportDefault(context, node);\n }\n },\n };\n },\n});\n","import { defineAppsyncRule } from \"./types.js\";\nimport { reportDefault } from \"./utils.js\";\n\nexport default defineAppsyncRule({\n meta: {\n type: \"problem\",\n docs: {\n description: \"Disallow the instanceof operator in AppSync resolvers\",\n },\n messages: {\n default: \"The instanceof operator is not supported in the AppSync JS runtime\",\n },\n schema: [],\n },\n createOnce(context) {\n return {\n BinaryExpression(node) {\n if (node.operator === \"instanceof\") {\n reportDefault(context, node);\n }\n },\n };\n },\n});\n","import { defineAppsyncRule } from \"./types.js\";\nimport { reportDefault } from \"./utils.js\";\n\nexport default defineAppsyncRule({\n meta: {\n type: \"problem\",\n docs: {\n description: \"Disallow labeled statements in AppSync resolvers\",\n },\n messages: {\n default: \"Labeled statements are not supported in the AppSync JS runtime\",\n },\n schema: [],\n },\n createOnce(context) {\n return {\n LabeledStatement(node) {\n reportDefault(context, node);\n },\n };\n },\n});\n","import { defineAppsyncRule } from \"./types.js\";\nimport { reportDefault } from \"./utils.js\";\n\nexport default defineAppsyncRule({\n meta: {\n type: \"problem\",\n docs: {\n description: \"Disallow the new operator in AppSync resolvers\",\n },\n messages: {\n default: \"The new operator is not supported in the AppSync JS runtime\",\n },\n schema: [],\n },\n createOnce(context) {\n return {\n NewExpression(node) {\n reportDefault(context, node);\n },\n };\n },\n});\n","import { defineAppsyncRule } from \"./types.js\";\nimport { isIdentifier, reportDefault } from \"./utils.js\";\n\nexport default defineAppsyncRule({\n meta: {\n type: \"problem\",\n docs: {\n description:\n \"Disallow using String() to stringify values in AppSync resolvers\",\n },\n messages: {\n default:\n \"Do not use String() to stringify variables in the AppSync JS runtime\",\n },\n schema: [],\n },\n createOnce(context) {\n return {\n CallExpression(node) {\n if (isIdentifier(node.callee, \"String\")) {\n reportDefault(context, node);\n }\n },\n NewExpression(node) {\n if (isIdentifier(node.callee, \"String\")) {\n reportDefault(context, node);\n }\n },\n };\n },\n});\n","import { defineAppsyncRule } from \"./types.js\";\nimport { reportDefault } from \"./utils.js\";\n\nexport default defineAppsyncRule({\n meta: {\n type: \"problem\",\n docs: {\n description: \"Disallow this expressions in AppSync resolvers\",\n },\n messages: {\n default: \"this is not supported in the AppSync JS runtime\",\n },\n schema: [],\n },\n createOnce(context) {\n return {\n ThisExpression(node) {\n reportDefault(context, node);\n },\n };\n },\n});\n","import { defineAppsyncRule } from \"./types.js\";\nimport { reportDefault } from \"./utils.js\";\n\nexport default defineAppsyncRule({\n meta: {\n type: \"problem\",\n docs: {\n description: \"Disallow throw statements in AppSync resolvers\",\n },\n messages: {\n default: \"throw statements are not supported in the AppSync JS runtime\",\n },\n schema: [],\n },\n createOnce(context) {\n return {\n ThrowStatement(node) {\n reportDefault(context, node);\n },\n };\n },\n});\n","import { defineAppsyncRule } from \"./types.js\";\nimport { reportDefault } from \"./utils.js\";\n\nexport default defineAppsyncRule({\n meta: {\n type: \"problem\",\n docs: {\n description:\n \"Disallow try/catch/finally statements in AppSync resolvers\",\n },\n messages: {\n default:\n \"try/catch/finally statements are not supported in the AppSync JS runtime\",\n },\n schema: [],\n },\n createOnce(context) {\n return {\n TryStatement(node) {\n reportDefault(context, node);\n },\n };\n },\n});\n","import { defineAppsyncRule } from \"./types.js\";\nimport { reportDefault } from \"./utils.js\";\n\nexport default defineAppsyncRule({\n meta: {\n type: \"problem\",\n docs: {\n description: \"Disallow ++ and -- operators in AppSync resolvers\",\n },\n messages: {\n default: \"++ and -- operators are not supported in the AppSync JS runtime\",\n },\n schema: [],\n },\n createOnce(context) {\n return {\n UpdateExpression(node) {\n reportDefault(context, node);\n },\n };\n },\n});\n","import { defineAppsyncRule } from \"./types.js\";\nimport { reportDefault } from \"./utils.js\";\n\nexport default defineAppsyncRule({\n meta: {\n type: \"problem\",\n docs: {\n description: \"Disallow while loops in AppSync resolvers\",\n },\n messages: {\n default: \"while loops are not supported in the AppSync JS runtime\",\n },\n schema: [],\n },\n createOnce(context) {\n return {\n WhileStatement(node) {\n reportDefault(context, node);\n },\n };\n },\n});\n","import noAsyncAwait from \"./no-async-await.js\";\nimport noBitwiseNot from \"./no-bitwise-not.js\";\nimport noClasses from \"./no-classes.js\";\nimport noContinue from \"./no-continue.js\";\nimport noDoWhile from \"./no-do-while.js\";\nimport noForLoop from \"./no-for-loop.js\";\nimport noFunctionArguments from \"./no-function-arguments.js\";\nimport noGenerators from \"./no-generators.js\";\nimport noInOperator from \"./no-in-operator.js\";\nimport noInstanceof from \"./no-instanceof.js\";\nimport noLabeledStatement from \"./no-labeled-statement.js\";\nimport noNew from \"./no-new.js\";\nimport noStringConstructor from \"./no-string-constructor.js\";\nimport noThis from \"./no-this.js\";\nimport noThrow from \"./no-throw.js\";\nimport noTry from \"./no-try.js\";\nimport noUpdateOperators from \"./no-update-operators.js\";\nimport noWhile from \"./no-while.js\";\nimport type { AppsyncRuleModule } from \"./types.js\";\n\nconst rules = {\n \"no-async-await\": noAsyncAwait,\n \"no-bitwise-not\": noBitwiseNot,\n \"no-classes\": noClasses,\n \"no-continue\": noContinue,\n \"no-do-while\": noDoWhile,\n \"no-for-loop\": noForLoop,\n \"no-function-arguments\": noFunctionArguments,\n \"no-generators\": noGenerators,\n \"no-in-operator\": noInOperator,\n \"no-instanceof\": noInstanceof,\n \"no-labeled-statement\": noLabeledStatement,\n \"no-new\": noNew,\n \"no-string-constructor\": noStringConstructor,\n \"no-this\": noThis,\n \"no-throw\": noThrow,\n \"no-try\": noTry,\n \"no-update-operators\": noUpdateOperators,\n \"no-while\": noWhile,\n} satisfies Record<string, AppsyncRuleModule>;\n\nexport type AppsyncRuleName = keyof typeof rules;\n\nexport default rules;\n","import { eslintCompatPlugin } from \"@oxlint/plugins\";\nimport rules from \"./rules/index.js\";\n\nexport const plugin = eslintCompatPlugin({\n meta: {\n name: \"appsync\",\n },\n rules,\n});\n\nexport const recommended = Object.fromEntries(\n Object.keys(rules).map((ruleName) => [`appsync/${ruleName}`, \"error\"]),\n) as Record<`appsync/${keyof typeof rules}`, \"error\">;\n","import { plugin, recommended } from \"./plugin.js\";\n\nexport { plugin, recommended };\nexport default plugin;\n"],"mappings":";;AAOA,SAAgB,kBAAkB,MAA4C;CAC5E,OAAO;AACT;;;ACLA,SAAgB,aACd,MACA,MACS;CACT,OAAO,MAAM,SAAS,gBAAiB,KAA0B,SAAS;AAC5E;AAEA,SAAgB,cACd,SACA,MACA,YAAY,WACN;CACN,QAAQ,OAAO;EAAE;EAAM;CAAU,CAAC;AACpC;;;ACdA,IAAA,yBAAe,kBAAkB;CAC/B,MAAM;EACJ,MAAM;EACN,MAAM,EACJ,aACE,sEACJ;EACA,UAAU,EACR,SACE,uEACJ;EACA,QAAQ,CAAC;CACX;CACA,WAAW,SAAS;EAClB,MAAM,uBAAuB,SAA8B;GACzD,IAAI,KAAK,OACP,cAAc,SAAS,IAAa;EAExC;EAEA,OAAO;GACL,gBAAgB,MAAM;IACpB,cAAc,SAAS,IAAI;GAC7B;GACA,qBAAqB;GACrB,oBAAoB;GACpB,yBAAyB;EAC3B;CACF;AACF,CAAC;;;AC7BD,IAAA,yBAAe,kBAAkB;CAC/B,MAAM;EACJ,MAAM;EACN,MAAM,EACJ,aAAa,6DACf;EACA,UAAU,EACR,SAAS,4DACX;EACA,QAAQ,CAAC;CACX;CACA,WAAW,SAAS;EAClB,OAAO,EACL,gBAAgB,MAAM;GACpB,IAAI,KAAK,aAAa,KACpB,cAAc,SAAS,IAAI;EAE/B,EACF;CACF;AACF,CAAC;;;ACpBD,IAAA,qBAAe,kBAAkB;CAC/B,MAAM;EACJ,MAAM;EACN,MAAM,EACJ,a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EACF;EACF;CACF,CKaaC;CACX,YJhCa,kBAAkB;EAC/B,MAAM;GACJ,MAAM;GACN,MAAM,EACJ,aAAa,iDACf;GACA,UAAU,EACR,SAAS,+DACX;GACA,QAAQ,CAAC;EACX;EACA,WAAW,SAAS;GAClB,OAAO,EACL,eAAe,MAAM;IACnB,cAAc,SAAS,IAAI;GAC7B,EACF;EACF;CACF,CIccC;CACZ,UHjCa,kBAAkB;EAC/B,MAAM;GACJ,MAAM;GACN,MAAM,EACJ,aACE,6DACJ;GACA,UAAU,EACR,SACE,2EACJ;GACA,QAAQ,CAAC;EACX;EACA,WAAW,SAAS;GAClB,OAAO,EACL,aAAa,MAAM;IACjB,cAAc,SAAS,IAAI;GAC7B,EACF;EACF;CACF,CGaYC;CACV,uBFlCa,kBAAkB;EAC/B,MAAM;GACJ,MAAM;GACN,MAAM,EACJ,aAAa,oDACf;GACA,UAAU,EACR,SAAS,kEACX;GACA,QAAQ,CAAC;EACX;EACA,WAAW,SAAS;GAClB,OAAO,EACL,iBAAiB,MAAM;IACrB,cAAc,SAAS,IAAI;GAC7B,EACF;EACF;CACF,CEgByBC;CACvB,YDnCa,kBAAkB;EAC/B,MAAM;GACJ,MAAM;GACN,MAAM,EACJ,aAAa,4CACf;GACA,UAAU,EACR,SAAS,0DACX;GACA,QAAQ,CAAC;EACX;EACA,WAAW,SAAS;GAClB,OAAO,EACL,eAAe,MAAM;IACnB,cAAc,SAAS,IAAI;GAC7B,EACF;EACF;CACF,CCiBcC;AACd;;;ACpCA,MAAa,SAAS,mBAAmB;CACvC,MAAM,EACJ,MAAM,UACR;CACA;AACF,CAAC;AAED,MAAa,cAAc,OAAO,YAChC,OAAO,KAAK,KAAK,CAAC,CAAC,KAAK,aAAa,CAAC,WAAW,YAAY,OAAO,CAAC,CACvE;;;ACTA,IAAA,cAAe"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oxlint-appsync",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Oxlint plugin that enforces AWS AppSync JavaScript runtime restrictions",
5
5
  "type": "module",
6
6
  "license": "MIT",