eslint-plugin-use-agnostic 1.0.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/comments.config.js +10 -2
- package/jscomments/_commons/constants/bases.js +95 -0
- package/jscomments/agnostic20/constants/modules-comments.js +28 -14
- package/jscomments/directive21/constants/modules-comments.js +52 -25
- package/library/_commons/utilities/helpers.js +6 -29
- package/library/agnostic20/_commons/constants/bases.js +49 -49
- package/library/agnostic20/_commons/utilities/helpers.js +8 -8
- package/library/directive21/_commons/constants/bases.js +81 -123
- package/library/directive21/_commons/rules/import-rules.js +1 -1
- package/library/directive21/_commons/utilities/helpers.js +69 -52
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -78,7 +78,7 @@ Base url and aliased import paths are currently resolved under the assumption th
|
|
|
78
78
|
|
|
79
79
|
It is up to you to confirm that your Agnostic Modules are indeed agnostic, meaning that they have neither server- nor client-side code. `eslint-plugin-use-agnostic`, at least at this time, does not do this verification for you.
|
|
80
80
|
|
|
81
|
-
It is also up to you to ensure, as outlined above, that **you avoid** exporting React components along with other logics within the same
|
|
81
|
+
It is also up to you to ensure, as outlined above, that **you avoid** exporting React components along with other logics within the same modules (unless you have to per the design of your current framework), which may derail the linting in some cases. Separating exporting React components within their own modules ending with a JSX file extension, from exporting other logics within modules that don't end with a JSX file extension, is crucial for distinguishing between Components Modules and Logics Modules respectively.
|
|
82
82
|
|
|
83
83
|
The import rules are designed to be as permissive as possible, allowing for more obscure use cases as long as they are non-breaking. However, it is still your responsibility as a developer to, within a file, not mix in incompatible ways code that cannot compose.
|
|
84
84
|
|
package/comments.config.js
CHANGED
|
@@ -3,11 +3,18 @@ import {
|
|
|
3
3
|
directive21ConfigName,
|
|
4
4
|
} from "./library/_commons/constants/bases.js";
|
|
5
5
|
|
|
6
|
+
import {
|
|
7
|
+
jSDocComments,
|
|
8
|
+
testsComments,
|
|
9
|
+
} from "./jscomments/_commons/constants/bases.js";
|
|
6
10
|
import { agnostic20Comments } from "./jscomments/agnostic20/constants/bases.js";
|
|
7
11
|
import { directive21Comments } from "./jscomments/directive21/constants/bases.js";
|
|
8
12
|
|
|
9
13
|
const config = Object.freeze({
|
|
10
|
-
|
|
14
|
+
jsDoc: jSDocComments,
|
|
15
|
+
// ...jSDocComments,
|
|
16
|
+
tests: testsComments,
|
|
17
|
+
// ...testsComments,
|
|
11
18
|
[agnostic20ConfigName]: agnostic20Comments,
|
|
12
19
|
[directive21ConfigName]: directive21Comments,
|
|
13
20
|
});
|
|
@@ -15,11 +22,12 @@ const config = Object.freeze({
|
|
|
15
22
|
export default config;
|
|
16
23
|
|
|
17
24
|
/* Notes
|
|
25
|
+
comment: "comment", // $COMMENT#COMMENT in code, "comment" on hover when resolved by the VSCode extension JSComments
|
|
18
26
|
Aims of the VSCode extension JSComments:
|
|
19
27
|
- automatically capitalizes keys, so here:
|
|
20
28
|
- config.comment would return $COMMENT#COMMENT
|
|
21
29
|
- automatically chain keys within keys, so here
|
|
22
30
|
- config["agnostic20"] would return $COMMENT#AGNOSTIC20#*
|
|
23
31
|
- config["directive21"] would return $COMMENT#DIRECTIVE21#*
|
|
24
|
-
- this way, instead doing a find-replace on a big documentation comment, the comment stays within the config and only the config placeholder is found and replaced for the same results
|
|
32
|
+
- this way, instead doing a find-replace on a big documentation comment, the comment stays within the config and only the config placeholder is found and replaced for the same results
|
|
25
33
|
*/
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
// comment variables for JSDoc definitions
|
|
2
|
+
export const jSDocComments = Object.freeze({
|
|
3
|
+
// library/_commons/utilities/helpers.js
|
|
4
|
+
basePath: "The absolute import path with extension yet resolved.",
|
|
5
|
+
currentDir:
|
|
6
|
+
"The directory of the file containing the import (from `path.dirname(context.filename)`).",
|
|
7
|
+
importPath:
|
|
8
|
+
"The import specifier (e.g., `@/components/Button` or `./utils`), from the current node.",
|
|
9
|
+
cwd: "The project root (from `context.cwd`).",
|
|
10
|
+
fileResolvedPath: "The resolved path of the file.",
|
|
11
|
+
aContext: "An ESLint rule's `context` object.",
|
|
12
|
+
resolvedDirectives_blockedImports: `The blocked imports object, either for agnostic20 or for directive21.`,
|
|
13
|
+
currentFileResolvedDirective: `The current file's "resolved" directive.`,
|
|
14
|
+
importedFileResolvedDirective: `The imported file's "resolved" directive.`,
|
|
15
|
+
theCurrentFileResolvedDirective: `The "resolved" directive of the "resolved" module.`,
|
|
16
|
+
// library/ ... /config.js
|
|
17
|
+
plugin: "The use-agnostic ESLint plugin itself.",
|
|
18
|
+
// library/agnostic20/_commons/constants/bases.js
|
|
19
|
+
currentFileEffectiveDirective: "The current file's effective directive.",
|
|
20
|
+
importedFileEffectiveDirective: "The imported file's effective directive.",
|
|
21
|
+
// library/ ... /flows.js
|
|
22
|
+
context: "The ESLint rule's `context` object.",
|
|
23
|
+
node: "The ESLint `node` of the rule's current traversal.",
|
|
24
|
+
// library/ ... /helpers.js
|
|
25
|
+
extension: "The JavaScript (TypeScript) extension of the file.",
|
|
26
|
+
resolvedPath: "The resolved path of the imported module.",
|
|
27
|
+
// library/agnostic20/_commons/utilities/helpers.js
|
|
28
|
+
ast: "The module's AST (Abstract Syntax Tree).",
|
|
29
|
+
directiveA20: `The directive as written on top of the file (\`"no directive"\` if no valid directive).`,
|
|
30
|
+
effectiveDirective: "The effective directive of the effective module.",
|
|
31
|
+
serverByDefault: `\`null\` denotes a server-by-default module, ideally a Server Module.`,
|
|
32
|
+
useServer: `\`'use server'\` denotes a Server Functions Module.`,
|
|
33
|
+
useClient: `\`'use client'\` denotes a Client Module.`,
|
|
34
|
+
useAgnostic: `\`'use agnostic'\` denotes an Agnostic Module (formerly Shared Module).`,
|
|
35
|
+
useServerLogics20: `\`'use server logics'\` denotes a Server Logics Module.`,
|
|
36
|
+
useServerComponents20: `\`'use server components'\` denotes a Server Components Module.`,
|
|
37
|
+
useServerFunctions20: `\`'use server functions'\` denotes a Server Functions Module.`,
|
|
38
|
+
useClientLogics20: `\`'use client logics'\` denotes a Client Logics Module.`,
|
|
39
|
+
useClientComponents20: `\`'use client components'\` denotes a Client Components Module.`,
|
|
40
|
+
useAgnosticLogics20: `\`'use agnostic logics'\` denotes an Agnostic Logics Module.`,
|
|
41
|
+
useAgnosticComponents20: `\`'use agnostic components'\` denotes an Agnostic Components Module.`,
|
|
42
|
+
// library/directive21/_commons/constants/bases.js
|
|
43
|
+
currentFileCommentedDirective: "The current file's commented directive.",
|
|
44
|
+
importedFileCommentedDirective: "The imported file's commented directive.",
|
|
45
|
+
// library/directive21/_commons/utilities/helpers.js
|
|
46
|
+
string: "The original string.",
|
|
47
|
+
sourceCode: "The ESLint SourceCode object.",
|
|
48
|
+
directiveD21:
|
|
49
|
+
"The commented directive as written on top of the file (cannot be `null` at that stage).",
|
|
50
|
+
commentedDirective: "The commented directive of the commented module.",
|
|
51
|
+
useServerLogics21: `\`'use server logics'\`, \`"use server logics"\` denoting a Server Logics Module.`,
|
|
52
|
+
useClientLogics21: `\`'use client logics'\`, \`"use client logics"\` denoting a Client Logics Module.`,
|
|
53
|
+
useAgnosticLogics21: `\`'use agnostic logics'\`, \`"use agnostic logics"\` denoting an Agnostic Logics Module.`,
|
|
54
|
+
useServerComponents21: `\`'use server components'\`, \`"use server components"\` denoting a Server Components Module.`,
|
|
55
|
+
useClientComponents21: `\`'use client components'\`, \`"use client components"\` denoting a Client Components Module.`,
|
|
56
|
+
useAgnosticComponents21: `\`'use agnostic components'\`, \`"use agnostic components"\` denoting an Agnostic Components Module.`,
|
|
57
|
+
useServerFunctions21: `\`'use server functions'\`, \`"use server functions"\` denoting a Server Functions Module.`,
|
|
58
|
+
useClientContexts21: `\`'use client contexts'\`, \`"use client contexts"\` denoting a Client Contexts Module.`,
|
|
59
|
+
useAgnosticConditions21: `\`'use agnostic conditions'\`, \`"use agnostic conditions"\` denoting an Agnostic Conditions Module.`,
|
|
60
|
+
useAgnosticStrategies21: `\`'use agnostic strategies'\`, \`"use agnostic strategies"\` denoting an Agnostic Strategies Module.`,
|
|
61
|
+
useServerLogicsExtensionRule: `\`'use server logics'\`: Server Logics Modules do NOT export JSX.`,
|
|
62
|
+
useClientLogicsExtensionRule: `\`'use client logics'\`: Client Logics Modules do NOT export JSX.`,
|
|
63
|
+
useAgnosticLogicsExtensionRule: `\`'use agnostic logics'\`: Agnostic Logics Modules do NOT export JSX.`,
|
|
64
|
+
useServerComponentsExtensionRule: `\`'use server components'\`: Server Components Modules ONLY export JSX.`,
|
|
65
|
+
useClientComponentsExtensionRule: `\`'use client components'\`: Client Components Modules ONLY export JSX.`,
|
|
66
|
+
useAgnosticComponentsExtensionRule: `\`'use agnostic components'\`: Agnostic Components Modules ONLY export JSX.`,
|
|
67
|
+
useServerFunctionsExtensionRule: `\`'use server functions'\`: Server Functions Modules do NOT export JSX.`,
|
|
68
|
+
useClientContextsExtensionRule: `\`'use client contexts'\`: Client Contexts Modules ONLY export JSX.`,
|
|
69
|
+
useAgnosticConditionsExtensionRule: `\`'use agnostic conditions'\`: Agnostic Conditions Modules ONLY export JSX.`,
|
|
70
|
+
useAgnosticStrategiesExtensionRule: `\`'use agnostic strategies'\`: Agnostic Strategies Modules may export JSX.`,
|
|
71
|
+
// tests/_commons/utilities/helpers.js
|
|
72
|
+
folderPath: "The provided directory.",
|
|
73
|
+
allFiles:
|
|
74
|
+
"The accumulator array of file paths. Defaults to an empty array on the initial call, and is passed through each recursive call to be mutated and collect results.",
|
|
75
|
+
javaScriptErrorsLength: "The number of errors expected on JavaScript files.",
|
|
76
|
+
typeScriptErrorsLength: "The number of errors expected on TypeScript files.",
|
|
77
|
+
messageId: "The messageId of the errors expected.",
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
// comment variables for tests flavor texts
|
|
81
|
+
export const testsComments = Object.freeze({
|
|
82
|
+
thatsA: "That's a",
|
|
83
|
+
thatsAn: "That's an",
|
|
84
|
+
importingA: "...Importing a",
|
|
85
|
+
withExtension: "with extension",
|
|
86
|
+
withExtensionParentheses: "(with extension).",
|
|
87
|
+
byFolder: "by a folder.",
|
|
88
|
+
importing: "...Importing",
|
|
89
|
+
viaStrategy: "via Special Agnostic Strategy",
|
|
90
|
+
viaStrategyPeriod: "via Special Agnostic Strategy.",
|
|
91
|
+
viaAlias: "Via alias.",
|
|
92
|
+
viaBaseUrl: "Via baseUrl.",
|
|
93
|
+
valid: "Valid.",
|
|
94
|
+
invalid: "Invalid.",
|
|
95
|
+
});
|
|
@@ -17,13 +17,15 @@ export const serverLogicsComments = Object.freeze({
|
|
|
17
17
|
[USE_SERVER_FUNCTIONS]:
|
|
18
18
|
/* valid */ "Server Functions, being able to import one another, can compose and do so via 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.)",
|
|
19
19
|
[USE_CLIENT_LOGICS]:
|
|
20
|
-
/* invalid */ "Client Logics should never leak to the server.",
|
|
20
|
+
/* invalid */ "Client Logics should never leak to the server, such as would be the case here in a Server Logics Module.",
|
|
21
21
|
[USE_CLIENT_COMPONENTS]:
|
|
22
22
|
/* invalid */ "Client Components cannot be tinkered with on the server.",
|
|
23
23
|
[USE_AGNOSTIC_LOGICS]:
|
|
24
|
-
/* valid */ "Agnostic Logics can run safely on the server just like they can on the client.",
|
|
24
|
+
/* valid */ "Agnostic Logics can run safely on the server just like they can on the client, such as is the case here in a Server Logics Module.",
|
|
25
25
|
[USE_AGNOSTIC_COMPONENTS]:
|
|
26
26
|
/* valid */ "Agnostic Components can be composed with Logics on the server just like they can on the client, as long at the Server Logics Module, by convention, does not export React components.",
|
|
27
|
+
module: "Server Logics Module",
|
|
28
|
+
modulePeriod: "Server Logics Module.",
|
|
27
29
|
});
|
|
28
30
|
|
|
29
31
|
export const serverComponentsComments = Object.freeze({
|
|
@@ -34,13 +36,15 @@ export const serverComponentsComments = Object.freeze({
|
|
|
34
36
|
[USE_SERVER_FUNCTIONS]:
|
|
35
37
|
/* valid */ "Server Functions can be passed to imported Client Components within Server Components Modules, even though indeed Server Components Modules and Server Components can make their own Server Functions through inline 'use server' directives.",
|
|
36
38
|
[USE_CLIENT_LOGICS]:
|
|
37
|
-
/* invalid */ "Client Logics should never leak to the server.",
|
|
39
|
+
/* invalid */ "Client Logics should never leak to the server, such as would be the case here in a Server Components Module.",
|
|
38
40
|
[USE_CLIENT_COMPONENTS]:
|
|
39
41
|
/* valid */ "Client Components can be nested inside Server Components either to wrap some of the tree with client state accessible through child Client Components and pass through Server Components, or to create client boundaries when the root of the application is planted on the server.",
|
|
40
42
|
[USE_AGNOSTIC_LOGICS]:
|
|
41
|
-
/* valid */ "Agnostic Logics can run safely on the server just like they can on the client.",
|
|
43
|
+
/* valid */ "Agnostic Logics can run safely on the server just like they can on the client, such as is the case here in a Server Components Module.",
|
|
42
44
|
[USE_AGNOSTIC_COMPONENTS]:
|
|
43
45
|
/* valid */ "Agnostic Components can render safely on the server just like they can on the client.",
|
|
46
|
+
module: "Server Components Module",
|
|
47
|
+
modulePeriod: "Server Components Module.",
|
|
44
48
|
});
|
|
45
49
|
|
|
46
50
|
export const serverFunctionsComments = Object.freeze({
|
|
@@ -51,18 +55,20 @@ export const serverFunctionsComments = Object.freeze({
|
|
|
51
55
|
[USE_SERVER_FUNCTIONS]:
|
|
52
56
|
/* valid */ "Server Functions, even though they don't need to import one another and the same results can be generated via 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.)",
|
|
53
57
|
[USE_CLIENT_LOGICS]:
|
|
54
|
-
/* invalid */ "Client Logics should never leak to the server.",
|
|
58
|
+
/* invalid */ "Client Logics should never leak to the server, such as would be the case here in a Server Functions Module.",
|
|
55
59
|
[USE_CLIENT_COMPONENTS]:
|
|
56
60
|
/* invalid */ "Client Components aren't allowed because Server Functions have no business working with React Components.",
|
|
57
61
|
[USE_AGNOSTIC_LOGICS]:
|
|
58
|
-
/* valid */ "Agnostic Logics can run safely on the server just like they can on the client.",
|
|
62
|
+
/* valid */ "Agnostic Logics can run safely on the server just like they can on the client, such as is the case here in a Server Functions Module.",
|
|
59
63
|
[USE_AGNOSTIC_COMPONENTS]:
|
|
60
64
|
/* invalid */ "Agnostic Components aren't allowed because Server Functions have no business working with React Components.",
|
|
65
|
+
module: "Server Functions Module",
|
|
66
|
+
modulePeriod: "Server Functions Module.",
|
|
61
67
|
});
|
|
62
68
|
|
|
63
69
|
export const clientLogicsComments = Object.freeze({
|
|
64
70
|
[USE_SERVER_LOGICS]:
|
|
65
|
-
/* invalid */ "Server Logics should never leak to the client.",
|
|
71
|
+
/* invalid */ "Server Logics should never leak to the client, such as would be the case here in a Client Logics Module.",
|
|
66
72
|
[USE_SERVER_COMPONENTS]:
|
|
67
73
|
/* invalid */ "Server Components cannot be thinkered with on the client.",
|
|
68
74
|
[USE_SERVER_FUNCTIONS]:
|
|
@@ -72,14 +78,16 @@ export const clientLogicsComments = Object.freeze({
|
|
|
72
78
|
[USE_CLIENT_COMPONENTS]:
|
|
73
79
|
/* valid */ "Client Components are OK to be composed with Client Logics as long as the Client Logics Module, by convention, does not export React components.",
|
|
74
80
|
[USE_AGNOSTIC_LOGICS]:
|
|
75
|
-
/* valid */ "Agnostic Logics can run safely on the client just like they can on the server.",
|
|
81
|
+
/* valid */ "Agnostic Logics can run safely on the client just like they can on the server, such as is the case here in a Client Logics Module.",
|
|
76
82
|
[USE_AGNOSTIC_COMPONENTS]:
|
|
77
83
|
/* valid */ "Agnostic Components can be composed with Logics on the client just like they can on the server, as long as the Client Logics Module, by convention, does not export React components.",
|
|
84
|
+
module: "Client Logics Module",
|
|
85
|
+
modulePeriod: "Client Logics Module.",
|
|
78
86
|
});
|
|
79
87
|
|
|
80
88
|
export const clientComponentsComments = Object.freeze({
|
|
81
89
|
[USE_SERVER_LOGICS]:
|
|
82
|
-
/* invalid */ "Server Logics should never leak to the client.",
|
|
90
|
+
/* invalid */ "Server Logics should never leak to the client, such as would be the case here in a Client Components Module.",
|
|
83
91
|
[USE_SERVER_COMPONENTS]:
|
|
84
92
|
/* invalid */ "Server Components may only pass through Client Components via the children prop within Server Components Modules.",
|
|
85
93
|
[USE_SERVER_FUNCTIONS]:
|
|
@@ -89,41 +97,47 @@ export const clientComponentsComments = Object.freeze({
|
|
|
89
97
|
[USE_CLIENT_COMPONENTS]:
|
|
90
98
|
/* valid */ "Client Components can compose with one another.",
|
|
91
99
|
[USE_AGNOSTIC_LOGICS]:
|
|
92
|
-
/* valid */ "Agnostic Logics can run safely on the client just like they can on the server.",
|
|
100
|
+
/* valid */ "Agnostic Logics can run safely on the client just like they can on the server, such as is the case here in a Client Components Module.",
|
|
93
101
|
[USE_AGNOSTIC_COMPONENTS]:
|
|
94
102
|
/* valid */ "Agnostic Components can render safely on the client just like they can on the server.",
|
|
103
|
+
module: "Client Components Module",
|
|
104
|
+
modulePeriod: "Client Components Module.",
|
|
95
105
|
});
|
|
96
106
|
|
|
97
107
|
export const agnosticLogicsComments = Object.freeze({
|
|
98
108
|
[USE_SERVER_LOGICS]:
|
|
99
|
-
/* invalid */ "Server Logics cannot run on both the server and the client.",
|
|
109
|
+
/* invalid */ "Server Logics cannot run on both the server and the client, such as would be the case here in an Agnostic Logics Module.",
|
|
100
110
|
[USE_SERVER_COMPONENTS]:
|
|
101
111
|
/* invalid */ "Server Components cannot be tinkered with on both the server and the client.",
|
|
102
112
|
[USE_SERVER_FUNCTIONS]:
|
|
103
113
|
/* invalid */ "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.",
|
|
104
114
|
[USE_CLIENT_LOGICS]:
|
|
105
|
-
/* invalid */ "Client Logics cannot run on both the server and the client.",
|
|
115
|
+
/* invalid */ "Client Logics cannot run on both the server and the client, such as would be the case here in an Agnostic Logics Module.",
|
|
106
116
|
[USE_CLIENT_COMPONENTS]:
|
|
107
117
|
/* invalid */ "Client Components cannot be tinkered with on both the server and the client.",
|
|
108
118
|
[USE_AGNOSTIC_LOGICS]:
|
|
109
119
|
/* valid */ "Agnostic Logics can compose with one another.",
|
|
110
120
|
[USE_AGNOSTIC_COMPONENTS]:
|
|
111
121
|
/* valid */ "Agnostic Components can be composed with Logics agnostically as long as the Agnostic Logics Module, by convention, does not export React components.",
|
|
122
|
+
module: "Agnostic Logics Module",
|
|
123
|
+
modulePeriod: "Agnostic Logics Module.",
|
|
112
124
|
});
|
|
113
125
|
|
|
114
126
|
export const agnosticComponentsComments = Object.freeze({
|
|
115
127
|
[USE_SERVER_LOGICS]:
|
|
116
|
-
/* invalid */ "Server Logics cannot run on both the server and the client.",
|
|
128
|
+
/* invalid */ "Server Logics cannot run on both the server and the client, such as would be the case here in an Agnostic Components Module.",
|
|
117
129
|
[USE_SERVER_COMPONENTS]:
|
|
118
130
|
/* invalid */ "Server Components, unlike 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.",
|
|
119
131
|
[USE_SERVER_FUNCTIONS]:
|
|
120
132
|
/* valid */ "Server Functions can be passed to Client Components as props when Client Components are also legally imported into Agnostic Components Modules.",
|
|
121
133
|
[USE_CLIENT_LOGICS]:
|
|
122
|
-
/* invalid */ "Client Logics cannot run on both the server and the client.",
|
|
134
|
+
/* invalid */ "Client Logics cannot run on both the server and the client, such as would be the case here in an Agnostic Components Module.",
|
|
123
135
|
[USE_CLIENT_COMPONENTS]:
|
|
124
136
|
/* valid */ "Client Components can be nested inside Agnostic Components either to wrap some of the tree with client state accessible through child Client Components and pass through Server Components (if still on the Server Tree), or to create client boundaries when the root of the application is planted on the server.",
|
|
125
137
|
[USE_AGNOSTIC_LOGICS]:
|
|
126
138
|
/* valid */ "Agnostic Logics, being environment-agnostic logic, can safely support Agnostic Components.",
|
|
127
139
|
[USE_AGNOSTIC_COMPONENTS]:
|
|
128
140
|
/* valid */ "Agnostic Components can compose with one another.",
|
|
141
|
+
module: "Agnostic Components Module",
|
|
142
|
+
modulePeriod: "Agnostic Components Module.",
|
|
129
143
|
});
|
|
@@ -15,49 +15,55 @@ export const serverLogicsComments = Object.freeze({
|
|
|
15
15
|
[USE_SERVER_LOGICS]:
|
|
16
16
|
/* valid */ "Prime Server Logics can compose with one another.",
|
|
17
17
|
[USE_CLIENT_LOGICS]:
|
|
18
|
-
/* invalid */ "Prime Client Logics should never leak to the server.",
|
|
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
19
|
[USE_AGNOSTIC_LOGICS]:
|
|
20
|
-
/* valid */ "Prime Agnostic Logics can run safely on the server just like they can on the client.",
|
|
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
21
|
[USE_SERVER_COMPONENTS]:
|
|
22
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
23
|
[USE_CLIENT_COMPONENTS]:
|
|
24
24
|
/* invalid */ "Lineal Client Components, like any Client Components, cannot be tinkered with on the server.",
|
|
25
25
|
[USE_AGNOSTIC_COMPONENTS]:
|
|
26
|
-
/* valid */ "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.",
|
|
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
27
|
[USE_SERVER_FUNCTIONS]:
|
|
28
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
29
|
[USE_CLIENT_CONTEXTS]:
|
|
30
30
|
/* invalid */ "Client Contexts Components, like any Client Components, cannot be tinkered with on the server.",
|
|
31
31
|
[USE_AGNOSTIC_CONDITIONS]:
|
|
32
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",
|
|
33
36
|
});
|
|
34
37
|
|
|
35
38
|
export const clientLogicsComments = Object.freeze({
|
|
36
39
|
[USE_SERVER_LOGICS]:
|
|
37
|
-
/* invalid */ "Prime Server Logics should never leak to the client.",
|
|
40
|
+
/* invalid */ "Prime Server Logics should never leak to the client, such as would be the case here in a Prime Client Logics Module.",
|
|
38
41
|
[USE_CLIENT_LOGICS]:
|
|
39
42
|
/* valid */ "Prime Client Logics can compose with one another.",
|
|
40
43
|
[USE_AGNOSTIC_LOGICS]:
|
|
41
|
-
/* valid */ "Prime Agnostic Logics can run safely on the client just like they can on the server.",
|
|
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.",
|
|
42
45
|
[USE_SERVER_COMPONENTS]:
|
|
43
46
|
/* invalid */ "Lineal Server Components cannot be thinkered with on the client.",
|
|
44
47
|
[USE_CLIENT_COMPONENTS]:
|
|
45
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.",
|
|
46
49
|
[USE_AGNOSTIC_COMPONENTS]:
|
|
47
|
-
/* valid */ "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.",
|
|
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.",
|
|
48
51
|
[USE_SERVER_FUNCTIONS]:
|
|
49
52
|
/* valid */ "(Special) Server Functions can technically be attached to Client Components that are being tinkered with within Client Logics Modules.",
|
|
50
53
|
[USE_CLIENT_CONTEXTS]:
|
|
51
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.",
|
|
52
55
|
[USE_AGNOSTIC_CONDITIONS]:
|
|
53
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",
|
|
54
60
|
});
|
|
55
61
|
|
|
56
62
|
export const agnosticLogicsComments = Object.freeze({
|
|
57
63
|
[USE_SERVER_LOGICS]:
|
|
58
|
-
/* invalid */ "Prime Server Logics cannot run on both the server and the client.",
|
|
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.",
|
|
59
65
|
[USE_CLIENT_LOGICS]:
|
|
60
|
-
/* invalid */ "Prime Client Logics cannot run on both the server and the client.",
|
|
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.",
|
|
61
67
|
[USE_AGNOSTIC_LOGICS]:
|
|
62
68
|
/* valid */ "Prime Agnostic Logics can compose with one another.",
|
|
63
69
|
[USE_SERVER_COMPONENTS]:
|
|
@@ -65,22 +71,25 @@ export const agnosticLogicsComments = Object.freeze({
|
|
|
65
71
|
[USE_CLIENT_COMPONENTS]:
|
|
66
72
|
/* invalid */ "Lineal Client Components, like any Client Components, cannot be tinkered with on both the server and the client.",
|
|
67
73
|
[USE_AGNOSTIC_COMPONENTS]:
|
|
68
|
-
/* valid */ "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.",
|
|
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.",
|
|
69
75
|
[USE_SERVER_FUNCTIONS]:
|
|
70
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.",
|
|
71
77
|
[USE_CLIENT_CONTEXTS]:
|
|
72
78
|
/* invalid */ "(Special) Client Contexts Components, like any Client Components, cannot be tinkered with on both the server and the client.",
|
|
73
79
|
[USE_AGNOSTIC_CONDITIONS]:
|
|
74
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",
|
|
75
84
|
});
|
|
76
85
|
|
|
77
86
|
export const serverComponentsComments = Object.freeze({
|
|
78
87
|
[USE_SERVER_LOGICS]:
|
|
79
88
|
/* valid */ "Prime Server Logics, being logic from the server, can safely support Lineal Server Components.",
|
|
80
89
|
[USE_CLIENT_LOGICS]:
|
|
81
|
-
/* invalid */ "Prime Client Logics should never leak to the server.",
|
|
90
|
+
/* invalid */ "Prime Client Logics should never leak to the server, such as would be the case here in a Lineal Server Components Module.",
|
|
82
91
|
[USE_AGNOSTIC_LOGICS]:
|
|
83
|
-
/* valid */ "Prime Agnostic Logics can run safely on the server just like they can on the client.",
|
|
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.",
|
|
84
93
|
[USE_SERVER_COMPONENTS]:
|
|
85
94
|
/* valid */ "Lineal Server Components can compose with one another, now that thanks to the inclusion of Agnostic Components they are actual Server Components.",
|
|
86
95
|
[USE_CLIENT_COMPONENTS]:
|
|
@@ -93,34 +102,40 @@ export const serverComponentsComments = Object.freeze({
|
|
|
93
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.",
|
|
94
103
|
[USE_AGNOSTIC_CONDITIONS]:
|
|
95
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",
|
|
96
108
|
});
|
|
97
109
|
|
|
98
110
|
export const clientComponentsComments = Object.freeze({
|
|
99
111
|
[USE_SERVER_LOGICS]:
|
|
100
|
-
/* invalid */ "Prime Server Logics should never leak to the client.",
|
|
112
|
+
/* invalid */ "Prime Server Logics should never leak to the client, such as would be the case here in a Lineal Client Components Module.",
|
|
101
113
|
[USE_CLIENT_LOGICS]:
|
|
102
114
|
/* valid */ "Prime Client Logics, being logic from the client, can safely support Lineal Client Components, like any Client Components.",
|
|
103
115
|
[USE_AGNOSTIC_LOGICS]:
|
|
104
|
-
/* valid */ "Prime Agnostic Logics can run safely on the client just like they can on the server.",
|
|
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.",
|
|
105
117
|
[USE_SERVER_COMPONENTS]:
|
|
106
118
|
/* invalid */ "Lineal Server Components cannot be the children of Lineal Client Components.",
|
|
107
119
|
[USE_CLIENT_COMPONENTS]:
|
|
108
120
|
/* valid */ "Lineal Client Components can compose with one another.",
|
|
109
121
|
[USE_AGNOSTIC_COMPONENTS]:
|
|
110
|
-
/* valid */ "Lineal Agnostic Components can render safely on the client just like they can on the server.",
|
|
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.",
|
|
111
123
|
[USE_SERVER_FUNCTIONS]:
|
|
112
|
-
/* valid */ "(Special) Server Functions are specifically triggered by Client Components.",
|
|
124
|
+
/* valid */ "(Special) Server Functions are specifically triggered by Client Components, such as is the case here in a Lineal Client Components Module.",
|
|
113
125
|
[USE_CLIENT_CONTEXTS]:
|
|
114
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.",
|
|
115
127
|
[USE_AGNOSTIC_CONDITIONS]:
|
|
116
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",
|
|
117
132
|
});
|
|
118
133
|
|
|
119
134
|
export const agnosticComponentsComments = Object.freeze({
|
|
120
135
|
[USE_SERVER_LOGICS]:
|
|
121
|
-
/* invalid */ "Prime Server Logics cannot run on both the server and the client.",
|
|
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.",
|
|
122
137
|
[USE_CLIENT_LOGICS]:
|
|
123
|
-
/* invalid */ "Prime Client Logics cannot run on both the server and the client.",
|
|
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.",
|
|
124
139
|
[USE_AGNOSTIC_LOGICS]:
|
|
125
140
|
/* valid */ "Prime Agnostic Logics, being environment-agnostic logic, can safely support Agnostic Components.",
|
|
126
141
|
[USE_SERVER_COMPONENTS]:
|
|
@@ -135,15 +150,18 @@ export const agnosticComponentsComments = Object.freeze({
|
|
|
135
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.",
|
|
136
151
|
[USE_AGNOSTIC_CONDITIONS]:
|
|
137
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",
|
|
138
156
|
});
|
|
139
157
|
|
|
140
158
|
export const serverFunctionsComments = Object.freeze({
|
|
141
159
|
[USE_SERVER_LOGICS]:
|
|
142
160
|
/* valid */ "Prime Server Logics, being logic from the server, can safely support (Special) Server Functions.",
|
|
143
161
|
[USE_CLIENT_LOGICS]:
|
|
144
|
-
/* invalid */ "Prime Client Logics should never leak to the server.",
|
|
162
|
+
/* invalid */ "Prime Client Logics should never leak to the server, such as would be the case here in a Special Server Functions Module.",
|
|
145
163
|
[USE_AGNOSTIC_LOGICS]:
|
|
146
|
-
/* valid */ "Prime Agnostic Logics can run safely on the server just like they can on the client.",
|
|
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.",
|
|
147
165
|
[USE_SERVER_COMPONENTS]:
|
|
148
166
|
/* invalid */ "Lineal Server Components aren't allowed because (Special) Server Functions have no business working with React Components.",
|
|
149
167
|
[USE_CLIENT_COMPONENTS]:
|
|
@@ -156,34 +174,40 @@ export const serverFunctionsComments = Object.freeze({
|
|
|
156
174
|
/* invalid */ "(Special) Client Contexts Components aren't allowed because (Special) Server Functions have no business working with React Components.",
|
|
157
175
|
[USE_AGNOSTIC_CONDITIONS]:
|
|
158
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",
|
|
159
180
|
});
|
|
160
181
|
|
|
161
182
|
export const clientContextsComments = Object.freeze({
|
|
162
183
|
[USE_SERVER_LOGICS]:
|
|
163
|
-
/* invalid */ "Prime Server Logics should never leak to the client.",
|
|
184
|
+
/* invalid */ "Prime Server Logics should never leak to the client, such as would be the case here in a Special Client Contexts Module.",
|
|
164
185
|
[USE_CLIENT_LOGICS]:
|
|
165
186
|
/* valid */ "Prime Client Logics, being logic from the client, can safely support (Special) Client Contexts Components, like any Client Components.",
|
|
166
187
|
[USE_AGNOSTIC_LOGICS]:
|
|
167
|
-
/* valid */ "Prime Agnostic Logics can run safely on the client just like they can on the server.",
|
|
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.",
|
|
168
189
|
[USE_SERVER_COMPONENTS]:
|
|
169
190
|
/* invalid */ "Lineal Server Components may only pass through (Special) Client Contexts Components via the children prop within Server Components Modules.",
|
|
170
191
|
[USE_CLIENT_COMPONENTS]:
|
|
171
192
|
/* valid */ "Lineal Client Components can create client boundaries within (Special) Client Contexts Components.",
|
|
172
193
|
[USE_AGNOSTIC_COMPONENTS]:
|
|
173
|
-
/* valid */ "Lineal Agnostic Components can render safely on the client just like they can on the server.",
|
|
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.",
|
|
174
195
|
[USE_SERVER_FUNCTIONS]:
|
|
175
|
-
/* valid */ "(Special) Server Functions are specifically triggered by Client Components.",
|
|
196
|
+
/* valid */ "(Special) Server Functions are specifically triggered by Client Components, such as is the case here in a Special Client Contexts Module.",
|
|
176
197
|
[USE_CLIENT_CONTEXTS]:
|
|
177
198
|
/* valid */ "(Special) Client Contexts Components can compose with one another.",
|
|
178
199
|
[USE_AGNOSTIC_CONDITIONS]:
|
|
179
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",
|
|
180
204
|
});
|
|
181
205
|
|
|
182
206
|
export const agnosticConditionsComments = Object.freeze({
|
|
183
207
|
[USE_SERVER_LOGICS]:
|
|
184
|
-
/* invalid */ "Prime Server Logics cannot run on both the server and the client.",
|
|
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.",
|
|
185
209
|
[USE_CLIENT_LOGICS]:
|
|
186
|
-
/* invalid */ "Prime Client Logics cannot run on both the server and the client.",
|
|
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.",
|
|
187
211
|
[USE_AGNOSTIC_LOGICS]:
|
|
188
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.)",
|
|
189
213
|
[USE_SERVER_COMPONENTS]:
|
|
@@ -198,4 +222,7 @@ export const agnosticConditionsComments = Object.freeze({
|
|
|
198
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.",
|
|
199
223
|
[USE_AGNOSTIC_CONDITIONS]:
|
|
200
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",
|
|
201
228
|
});
|
|
@@ -81,15 +81,14 @@ export const resolveImportPath = (currentDir, importPath, cwd) => {
|
|
|
81
81
|
return null; // not found
|
|
82
82
|
};
|
|
83
83
|
|
|
84
|
-
/*
|
|
85
|
-
// Note: For agnostic20, I need the AST so that the directive can be picked up on any line as long as it is the first statement of the file.
|
|
84
|
+
/* getSourceCodeFromFilePath */
|
|
86
85
|
|
|
87
86
|
/**
|
|
88
|
-
* Gets the ESLint-generated
|
|
87
|
+
* Gets the ESLint-generated SourceCode object of a file from its resolved path.
|
|
89
88
|
* @param {string} resolvedPath The resolved path of the file.
|
|
90
|
-
* @returns The ESLint-generated
|
|
89
|
+
* @returns The ESLint-generated SourceCode object of the file.
|
|
91
90
|
*/
|
|
92
|
-
export const
|
|
91
|
+
export const getSourceCodeFromFilePath = (resolvedPath) => {
|
|
93
92
|
// ensures each instance of the function is based on its own linter
|
|
94
93
|
// (just in case somehow some linters were running concurrently)
|
|
95
94
|
const linter = new Linter();
|
|
@@ -97,32 +96,10 @@ export const getASTFromFilePath = (resolvedPath) => {
|
|
|
97
96
|
const text = fs.readFileSync(resolvedPath, "utf8");
|
|
98
97
|
// utilizes linter.verify ...
|
|
99
98
|
linter.verify(text, { languageOptions: typeScriptAndJSXCompatible });
|
|
100
|
-
// ... to retrieve the raw code as a SourceCode object
|
|
99
|
+
// ... to retrieve the raw code as a SourceCode object
|
|
101
100
|
const code = linter.getSourceCode();
|
|
102
|
-
// ... from which to extract the ESLint-generated AST
|
|
103
|
-
const ast = code.ast;
|
|
104
101
|
|
|
105
|
-
return
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
/* getImportedFileFirstLine */ // for directive21
|
|
109
|
-
// Note: For directive21, I prioritize reading from the file system for performance, foregoing the retrieval of the source code comments for imported modules, since the Directive-First Architecture imposes that the first line of the file is reserved for its commented directive.
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* Gets the first line of code of the imported module.
|
|
113
|
-
* @param {string} resolvedImportPath The resolved path of the imported module.
|
|
114
|
-
* @returns The first line of the imported module.
|
|
115
|
-
*/
|
|
116
|
-
export const getImportedFileFirstLine = (resolvedImportPath) => {
|
|
117
|
-
// gets the code of the import
|
|
118
|
-
const importedFileContent = fs.readFileSync(resolvedImportPath, "utf8");
|
|
119
|
-
// gets the first line of the code of the import
|
|
120
|
-
const importedFileFirstLine = importedFileContent
|
|
121
|
-
.trim()
|
|
122
|
-
.split("\n")[0]
|
|
123
|
-
.trim(); // the line itself needs to be trimmed too
|
|
124
|
-
|
|
125
|
-
return importedFileFirstLine;
|
|
102
|
+
return code;
|
|
126
103
|
};
|
|
127
104
|
|
|
128
105
|
/* highlightFirstLineOfCode */
|