eslint-plugin-use-agnostic 1.2.2 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,228 +0,0 @@
1
- import {
2
- USE_SERVER_LOGICS,
3
- USE_CLIENT_LOGICS,
4
- USE_AGNOSTIC_LOGICS,
5
- USE_SERVER_COMPONENTS,
6
- USE_CLIENT_COMPONENTS,
7
- USE_AGNOSTIC_COMPONENTS,
8
- USE_SERVER_FUNCTIONS,
9
- USE_CLIENT_CONTEXTS,
10
- USE_AGNOSTIC_CONDITIONS,
11
- } from "../../../library/_commons/constants/bases.js";
12
-
13
- export const serverLogicsComments = Object.freeze({
14
- // $COMMENT#DIRECTIVE21#USE_SERVER_LOGICS#USE_SERVER_LOGICS
15
- [USE_SERVER_LOGICS]:
16
- /* valid */ "Prime Server Logics can compose with one another.",
17
- [USE_CLIENT_LOGICS]:
18
- /* invalid */ "Prime Client Logics should never leak to the server, such as would be the case here in a Prime Server Logics Module.",
19
- [USE_AGNOSTIC_LOGICS]:
20
- /* valid */ "Prime Agnostic Logics can run safely on the server just like they can on the client, such as is the case here in a Prime Server Logics Module.",
21
- [USE_SERVER_COMPONENTS]:
22
- /* valid */ "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.",
23
- [USE_CLIENT_COMPONENTS]:
24
- /* invalid */ "Lineal Client Components, like any Client Components, cannot be tinkered with on the server.",
25
- [USE_AGNOSTIC_COMPONENTS]:
26
- /* valid */ "Lineal Agnostic Components can be composed with any Prime Environment Logics agnostically, such as Prime Server Logics, as long as the Prime Environment Logics Module, by convention, does not export React components.",
27
- [USE_SERVER_FUNCTIONS]:
28
- /* valid */ "(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.)",
29
- [USE_CLIENT_CONTEXTS]:
30
- /* invalid */ "Client Contexts Components, like any Client Components, cannot be tinkered with on the server.",
31
- [USE_AGNOSTIC_CONDITIONS]:
32
- /* valid */ "(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.",
33
- module: "Prime Server Logics Module",
34
- modulePeriod: "Prime Server Logics Module.",
35
- kinds: "Prime Server Logics",
36
- });
37
-
38
- export const clientLogicsComments = Object.freeze({
39
- [USE_SERVER_LOGICS]:
40
- /* invalid */ "Prime Server Logics should never leak to the client, such as would be the case here in a Prime Client Logics Module.",
41
- [USE_CLIENT_LOGICS]:
42
- /* valid */ "Prime Client Logics can compose with one another.",
43
- [USE_AGNOSTIC_LOGICS]:
44
- /* valid */ "Prime Agnostic Logics can run safely on the client just like they can on the server, such as is the case here in a Prime Client Logics Module.",
45
- [USE_SERVER_COMPONENTS]:
46
- /* invalid */ "Lineal Server Components cannot be thinkered with on the client.",
47
- [USE_CLIENT_COMPONENTS]:
48
- /* valid */ "Lineal Client 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.",
49
- [USE_AGNOSTIC_COMPONENTS]:
50
- /* valid */ "Lineal Agnostic Components can be composed with any Prime Environment Logics agnostically, such as Prime Client Logics, as long as the Prime Environment Logics Module, by convention, does not export React components.",
51
- [USE_SERVER_FUNCTIONS]:
52
- /* valid */ "(Special) Server Functions can technically be attached to Client Components that are being tinkered with within Client Logics Modules.",
53
- [USE_CLIENT_CONTEXTS]:
54
- /* valid */ "(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.",
55
- [USE_AGNOSTIC_CONDITIONS]:
56
- /* valid */ "(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.",
57
- module: "Prime Client Logics Module",
58
- modulePeriod: "Prime Client Logics Module.",
59
- kinds: "Prime Client Logics",
60
- });
61
-
62
- export const agnosticLogicsComments = Object.freeze({
63
- [USE_SERVER_LOGICS]:
64
- /* invalid */ "Prime Server Logics cannot run on both the server and the client, such as would be the case here in a Prime Agnostic Logics Module.",
65
- [USE_CLIENT_LOGICS]:
66
- /* invalid */ "Prime Client Logics cannot run on both the server and the client, such as would be the case here in a Prime Agnostic Logics Module.",
67
- [USE_AGNOSTIC_LOGICS]:
68
- /* valid */ "Prime Agnostic Logics can compose with one another.",
69
- [USE_SERVER_COMPONENTS]:
70
- /* invalid */ "Lineal Server Components cannot be tinkered with on both the server and the client.",
71
- [USE_CLIENT_COMPONENTS]:
72
- /* invalid */ "Lineal Client Components, like any Client Components, cannot be tinkered with on both the server and the client.",
73
- [USE_AGNOSTIC_COMPONENTS]:
74
- /* valid */ "Lineal Agnostic Components can be composed with any Prime Environment Logics agnostically, such as Prime Agnostic Logics, as long as the Prime Environment Logics Module, by convention, does not export React components.",
75
- [USE_SERVER_FUNCTIONS]:
76
- /* invalid */ "(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.",
77
- [USE_CLIENT_CONTEXTS]:
78
- /* invalid */ "(Special) Client Contexts Components, like any Client Components, cannot be tinkered with on both the server and the client.",
79
- [USE_AGNOSTIC_CONDITIONS]:
80
- /* valid */ "(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.",
81
- module: "Prime Agnostic Logics Module",
82
- modulePeriod: "Prime Agnostic Logics Module.",
83
- kinds: "Prime Agnostic Logics",
84
- });
85
-
86
- export const serverComponentsComments = Object.freeze({
87
- [USE_SERVER_LOGICS]:
88
- /* valid */ "Prime Server Logics, being logic from the server, can safely support Lineal Server Components.",
89
- [USE_CLIENT_LOGICS]:
90
- /* invalid */ "Prime Client Logics should never leak to the server, such as would be the case here in a Lineal Server Components Module.",
91
- [USE_AGNOSTIC_LOGICS]:
92
- /* valid */ "Prime Agnostic Logics can run safely on the server just like they can on the client, such as is the case here in a Lineal Server Components Module.",
93
- [USE_SERVER_COMPONENTS]:
94
- /* valid */ "Lineal Server Components can compose with one another, now that thanks to the inclusion of Agnostic Components they are actual Server Components.",
95
- [USE_CLIENT_COMPONENTS]:
96
- /* valid */ "Lineal Client Components can be nested inside Server Components to create client boundaries when the root of the application is planted on the server.",
97
- [USE_AGNOSTIC_COMPONENTS]:
98
- /* valid */ "Lineal Agnostic Components can render safely on the server just like they can on the client.",
99
- [USE_SERVER_FUNCTIONS]:
100
- /* valid */ "(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.",
101
- [USE_CLIENT_CONTEXTS]:
102
- /* valid */ "(Special) Client Contexts Components can be nested inside 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.",
103
- [USE_AGNOSTIC_CONDITIONS]:
104
- /* valid */ "(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.",
105
- module: "Lineal Server Components Module",
106
- modulePeriod: "Lineal Server Components Module.",
107
- kinds: "Lineal Server Components",
108
- });
109
-
110
- export const clientComponentsComments = Object.freeze({
111
- [USE_SERVER_LOGICS]:
112
- /* invalid */ "Prime Server Logics should never leak to the client, such as would be the case here in a Lineal Client Components Module.",
113
- [USE_CLIENT_LOGICS]:
114
- /* valid */ "Prime Client Logics, being logic from the client, can safely support Lineal Client Components, like any Client Components.",
115
- [USE_AGNOSTIC_LOGICS]:
116
- /* valid */ "Prime Agnostic Logics can run safely on the client just like they can on the server, such as is the case here in a Lineal Client Components Module.",
117
- [USE_SERVER_COMPONENTS]:
118
- /* invalid */ "Lineal Server Components cannot be the children of Lineal Client Components.",
119
- [USE_CLIENT_COMPONENTS]:
120
- /* valid */ "Lineal Client Components can compose with one another.",
121
- [USE_AGNOSTIC_COMPONENTS]:
122
- /* valid */ "Lineal Agnostic Components can render safely on the client just like they can on the server, such as is the case here in a Lineal Client Components Module.",
123
- [USE_SERVER_FUNCTIONS]:
124
- /* valid */ "(Special) Server Functions are specifically triggered by Client Components, such as is the case here in a Lineal Client Components Module.",
125
- [USE_CLIENT_CONTEXTS]:
126
- /* valid */ "(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 grand-children of an ancestor Lineal Client Component, enforcing them to render exclusively on the client.",
127
- [USE_AGNOSTIC_CONDITIONS]:
128
- /* valid */ "(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.",
129
- module: "Lineal Client Components Module",
130
- modulePeriod: "Lineal Client Components Module.",
131
- kinds: "Lineal Client Components",
132
- });
133
-
134
- export const agnosticComponentsComments = Object.freeze({
135
- [USE_SERVER_LOGICS]:
136
- /* invalid */ "Prime Server Logics cannot run on both the server and the client, such as would be the case here in a Lineal Agnostic Components Module.",
137
- [USE_CLIENT_LOGICS]:
138
- /* invalid */ "Prime Client Logics cannot run on both the server and the client, such as would be the case here in a Lineal Agnostic Components Module.",
139
- [USE_AGNOSTIC_LOGICS]:
140
- /* valid */ "Prime Agnostic Logics, being environment-agnostic logic, can safely support Agnostic Components.",
141
- [USE_SERVER_COMPONENTS]:
142
- /* invalid */ "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.",
143
- [USE_CLIENT_COMPONENTS]:
144
- /* valid */ "Lineal Client Components can be nested inside Agnostic Components to create client boundaries when the root of the application is planted on the server.",
145
- [USE_AGNOSTIC_COMPONENTS]:
146
- /* valid */ "Lineal Agnostic Components, can compose with one another.",
147
- [USE_SERVER_FUNCTIONS]:
148
- /* valid */ "(Special) Server Functions can be passed to Client Components as props when Client Components are also legally imported into Agnostic Components Modules.",
149
- [USE_CLIENT_CONTEXTS]:
150
- /* valid */ "(Special) Client Contexts Components can be nested inside 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.",
151
- [USE_AGNOSTIC_CONDITIONS]:
152
- /* valid */ "(Special) Agnostic Conditions Components can compose with Lineal Agnostic Components as if they were Lineal Agnostic Components themselves, making them a necessary mechanism for Server Components to be nested in Agnostic Components.",
153
- module: "Lineal Agnostic Components Module",
154
- modulePeriod: "Lineal Agnostic Components Module.",
155
- kinds: "Lineal Agnostic Components",
156
- });
157
-
158
- export const serverFunctionsComments = Object.freeze({
159
- [USE_SERVER_LOGICS]:
160
- /* valid */ "Prime Server Logics, being logic from the server, can safely support (Special) Server Functions.",
161
- [USE_CLIENT_LOGICS]:
162
- /* invalid */ "Prime Client Logics should never leak to the server, such as would be the case here in a Special Server Functions Module.",
163
- [USE_AGNOSTIC_LOGICS]:
164
- /* valid */ "Prime Agnostic Logics can run safely on the server just like they can on the client, such as is the case here in a Special Server Functions Module.",
165
- [USE_SERVER_COMPONENTS]:
166
- /* invalid */ "Lineal Server Components aren't allowed because (Special) Server Functions have no business working with React Components.",
167
- [USE_CLIENT_COMPONENTS]:
168
- /* invalid */ "Lineal Client Components aren't allowed because (Special) Server Functions have no business working with React Components.",
169
- [USE_AGNOSTIC_COMPONENTS]:
170
- /* invalid */ "Lineal Agnostic Components aren't allowed because (Special) Server Functions have no business working with React Components.",
171
- [USE_SERVER_FUNCTIONS]:
172
- /* valid */ "(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.)",
173
- [USE_CLIENT_CONTEXTS]:
174
- /* invalid */ "(Special) Client Contexts Components aren't allowed because (Special) Server Functions have no business working with React Components.",
175
- [USE_AGNOSTIC_CONDITIONS]:
176
- /* invalid */ "(Special) Agnostic Conditions Components aren't allowed because (Special) Server Functions have no business working with React Components.",
177
- module: "Special Server Functions Module",
178
- modulePeriod: "Special Server Functions Module.",
179
- kinds: "Special Server Functions",
180
- });
181
-
182
- export const clientContextsComments = Object.freeze({
183
- [USE_SERVER_LOGICS]:
184
- /* invalid */ "Prime Server Logics should never leak to the client, such as would be the case here in a Special Client Contexts Module.",
185
- [USE_CLIENT_LOGICS]:
186
- /* valid */ "Prime Client Logics, being logic from the client, can safely support (Special) Client Contexts Components, like any Client Components.",
187
- [USE_AGNOSTIC_LOGICS]:
188
- /* valid */ "Prime Agnostic Logics can run safely on the client just like they can on the server, such as is the case here in a Special Client Contexts Module.",
189
- [USE_SERVER_COMPONENTS]:
190
- /* invalid */ "Lineal Server Components may only pass through (Special) Client Contexts Components via the children prop within Server Components Modules.",
191
- [USE_CLIENT_COMPONENTS]:
192
- /* valid */ "Lineal Client Components can create client boundaries within (Special) Client Contexts Components.",
193
- [USE_AGNOSTIC_COMPONENTS]:
194
- /* valid */ "Lineal Agnostic Components can render safely on the client just like they can on the server, such as is the case here in a Special Client Contexts Module.",
195
- [USE_SERVER_FUNCTIONS]:
196
- /* valid */ "(Special) Server Functions are specifically triggered by Client Components, such as is the case here in a Special Client Contexts Module.",
197
- [USE_CLIENT_CONTEXTS]:
198
- /* valid */ "(Special) Client Contexts Components can compose with one another.",
199
- [USE_AGNOSTIC_CONDITIONS]:
200
- /* valid */ "(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 (Special) Client Contexts Components to safely and indirectly compose with child Server Components within Client Contexts Modules.",
201
- module: "Special Client Contexts Module",
202
- modulePeriod: "Special Client Contexts Module.",
203
- kinds: "Special Client Contexts",
204
- });
205
-
206
- export const agnosticConditionsComments = Object.freeze({
207
- [USE_SERVER_LOGICS]:
208
- /* invalid */ "Prime Server Logics cannot run on both the server and the client, such as would be the case here in a Special Agnostic Conditions Module.",
209
- [USE_CLIENT_LOGICS]:
210
- /* invalid */ "Prime Client Logics cannot run on both the server and the client, such as would be the case here in a Special Agnostic Conditions Module.",
211
- [USE_AGNOSTIC_LOGICS]:
212
- /* valid */ "Prime Agnostic Logics, being environment-agnostic logic, can safely support 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.)",
213
- [USE_SERVER_COMPONENTS]:
214
- /* valid */ "Lineal Server Components are to be paired as `ComponentForServer` components with `ComponentForClient` components to form (Special) Agnostic Conditions Components.",
215
- [USE_CLIENT_COMPONENTS]:
216
- /* valid */ "Lineal Client Components are to be paired as `ComponentForClient` components with `ComponentForServer` components to form (Special) Agnostic Conditions Components.",
217
- [USE_AGNOSTIC_COMPONENTS]:
218
- /* valid */ "Lineal Agnostic Components can take the place of `ComponentForServer` and/or `ComponentForClient` components to form (Special) Agnostic Conditions Components.",
219
- [USE_SERVER_FUNCTIONS]:
220
- /* invalid */ "(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.",
221
- [USE_CLIENT_CONTEXTS]:
222
- /* invalid */ "(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.",
223
- [USE_AGNOSTIC_CONDITIONS]:
224
- /* valid */ "(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.",
225
- module: "Special Agnostic Conditions Module",
226
- modulePeriod: "Special Agnostic Conditions Module.",
227
- kinds: "Special Agnostic Conditions",
228
- });