eslint-plugin-use-agnostic 1.3.3 → 1.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16,10 +16,6 @@ import { makeIntroForSpecificViolationMessage } from "../../../_commons/utilitie
16
16
 
17
17
  import { resolvedConfigData } from "../../../../jscomments/_commons/constants/bases.js";
18
18
 
19
- // const resolvedConfigData = await import("../../../../comments.config.json", {
20
- // assert: { type: "json" },
21
- // });
22
-
23
19
  /**
24
20
  * @typedef {import('../../../../types/directive21/_commons/typedefs.js').CommentedDirective} CommentedDirective
25
21
  * @typedef {import('../../../../types/directive21/_commons/typedefs.js').CommentedDirectiveWithoutUseAgnosticStrategies} CommentedDirectiveWithoutUseAgnosticStrategies
@@ -147,12 +143,12 @@ export const commentedDirectives_verificationReports = Object.freeze({
147
143
  /* commentedDirectives_blockedImports */
148
144
 
149
145
  /**
150
- * $COMMENT#JSDOC#DEFINITIONS#AGNOSTIC20#MAKEBLOCKEDIMPORT
146
+ * Makes a blockedImport object for the identified blocked import at hand.
151
147
  * @template {CommentedDirectiveWithoutUseAgnosticStrategies} T
152
148
  * @template {CommentedDirectiveWithoutUseAgnosticStrategies} U
153
- * @param {T} currentFileCommentedDirective $COMMENT#JSDOC#PARAMS#DIRECTIVE21#CURRENTFILECOMMENTEDDIRECTIVE
154
- * @param {U} importedFileCommentedDirective $COMMENT#JSDOC#PARAMS#DIRECTIVE21#IMPORTEDFILECOMMENTEDDIRECTIVE
155
- * @returns $COMMENT#JSDOC#RETURNS#AGNOSTIC20#MAKEBLOCKEDIMPORT
149
+ * @param {T} currentFileCommentedDirective The current file's commented directive.
150
+ * @param {U} importedFileCommentedDirective The imported file's commented directive.
151
+ * @returns The blockedImport object for the identified blocked import at hand.
156
152
  */
