oxlint-appsync 0.2.0 → 0.3.0
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 +40 -22
- package/dist/index.d.ts +24 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +61 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -22,11 +22,17 @@ Copy [oxlintrc.example.json](oxlintrc.example.json) to `.oxlintrc.json` in your
|
|
|
22
22
|
|
|
23
23
|
```ts
|
|
24
24
|
import { defineConfig } from "oxlint";
|
|
25
|
-
import plugin, { recommended } from "oxlint-appsync";
|
|
25
|
+
import plugin, { portable, recommended } from "oxlint-appsync";
|
|
26
26
|
|
|
27
27
|
export default defineConfig({
|
|
28
28
|
jsPlugins: [plugin],
|
|
29
29
|
rules: recommended,
|
|
30
|
+
overrides: [
|
|
31
|
+
{
|
|
32
|
+
files: ["src/shared/**/*.js"],
|
|
33
|
+
rules: portable,
|
|
34
|
+
},
|
|
35
|
+
],
|
|
30
36
|
});
|
|
31
37
|
```
|
|
32
38
|
|
|
@@ -42,38 +48,50 @@ The plugin uses Oxlint's `createOnce` API wrapped with `eslintCompatPlugin`, so
|
|
|
42
48
|
|
|
43
49
|
```js
|
|
44
50
|
import appsync from "oxlint-appsync";
|
|
45
|
-
import { recommended } from "oxlint-appsync";
|
|
51
|
+
import { portable, recommended } from "oxlint-appsync";
|
|
46
52
|
|
|
47
53
|
export default [
|
|
48
54
|
{
|
|
49
55
|
plugins: { appsync },
|
|
50
56
|
rules: recommended,
|
|
51
57
|
},
|
|
58
|
+
{
|
|
59
|
+
files: ["src/shared/**/*.js"],
|
|
60
|
+
rules: portable,
|
|
61
|
+
},
|
|
52
62
|
];
|
|
53
63
|
```
|
|
54
64
|
|
|
65
|
+
## Config presets
|
|
66
|
+
|
|
67
|
+
| Preset | Use for |
|
|
68
|
+
| ------------- | ----------------------------------------------------------------------------------------------------------------- |
|
|
69
|
+
| `recommended` | AppSync resolver entry points — all syntax rules enabled |
|
|
70
|
+
| `portable` | Shared modules that must run in AppSync and other runtimes (e.g. Lambda) — syntax rules plus `no-appsync-globals` |
|
|
71
|
+
|
|
55
72
|
## Rules
|
|
56
73
|
|
|
57
|
-
| Rule
|
|
58
|
-
|
|
|
59
|
-
| `appsync/no-global-constructor` | Disallow global constructor calls (`String()`, `Number()`, `Boolean()`, `Date()`, etc.)
|
|
60
|
-
| `appsync/no-async-await`
|
|
61
|
-
| `appsync/no-classes`
|
|
62
|
-
| `appsync/no-instanceof`
|
|
63
|
-
| `appsync/no-for-loop`
|
|
64
|
-
| `appsync/no-while`
|
|
65
|
-
| `appsync/no-do-while`
|
|
66
|
-
| `appsync/no-try`
|
|
67
|
-
| `appsync/no-throw`
|
|
68
|
-
| `appsync/no-continue`
|
|
69
|
-
| `appsync/no-labeled-statement`
|
|
70
|
-
| `appsync/no-new`
|
|
71
|
-
| `appsync/no-generators`
|
|
72
|
-
| `appsync/no-this`
|
|
73
|
-
| `appsync/no-update-operators`
|
|
74
|
-
| `appsync/no-bitwise-not`
|
|
75
|
-
| `appsync/no-in-operator`
|
|
76
|
-
| `appsync/no-function-arguments` | Disallow passing function references as call arguments (inline arrow callbacks are allowed)
|
|
74
|
+
| Rule | Description |
|
|
75
|
+
| ------------------------------- | ------------------------------------------------------------------------------------------------ |
|
|
76
|
+
| `appsync/no-global-constructor` | Disallow global constructor calls (`String()`, `Number()`, `Boolean()`, `Date()`, etc.) |
|
|
77
|
+
| `appsync/no-async-await` | Disallow `async`/`await` and async functions |
|
|
78
|
+
| `appsync/no-classes` | Disallow `class` declarations and expressions |
|
|
79
|
+
| `appsync/no-instanceof` | Disallow `instanceof` |
|
|
80
|
+
| `appsync/no-for-loop` | Disallow C-style `for` loops (`for-in` / `for-of` allowed) |
|
|
81
|
+
| `appsync/no-while` | Disallow `while` loops |
|
|
82
|
+
| `appsync/no-do-while` | Disallow `do-while` loops |
|
|
83
|
+
| `appsync/no-try` | Disallow `try`/`catch`/`finally` |
|
|
84
|
+
| `appsync/no-throw` | Disallow `throw` |
|
|
85
|
+
| `appsync/no-continue` | Disallow `continue` |
|
|
86
|
+
| `appsync/no-labeled-statement` | Disallow labeled statements |
|
|
87
|
+
| `appsync/no-new` | Disallow the `new` operator |
|
|
88
|
+
| `appsync/no-generators` | Disallow generator functions |
|
|
89
|
+
| `appsync/no-this` | Disallow `this` |
|
|
90
|
+
| `appsync/no-update-operators` | Disallow `++` and `--` |
|
|
91
|
+
| `appsync/no-bitwise-not` | Disallow bitwise NOT (`~`) |
|
|
92
|
+
| `appsync/no-in-operator` | Disallow `in` (use `Object.hasOwn`) |
|
|
93
|
+
| `appsync/no-function-arguments` | Disallow passing function references as call arguments (inline arrow callbacks are allowed) |
|
|
94
|
+
| `appsync/no-appsync-globals` | Disallow AppSync-only globals (`util`, `extensions`, `runtime`) — opt-in, included in `portable` |
|
|
77
95
|
|
|
78
96
|
## Migration
|
|
79
97
|
|
package/dist/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ type AppsyncRuleModule = {
|
|
|
9
9
|
//#endregion
|
|
10
10
|
//#region src/rules/index.d.ts
|
|
11
11
|
declare const rules: {
|
|
12
|
+
"no-appsync-globals": AppsyncRuleModule;
|
|
12
13
|
"no-async-await": AppsyncRuleModule;
|
|
13
14
|
"no-bitwise-not": AppsyncRuleModule;
|
|
14
15
|
"no-classes": AppsyncRuleModule;
|
|
@@ -31,9 +32,30 @@ declare const rules: {
|
|
|
31
32
|
//#endregion
|
|
32
33
|
//#region src/plugin.d.ts
|
|
33
34
|
declare const plugin: _oxlint_plugins0.Plugin;
|
|
34
|
-
declare const recommended: Record<`appsync/${keyof typeof rules}`, "error">;
|
|
35
|
+
declare const recommended: Record<`appsync/${Exclude<keyof typeof rules, "no-appsync-globals">}`, "error">;
|
|
36
|
+
declare const portable: {
|
|
37
|
+
readonly "appsync/no-appsync-globals": "error";
|
|
38
|
+
readonly "appsync/no-async-await": "error";
|
|
39
|
+
readonly "appsync/no-bitwise-not": "error";
|
|
40
|
+
readonly "appsync/no-classes": "error";
|
|
41
|
+
readonly "appsync/no-continue": "error";
|
|
42
|
+
readonly "appsync/no-do-while": "error";
|
|
43
|
+
readonly "appsync/no-for-loop": "error";
|
|
44
|
+
readonly "appsync/no-function-arguments": "error";
|
|
45
|
+
readonly "appsync/no-generators": "error";
|
|
46
|
+
readonly "appsync/no-in-operator": "error";
|
|
47
|
+
readonly "appsync/no-instanceof": "error";
|
|
48
|
+
readonly "appsync/no-labeled-statement": "error";
|
|
49
|
+
readonly "appsync/no-new": "error";
|
|
50
|
+
readonly "appsync/no-global-constructor": "error";
|
|
51
|
+
readonly "appsync/no-this": "error";
|
|
52
|
+
readonly "appsync/no-throw": "error";
|
|
53
|
+
readonly "appsync/no-try": "error";
|
|
54
|
+
readonly "appsync/no-update-operators": "error";
|
|
55
|
+
readonly "appsync/no-while": "error";
|
|
56
|
+
};
|
|
35
57
|
//# sourceMappingURL=plugin.d.ts.map
|
|
36
58
|
|
|
37
59
|
//#endregion
|
|
38
|
-
export { plugin as default, plugin, recommended };
|
|
60
|
+
export { plugin as default, plugin, portable, recommended };
|
|
39
61
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/rules/types.ts","../src/rules/index.ts","../src/plugin.ts"],"mappings":";;;;KAEY,iBAAA;QACJ,IAAA,CAAK;wBACW,IAAA,CAAK,gBAAgB,IAAA,CAAK;AAFlD,CAAA;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/rules/types.ts","../src/rules/index.ts","../src/plugin.ts"],"mappings":";;;;KAEY,iBAAA;QACJ,IAAA,CAAK;wBACW,IAAA,CAAK,gBAAgB,IAAA,CAAK;AAFlD,CAAA;;;cCmBM;;;EDnBM,gBAAA,mBAAiB;EAAA,YAAA,mBAAA;eAChB,mBAAA;eACgB,mBAAA;eAAqB,mBAAA;EAAY,uBAAA,mBAAA;;;;ECiBxD,sBAoBuC,mBAAA;EAAA,QAAA,mBAAA;;;;;;;;;;cCpChC,QAKX,gBAAA,CALiB;cAON,aAIR,kBAAkB,qBAAqB;cAE/B;EFhBD,SAAA,4BAAiB,EAAA,OAAA;EAAA,SAAA,wBAAA,EAAA,OAAA;WAChB,wBAAA,EAAA,OAAA;WACgB,oBAAA,EAAA,OAAA;WAAqB,qBAAA,EAAA,OAAA;EAAY,SAAA,qBAAA,EAAA,OAAA;;;;ECiBxD,SAoBuC,wBAAA,EAAA,OAAA;EAAA,SAAA,uBAAA,EAAA,OAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,62 @@
|
|
|
1
1
|
import { eslintCompatPlugin } from "@oxlint/plugins";
|
|
2
|
+
//#region src/rules/appsync-globals.ts
|
|
3
|
+
const APPSYNC_GLOBAL_NAMES = /* @__PURE__ */ new Set([
|
|
4
|
+
"util",
|
|
5
|
+
"extensions",
|
|
6
|
+
"runtime"
|
|
7
|
+
]);
|
|
8
|
+
//#endregion
|
|
2
9
|
//#region src/rules/types.ts
|
|
3
10
|
function defineAppsyncRule(rule) {
|
|
4
11
|
return rule;
|
|
5
12
|
}
|
|
6
13
|
//#endregion
|
|
14
|
+
//#region src/rules/no-appsync-globals.ts
|
|
15
|
+
function isBindingPosition(node) {
|
|
16
|
+
const parent = node.parent;
|
|
17
|
+
if (!parent) return false;
|
|
18
|
+
if (parent.type === "VariableDeclarator" || parent.type === "FunctionDeclaration" || parent.type === "FunctionExpression" || parent.type === "ClassDeclaration") return parent.id === node;
|
|
19
|
+
if (parent.type === "ImportSpecifier" || parent.type === "ImportDefaultSpecifier" || parent.type === "ImportNamespaceSpecifier") return parent.local === node;
|
|
20
|
+
if (parent.type === "CatchClause") return parent.param === node;
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
function isNonReferencePosition(node) {
|
|
24
|
+
const parent = node.parent;
|
|
25
|
+
if (!parent) return false;
|
|
26
|
+
if (parent.type === "Property" && parent.key === node && !parent.computed) return true;
|
|
27
|
+
if (parent.type === "MemberExpression" && parent.property === node && !parent.computed) return true;
|
|
28
|
+
return isBindingPosition(node);
|
|
29
|
+
}
|
|
30
|
+
function hasLocalBinding(node, context) {
|
|
31
|
+
let scope = context.sourceCode.getScope(node);
|
|
32
|
+
while (scope) {
|
|
33
|
+
const variable = scope.set.get(node.name);
|
|
34
|
+
if (variable && variable.defs.length > 0) return true;
|
|
35
|
+
scope = scope.upper;
|
|
36
|
+
}
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
var no_appsync_globals_default = defineAppsyncRule({
|
|
40
|
+
meta: {
|
|
41
|
+
type: "problem",
|
|
42
|
+
docs: { description: "Disallow AppSync-only globals in code that must run outside the AppSync runtime" },
|
|
43
|
+
messages: { default: "AppSync global `{{name}}` is not available outside the AppSync runtime" },
|
|
44
|
+
schema: []
|
|
45
|
+
},
|
|
46
|
+
createOnce(context) {
|
|
47
|
+
return { Identifier(node) {
|
|
48
|
+
if (!APPSYNC_GLOBAL_NAMES.has(node.name)) return;
|
|
49
|
+
if (isNonReferencePosition(node)) return;
|
|
50
|
+
if (hasLocalBinding(node, context)) return;
|
|
51
|
+
context.report({
|
|
52
|
+
node,
|
|
53
|
+
messageId: "default",
|
|
54
|
+
data: { name: node.name }
|
|
55
|
+
});
|
|
56
|
+
} };
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
//#endregion
|
|
7
60
|
//#region src/rules/utils.ts
|
|
8
61
|
function reportDefault(context, node, messageId = "default") {
|
|
9
62
|
context.report({
|
|
@@ -206,6 +259,7 @@ var no_global_constructor_default = defineAppsyncRule({
|
|
|
206
259
|
//#endregion
|
|
207
260
|
//#region src/rules/index.ts
|
|
208
261
|
const rules = {
|
|
262
|
+
"no-appsync-globals": no_appsync_globals_default,
|
|
209
263
|
"no-async-await": no_async_await_default,
|
|
210
264
|
"no-bitwise-not": no_bitwise_not_default,
|
|
211
265
|
"no-classes": no_classes_default,
|
|
@@ -335,15 +389,20 @@ const rules = {
|
|
|
335
389
|
};
|
|
336
390
|
//#endregion
|
|
337
391
|
//#region src/plugin.ts
|
|
392
|
+
const OPT_IN_RULES = /* @__PURE__ */ new Set(["no-appsync-globals"]);
|
|
338
393
|
const plugin = eslintCompatPlugin({
|
|
339
394
|
meta: { name: "appsync" },
|
|
340
395
|
rules
|
|
341
396
|
});
|
|
342
|
-
const recommended = Object.fromEntries(Object.keys(rules).map((ruleName) => [`appsync/${ruleName}`, "error"]));
|
|
397
|
+
const recommended = Object.fromEntries(Object.keys(rules).filter((ruleName) => !OPT_IN_RULES.has(ruleName)).map((ruleName) => [`appsync/${ruleName}`, "error"]));
|
|
398
|
+
const portable = {
|
|
399
|
+
...recommended,
|
|
400
|
+
"appsync/no-appsync-globals": "error"
|
|
401
|
+
};
|
|
343
402
|
//#endregion
|
|
344
403
|
//#region src/index.ts
|
|
345
404
|
var src_default = plugin;
|
|
346
405
|
//#endregion
|
|
347
|
-
export { src_default as default, plugin, recommended };
|
|
406
|
+
export { src_default as default, plugin, portable, recommended };
|
|
348
407
|
|
|
349
408
|
//# sourceMappingURL=index.js.map
|
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","noGlobalConstructor","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/global-constructors.ts","../src/rules/no-global-constructor.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-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","export const GLOBAL_CONSTRUCTOR_NAMES = new Set([\n \"String\",\n \"Boolean\",\n \"Number\",\n \"BigInt\",\n \"Symbol\",\n \"Date\",\n \"Object\",\n \"Array\",\n \"Function\",\n \"RegExp\",\n]);\n","import { defineAppsyncRule } from \"./types.js\";\nimport { GLOBAL_CONSTRUCTOR_NAMES } from \"./global-constructors.js\";\n\nexport default defineAppsyncRule({\n meta: {\n type: \"problem\",\n docs: {\n description:\n \"Disallow calling global constructor functions in AppSync resolvers\",\n },\n messages: {\n default:\n \"Do not use `{{name}}()` as a constructor in the AppSync JS runtime\",\n },\n schema: [],\n },\n createOnce(context) {\n return {\n CallExpression(node) {\n if (\n node.callee.type === \"Identifier\" &&\n GLOBAL_CONSTRUCTOR_NAMES.has(node.callee.name)\n ) {\n context.report({\n node,\n messageId: \"default\",\n data: { name: node.callee.name },\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 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 { 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 noGlobalConstructor from \"./no-global-constructor.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 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-global-constructor\": noGlobalConstructor,\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;;;ACEA,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,aAAa,mEACf;EACA,UAAU,EACR,SAAS,sDACX;EACA,QAAQ,CAAC;CACX;CACA,WAAW,SAAS;EAClB,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"index.js","names":["noAppsyncGlobals","noAsyncAwait","noBitwiseNot","noClasses","noContinue","noDoWhile","noForLoop","noFunctionArguments","noGenerators","noInOperator","noInstanceof","noLabeledStatement","noNew","noGlobalConstructor","noThis","noThrow","noTry","noUpdateOperators","noWhile"],"sources":["../src/rules/appsync-globals.ts","../src/rules/types.ts","../src/rules/no-appsync-globals.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/global-constructors.ts","../src/rules/no-global-constructor.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-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":["export const APPSYNC_GLOBAL_NAMES = new Set([\n \"util\",\n \"extensions\",\n \"runtime\",\n]);\n","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\";\nimport { APPSYNC_GLOBAL_NAMES } from \"./appsync-globals.js\";\nimport { defineAppsyncRule } from \"./types.js\";\n\nfunction isBindingPosition(node: Rule.Node): boolean {\n const parent = node.parent;\n if (!parent) {\n return false;\n }\n\n if (\n parent.type === \"VariableDeclarator\" ||\n parent.type === \"FunctionDeclaration\" ||\n parent.type === \"FunctionExpression\" ||\n parent.type === \"ClassDeclaration\"\n ) {\n return parent.id === node;\n }\n\n if (\n parent.type === \"ImportSpecifier\" ||\n parent.type === \"ImportDefaultSpecifier\" ||\n parent.type === \"ImportNamespaceSpecifier\"\n ) {\n return parent.local === node;\n }\n\n if (parent.type === \"CatchClause\") {\n return parent.param === node;\n }\n\n return false;\n}\n\nfunction isNonReferencePosition(node: Rule.Node): boolean {\n const parent = node.parent;\n if (!parent) {\n return false;\n }\n\n if (parent.type === \"Property\" && parent.key === node && !parent.computed) {\n return true;\n }\n\n if (\n parent.type === \"MemberExpression\" &&\n parent.property === node &&\n !parent.computed\n ) {\n return true;\n }\n\n return isBindingPosition(node);\n}\n\nfunction hasLocalBinding(\n node: Rule.Node & { type: \"Identifier\"; name: string },\n context: Rule.RuleContext,\n): boolean {\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 && variable.defs.length > 0) {\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 AppSync-only globals in code that must run outside the AppSync runtime\",\n },\n messages: {\n default:\n \"AppSync global `{{name}}` is not available outside the AppSync runtime\",\n },\n schema: [],\n },\n createOnce(context) {\n return {\n Identifier(node) {\n if (!APPSYNC_GLOBAL_NAMES.has(node.name)) {\n return;\n }\n\n if (isNonReferencePosition(node)) {\n return;\n }\n\n if (hasLocalBinding(node, context)) {\n return;\n }\n\n context.report({\n node,\n messageId: \"default\",\n data: { name: node.name },\n });\n },\n };\n },\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","export const GLOBAL_CONSTRUCTOR_NAMES = new Set([\n \"String\",\n \"Boolean\",\n \"Number\",\n \"BigInt\",\n \"Symbol\",\n \"Date\",\n \"Object\",\n \"Array\",\n \"Function\",\n \"RegExp\",\n]);\n","import { GLOBAL_CONSTRUCTOR_NAMES } from \"./global-constructors.js\";\nimport { defineAppsyncRule } from \"./types.js\";\n\nexport default defineAppsyncRule({\n meta: {\n type: \"problem\",\n docs: {\n description:\n \"Disallow calling global constructor functions in AppSync resolvers\",\n },\n messages: {\n default:\n \"Do not use `{{name}}()` as a constructor in the AppSync JS runtime\",\n },\n schema: [],\n },\n createOnce(context) {\n return {\n CallExpression(node) {\n if (\n node.callee.type === \"Identifier\" &&\n GLOBAL_CONSTRUCTOR_NAMES.has(node.callee.name)\n ) {\n context.report({\n node,\n messageId: \"default\",\n data: { name: node.callee.name },\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 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 { 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 noAppsyncGlobals from \"./no-appsync-globals.js\";\nimport 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 noGlobalConstructor from \"./no-global-constructor.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 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-appsync-globals\": noAppsyncGlobals,\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-global-constructor\": noGlobalConstructor,\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\nconst OPT_IN_RULES = new Set([\"no-appsync-globals\"]);\n\nexport const plugin = eslintCompatPlugin({\n meta: {\n name: \"appsync\",\n },\n rules,\n});\n\nexport const recommended = Object.fromEntries(\n Object.keys(rules)\n .filter((ruleName) => !OPT_IN_RULES.has(ruleName))\n .map((ruleName) => [`appsync/${ruleName}`, \"error\"]),\n) as Record<`appsync/${Exclude<keyof typeof rules, \"no-appsync-globals\">}`, \"error\">;\n\nexport const portable = {\n ...recommended,\n \"appsync/no-appsync-globals\": \"error\",\n} as const;\n","import { plugin, portable, recommended } from \"./plugin.js\";\n\nexport { plugin, portable, recommended };\nexport default plugin;\n"],"mappings":";;AAAA,MAAa,uCAAuB,IAAI,IAAI;CAC1C;CACA;CACA;AACF,CAAC;;;ACGD,SAAgB,kBAAkB,MAA4C;CAC5E,OAAO;AACT;;;ACLA,SAAS,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