atom.io 0.35.0 → 0.36.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/dist/eslint-plugin/index.d.ts +2 -18
- package/dist/eslint-plugin/index.d.ts.map +1 -1
- package/dist/eslint-plugin/index.js +4 -141
- package/dist/eslint-plugin/index.js.map +1 -1
- package/dist/internal/index.d.ts +100 -78
- package/dist/internal/index.d.ts.map +1 -1
- package/dist/internal/index.js +180 -163
- package/dist/internal/index.js.map +1 -1
- package/dist/introspection/index.d.ts +5 -6
- package/dist/introspection/index.d.ts.map +1 -1
- package/dist/introspection/index.js +2 -3
- package/dist/introspection/index.js.map +1 -1
- package/dist/json/index.d.ts +2 -10
- package/dist/json/index.d.ts.map +1 -1
- package/dist/json/index.js +1 -31
- package/dist/json/index.js.map +1 -1
- package/dist/main/index.d.ts +38 -39
- package/dist/main/index.d.ts.map +1 -1
- package/dist/main/index.js +15 -16
- package/dist/main/index.js.map +1 -1
- package/dist/react/index.d.ts +4 -4
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js.map +1 -1
- package/dist/react-devtools/index.js.map +1 -1
- package/dist/realtime/index.d.ts +4 -4
- package/dist/realtime/index.d.ts.map +1 -1
- package/dist/realtime/index.js +2 -6
- package/dist/realtime/index.js.map +1 -1
- package/dist/realtime-client/index.d.ts +7 -8
- package/dist/realtime-client/index.d.ts.map +1 -1
- package/dist/realtime-client/index.js +3 -4
- package/dist/realtime-client/index.js.map +1 -1
- package/dist/realtime-react/index.d.ts +4 -4
- package/dist/realtime-react/index.d.ts.map +1 -1
- package/dist/realtime-react/index.js.map +1 -1
- package/dist/realtime-server/index.d.ts +18 -18
- package/dist/realtime-server/index.d.ts.map +1 -1
- package/dist/realtime-server/index.js +5 -9
- package/dist/realtime-server/index.js.map +1 -1
- package/dist/transceivers/set-rtx/index.d.ts +9 -2
- package/dist/transceivers/set-rtx/index.d.ts.map +1 -1
- package/dist/transceivers/set-rtx/index.js +3 -0
- package/dist/transceivers/set-rtx/index.js.map +1 -1
- package/package.json +6 -6
- package/src/eslint-plugin/index.ts +0 -1
- package/src/eslint-plugin/rules/explicit-state-types.ts +8 -1
- package/src/eslint-plugin/rules/index.ts +0 -1
- package/src/internal/atom/create-regular-atom.ts +5 -5
- package/src/internal/atom/dispose-atom.ts +1 -0
- package/src/internal/atom/has-role.ts +12 -0
- package/src/internal/atom/index.ts +1 -0
- package/src/internal/caching.ts +38 -16
- package/src/internal/families/find-in-store.ts +4 -5
- package/src/internal/families/get-family-of-token.ts +4 -5
- package/src/internal/families/init-family-member.ts +3 -4
- package/src/internal/families/seek-in-store.ts +4 -5
- package/src/internal/get-state/read-or-compute-value.ts +37 -16
- package/src/internal/index.ts +19 -21
- package/src/internal/ingest-updates/ingest-creation-disposal.ts +18 -15
- package/src/internal/ingest-updates/ingest-selector-update.ts +9 -5
- package/src/internal/join/get-internal-relations-from-store.ts +2 -2
- package/src/internal/join/join-internal.ts +10 -18
- package/src/internal/molecule.ts +1 -0
- package/src/internal/mutable/create-mutable-atom-family.ts +40 -22
- package/src/internal/mutable/create-mutable-atom.ts +16 -12
- package/src/internal/mutable/get-json-family.ts +7 -6
- package/src/internal/mutable/get-json-token.ts +6 -13
- package/src/internal/mutable/get-update-family.ts +7 -8
- package/src/internal/mutable/get-update-token.ts +5 -9
- package/src/internal/mutable/tracker-family.ts +31 -38
- package/src/internal/mutable/tracker.ts +86 -104
- package/src/internal/mutable/transceiver.ts +37 -9
- package/src/internal/selector/create-readonly-held-selector.ts +2 -2
- package/src/internal/selector/create-readonly-pure-selector.ts +2 -2
- package/src/internal/selector/create-writable-held-selector.ts +3 -3
- package/src/internal/selector/create-writable-pure-selector.ts +3 -3
- package/src/internal/selector/dispose-selector.ts +9 -9
- package/src/internal/set-state/reset-atom-or-selector.ts +11 -4
- package/src/internal/set-state/set-atom.ts +15 -22
- package/src/internal/set-state/set-into-store.ts +5 -4
- package/src/internal/store/counterfeit.ts +3 -4
- package/src/internal/store/deposit.ts +8 -11
- package/src/internal/store/store.ts +7 -7
- package/src/internal/store/withdraw.ts +8 -12
- package/src/internal/subscribe/subscribe-in-store.ts +2 -2
- package/src/internal/subscribe/subscribe-to-transaction.ts +2 -2
- package/src/internal/timeline/create-timeline.ts +3 -3
- package/src/internal/transaction/act-upon-store.ts +2 -2
- package/src/internal/transaction/apply-transaction.ts +2 -2
- package/src/internal/transaction/build-transaction.ts +2 -2
- package/src/internal/transaction/create-transaction.ts +3 -3
- package/src/internal/transaction/index.ts +2 -2
- package/src/internal/transaction/is-root-store.ts +4 -2
- package/src/internal/utility-types.ts +1 -1
- package/src/introspection/attach-introspection-states.ts +3 -3
- package/src/introspection/attach-transaction-index.ts +4 -4
- package/src/introspection/attach-transaction-logs.ts +4 -4
- package/src/introspection/auditor.ts +3 -3
- package/src/json/index.ts +0 -2
- package/src/main/atom.ts +24 -36
- package/src/main/dispose-state.ts +6 -5
- package/src/main/find-state.ts +3 -4
- package/src/main/get-state.ts +6 -5
- package/src/main/join.ts +2 -2
- package/src/main/logger.ts +7 -7
- package/src/main/reset-state.ts +3 -3
- package/src/main/set-state.ts +3 -3
- package/src/main/subscribe.ts +3 -3
- package/src/main/tokens.ts +8 -14
- package/src/main/transaction.ts +17 -13
- package/src/main/validators.ts +1 -1
- package/src/react/use-json.ts +14 -24
- package/src/react-devtools/TransactionIndex.tsx +3 -3
- package/src/react-devtools/Updates.tsx +2 -2
- package/src/realtime/shared-room-store.ts +11 -22
- package/src/realtime-client/continuity/register-and-attempt-confirmed-update.ts +2 -2
- package/src/realtime-client/pull-mutable-atom-family-member.ts +8 -17
- package/src/realtime-client/pull-mutable-atom.ts +7 -14
- package/src/realtime-client/push-state.ts +6 -5
- package/src/realtime-client/server-action.ts +5 -4
- package/src/realtime-react/use-pull-mutable-atom.ts +3 -5
- package/src/realtime-react/use-pull-mutable-family-member.ts +3 -4
- package/src/realtime-react/use-server-action.ts +2 -2
- package/src/realtime-server/realtime-mutable-family-provider.ts +3 -4
- package/src/realtime-server/realtime-mutable-provider.ts +2 -3
- package/src/realtime-server/realtime-server-stores/server-room-external-actions.ts +6 -5
- package/src/realtime-server/realtime-server-stores/server-user-store.ts +8 -15
- package/src/transceivers/set-rtx/set-rtx.ts +14 -1
- package/src/eslint-plugin/rules/synchronous-selector-dependencies.ts +0 -140
- package/src/eslint-plugin/walk.ts +0 -81
- package/src/internal/set-state/copy-mutable-if-needed.ts +0 -27
- package/src/json/select-json-family.ts +0 -55
- package/src/json/select-json.ts +0 -19
|
@@ -1,26 +1,10 @@
|
|
|
1
1
|
import { ESLintUtils } from "@typescript-eslint/utils";
|
|
2
|
-
import { ESLint
|
|
3
|
-
import { RuleType } from "@eslint/core";
|
|
2
|
+
import { ESLint } from "eslint";
|
|
4
3
|
|
|
5
4
|
//#region src/eslint-plugin/rules/explicit-state-types.d.ts
|
|
6
5
|
declare const explicitStateTypes: ESLintUtils.RuleModule<`noTypeArgument`, [], unknown, ESLintUtils.RuleListener>;
|
|
7
|
-
//#endregion
|
|
8
|
-
//#region src/eslint-plugin/rules/synchronous-selector-dependencies.d.ts
|
|
9
|
-
declare const synchronousSelectorDependencies: {
|
|
10
|
-
meta: {
|
|
11
|
-
type: RuleType;
|
|
12
|
-
docs: {
|
|
13
|
-
description: string;
|
|
14
|
-
category: string;
|
|
15
|
-
recommended: boolean;
|
|
16
|
-
url: string;
|
|
17
|
-
};
|
|
18
|
-
schema: never[];
|
|
19
|
-
};
|
|
20
|
-
create(context: Rule.RuleContext): Rule.NodeListener;
|
|
21
|
-
};
|
|
22
6
|
declare namespace index_d_exports {
|
|
23
|
-
export { explicitStateTypes
|
|
7
|
+
export { explicitStateTypes };
|
|
24
8
|
}
|
|
25
9
|
//#endregion
|
|
26
10
|
//#region src/eslint-plugin/index.d.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":["explicitStateTypes: ESLintUtils.RuleModule<\n\t`noTypeArgument`,\n\t[],\n\tunknown,\n\tESLintUtils.RuleListener\n>","
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":["explicitStateTypes: ESLintUtils.RuleModule<\n\t`noTypeArgument`,\n\t[],\n\tunknown,\n\tESLintUtils.RuleListener\n>","plugin: ESLint.Plugin"],"sources":["../../src/eslint-plugin/rules/explicit-state-types.ts","../../src/eslint-plugin/rules/index.ts","../../src/eslint-plugin/index.ts"],"sourcesContent":[],"mappings":";;;;cAgBaA,oBAAoB,WAAA,CAAY,0CAI5C,WAAA,CAAY;;;;;;cEdPC,QAAQ,MAAA,CAAO"}
|
|
@@ -6,6 +6,8 @@ const createRule = ESLintUtils.RuleCreator((name) => `https://atom.io.fyi/docs/e
|
|
|
6
6
|
const STATE_FUNCTIONS = [
|
|
7
7
|
`atom`,
|
|
8
8
|
`atomFamily`,
|
|
9
|
+
`mutableAtom`,
|
|
10
|
+
`mutableAtomFamily`,
|
|
9
11
|
`selector`,
|
|
10
12
|
`selectorFamily`
|
|
11
13
|
];
|
|
@@ -41,153 +43,14 @@ const explicitStateTypes = createRule({
|
|
|
41
43
|
}
|
|
42
44
|
});
|
|
43
45
|
|
|
44
|
-
//#endregion
|
|
45
|
-
//#region src/eslint-plugin/walk.ts
|
|
46
|
-
function walk(node, callback, depth = 0) {
|
|
47
|
-
callback(node, depth);
|
|
48
|
-
switch (node.type) {
|
|
49
|
-
case `AwaitExpression`:
|
|
50
|
-
walk(node.argument, callback, depth + 1);
|
|
51
|
-
break;
|
|
52
|
-
case `FunctionExpression`:
|
|
53
|
-
case `ArrowFunctionExpression`:
|
|
54
|
-
for (const param of node.params) walk(param, callback, depth + 1);
|
|
55
|
-
walk(node.body, callback, depth + 1);
|
|
56
|
-
break;
|
|
57
|
-
case `BlockStatement`:
|
|
58
|
-
for (const statement of node.body) walk(statement, callback, depth + 1);
|
|
59
|
-
break;
|
|
60
|
-
case `IfStatement`:
|
|
61
|
-
walk(node.test, callback, depth);
|
|
62
|
-
walk(node.consequent, callback, depth);
|
|
63
|
-
if (node.alternate) walk(node.alternate, callback, depth);
|
|
64
|
-
break;
|
|
65
|
-
case `SwitchStatement`:
|
|
66
|
-
walk(node.discriminant, callback, depth + 1);
|
|
67
|
-
for (const caseOrDefault of node.cases) walk(caseOrDefault, callback, depth);
|
|
68
|
-
break;
|
|
69
|
-
case `ReturnStatement`:
|
|
70
|
-
if (node.argument) walk(node.argument, callback, depth);
|
|
71
|
-
break;
|
|
72
|
-
case `SwitchCase`:
|
|
73
|
-
if (node.test) walk(node.test, callback, depth);
|
|
74
|
-
for (const statement of node.consequent) walk(statement, callback, depth);
|
|
75
|
-
break;
|
|
76
|
-
case `VariableDeclaration`:
|
|
77
|
-
for (const declaration of node.declarations) {
|
|
78
|
-
walk(declaration, callback, depth);
|
|
79
|
-
if (declaration.init) walk(declaration.init, callback, depth);
|
|
80
|
-
}
|
|
81
|
-
break;
|
|
82
|
-
case `BinaryExpression`:
|
|
83
|
-
walk(node.left, callback, depth);
|
|
84
|
-
walk(node.right, callback, depth);
|
|
85
|
-
break;
|
|
86
|
-
case `ConditionalExpression`:
|
|
87
|
-
walk(node.test, callback, depth + 1);
|
|
88
|
-
walk(node.consequent, callback, depth + 1);
|
|
89
|
-
walk(node.alternate, callback, depth + 1);
|
|
90
|
-
break;
|
|
91
|
-
case `MemberExpression`:
|
|
92
|
-
walk(node.object, callback, depth);
|
|
93
|
-
walk(node.property, callback, depth);
|
|
94
|
-
break;
|
|
95
|
-
case `CallExpression`:
|
|
96
|
-
walk(node.callee, callback, depth);
|
|
97
|
-
for (const argument of node.arguments) walk(argument, callback, depth);
|
|
98
|
-
break;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
//#endregion
|
|
103
|
-
//#region src/eslint-plugin/rules/synchronous-selector-dependencies.ts
|
|
104
|
-
const synchronousSelectorDependencies = {
|
|
105
|
-
meta: {
|
|
106
|
-
type: `problem`,
|
|
107
|
-
docs: {
|
|
108
|
-
description: `disallow await before calling get on the parameter's get method inside selector`,
|
|
109
|
-
category: `Possible Errors`,
|
|
110
|
-
recommended: false,
|
|
111
|
-
url: ``
|
|
112
|
-
},
|
|
113
|
-
schema: []
|
|
114
|
-
},
|
|
115
|
-
create(context) {
|
|
116
|
-
return { CallExpression(node) {
|
|
117
|
-
let selectorComputation;
|
|
118
|
-
if (`name` in node.callee && node.callee.name === `selectorFamily`) {
|
|
119
|
-
if (node.arguments[0].type === `ObjectExpression`) {
|
|
120
|
-
const selectorLookupProperty = node.arguments[0].properties.find((prop) => {
|
|
121
|
-
return `key` in prop && `name` in prop.key && prop.key.name === `get`;
|
|
122
|
-
});
|
|
123
|
-
const selectorLookup = selectorLookupProperty?.value;
|
|
124
|
-
if (selectorLookup?.type === `FunctionExpression` || selectorLookup?.type === `ArrowFunctionExpression`) {
|
|
125
|
-
if (selectorLookup.body.type === `BlockStatement`) {
|
|
126
|
-
for (const statement of selectorLookup.body.body) if (statement.type === `ReturnStatement` && statement.argument) selectorComputation = statement.argument;
|
|
127
|
-
} else if (selectorLookup.body.type === `FunctionExpression` || selectorLookup.body.type === `ArrowFunctionExpression`) selectorComputation = selectorLookup.body;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
if (`name` in node.callee && node.callee.name === `selector`) {
|
|
132
|
-
if (node.arguments[0].type === `ObjectExpression`) {
|
|
133
|
-
const selectorComputationProperty = node.arguments[0].properties.find((prop) => {
|
|
134
|
-
return `key` in prop && `name` in prop.key && prop.key.name === `get`;
|
|
135
|
-
});
|
|
136
|
-
selectorComputation = selectorComputationProperty?.value;
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
if (selectorComputation?.type === `FunctionExpression` || selectorComputation?.type === `ArrowFunctionExpression`) {
|
|
140
|
-
const nonDestructuredTransactorsName = selectorComputation.params[0] && `name` in selectorComputation.params[0] ? selectorComputation.params[0].name : void 0;
|
|
141
|
-
let awaited;
|
|
142
|
-
let awaitNode;
|
|
143
|
-
walk(selectorComputation, (n, depth) => {
|
|
144
|
-
if (typeof awaited === `number`) {
|
|
145
|
-
if (awaited > depth) {
|
|
146
|
-
awaited = void 0;
|
|
147
|
-
awaitNode = void 0;
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
switch (n.type) {
|
|
151
|
-
case `AwaitExpression`:
|
|
152
|
-
awaited = depth;
|
|
153
|
-
awaitNode = n;
|
|
154
|
-
break;
|
|
155
|
-
case `CallExpression`: if (awaitNode) {
|
|
156
|
-
let willReport = false;
|
|
157
|
-
switch (n.callee.type) {
|
|
158
|
-
case `MemberExpression`:
|
|
159
|
-
if (n.callee.object.type === `Identifier` && n.callee.object.name === nonDestructuredTransactorsName && n.callee.property.type === `Identifier` && n.callee.property.name === `get`) willReport = true;
|
|
160
|
-
break;
|
|
161
|
-
case `Identifier`:
|
|
162
|
-
if (n.callee.name === `get`) willReport = true;
|
|
163
|
-
break;
|
|
164
|
-
}
|
|
165
|
-
if (willReport) context.report({
|
|
166
|
-
node: awaitNode,
|
|
167
|
-
message: `Using await before calling the 'get' transactor is not allowed.`
|
|
168
|
-
});
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
});
|
|
172
|
-
}
|
|
173
|
-
} };
|
|
174
|
-
}
|
|
175
|
-
};
|
|
176
|
-
|
|
177
46
|
//#endregion
|
|
178
47
|
//#region src/eslint-plugin/rules/index.ts
|
|
179
48
|
var rules_exports = {};
|
|
180
|
-
__export(rules_exports, {
|
|
181
|
-
explicitStateTypes: () => explicitStateTypes,
|
|
182
|
-
synchronousSelectorDependencies: () => synchronousSelectorDependencies
|
|
183
|
-
});
|
|
49
|
+
__export(rules_exports, { explicitStateTypes: () => explicitStateTypes });
|
|
184
50
|
|
|
185
51
|
//#endregion
|
|
186
52
|
//#region src/eslint-plugin/index.ts
|
|
187
|
-
const plugin = { rules: {
|
|
188
|
-
"explicit-state-types": explicitStateTypes,
|
|
189
|
-
"synchronous-selector-dependencies": synchronousSelectorDependencies
|
|
190
|
-
} };
|
|
53
|
+
const plugin = { rules: { "explicit-state-types": explicitStateTypes } };
|
|
191
54
|
var eslint_plugin_default = plugin;
|
|
192
55
|
|
|
193
56
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["explicitStateTypes: ESLintUtils.RuleModule<\n\t`noTypeArgument`,\n\t[],\n\tunknown,\n\tESLintUtils.RuleListener\n>","node: ESTree.Node","callback: (node: ESTree.Node, depth: number) => void","synchronousSelectorDependencies: {\n\tmeta: {\n\t\ttype: RuleType\n\t\tdocs: {\n\t\t\tdescription: string\n\t\t\tcategory: string\n\t\t\trecommended: boolean\n\t\t\turl: string\n\t\t}\n\t\tschema: never[]\n\t}\n\tcreate(context: Rule.RuleContext): Rule.NodeListener\n}","selectorComputation: ESTree.Node | undefined","awaited: number | undefined","awaitNode: ESTree.AwaitExpression | undefined","plugin: ESLint.Plugin"],"sources":["../../src/eslint-plugin/rules/explicit-state-types.ts","../../src/eslint-plugin/walk.ts","../../src/eslint-plugin/rules/synchronous-selector-dependencies.ts","../../src/eslint-plugin/rules/index.ts","../../src/eslint-plugin/index.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/switch-exhaustiveness-check */\nimport { ESLintUtils } from \"@typescript-eslint/utils\"\n\nconst createRule = ESLintUtils.RuleCreator(\n\t(name) => `https://atom.io.fyi/docs/eslint-plugin#${name}`,\n)\n\nconst STATE_FUNCTIONS = [`atom`, `atomFamily`, `selector`, `selectorFamily`]\n\nexport const explicitStateTypes: ESLintUtils.RuleModule<\n\t`noTypeArgument`,\n\t[],\n\tunknown,\n\tESLintUtils.RuleListener\n> = createRule({\n\tname: `explicit-state-types`,\n\tmeta: {\n\t\ttype: `problem`,\n\t\tdocs: {\n\t\t\tdescription: `State declarations must have generic type arguments directly passed to them`,\n\t\t},\n\t\tmessages: {\n\t\t\tnoTypeArgument: `State declarations must have generic type arguments directly passed to them.`,\n\t\t},\n\t\tschema: [], // no options\n\t},\n\tdefaultOptions: [],\n\tcreate(context) {\n\t\treturn {\n\t\t\tCallExpression(node) {\n\t\t\t\tconst { callee } = node\n\t\t\t\tswitch (callee.type) {\n\t\t\t\t\tcase `Identifier`: {\n\t\t\t\t\t\tif (STATE_FUNCTIONS.includes(callee.name)) {\n\t\t\t\t\t\t\tif (!node.typeArguments) {\n\t\t\t\t\t\t\t\tcontext.report({\n\t\t\t\t\t\t\t\t\tnode,\n\t\t\t\t\t\t\t\t\tmessageId: `noTypeArgument`,\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\tcase `MemberExpression`: {\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tcallee.property.type === `Identifier` &&\n\t\t\t\t\t\t\tSTATE_FUNCTIONS.includes(callee.property.name)\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tif (!node.typeArguments) {\n\t\t\t\t\t\t\t\tcontext.report({\n\t\t\t\t\t\t\t\t\tnode,\n\t\t\t\t\t\t\t\t\tmessageId: `noTypeArgument`,\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t}\n\t},\n})\n","/* eslint-disable @typescript-eslint/switch-exhaustiveness-check */\nimport type * as ESTree from \"estree\"\n\nexport function walk(\n\tnode: ESTree.Node,\n\tcallback: (node: ESTree.Node, depth: number) => void,\n\tdepth = 0,\n): void {\n\tcallback(node, depth)\n\n\tswitch (node.type) {\n\t\tcase `AwaitExpression`:\n\t\t\twalk(node.argument, callback, depth + 1)\n\t\t\tbreak\n\t\tcase `FunctionExpression`:\n\t\tcase `ArrowFunctionExpression`:\n\t\t\tfor (const param of node.params) {\n\t\t\t\twalk(param, callback, depth + 1)\n\t\t\t}\n\t\t\twalk(node.body, callback, depth + 1)\n\t\t\tbreak\n\t\tcase `BlockStatement`:\n\t\t\tfor (const statement of node.body) {\n\t\t\t\twalk(statement, callback, depth + 1)\n\t\t\t}\n\t\t\tbreak\n\t\tcase `IfStatement`:\n\t\t\twalk(node.test, callback, depth)\n\t\t\twalk(node.consequent, callback, depth)\n\t\t\tif (node.alternate) {\n\t\t\t\twalk(node.alternate, callback, depth)\n\t\t\t}\n\t\t\tbreak\n\t\tcase `SwitchStatement`:\n\t\t\twalk(node.discriminant, callback, depth + 1)\n\t\t\tfor (const caseOrDefault of node.cases) {\n\t\t\t\twalk(caseOrDefault, callback, depth)\n\t\t\t}\n\t\t\tbreak\n\t\tcase `ReturnStatement`:\n\t\t\tif (node.argument) {\n\t\t\t\twalk(node.argument, callback, depth)\n\t\t\t}\n\t\t\tbreak\n\t\tcase `SwitchCase`:\n\t\t\tif (node.test) {\n\t\t\t\twalk(node.test, callback, depth)\n\t\t\t}\n\t\t\tfor (const statement of node.consequent) {\n\t\t\t\twalk(statement, callback, depth)\n\t\t\t}\n\t\t\tbreak\n\t\tcase `VariableDeclaration`:\n\t\t\tfor (const declaration of node.declarations) {\n\t\t\t\twalk(declaration, callback, depth)\n\t\t\t\tif (declaration.init) {\n\t\t\t\t\twalk(declaration.init, callback, depth)\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak\n\t\tcase `BinaryExpression`:\n\t\t\twalk(node.left, callback, depth)\n\t\t\twalk(node.right, callback, depth)\n\t\t\tbreak\n\t\tcase `ConditionalExpression`:\n\t\t\twalk(node.test, callback, depth + 1)\n\t\t\twalk(node.consequent, callback, depth + 1)\n\t\t\twalk(node.alternate, callback, depth + 1)\n\t\t\tbreak\n\t\tcase `MemberExpression`:\n\t\t\twalk(node.object, callback, depth)\n\t\t\twalk(node.property, callback, depth)\n\t\t\tbreak\n\t\tcase `CallExpression`:\n\t\t\twalk(node.callee, callback, depth)\n\t\t\tfor (const argument of node.arguments) {\n\t\t\t\twalk(argument, callback, depth)\n\t\t\t}\n\t\t\tbreak\n\t}\n}\n","/* eslint-disable @typescript-eslint/switch-exhaustiveness-check */\nimport type { RuleType } from \"@eslint/core\"\nimport type { Rule } from \"eslint\"\nimport type * as ESTree from \"estree\"\n\nimport { walk } from \"../walk\"\n\nexport const synchronousSelectorDependencies: {\n\tmeta: {\n\t\ttype: RuleType\n\t\tdocs: {\n\t\t\tdescription: string\n\t\t\tcategory: string\n\t\t\trecommended: boolean\n\t\t\turl: string\n\t\t}\n\t\tschema: never[]\n\t}\n\tcreate(context: Rule.RuleContext): Rule.NodeListener\n} = {\n\tmeta: {\n\t\ttype: `problem`,\n\t\tdocs: {\n\t\t\tdescription: `disallow await before calling get on the parameter's get method inside selector`,\n\t\t\tcategory: `Possible Errors`,\n\t\t\trecommended: false,\n\t\t\turl: ``, // URL to documentation page for this rule\n\t\t},\n\t\tschema: [], // no options\n\t},\n\tcreate(context) {\n\t\treturn {\n\t\t\tCallExpression(node) {\n\t\t\t\tlet selectorComputation: ESTree.Node | undefined\n\t\t\t\tif (`name` in node.callee && node.callee.name === `selectorFamily`) {\n\t\t\t\t\tif (node.arguments[0].type === `ObjectExpression`) {\n\t\t\t\t\t\tconst selectorLookupProperty = node.arguments[0].properties.find(\n\t\t\t\t\t\t\t(prop): prop is ESTree.Property => {\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t`key` in prop && `name` in prop.key && prop.key.name === `get`\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t)\n\t\t\t\t\t\tconst selectorLookup = selectorLookupProperty?.value\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tselectorLookup?.type === `FunctionExpression` ||\n\t\t\t\t\t\t\tselectorLookup?.type === `ArrowFunctionExpression`\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tif (selectorLookup.body.type === `BlockStatement`) {\n\t\t\t\t\t\t\t\tfor (const statement of selectorLookup.body.body) {\n\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\tstatement.type === `ReturnStatement` &&\n\t\t\t\t\t\t\t\t\t\tstatement.argument\n\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\tselectorComputation = statement.argument\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if (\n\t\t\t\t\t\t\t\tselectorLookup.body.type === `FunctionExpression` ||\n\t\t\t\t\t\t\t\tselectorLookup.body.type === `ArrowFunctionExpression`\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tselectorComputation = selectorLookup.body\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (`name` in node.callee && node.callee.name === `selector`) {\n\t\t\t\t\tif (node.arguments[0].type === `ObjectExpression`) {\n\t\t\t\t\t\tconst selectorComputationProperty =\n\t\t\t\t\t\t\tnode.arguments[0].properties.find(\n\t\t\t\t\t\t\t\t(prop): prop is ESTree.Property => {\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t`key` in prop &&\n\t\t\t\t\t\t\t\t\t\t`name` in prop.key &&\n\t\t\t\t\t\t\t\t\t\tprop.key.name === `get`\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\tselectorComputation = selectorComputationProperty?.value\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (\n\t\t\t\t\tselectorComputation?.type === `FunctionExpression` ||\n\t\t\t\t\tselectorComputation?.type === `ArrowFunctionExpression`\n\t\t\t\t) {\n\t\t\t\t\tconst nonDestructuredTransactorsName =\n\t\t\t\t\t\tselectorComputation.params[0] &&\n\t\t\t\t\t\t`name` in selectorComputation.params[0]\n\t\t\t\t\t\t\t? selectorComputation.params[0].name\n\t\t\t\t\t\t\t: undefined\n\t\t\t\t\tlet awaited: number | undefined\n\t\t\t\t\tlet awaitNode: ESTree.AwaitExpression | undefined\n\t\t\t\t\twalk(selectorComputation, (n, depth) => {\n\t\t\t\t\t\t// console.log(`${`\\t`.repeat(depth)}${n.type} ${n.name ?? ``}`)\n\t\t\t\t\t\tif (typeof awaited === `number`) {\n\t\t\t\t\t\t\tif (awaited > depth) {\n\t\t\t\t\t\t\t\tawaited = undefined\n\t\t\t\t\t\t\t\tawaitNode = undefined\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tswitch (n.type) {\n\t\t\t\t\t\t\tcase `AwaitExpression`:\n\t\t\t\t\t\t\t\tawaited = depth\n\t\t\t\t\t\t\t\tawaitNode = n\n\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\tcase `CallExpression`:\n\t\t\t\t\t\t\t\tif (awaitNode) {\n\t\t\t\t\t\t\t\t\tlet willReport = false\n\t\t\t\t\t\t\t\t\tswitch (n.callee.type) {\n\t\t\t\t\t\t\t\t\t\tcase `MemberExpression`:\n\t\t\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\t\t\tn.callee.object.type === `Identifier` &&\n\t\t\t\t\t\t\t\t\t\t\t\tn.callee.object.name ===\n\t\t\t\t\t\t\t\t\t\t\t\t\tnonDestructuredTransactorsName &&\n\t\t\t\t\t\t\t\t\t\t\t\tn.callee.property.type === `Identifier` &&\n\t\t\t\t\t\t\t\t\t\t\t\tn.callee.property.name === `get`\n\t\t\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\t\t\twillReport = true\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t\tcase `Identifier`:\n\t\t\t\t\t\t\t\t\t\t\tif (n.callee.name === `get`) {\n\t\t\t\t\t\t\t\t\t\t\t\twillReport = true\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (willReport) {\n\t\t\t\t\t\t\t\t\t\tcontext.report({\n\t\t\t\t\t\t\t\t\t\t\tnode: awaitNode,\n\t\t\t\t\t\t\t\t\t\t\tmessage: `Using await before calling the 'get' transactor is not allowed.`,\n\t\t\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t},\n\t\t}\n\t},\n} satisfies Rule.RuleModule\n","export * from \"./explicit-state-types\"\nexport * from \"./synchronous-selector-dependencies\"\n","import type { ESLint } from \"eslint\"\n\nimport * as Rules from \"./rules\"\n\nexport { Rules }\n\nconst plugin: ESLint.Plugin = {\n\trules: {\n\t\t\"explicit-state-types\": Rules.explicitStateTypes as any,\n\t\t\"synchronous-selector-dependencies\": Rules.synchronousSelectorDependencies,\n\t},\n} satisfies ESLint.Plugin\n\nexport default plugin\n"],"mappings":";;;;AAGA,MAAM,aAAa,YAAY,YAC9B,CAAC,SAAS,CAAC,uCAAuC,EAAE,MAAM,CAC1D;AAED,MAAM,kBAAkB;CAAC,CAAC,IAAI,CAAC;CAAE,CAAC,UAAU,CAAC;CAAE,CAAC,QAAQ,CAAC;CAAE,CAAC,cAAc,CAAC;AAAC;AAE5E,MAAaA,qBAKT,WAAW;CACd,MAAM,CAAC,oBAAoB,CAAC;CAC5B,MAAM;EACL,MAAM,CAAC,OAAO,CAAC;EACf,MAAM,EACL,aAAa,CAAC,2EAA2E,CAAC,CAC1F;EACD,UAAU,EACT,gBAAgB,CAAC,4EAA4E,CAAC,CAC9F;EACD,QAAQ,CAAE;CACV;CACD,gBAAgB,CAAE;CAClB,OAAO,SAAS;AACf,SAAO,EACN,eAAe,MAAM;GACpB,MAAM,EAAE,QAAQ,GAAG;AACnB,WAAQ,OAAO,MAAf;IACC,KAAK,CAAC,UAAU,CAAC;AAChB,SAAI,gBAAgB,SAAS,OAAO,KAAK,EACxC;UAAI,CAAC,KAAK,eACT,QAAQ,OAAO;OACd;OACA,WAAW,CAAC,cAAc,CAAC;MAC3B,EAAC;KACF;AAEF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C,KAAK,CAAC,eAAe,CAAC;OACrB,UAAU;OACV,YAAY;AACZ;MACD,KAAK,CAAC,cAAc,CAAC,CACpB,KAAI,WAAW;OACd,IAAI,aAAa;AACjB,eAAQ,EAAE,OAAO,MAAjB;QACC,KAAK,CAAC,gBAAgB,CAAC;AACtB,aACC,EAAE,OAAO,OAAO,SAAS,CAAC,UAAU,CAAC,IACrC,EAAE,OAAO,OAAO,SACf,kCACD,EAAE,OAAO,SAAS,SAAS,CAAC,UAAU,CAAC,IACvC,EAAE,OAAO,SAAS,SAAS,CAAC,GAAG,CAAC,EAEhC,aAAa;AAEd;QACD,KAAK,CAAC,UAAU,CAAC;AAChB,aAAI,EAAE,OAAO,SAAS,CAAC,GAAG,CAAC,EAC1B,aAAa;AAEd;OACD;AACD,WAAI,YACH,QAAQ,OAAO;QACd,MAAM;QACN,SAAS,CAAC,+DAA+D,CAAC;OAC1E,EAAC;MAEH;KACF;IACD,EAAC;GACF;EACD,EACD;CACD;AACD;;;;;;;;;;;;AErID,MAAMC,SAAwB,EAC7B,OAAO;CACN;CACA;AACA,EACD;AAED,4BAAe"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["explicitStateTypes: ESLintUtils.RuleModule<\n\t`noTypeArgument`,\n\t[],\n\tunknown,\n\tESLintUtils.RuleListener\n>","plugin: ESLint.Plugin"],"sources":["../../src/eslint-plugin/rules/explicit-state-types.ts","../../src/eslint-plugin/rules/index.ts","../../src/eslint-plugin/index.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/switch-exhaustiveness-check */\nimport { ESLintUtils } from \"@typescript-eslint/utils\"\n\nconst createRule = ESLintUtils.RuleCreator(\n\t(name) => `https://atom.io.fyi/docs/eslint-plugin#${name}`,\n)\n\nconst STATE_FUNCTIONS = [\n\t`atom`,\n\t`atomFamily`,\n\t`mutableAtom`,\n\t`mutableAtomFamily`,\n\t`selector`,\n\t`selectorFamily`,\n]\n\nexport const explicitStateTypes: ESLintUtils.RuleModule<\n\t`noTypeArgument`,\n\t[],\n\tunknown,\n\tESLintUtils.RuleListener\n> = createRule({\n\tname: `explicit-state-types`,\n\tmeta: {\n\t\ttype: `problem`,\n\t\tdocs: {\n\t\t\tdescription: `State declarations must have generic type arguments directly passed to them`,\n\t\t},\n\t\tmessages: {\n\t\t\tnoTypeArgument: `State declarations must have generic type arguments directly passed to them.`,\n\t\t},\n\t\tschema: [], // no options\n\t},\n\tdefaultOptions: [],\n\tcreate(context) {\n\t\treturn {\n\t\t\tCallExpression(node) {\n\t\t\t\tconst { callee } = node\n\t\t\t\tswitch (callee.type) {\n\t\t\t\t\tcase `Identifier`: {\n\t\t\t\t\t\tif (STATE_FUNCTIONS.includes(callee.name)) {\n\t\t\t\t\t\t\tif (!node.typeArguments) {\n\t\t\t\t\t\t\t\tcontext.report({\n\t\t\t\t\t\t\t\t\tnode,\n\t\t\t\t\t\t\t\t\tmessageId: `noTypeArgument`,\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t\tcase `MemberExpression`: {\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tcallee.property.type === `Identifier` &&\n\t\t\t\t\t\t\tSTATE_FUNCTIONS.includes(callee.property.name)\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\tif (!node.typeArguments) {\n\t\t\t\t\t\t\t\tcontext.report({\n\t\t\t\t\t\t\t\t\tnode,\n\t\t\t\t\t\t\t\t\tmessageId: `noTypeArgument`,\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t}\n\t},\n})\n","export * from \"./explicit-state-types\"\n","import type { ESLint } from \"eslint\"\n\nimport * as Rules from \"./rules\"\n\nexport { Rules }\n\nconst plugin: ESLint.Plugin = {\n\trules: {\n\t\t\"explicit-state-types\": Rules.explicitStateTypes as any,\n\t},\n} satisfies ESLint.Plugin\n\nexport default plugin\n"],"mappings":";;;;AAGA,MAAM,aAAa,YAAY,YAC9B,CAAC,SAAS,CAAC,uCAAuC,EAAE,MAAM,CAC1D;AAED,MAAM,kBAAkB;CACvB,CAAC,IAAI,CAAC;CACN,CAAC,UAAU,CAAC;CACZ,CAAC,WAAW,CAAC;CACb,CAAC,iBAAiB,CAAC;CACnB,CAAC,QAAQ,CAAC;CACV,CAAC,cAAc,CAAC;AAChB;AAED,MAAaA,qBAKT,WAAW;CACd,MAAM,CAAC,oBAAoB,CAAC;CAC5B,MAAM;EACL,MAAM,CAAC,OAAO,CAAC;EACf,MAAM,EACL,aAAa,CAAC,2EAA2E,CAAC,CAC1F;EACD,UAAU,EACT,gBAAgB,CAAC,4EAA4E,CAAC,CAC9F;EACD,QAAQ,CAAE;CACV;CACD,gBAAgB,CAAE;CAClB,OAAO,SAAS;AACf,SAAO,EACN,eAAe,MAAM;GACpB,MAAM,EAAE,QAAQ,GAAG;AACnB,WAAQ,OAAO,MAAf;IACC,KAAK,CAAC,UAAU,CAAC;AAChB,SAAI,gBAAgB,SAAS,OAAO,KAAK,EACxC;UAAI,CAAC,KAAK,eACT,QAAQ,OAAO;OACd;OACA,WAAW,CAAC,cAAc,CAAC;MAC3B,EAAC;KACF;AAEF;IAED,KAAK,CAAC,gBAAgB,CAAC,CACtB,KACC,OAAO,SAAS,SAAS,CAAC,UAAU,CAAC,IACrC,gBAAgB,SAAS,OAAO,SAAS,KAAK,EAE9C;SAAI,CAAC,KAAK,eACT,QAAQ,OAAO;MACd;MACA,WAAW,CAAC,cAAc,CAAC;KAC3B,EAAC;IACF;GAGH;EACD,EACD;CACD;AACD,EAAC;;;;;;;;;AE7DF,MAAMC,SAAwB,EAC7B,OAAO,EACN,2CACA,EACD;AAED,4BAAe"}
|