eslint-plugin-use-agnostic 2.0.0 → 2.0.2

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.
@@ -74,7 +74,7 @@ export const directive21Comments = Object.freeze({
74
74
  agnosticComponentsCanAny:
75
75
  "Lineal Agnostic Components can be composed with any Prime Environment Logics agnostically, as long as the Prime Environment Logics Module," /* $COMMENT#DIRECTIVE21#FORCOMPOSEDVARIABLES#AGNOSTICCOMPONENTSCANANY */,
76
76
  asIfLinealAgnostic:
77
- "as if they were Lineal Agnostic Components themselves," /* $COMMENT#DIRECTIVE21#FORCOMPOSEDVARIABLES#ASIFLINEALAGNOSTIC */,
77
+ "as if they were Lineal Agnostic Components and/or Prime Agnostic Logics themselves," /* $COMMENT#DIRECTIVE21#FORCOMPOSEDVARIABLES#ASIFLINEALAGNOSTIC */,
78
78
  canAnyPrimeLogics:
79
79
  "can be composed with any Prime Environment Logics agnostically, as long as the Prime Environment Logics Module," /* $COMMENT#DIRECTIVE21#FORCOMPOSEDVARIABLES#CANANYPRIMELOGICS */,
80
80
  noExportComponents:
@@ -16,7 +16,7 @@ export const serverLogicsComments = Object.freeze({
16
16
  "use client contexts":
17
17
  /* invalid */ "$COMMENT#DIRECTIVE21#USE_CLIENT_CONTEXTS#SPECIALSCOMMA $COMMENT#DIRECTIVE21#FORCOMPOSEDVARIABLES#LIKEANYCLIENTCOMPONENTSCOMMA $COMMENT#DIRECTIVE21#FORCOMPOSEDVARIABLES#CANTTINKEREDSERVER" /* $COMMENT#DIRECTIVE21#USE_SERVER_LOGICS#USE_CLIENT_CONTEXTS */,
18
18
  "use agnostic conditions":
19
- /* invalid */ "DIRECTIVE21#USE_AGNOSTIC_CONDITIONS#INVALIDONLYINCOMPONENTS" /* $COMMENT#DIRECTIVE21#USE_SERVER_LOGICS#USE_AGNOSTIC_CONDITIONS */,
19
+ /* valid */ "DIRECTIVE21#USE_SERVER_COMPONENTS#USE_AGNOSTIC_CONDITIONS" /* $COMMENT#DIRECTIVE21#USE_SERVER_LOGICS#USE_AGNOSTIC_CONDITIONS */,
20
20
  "use agnostic strategies":
21
21
  /* invalid */ "DIRECTIVE21#USE_AGNOSTIC_STRATEGIES#INVALID" /* $COMMENT#DIRECTIVE21#USE_SERVER_LOGICS#USE_AGNOSTIC_STRATEGIES */,
22
22
  kinds:
@@ -63,7 +63,7 @@ export const clientLogicsComments = Object.freeze({
63
63
  "use client contexts":
64
64
  /* valid */ "$COMMENT#DIRECTIVE21#USE_CLIENT_CONTEXTS#SPECIALSCOMMA $COMMENT#DIRECTIVE21#FORCOMPOSEDVARIABLES#LIKEANYCLIENTCOMPONENTSCOMMA $COMMENT#DIRECTIVE21#FORCOMPOSEDVARIABLES#OKCLIENTLOGICS $COMMENT#DIRECTIVE21#FORCOMPOSEDVARIABLES#NOEXPORTCOMPONENTS" /* $COMMENT#DIRECTIVE21#USE_CLIENT_LOGICS#USE_CLIENT_CONTEXTS */,
65
65
  "use agnostic conditions":
66
- /* invalid */ "DIRECTIVE21#USE_AGNOSTIC_CONDITIONS#INVALIDONLYINCOMPONENTS" /* $COMMENT#DIRECTIVE21#USE_CLIENT_LOGICS#USE_AGNOSTIC_CONDITIONS */,
66
+ /* valid */ "DIRECTIVE21#USE_CLIENT_COMPONENTS#USE_AGNOSTIC_CONDITIONS" /* $COMMENT#DIRECTIVE21#USE_CLIENT_LOGICS#USE_AGNOSTIC_CONDITIONS */,
67
67
  "use agnostic strategies":
68
68
  /* invalid */ "DIRECTIVE21#USE_AGNOSTIC_STRATEGIES#INVALID" /* $COMMENT#DIRECTIVE21#USE_CLIENT_LOGICS#USE_AGNOSTIC_STRATEGIES */,
69
69
  kinds:
@@ -390,19 +390,19 @@ export const clientContextsComments = Object.freeze({
390
390
 
391
391
  export const agnosticConditionsComments = Object.freeze({
392
392
  "use server logics":
393
- /* invalid */ "$COMMENT#DIRECTIVE21#USE_SERVER_LOGICS#KINDS $COMMENT#DIRECTIVE21#FORCOMPOSEDVARIABLES#ARENTALLOWED $COMMENT#DIRECTIVE21#USE_AGNOSTIC_CONDITIONS#INVALIDONLYFROMCOMPONENTS" /* $COMMENT#DIRECTIVE21#USE_AGNOSTIC_CONDITIONS#USE_SERVER_LOGICS */,
393
+ /* valid */ "Prime Server Logics are to be paired as `LogicForServer` utilities with `LogicForClient` utilities to form (Special) Agnostic Conditions Logics. The `LogicForServer` is always the first assigned. The exported variable should be prefixed by `utilize-`, like `utilizeUtility`." /* $COMMENT#DIRECTIVE21#USE_AGNOSTIC_CONDITIONS#USE_SERVER_LOGICS */,
394
394
  "use client logics":
395
- /* invalid */ "$COMMENT#DIRECTIVE21#USE_CLIENT_LOGICS#KINDS $COMMENT#DIRECTIVE21#FORCOMPOSEDVARIABLES#ARENTALLOWED $COMMENT#DIRECTIVE21#USE_AGNOSTIC_CONDITIONS#INVALIDONLYFROMCOMPONENTS" /* $COMMENT#DIRECTIVE21#USE_AGNOSTIC_CONDITIONS#USE_CLIENT_LOGICS */,
395
+ /* valid */ "Prime Client Logics are to be paired as `LogicForClient` utilities with `LogicForServer` utilities to form (Special) Agnostic Conditions Logics. The `LogicForClient` is always the last assigned. The exported variable should be prefixed by `utilize-`, like `utilizeUtility`." /* $COMMENT#DIRECTIVE21#USE_AGNOSTIC_CONDITIONS#USE_CLIENT_LOGICS */,
396
396
  "use agnostic logics":
397
- /* invalid */ "$COMMENT#DIRECTIVE21#USE_AGNOSTIC_LOGICS#KINDS $COMMENT#DIRECTIVE21#FORCOMPOSEDVARIABLES#ARENTALLOWED $COMMENT#DIRECTIVE21#USE_AGNOSTIC_CONDITIONS#INVALIDONLYFROMCOMPONENTS" /* $COMMENT#DIRECTIVE21#USE_AGNOSTIC_CONDITIONS#USE_AGNOSTIC_LOGICS */,
397
+ /* valid */ "Prime Agnostic Logics can take the place of `LogicForServer` and/or `LogicForClient` utilities to form (Special) Agnostic Conditions Logics. The exported variable should be prefixed by `utilize-`, like `utilizeUtility`." /* $COMMENT#DIRECTIVE21#USE_AGNOSTIC_CONDITIONS#USE_AGNOSTIC_LOGICS */,
398
398
  "use server components":
399
- /* valid */ "Lineal Server Components are to be paired as `ComponentForServer` components with `ComponentForClient` components to form (Special) Agnostic Conditions Components. The `ComponentForServer` is always the first assigned." /* $COMMENT#DIRECTIVE21#USE_AGNOSTIC_CONDITIONS#USE_SERVER_COMPONENTS */,
399
+ /* valid */ "Lineal Server Components are to be paired as `ComponentForServer` components with `ComponentForClient` components to form (Special) Agnostic Conditions Components. The `ComponentForServer` is always the first assigned. The exported variable should be in PascalCase, like `ReactComponent`." /* $COMMENT#DIRECTIVE21#USE_AGNOSTIC_CONDITIONS#USE_SERVER_COMPONENTS */,
400
400
  "use client components":
401
- /* valid */ "Lineal Client Components are to be paired as `ComponentForClient` components with `ComponentForServer` components to form (Special) Agnostic Conditions Components. The `ComponentForClient` is always the last assigned." /* $COMMENT#DIRECTIVE21#USE_AGNOSTIC_CONDITIONS#USE_CLIENT_COMPONENTS */,
401
+ /* valid */ "Lineal Client Components are to be paired as `ComponentForClient` components with `ComponentForServer` components to form (Special) Agnostic Conditions Components. The `ComponentForClient` is always the last assigned. The exported variable should be in PascalCase, like `ReactComponent`." /* $COMMENT#DIRECTIVE21#USE_AGNOSTIC_CONDITIONS#USE_CLIENT_COMPONENTS */,
402
402
  "use agnostic components":
403
- /* valid */ "Lineal Agnostic Components can take the place of `ComponentForServer` and/or `ComponentForClient` components to form (Special) Agnostic Conditions Components." /* $COMMENT#DIRECTIVE21#USE_AGNOSTIC_CONDITIONS#USE_AGNOSTIC_COMPONENTS */,
403
+ /* valid */ "Lineal Agnostic Components can take the place of `ComponentForServer` and/or `ComponentForClient` components to form (Special) Agnostic Conditions Components. The exported variable should be in PascalCase, like `ReactComponent`." /* $COMMENT#DIRECTIVE21#USE_AGNOSTIC_CONDITIONS#USE_AGNOSTIC_COMPONENTS */,
404
404
  "use server functions":
405
- /* invalid */ "$COMMENT#DIRECTIVE21#USE_SERVER_FUNCTIONS#SPECIALS $COMMENT#DIRECTIVE21#FORCOMPOSEDVARIABLES#ARENTALLOWED $COMMENT#DIRECTIVE21#USE_AGNOSTIC_CONDITIONS#INVALIDONLYFROMCOMPONENTS" /* $COMMENT#DIRECTIVE21#USE_AGNOSTIC_CONDITIONS#USE_SERVER_FUNCTIONS */,
405
+ /* invalid */ "(Special) Server Functions aren't allowed because they do not have 1-to-1 behavioral equivalents for the client that would satisfy (Special) Agnostic Conditions Modules." /* $COMMENT#DIRECTIVE21#USE_AGNOSTIC_CONDITIONS#USE_SERVER_FUNCTIONS */,
406
406
  "use client contexts":
407
407
  /* valid */ "(Special) Client Contexts Components can actually be used as `ComponentForClient` arguments for (Special) Agnostic Conditions Components notably as counterparts to similar passthrough components selected as `ComponentForServer` arguments." /* $COMMENT#DIRECTIVE21#USE_AGNOSTIC_CONDITIONS#USE_CLIENT_CONTEXTS */,
408
408
  "use agnostic conditions":
@@ -428,11 +428,11 @@ export const agnosticConditionsComments = Object.freeze({
428
428
  moduleSimple:
429
429
  "$COMMENT#DIRECTIVE21#USE_AGNOSTIC_CONDITIONS#KINDSSIMPLE $COMMENT#TESTS#FORCOMPOSEDVARIABLES#MODULE" /* $COMMENT#DIRECTIVE21#USE_AGNOSTIC_CONDITIONS#MODULESIMPLE */,
430
430
  specials:
431
- "(Special) Agnostic Conditions Components" /* $COMMENT#DIRECTIVE21#USE_AGNOSTIC_CONDITIONS#SPECIALS */,
431
+ "(Special) Agnostic Conditions Components and/or Logics" /* $COMMENT#DIRECTIVE21#USE_AGNOSTIC_CONDITIONS#SPECIALS */,
432
432
  specialsComma:
433
- "(Special) Agnostic Conditions Components," /* $COMMENT#DIRECTIVE21#USE_AGNOSTIC_CONDITIONS#SPECIALSCOMMA */,
433
+ "(Special) Agnostic Conditions Components and/or Logics," /* $COMMENT#DIRECTIVE21#USE_AGNOSTIC_CONDITIONS#SPECIALSCOMMA */,
434
434
  specialsPeriod:
435
- "(Special) Agnostic Conditions Components." /* $COMMENT#DIRECTIVE21#USE_AGNOSTIC_CONDITIONS#SPECIALSPERIOD */,
435
+ "(Special) Agnostic Conditions Components and/or Logics." /* $COMMENT#DIRECTIVE21#USE_AGNOSTIC_CONDITIONS#SPECIALSPERIOD */,
436
436
  importingAModule:
437
437
  "$COMMENT#TESTS#FORCOMPOSEDVARIABLES#IMPORTINGA $COMMENT#DIRECTIVE21#USE_AGNOSTIC_CONDITIONS#KINDS $COMMENT#TESTS#FORCOMPOSEDVARIABLES#MODULEPERIOD" /* $COMMENT#DIRECTIVE21#USE_AGNOSTIC_CONDITIONS#IMPORTINGAMODULE */,
438
438
  importingByAFolder:
@@ -168,6 +168,8 @@ export const jsDocComments = Object.freeze({
168
168
  settings: "The settings as follows:" /* $COMMENT#JSDOC#PARAMS#SETTINGS */,
169
169
  reactFolder:
170
170
  'The path of the project\'s React folder where everything React lives, relative to the root of the project. This is, for example, the app directory when using the Next.js App Router, as `"app"`.' /* $COMMENT#JSDOC#PARAMS#REACTFOLDER */,
171
+ rootPath:
172
+ "The absolute path of the root of the project, from which the absolute path of the React folder can be easily obtained." /* $COMMENT#JSDOC#PARAMS#ROOTPATH */,
171
173
  agnostic20: Object.freeze({
172
174
  currentFileEffectiveDirective:
173
175
  "$COMMENT#JSDOC#FORCOMPOSEDVARIABLES#THECURRENTFILE $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#EFFECTIVE $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#DIRECTIVEPERIOD" /* $COMMENT#JSDOC#PARAMS#AGNOSTIC20#CURRENTFILEEFFECTIVEDIRECTIVE */,
@@ -252,10 +252,7 @@ export const commentedDirectives_blockedImports = Object.freeze({
252
252
  USE_SERVER_LOGICS,
253
253
  USE_CLIENT_CONTEXTS,
254
254
  ) /* (Special) Client Contexts Components, like any Client Components, cannot be tinkered with on the server. */,
255
- makeBlockedImport(
256
- USE_SERVER_LOGICS,
257
- USE_AGNOSTIC_CONDITIONS,
258
- ) /* (Special) Agnostic Conditions Modules can only be imported by Components Modules, given how the consuming of their conditioned mechanism is restricted to React Components. */,
255
+ // USE_AGNOSTIC_CONDITIONS (Special) Agnostic Conditions Components and/or Logics, as if they were Lineal Agnostic Components and/or Prime Agnostic Logics themselves, can render safely on the server just like they can on the client.
259
256
  makeBlockedImport(
260
257
  USE_SERVER_LOGICS,
261
258
  USE_AGNOSTIC_STRATEGIES,
@@ -276,10 +273,7 @@ export const commentedDirectives_blockedImports = Object.freeze({
276
273
  // USE_AGNOSTIC_COMPONENTS 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.
277
274
  // USE_SERVER_FUNCTIONS (Special) Server Functions can technically be attached to any Client Components being tinkered with within Client Logics Modules.
278
275
  // USE_CLIENT_CONTEXTS (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.
279
- makeBlockedImport(
280
- USE_CLIENT_LOGICS,
281
- USE_AGNOSTIC_CONDITIONS,
282
- ) /* (Special) Agnostic Conditions Modules can only be imported by Components Modules, given how the consuming of their conditioned mechanism is restricted to React Components. */,
276
+ // USE_AGNOSTIC_CONDITIONS (Special) Agnostic Conditions Components and/or Logics, as if they were Lineal Agnostic Components and/or Prime Agnostic Logics themselves, can render safely on the client just like they can on the server.
283
277
  makeBlockedImport(
284
278
  USE_CLIENT_LOGICS,
285
279
  USE_AGNOSTIC_STRATEGIES,
@@ -333,7 +327,7 @@ export const commentedDirectives_blockedImports = Object.freeze({
333
327
  // USE_AGNOSTIC_COMPONENTS Lineal Agnostic Components can render safely on the server just like they can on the client.
334
328
  // USE_SERVER_FUNCTIONS (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.
335
329
  // USE_CLIENT_CONTEXTS (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.
336
- // USE_AGNOSTIC_CONDITIONS (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.
330
+ // USE_AGNOSTIC_CONDITIONS (Special) Agnostic Conditions Components and/or Logics, as if they were Lineal Agnostic Components and/or Prime Agnostic Logics themselves, can render safely on the server just like they can on the client.
337
331
  makeBlockedImport(
338
332
  USE_SERVER_COMPONENTS,
339
333
  USE_AGNOSTIC_STRATEGIES,
@@ -354,7 +348,7 @@ export const commentedDirectives_blockedImports = Object.freeze({
354
348
  // USE_AGNOSTIC_COMPONENTS Lineal Agnostic Components can render safely on the client just like they can on the server.
355
349
  // USE_SERVER_FUNCTIONS (Special) Server Functions can be specifically triggered by Client Components.
356
350
  // USE_CLIENT_CONTEXTS (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.
357
- // USE_AGNOSTIC_CONDITIONS (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.
351
+ // USE_AGNOSTIC_CONDITIONS (Special) Agnostic Conditions Components and/or Logics, as if they were Lineal Agnostic Components and/or Prime Agnostic Logics themselves, can render safely on the client just like they can on the server.
358
352
  makeBlockedImport(
359
353
  USE_CLIENT_COMPONENTS,
360
354
  USE_AGNOSTIC_STRATEGIES,
@@ -414,7 +408,7 @@ export const commentedDirectives_blockedImports = Object.freeze({
414
408
  makeBlockedImport(
415
409
  USE_SERVER_FUNCTIONS,
416
410
  USE_AGNOSTIC_CONDITIONS,
417
- ) /* (Special) Agnostic Conditions Components aren't allowed because (Special) Server Functions have no business working with React Components. */,
411
+ ) /* (Special) Agnostic Conditions Components and/or Logics aren't allowed because (Special) Server Functions have no business working with React Components. */,
418
412
  makeBlockedImport(
419
413
  USE_SERVER_FUNCTIONS,
420
414
  USE_AGNOSTIC_STRATEGIES,
@@ -435,32 +429,35 @@ export const commentedDirectives_blockedImports = Object.freeze({
435
429
  // USE_AGNOSTIC_COMPONENTS Lineal Agnostic Components can render safely on the client just like they can on the server.
436
430
  // USE_SERVER_FUNCTIONS (Special) Server Functions can be specifically triggered by Client Components.
437
431
  // USE_CLIENT_CONTEXTS (Special) Client Contexts Components can compose with one another.
438
- // USE_AGNOSTIC_CONDITIONS (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.
432
+ // USE_AGNOSTIC_CONDITIONS (Special) Agnostic Conditions Components and/or Logics, as if they were Lineal Agnostic Components and/or Prime Agnostic Logics themselves, can render safely on the client just like they can on the server.
439
433
  makeBlockedImport(
440
434
  USE_CLIENT_CONTEXTS,
441
435
  USE_AGNOSTIC_STRATEGIES,
442
436
  ) /* (Special) Agnostic Strategies Modules cannot be imported by any of the known modules, since given that Agnostic Strategies Modules generate strategized files, they need to be imported via their strategized files (like those ending in `.serverLogics.ts`) instead. */,
443
437
  ]),
444
438
  [USE_AGNOSTIC_CONDITIONS]: Object.freeze([
439
+ // USE_SERVER_LOGICS Prime Server Logics are to be paired as `LogicForServer` utilities with `LogicForClient` utilities to form (Special) Agnostic Conditions Logics. The `LogicForServer` is always the first assigned. The exported variable should be prefixed by `utilize-`, like `utilizeUtility`.
440
+ // USE_CLIENT_LOGICS Prime Client Logics are to be paired as `LogicForClient` utilities with `LogicForServer` utilities to form (Special) Agnostic Conditions Logics. The `LogicForClient` is always the last assigned. The exported variable should be prefixed by `utilize-`, like `utilizeUtility`.
441
+ // USE_AGNOSTIC_LOGICS Prime Agnostic Logics can take the place of `LogicForServer` and/or `LogicForClient` utilities to form (Special) Agnostic Conditions Logics. The exported variable should be prefixed by `utilize-`, like `utilizeUtility`.
445
442
  makeBlockedImport(
446
443
  USE_AGNOSTIC_CONDITIONS,
447
444
  USE_SERVER_LOGICS,
448
- ) /* Prime Server Logics aren't allowed because (Special) Agnostic Conditions Modules can only import directly from Components Modules, given how the making of their conditioned mechanism is restricted to React Components. */,
445
+ ) /* Prime Server Logics are to be paired as `LogicForServer` utilities with `LogicForClient` utilities to form (Special) Agnostic Conditions Logics. The `LogicForServer` is always the first assigned. The exported variable should be prefixed by `utilize-`, like `utilizeUtility`. */,
449
446
  makeBlockedImport(
450
447
  USE_AGNOSTIC_CONDITIONS,
451
448
  USE_CLIENT_LOGICS,
452
- ) /* Prime Client Logics aren't allowed because (Special) Agnostic Conditions Modules can only import directly from Components Modules, given how the making of their conditioned mechanism is restricted to React Components. */,
449
+ ) /* Prime Client Logics are to be paired as `LogicForClient` utilities with `LogicForServer` utilities to form (Special) Agnostic Conditions Logics. The `LogicForClient` is always the last assigned. The exported variable should be prefixed by `utilize-`, like `utilizeUtility`. */,
453
450
  makeBlockedImport(
454
451
  USE_AGNOSTIC_CONDITIONS,
455
452
  USE_AGNOSTIC_LOGICS,
456
- ) /* Prime Agnostic Logics aren't allowed because (Special) Agnostic Conditions Modules can only import directly from Components Modules, given how the making of their conditioned mechanism is restricted to React Components. */,
457
- // USE_SERVER_COMPONENTS Lineal Server Components are to be paired as `ComponentForServer` components with `ComponentForClient` components to form (Special) Agnostic Conditions Components. The `ComponentForServer` is always the first assigned.
458
- // USE_CLIENT_COMPONENTS Lineal Client Components are to be paired as `ComponentForClient` components with `ComponentForServer` components to form (Special) Agnostic Conditions Components. The `ComponentForClient` is always the last assigned.
459
- // USE_AGNOSTIC_COMPONENTS Lineal Agnostic Components can take the place of `ComponentForServer` and/or `ComponentForClient` components to form (Special) Agnostic Conditions Components.
453
+ ) /* Prime Agnostic Logics can take the place of `LogicForServer` and/or `LogicForClient` utilities to form (Special) Agnostic Conditions Logics. The exported variable should be prefixed by `utilize-`, like `utilizeUtility`. */,
454
+ // USE_SERVER_COMPONENTS Lineal Server Components are to be paired as `ComponentForServer` components with `ComponentForClient` components to form (Special) Agnostic Conditions Components. The `ComponentForServer` is always the first assigned. The exported variable should be in PascalCase, like `ReactComponent`.
455
+ // USE_CLIENT_COMPONENTS Lineal Client Components are to be paired as `ComponentForClient` components with `ComponentForServer` components to form (Special) Agnostic Conditions Components. The `ComponentForClient` is always the last assigned. The exported variable should be in PascalCase, like `ReactComponent`.
456
+ // USE_AGNOSTIC_COMPONENTS Lineal Agnostic Components can take the place of `ComponentForServer` and/or `ComponentForClient` components to form (Special) Agnostic Conditions Components. The exported variable should be in PascalCase, like `ReactComponent`.
460
457
  makeBlockedImport(
461
458
  USE_AGNOSTIC_CONDITIONS,
462
459
  USE_SERVER_FUNCTIONS,
463
- ) /* (Special) Server Functions aren't allowed because (Special) Agnostic Conditions Modules can only import directly from Components Modules, given how the making of their conditioned mechanism is restricted to React Components. */,
460
+ ) /* (Special) Server Functions aren't allowed because they do not have 1-to-1 behavioral equivalents for the client that would satisfy (Special) Agnostic Conditions Modules. */,
464
461
  // USE_CLIENT_CONTEXTS (Special) Client Contexts Components can actually be used as `ComponentForClient` arguments for (Special) Agnostic Conditions Components notably as counterparts to similar passthrough components selected as `ComponentForServer` arguments.
465
462
  makeBlockedImport(
466
463
  USE_AGNOSTIC_CONDITIONS,
@@ -76,8 +76,13 @@ In this context, {{ ${specificFailure} }} `,
76
76
  create: (context) => {
77
77
  const result = currentFileFlow(context);
78
78
 
79
+ const reactFolder = /** @type {string} */ (context.settings.reactFolder);
80
+ const rootPath = /** @type {string} */ (context.settings.rootPath);
81
+ // make the resolver by resolving the TypeScript from the rootPath
82
+ // pass the resolver to importsFlow, allExportsFlow, importsFlowRequire
83
+
79
84
  if (result.skip) return {};
80
- const { verifiedCommentedDirective } = result;
85
+ const { verifiedCommentedDirective } = result; // Leave untouched. Since this is the verifying process. Commented directives from imported modules however, don't need to be further verified, and can simply be obtained by the flat module index.
81
86
 
82
87
  return {
83
88
  ImportDeclaration: (node) =>
package/library/index.js CHANGED
@@ -197,11 +197,13 @@ export const defineDirective21 = (reactFolder) => {
197
197
  /**
198
198
  * Defines the config settings for the eXtra JSX VS Code extension as a means to configure `eXtra JSX` directly from ESLint, given the fact that `eslint-plugin-use-agnostic` and `eXtra JSX` have to work together in making the Directive-First Architecture.
199
199
  * @template {string} T
200
+ * @template {string} U
200
201
  * @param {Object} settings The settings as follows:
201
202
  * @param {T} settings.reactFolder The path of the project's React folder where everything React lives, relative to the root of the project. This is, for example, the app directory when using the Next.js App Router, as `"app"`.
203
+ * @param {U} settings.rootPath The absolute path of the root of the project, from which the absolute path of the React folder can be easily obtained.
202
204
  * @returns The config object responsible for the settings retrieved by the eXtra JSX VS Code extension.
203
205
  */
204
- export const defineConfigSettings = ({ reactFolder }) => {
206
+ export const defineConfigSettings = ({ reactFolder, rootPath }) => {
205
207
  /**
206
208
  * @type {["**\/*.js"]}
207
209
  * The dummy file paths used by the eXtra JSX VS Code extension are JavaScript file paths, therefore this glob pattern is enough to work in recognizing the dummy file paths in order to retrieve the settings.
@@ -213,6 +215,7 @@ export const defineConfigSettings = ({ reactFolder }) => {
213
215
  settings: {
214
216
  eXtraJSX: {
215
217
  reactFolder,
218
+ rootPath, // Makes sure the rootPath on ESLint and the rootPath on VS Code are the same.
216
219
  },
217
220
  },
218
221
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-use-agnostic",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "description": "Highlights problematic server-client imports in projects made with the Fullstack React Architecture.",
5
5
  "keywords": [
6
6
  "eslint",
package/types/index.d.ts CHANGED
@@ -664,17 +664,21 @@ export const defineDirective21: <T extends string>(
664
664
  * Defines the config settings for the eXtra JSX VS Code extension as a means to configure `eXtra JSX` directly from ESLint, given the fact that `eslint-plugin-use-agnostic` and `eXtra JSX` have to work together in making the Directive-First Architecture.
665
665
  * @param settings The settings as follows:
666
666
  * @param settings.reactFolder The path of the project's React folder where everything React lives, relative to the root of the project. This is, for example, the app directory when using the Next.js App Router, as `"app"`.
667
+ * @param settings.rootPath The absolute path of the root of the project, from which the absolute path of the React folder can be easily obtained.
667
668
  * @returns The config object responsible for the settings retrieved by the eXtra JSX VS Code extension.
668
669
  */
669
- export const defineConfigSettings: <T extends string>({
670
+ export const defineConfigSettings: <T extends string, U extends string>({
670
671
  reactFolder,
672
+ rootPath,
671
673
  }: {
672
674
  reactFolder: T;
675
+ rootPath: U;
673
676
  }) => {
674
677
  files: ["**/*.js"];
675
678
  settings: {
676
679
  eXtraJSX: {
677
680
  reactFolder: T;
681
+ rootPath: U;
678
682
  };
679
683
  };
680
684
  };