157
153
  export const makeBlockedImport = (
158
154
  currentFileCommentedDirective,
@@ -166,196 +162,196 @@ export const makeBlockedImport = (
166
162
  )} ${
167
163
  resolvedConfigData[directive21ConfigName][currentFileCommentedDirective][
168
164
  importedFileCommentedDirective
169
- ]
165
+ ].value
170
166
  }`,
171
167
  });
172
168
  };
173
169
 
174
170
  export const commentedDirectives_blockedImports = Object.freeze({
175
171
  [USE_SERVER_LOGICS]: Object.freeze([
176
- // USE_SERVER_LOGICS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_SERVER_LOGICS#USE_SERVER_LOGICS
172
+ // USE_SERVER_LOGICS allowed, because Prime Server Logics can compose with one another.
177
173
  makeBlockedImport(
178
174
  USE_SERVER_LOGICS,
179
175
  USE_CLIENT_LOGICS
180
- ) /* $COMMENT#DIRECTIVE21#FORALIASVARIABLES#CLIENTNEVERSERVER */,
181
- // USE_AGNOSTIC_LOGICS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#FORALIASVARIABLES#AGNOSTICCANSERVERCLIENT
182
- // USE_SERVER_COMPONENTS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_SERVER_LOGICS#USE_SERVER_COMPONENTS
176
+ ) /* Prime Client Logics should never leak to the server. */,
177
+ // USE_AGNOSTIC_LOGICS allowed, because Prime Agnostic Logics can run safely on the server just like they can on the client.
178
+ // USE_SERVER_COMPONENTS allowed, because Lineal Server Components are OK to be composed with Prime Server Logics as long as the Prime Server Logics Module, by convention, does not export React components.
183
179
  makeBlockedImport(
184
180
  USE_SERVER_LOGICS,
185
181
  USE_CLIENT_COMPONENTS
186
- ) /* $COMMENT#DIRECTIVE21#USE_SERVER_LOGICS#USE_CLIENT_COMPONENTS */,
187
- // USE_AGNOSTIC_COMPONENTS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#FORALIASVARIABLES#AGNOSTICCOMPONENTSCANANY
188
- // USE_SERVER_FUNCTIONS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_SERVER_LOGICS#USE_SERVER_FUNCTIONS
182
+ ) /* Lineal Client Components, like any Client Components, cannot be tinkered with on the server. */,
183
+ // USE_AGNOSTIC_COMPONENTS allowed, because Lineal Agnostic Components can be composed with any Prime Environment Logics agnostically, as long as the Prime Environment Logics Module, by convention, does not export React components.
184
+ // USE_SERVER_FUNCTIONS allowed, because (Special) Server Functions, being able to import one another, can compose and do so via Prime Server Logics, despite this method seeming superfluous at first glance. (Perhaps a preferrable use case for this has been found or could be found either today or in the future.)
189
185
  makeBlockedImport(
190
186
  USE_SERVER_LOGICS,
191
187
  USE_CLIENT_CONTEXTS
192
- ) /* $COMMENT#DIRECTIVE21#USE_SERVER_LOGICS#USE_CLIENT_CONTEXTS */,
193
- // USE_AGNOSTIC_CONDITIONS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_SERVER_LOGICS#USE_AGNOSTIC_CONDITIONS
188
+ ) /* (Special) Client Contexts Components, like any Client Components, cannot be tinkered with on the server. */,
189
+ // USE_AGNOSTIC_CONDITIONS allowed, because (Special) Agnostic Conditions Components are able to safely render on the server, guaranteeing that only their `ComponentForServer` will be effectively involved in Prime Server Logics Modules.
194
190
  ]),
195
191
  [USE_CLIENT_LOGICS]: Object.freeze([
196
192
  makeBlockedImport(
197
193
  USE_CLIENT_LOGICS,
198
194
  USE_SERVER_LOGICS
199
- ) /* $COMMENT#DIRECTIVE21#FORALIASVARIABLES#SERVERNEVERCLIENT */,
200
- // USE_CLIENT_LOGICS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_CLIENT_LOGICS#USE_CLIENT_LOGICS
201
- // USE_AGNOSTIC_LOGICS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#FORALIASVARIABLES#AGNOSTICCANCLIENTSERVER
195
+ ) /* Prime Server Logics should never leak to the client. */,
196
+ // USE_CLIENT_LOGICS allowed, because Prime Client Logics can compose with one another.
197
+ // USE_AGNOSTIC_LOGICS allowed, because Prime Agnostic Logics can run safely on the client just like they can on the server.
202
198
  makeBlockedImport(
203
199
  USE_CLIENT_LOGICS,
204
200
  USE_SERVER_COMPONENTS
205
- ) /* $COMMENT#DIRECTIVE21#USE_CLIENT_LOGICS#USE_SERVER_COMPONENTS */,
206
- // USE_CLIENT_COMPONENTS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_CLIENT_LOGICS#USE_CLIENT_COMPONENTS
207
- // USE_AGNOSTIC_COMPONENTS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#FORALIASVARIABLES#AGNOSTICCOMPONENTSCANANY
208
- // USE_SERVER_FUNCTIONS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_CLIENT_LOGICS#USE_SERVER_FUNCTIONS
209
- // USE_CLIENT_CONTEXTS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_CLIENT_LOGICS#USE_CLIENT_CONTEXTS
210
- // USE_AGNOSTIC_CONDITIONS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_CLIENT_LOGICS#USE_AGNOSTIC_CONDITIONS
201
+ ) /* Lineal Server Components cannot be tinkered with on the client. */,
202
+ // USE_CLIENT_COMPONENTS allowed, because Prime Client Logics, like any Client Components, are OK to be composed with Prime Client Logics as long as the Prime Client Logics Module, by convention, does not export React components.
203
+ // USE_AGNOSTIC_COMPONENTS allowed, because Lineal Agnostic Components can be composed with any Prime Environment Logics agnostically, as long as the Prime Environment Logics Module, by convention, does not export React components.
204
+ // USE_SERVER_FUNCTIONS allowed, because (Special) Server Functions can technically be attached to any Client Components that are being tinkered with within Client Logics Modules.
205
+ // USE_CLIENT_CONTEXTS allowed, because (Special) Client Contexts Components, like any Client Components, are OK to be composed with Prime Client Logics as long as the Prime Client Logics Module, by convention, does not export React components.
206
+ // USE_AGNOSTIC_CONDITIONS allowed, because (Special) Agnostic Conditions Components are able to safely render on the client, guaranteeing that only their `ComponentForClient` will be effectively involved in Prime Client Logics Modules.
211
207
  ]),
212
208
  [USE_AGNOSTIC_LOGICS]: Object.freeze([
213
209
  makeBlockedImport(
214
210
  USE_AGNOSTIC_LOGICS,
215
211
  USE_SERVER_LOGICS
216
- ) /* $COMMENT#DIRECTIVE21#FORALIASVARIABLES#SERVERLOGICSCANTBOTH */,
212
+ ) /* Prime Server Logics cannot run on both the server and the client. */,
217
213
  makeBlockedImport(
218
214
  USE_AGNOSTIC_LOGICS,
219
215
  USE_CLIENT_LOGICS
220
- ) /* $COMMENT#DIRECTIVE21#FORALIASVARIABLES#CLIENTLOGICSCANTBOTH */,
221
- // USE_AGNOSTIC_LOGICS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_AGNOSTIC_LOGICS#USE_AGNOSTIC_LOGICS
216
+ ) /* Prime Client Logics cannot run on both the server and the client. */,
217
+ // USE_AGNOSTIC_LOGICS allowed, because Prime Agnostic Logics can compose with one another.
222
218
  makeBlockedImport(
223
219
  USE_AGNOSTIC_LOGICS,
224
220
  USE_SERVER_COMPONENTS
225
- ) /* $COMMENT#DIRECTIVE21#USE_AGNOSTIC_LOGICS#USE_SERVER_COMPONENTS */,
221
+ ) /* Lineal Server Components cannot be tinkered with on both the server and the client. */,
226
222
  makeBlockedImport(
227
223
  USE_AGNOSTIC_LOGICS,
228
224
  USE_CLIENT_COMPONENTS
229
- ) /* $COMMENT#DIRECTIVE21#USE_AGNOSTIC_LOGICS#USE_CLIENT_COMPONENTS */,
230
- // USE_AGNOSTIC_COMPONENTS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#FORALIASVARIABLES#AGNOSTICCOMPONENTSCANANY
225
+ ) /* Lineal Client Components, like any Client Components, cannot be tinkered with on both the server and the client. */,
226
+ // USE_AGNOSTIC_COMPONENTS allowed, because Lineal Agnostic Components can be composed with any Prime Environment Logics agnostically, as long as the Prime Environment Logics Module, by convention, does not export React components.
231
227
  makeBlockedImport(
232
228
  USE_AGNOSTIC_LOGICS,
233
229
  USE_SERVER_FUNCTIONS
234
- ) /* $COMMENT#DIRECTIVE21#USE_AGNOSTIC_LOGICS#USE_SERVER_FUNCTIONS */,
230
+ ) /* (Special) Server Functions can be modified on the server and on the client, but their use cases on both environments are not one-to-one compatible, since they're being addressed as they are on the server and addressed as references on the client. */,
235
231
  makeBlockedImport(
236
232
  USE_AGNOSTIC_LOGICS,
237
233
  USE_CLIENT_CONTEXTS
238
- ) /* $COMMENT#DIRECTIVE21#USE_AGNOSTIC_LOGICS#USE_CLIENT_CONTEXTS */,
239
- // USE_AGNOSTIC_CONDITIONS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_AGNOSTIC_LOGICS#USE_AGNOSTIC_CONDITIONS
234
+ ) /* (Special) Client Contexts Components, like any Client Components, cannot be tinkered with on both the server and the client. */,
235
+ // USE_AGNOSTIC_CONDITIONS allowed, because (Special) Agnostic Conditions Components, as if they were Lineal Agnostic Components themselves, can be composed with any Prime Environment Logics agnostically, as long as the Prime Environment Logics Module, by convention, does not export React components.
240
236
  ]),
241
237
  [USE_SERVER_COMPONENTS]: Object.freeze([
242
- // USE_SERVER_LOGICS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_SERVER_COMPONENTS#USE_SERVER_LOGICS
238
+ // USE_SERVER_LOGICS allowed, because Prime Server Logics, being logic from the server, can safely support Lineal Server Components.
243
239
  makeBlockedImport(
244
240
  USE_SERVER_COMPONENTS,
245
241
  USE_CLIENT_LOGICS
246
- ) /* $COMMENT#DIRECTIVE21#FORALIASVARIABLES#CLIENTNEVERSERVER */,
247
- // USE_AGNOSTIC_LOGICS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#FORALIASVARIABLES#AGNOSTICCANSERVERCLIENT
248
- // USE_SERVER_COMPONENTS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_SERVER_COMPONENTS#USE_SERVER_COMPONENTS
249
- // USE_CLIENT_COMPONENTS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_SERVER_COMPONENTS#USE_CLIENT_COMPONENTS
250
- // USE_AGNOSTIC_COMPONENTS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_SERVER_COMPONENTS#USE_AGNOSTIC_COMPONENTS
251
- // USE_SERVER_FUNCTIONS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_SERVER_COMPONENTS#USE_SERVER_FUNCTIONS
252
- // USE_CLIENT_CONTEXTS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_SERVER_COMPONENTS#USE_CLIENT_CONTEXTS
253
- // USE_AGNOSTIC_CONDITIONS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_SERVER_COMPONENTS#USE_AGNOSTIC_CONDITIONS
242
+ ) /* Prime Client Logics should never leak to the server. */,
243
+ // USE_AGNOSTIC_LOGICS allowed, because Prime Agnostic Logics can run safely on the server just like they can on the client.
244
+ // USE_SERVER_COMPONENTS allowed, because Lineal Server Components can compose with one another, now that thanks to the inclusion of Agnostic Components they are actual Server Components.
245
+ // USE_CLIENT_COMPONENTS allowed, because Lineal Client Components can be nested inside Lineal Server Components to create client boundaries when the root of the application is planted on the server.
246
+ // USE_AGNOSTIC_COMPONENTS allowed, because Lineal Agnostic Components can render safely on the server just like they can on the client.
247
+ // USE_SERVER_FUNCTIONS allowed, because (Special) Server Functions can be passed to imported Client Components within Lineal Server Components Modules, even though indeed Lineal Server Components Modules and Lineal Server Components can make their own Server Functions through inline `'use server'` directives.
248
+ // USE_CLIENT_CONTEXTS allowed, because (Special) Client Contexts Components can be nested inside Lineal Server Components to wrap some of the tree with client state accessible through child Client Components, and to pass through Server Components when the root of the application is planted on the server.
249
+ // USE_AGNOSTIC_CONDITIONS allowed, because (Special) Agnostic Conditions Components, as if they were Lineal Agnostic Components themselves, can render safely on the server just like they can on the client.
254
250
  ]),
255
251
  [USE_CLIENT_COMPONENTS]: Object.freeze([
256
252
  makeBlockedImport(
257
253
  USE_CLIENT_COMPONENTS,
258
254
  USE_SERVER_LOGICS
259
- ) /* $COMMENT#DIRECTIVE21#FORALIASVARIABLES#SERVERNEVERCLIENT */,
260
- // USE_CLIENT_LOGICS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_CLIENT_COMPONENTS#USE_CLIENT_LOGICS
261
- // USE_AGNOSTIC_LOGICS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#FORALIASVARIABLES#AGNOSTICCANCLIENTSERVER
255
+ ) /* Prime Server Logics should never leak to the client. */,
256
+ // USE_CLIENT_LOGICS allowed, because Prime Client Logics, being logic from the client, can safely support Lineal Client Components, like any Client Components.
257
+ // USE_AGNOSTIC_LOGICS allowed, because Prime Agnostic Logics can run safely on the client just like they can on the server.
262
258
  makeBlockedImport(
263
259
  USE_CLIENT_COMPONENTS,
264
260
  USE_SERVER_COMPONENTS
265
- ) /* $COMMENT#DIRECTIVE21#USE_CLIENT_COMPONENTS#USE_SERVER_COMPONENTS */,
266
- // USE_CLIENT_COMPONENTS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_CLIENT_COMPONENTS#USE_CLIENT_COMPONENTS
267
- // USE_AGNOSTIC_COMPONENTS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#FORALIASVARIABLES#AGNOSTICCOMPONENTSRENDERANY
268
- // USE_SERVER_FUNCTIONS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#FORALIASVARIABLES#SERVERFUNCTIONSCLIENT
269
- // USE_CLIENT_CONTEXTS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_CLIENT_COMPONENTS#USE_CLIENT_CONTEXTS
270
- // USE_AGNOSTIC_CONDITIONS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_CLIENT_COMPONENTS#USE_AGNOSTIC_CONDITIONS
261
+ ) /* Lineal Server Components cannot be the children of Lineal Client Components. */,
262
+ // USE_CLIENT_COMPONENTS allowed, because Lineal Client Components can compose with one another.
263
+ // USE_AGNOSTIC_COMPONENTS allowed, because Lineal Agnostic Components can render safely on the client just like they can on the server.
264
+ // USE_SERVER_FUNCTIONS allowed, because (Special) Server Functions can be specifically triggered by Client Components.
265
+ // USE_CLIENT_CONTEXTS allowed, because (Special) Client Contexts Components can effectively become Lineal and only render their children on the client via this mechanism since, by a Client Contexts Component being the child of a Lineal Client Component, the Client Contexts Component's children become the grandchildren of an ancestor Lineal Client Component, enforcing them to render exclusively on the client.
266
+ // USE_AGNOSTIC_CONDITIONS allowed, because (Special) Agnostic Conditions Components, as if they were Lineal Agnostic Components themselves, can render safely on the client just like they can on the server.
271
267
  ]),
272
268
  [USE_AGNOSTIC_COMPONENTS]: Object.freeze([
273
269
  makeBlockedImport(
274
270
  USE_AGNOSTIC_COMPONENTS,
275
271
  USE_SERVER_LOGICS
276
- ) /* $COMMENT#DIRECTIVE21#FORALIASVARIABLES#SERVERLOGICSCANTBOTH */,
272
+ ) /* Prime Server Logics cannot run on both the server and the client. */,
277
273
  makeBlockedImport(
278
274
  USE_AGNOSTIC_COMPONENTS,
279
275
  USE_CLIENT_LOGICS
280
- ) /* $COMMENT#DIRECTIVE21#FORALIASVARIABLES#CLIENTLOGICSCANTBOTH */,
281
- // USE_AGNOSTIC_LOGICS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_AGNOSTIC_COMPONENTS#USE_AGNOSTIC_LOGICS
276
+ ) /* Prime Client Logics cannot run on both the server and the client. */,
277
+ // USE_AGNOSTIC_LOGICS allowed, because Prime Agnostic Logics, being environment-agnostic logic, can safely support any Agnostic Components.
282
278
  makeBlockedImport(
283
279
  USE_AGNOSTIC_COMPONENTS,
284
280
  USE_SERVER_COMPONENTS
285
- ) /* $COMMENT#DIRECTIVE21#USE_AGNOSTIC_COMPONENTS#USE_SERVER_COMPONENTS */,
286
- // USE_CLIENT_COMPONENTS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_AGNOSTIC_COMPONENTS#USE_CLIENT_COMPONENTS
287
- // USE_AGNOSTIC_COMPONENTS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_AGNOSTIC_COMPONENTS#USE_AGNOSTIC_COMPONENTS
288
- // USE_SERVER_FUNCTIONS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_AGNOSTIC_COMPONENTS#USE_SERVER_FUNCTIONS
289
- // USE_CLIENT_CONTEXTS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_AGNOSTIC_COMPONENTS#USE_CLIENT_CONTEXTS
290
- // USE_AGNOSTIC_CONDITIONS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_AGNOSTIC_COMPONENTS#USE_AGNOSTIC_CONDITIONS
281
+ ) /* Lineal Server Components, unlike Lineal Client Components, cannot make silos of their own once on the opposing environment (the client in this case), and therefore cannot be executed from the client, making them unable to execute agnostically from both the server and the client. */,
282
+ // USE_CLIENT_COMPONENTS allowed, because Lineal Client Components can be nested inside Lineal Agnostic Components to create client boundaries when the root of the application is planted on the server.
283
+ // USE_AGNOSTIC_COMPONENTS allowed, because Lineal Agnostic Components can compose with one another.
284
+ // USE_SERVER_FUNCTIONS allowed, because (Special) Server Functions can be passed to Client Components as props when Client Components are also legally imported into Agnostic Components Modules.
285
+ // USE_CLIENT_CONTEXTS allowed, because (Special) Client Contexts Components can be nested inside Lineal Agnostic Components to wrap some of the tree with client state accessible through child Client Components, and to pass through Server Components — if still on the Server Tree — when the root of the application is planted on the server.
286
+ // USE_AGNOSTIC_CONDITIONS allowed, because (Special) Agnostic Conditions Components can compose with Lineal Agnostic Components as if they were Lineal Agnostic Components themselves, making them a necessary mechanism for Lineal Server Components to be nested in any Agnostic Components.
291
287
  ]),
292
288
  [USE_SERVER_FUNCTIONS]: Object.freeze([
293
- // USE_SERVER_LOGICS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_SERVER_FUNCTIONS#USE_SERVER_LOGICS
289
+ // USE_SERVER_LOGICS allowed, because Prime Server Logics, being logic from the server, can safely support (Special) Server Functions.
294
290
  makeBlockedImport(
295
291
  USE_SERVER_FUNCTIONS,
296
292
  USE_CLIENT_LOGICS
297
- ) /* $COMMENT#DIRECTIVE21#FORALIASVARIABLES#CLIENTNEVERSERVER */,
298
- // USE_AGNOSTIC_LOGICS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#FORALIASVARIABLES#AGNOSTICCANSERVERCLIENT
293
+ ) /* Prime Client Logics should never leak to the server. */,
294
+ // USE_AGNOSTIC_LOGICS allowed, because Prime Agnostic Logics can run safely on the server just like they can on the client.
299
295
  makeBlockedImport(
300
296
  USE_SERVER_FUNCTIONS,
301
297
  USE_SERVER_COMPONENTS
302
- ) /* $COMMENT#DIRECTIVE21#USE_SERVER_FUNCTIONS#USE_SERVER_COMPONENTS */,
298
+ ) /* Lineal Server Components aren't allowed because (Special) Server Functions have no business working with React Components. */,
303
299
  makeBlockedImport(
304
300
  USE_SERVER_FUNCTIONS,
305
301
  USE_CLIENT_COMPONENTS
306
- ) /* $COMMENT#DIRECTIVE21#USE_SERVER_FUNCTIONS#USE_CLIENT_COMPONENTS */,
302
+ ) /* Lineal Client Components aren't allowed because (Special) Server Functions have no business working with React Components. */,
307
303
  makeBlockedImport(
308
304
  USE_SERVER_FUNCTIONS,
309
305
  USE_AGNOSTIC_COMPONENTS
310
- ) /* $COMMENT#DIRECTIVE21#USE_SERVER_FUNCTIONS#USE_AGNOSTIC_COMPONENTS */,
311
- // USE_SERVER_FUNCTIONS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_SERVER_FUNCTIONS#USE_SERVER_FUNCTIONS
306
+ ) /* Lineal Agnostic Components aren't allowed because (Special) Server Functions have no business working with React Components. */,
307
+ // USE_SERVER_FUNCTIONS allowed, because (Special) Server Functions, even though they don't need to import one another and the same results can be generated via Prime Server Logics for the outcome of a single Server Function, can still compose with one another. (Perhaps a preferrable use case for this has been found or could be found either today or in the future.)
312
308
  makeBlockedImport(
313
309
  USE_SERVER_FUNCTIONS,
314
310
  USE_CLIENT_CONTEXTS
315
- ) /* $COMMENT#DIRECTIVE21#USE_SERVER_FUNCTIONS#USE_CLIENT_CONTEXTS */,
311
+ ) /* (Special) Client Contexts Components aren't allowed because (Special) Server Functions have no business working with React Components. */,
316
312
  makeBlockedImport(
317
313
  USE_SERVER_FUNCTIONS,
318
314
  USE_AGNOSTIC_CONDITIONS
319
- ) /* $COMMENT#DIRECTIVE21#USE_SERVER_FUNCTIONS#USE_AGNOSTIC_CONDITIONS */,
315
+ ) /* (Special) Agnostic Conditions Components aren't allowed because (Special) Server Functions have no business working with React Components. */,
320
316
  ]),
321
317
  [USE_CLIENT_CONTEXTS]: Object.freeze([
322
318
  makeBlockedImport(
323
319
  USE_CLIENT_CONTEXTS,
324
320
  USE_SERVER_LOGICS
325
- ) /* $COMMENT#DIRECTIVE21#FORALIASVARIABLES#SERVERNEVERCLIENT */,
326
- // USE_CLIENT_LOGICS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_CLIENT_CONTEXTS#USE_CLIENT_LOGICS
327
- // USE_AGNOSTIC_LOGICS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#FORALIASVARIABLES#AGNOSTICCANCLIENTSERVER
321
+ ) /* Prime Server Logics should never leak to the client. */,
322
+ // USE_CLIENT_LOGICS allowed, because Prime Client Logics, being logic from the client, can safely support like any Client Components.
323
+ // USE_AGNOSTIC_LOGICS allowed, because Prime Agnostic Logics can run safely on the client just like they can on the server.
328
324
  makeBlockedImport(
329
325
  USE_CLIENT_CONTEXTS,
330
326
  USE_SERVER_COMPONENTS
331
- ) /* $COMMENT#DIRECTIVE21#USE_CLIENT_CONTEXTS#USE_SERVER_COMPONENTS */,
332
- // USE_CLIENT_COMPONENTS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_CLIENT_CONTEXTS#USE_CLIENT_COMPONENTS
333
- // USE_AGNOSTIC_COMPONENTS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#FORALIASVARIABLES#AGNOSTICCOMPONENTSRENDERANY
334
- // USE_SERVER_FUNCTIONS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#FORALIASVARIABLES#SERVERFUNCTIONSCLIENT
335
- // USE_CLIENT_CONTEXTS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_CLIENT_CONTEXTS#USE_CLIENT_CONTEXTS
336
- // USE_AGNOSTIC_CONDITIONS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_CLIENT_CONTEXTS#USE_AGNOSTIC_CONDITIONS
327
+ ) /* Lineal Server Components may only pass through (Special) Client Contexts Components via the children prop within Server Components Modules. */,
328
+ // USE_CLIENT_COMPONENTS allowed, because Lineal Client Components can create client boundaries within (Special) Client Contexts Components.
329
+ // USE_AGNOSTIC_COMPONENTS allowed, because Lineal Agnostic Components can render safely on the client just like they can on the server.
330
+ // USE_SERVER_FUNCTIONS allowed, because (Special) Server Functions can be specifically triggered by Client Components.
331
+ // USE_CLIENT_CONTEXTS allowed, because (Special) Client Contexts Components can compose with one another.
332
+ // USE_AGNOSTIC_CONDITIONS allowed, because (Special) Agnostic Conditions Components, as if they were Lineal Agnostic Components themselves, can render safely on the client just like they can on the server, in a mechanism that allows Client Contexts Components to safely and indirectly compose with child Server Components within Client Contexts Modules.
337
333
  ]),
338
334
  [USE_AGNOSTIC_CONDITIONS]: Object.freeze([
339
335
  makeBlockedImport(
340
336
  USE_AGNOSTIC_CONDITIONS,
341
337
  USE_SERVER_LOGICS
342
- ) /* $COMMENT#DIRECTIVE21#FORALIASVARIABLES#SERVERLOGICSCANTBOTH */,
338
+ ) /* Prime Server Logics cannot run on both the server and the client. */,
343
339
  makeBlockedImport(
344
340
  USE_AGNOSTIC_CONDITIONS,
345
341
  USE_CLIENT_LOGICS
346
- ) /* $COMMENT#DIRECTIVE21#FORALIASVARIABLES#CLIENTLOGICSCANTBOTH */,
347
- // USE_AGNOSTIC_LOGICS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_AGNOSTIC_CONDITIONS#USE_AGNOSTIC_LOGICS
348
- // USE_SERVER_COMPONENTS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_AGNOSTIC_CONDITIONS#USE_SERVER_COMPONENTS
349
- // USE_CLIENT_COMPONENTS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_AGNOSTIC_CONDITIONS#USE_CLIENT_COMPONENTS
350
- // USE_AGNOSTIC_COMPONENTS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_AGNOSTIC_CONDITIONS#USE_AGNOSTIC_COMPONENTS
342
+ ) /* Prime Client Logics cannot run on both the server and the client. */,
343
+ // USE_AGNOSTIC_LOGICS allowed, because Prime Agnostic Logics, being environment-agnostic logic, can safely support any Agnostic Components, including (Special) Agnostic Conditions Components. (In this case this is necessary for the import of the `conditionAgnosticComponent` function needed to make Agnostic Conditions Components.)
344
+ // USE_SERVER_COMPONENTS allowed, because Lineal Server Components are to be paired as `ComponentForServer` components with `ComponentForClient` components to form (Special) Agnostic Conditions Components.
345
+ // USE_CLIENT_COMPONENTS allowed, because Lineal Client Components are to be paired as `ComponentForClient` components with `ComponentForServer` components to form (Special) Agnostic Conditions Components.
346
+ // USE_AGNOSTIC_COMPONENTS allowed, because Lineal Agnostic Components can take the place of `ComponentForServer` and/or `ComponentForClient` components to form (Special) Agnostic Conditions Components.
351
347
  makeBlockedImport(
352
348
  USE_AGNOSTIC_CONDITIONS,
353
349
  USE_SERVER_FUNCTIONS
354
- ) /* $COMMENT#DIRECTIVE21#USE_AGNOSTIC_CONDITIONS#USE_SERVER_FUNCTIONS */,
350
+ ) /* (Special) Server Functions are not accepted because (Special) Agnostic Conditions Components only take finite, imported components as arguments in their making. As such, assigning props to these components, including Server Functions, is not made within Agnostic Conditions Modules. */,
355
351
  makeBlockedImport(
356
352
  USE_AGNOSTIC_CONDITIONS,
357
353
  USE_CLIENT_CONTEXTS
358
- ) /* $COMMENT#DIRECTIVE21#USE_AGNOSTIC_CONDITIONS#USE_CLIENT_CONTEXTS */,
359
- // USE_AGNOSTIC_CONDITIONS $COMMENT#AGNOSTIC20#FORCOMPOSEDVARIABLES#ALLOWEDBECAUSE $COMMENT#DIRECTIVE21#USE_AGNOSTIC_CONDITIONS#USE_AGNOSTIC_CONDITIONS
354
+ ) /* (Special) Client Contexts Components cannot be used as component arguments for (Special) Agnostic Conditions Components since they only take Lineal Components as arguments in their making. */,
355
+ // USE_AGNOSTIC_CONDITIONS allowed, because (Special) Agnostic Conditions Components, despite not being Lineal Components themselves, output components that can only be Lineal and compatible with their attributed rendering environments, making them acceptable arguments in the making of Agnostic Conditions Components.
360
356
  ]),
361
357
  });
@@ -45,9 +45,9 @@ import {
45
45
  /* currentFileFlow */
46
46
 
47
47
  /**
48
- * $COMMENT#JSDOC#DEFINITIONS#DIRECTIVE21#CURRENTFILEFLOW
49
- * @param {Context} context $COMMENT#JSDOC#PARAMS#CONTEXTB
50
- * @returns $COMMENT#JSDOC#RETURNS#DIRECTIVE21#CURRENTFILEFLOW
48
+ * The flow that begins the import rules enforcement rule, retrieving the verified commented directive of the current file before comparing it to upcoming verified commented directives of the files it imports.
49
+ * @param {Context} context The ESLint rule's `context` object.
50
+ * @returns Either an object with `skip: true` to disregard or one with the non-null `verifiedCommentedDirective`.
51
51
  */
52
52
  export const currentFileFlow = (context) => {
53
53
  const skipTrue = { ...skip, verifiedCommentedDirective: undefined };
@@ -103,10 +103,10 @@ export const currentFileFlow = (context) => {
103
103
  /* importedFileFlow */
104
104
 
105
105
  /**
106
- * $COMMENT#JSDOC#DEFINITIONS#DIRECTIVE21#IMPORTEDFILEFLOW
107
- * @param {Context} context $COMMENT#JSDOC#PARAMS#CONTEXTB
108
- * @param {ImportDeclaration} node $COMMENT#JSDOC#PARAMS#NODE
109
- * @returns $COMMENT#JSDOC#RETURNS#DIRECTIVE21#IMPORTEDFILEFLOW
106
+ * The flow that is shared between import and re-export traversals to obtain the import file's commented directive.
107
+ * @param {Context} context The ESLint rule's `context` object.
108
+ * @param {ImportDeclaration} node The ESLint `node` of the rule's current traversal.
109
+ * @returns Either an object with `skip: true` to disregard or one with the non-null `importedFileCommentedDirective`.
110
110
  */
111
111
  const importedFileFlow = (context, node) => {
112
112
  const skipTrue = { ...skip, importedFileCommentedDirective: undefined };
@@ -170,11 +170,11 @@ const importedFileFlow = (context, node) => {
170
170
  /* importsFlow */
171
171
 
172
172
  /**
173
- * $COMMENT#JSDOC#DEFINITIONS#AGNOSTIC20#IMPORTSFLOW
174
- * @param {Context} context $COMMENT#JSDOC#PARAMS#CONTEXTB
175
- * @param {ImportDeclaration} node $COMMENT#JSDOC#PARAMS#NODE
176
- * @param {CommentedDirective} currentFileCommentedDirective $COMMENT#JSDOC#PARAMS#DIRECTIVE21#CURRENTFILECOMMENTEDDIRECTIVE
177
- * @returns $COMMENT#JSDOC#RETURNS#AGNOSTIC20#IMPORTSFLOW
173
+ * The full flow for import traversals to enforce effective directives import rules.
174
+ * @param {Context} context The ESLint rule's `context` object.
175
+ * @param {ImportDeclaration} node The ESLint `node` of the rule's current traversal.
176
+ * @param {CommentedDirective} currentFileCommentedDirective The current file's commented directive.
177
+ * @returns Early if the flow needs to be interrupted.
178
178
  */
179
179
  export const importsFlow = (context, node, currentFileCommentedDirective) => {
180
180
  // does not operate on `import type`
@@ -185,7 +185,7 @@ export const importsFlow = (context, node, currentFileCommentedDirective) => {
185
185
  if (result.skip) return;
186
186
  const { importedFileCommentedDirective } = result;
187
187
 
188
- // returns early is the current file is an Agnostic Strategies $COMMENT#TESTS#FORCOMPOSEDVARIABLES#MODULE
188
+ // returns early is the current file is an Agnostic Strategies Module
189
189
  if (currentFileCommentedDirective === USE_AGNOSTIC_STRATEGIES) return;
190
190
 
191
191
  if (
@@ -214,11 +214,11 @@ export const importsFlow = (context, node, currentFileCommentedDirective) => {
214
214
  /* allExportsFlow */
215
215
 
216
216
  /**
217
- * $COMMENT#JSDOC#DEFINITIONS#DIRECTIVE21#ALLEXPORTSFLOW
218
- * @param {Context} context $COMMENT#JSDOC#PARAMS#CONTEXTB
219
- * @param {ExportNamedDeclaration | ExportAllDeclaration | ExportDefaultDeclaration} node $COMMENT#JSDOC#PARAMS#NODE
220
- * @param {CommentedDirective} currentFileCommentedDirective $COMMENT#JSDOC#PARAMS#DIRECTIVE21#CURRENTFILECOMMENTEDDIRECTIVE
221
- * @returns $COMMENT#JSDOC#RETURNS#AGNOSTIC20#IMPORTSFLOW
217
+ * The full flow for export traversals, shared between `ExportNamedDeclaration`, `ExportAllDeclaration`, and `ExportDefaultDeclaration`, to ensure same commented directive re-exports in modules that aren't Agnostic Strategies Modules, and enforce strategized exports specifically in Agnostic Strategies modules.
218
+ * @param {Context} context The ESLint rule's `context` object.
219
+ * @param {ExportNamedDeclaration | ExportAllDeclaration | ExportDefaultDeclaration} node The ESLint `node` of the rule's current traversal.
220
+ * @param {CommentedDirective} currentFileCommentedDirective The current file's commented directive.
221
+ * @returns Early if the flow needs to be interrupted.
222
222
  */
223
223
  export const allExportsFlow = (
224
224
  context,