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.
@@ -0,0 +1,331 @@
1
+ import { forAliasVariables } from "./alias-variables.js";
2
+ import { forComposedVariables } from "./composed-variables.js";
3
+
4
+ export const jsDocComments = Object.freeze({
5
+ definitions: Object.freeze({
6
+ makeTestFiles:
7
+ "Makes the paths of the files to be linted for agnostic20 and directive21." /* $COMMENT#JSDOC#DEFINITIONS#MAKETESTFILES */,
8
+ highlightFirstLineOfCode:
9
+ "Gets the coordinates for the first line of code of a file." /* $COMMENT#JSDOC#DEFINITIONS#HIGHLIGHTFIRSTLINEOFCODE */,
10
+ isImportBlocked:
11
+ "$COMMENT#JSDOC#FORCOMPOSEDVARIABLES#RETURNSDECIDING $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#RESOLVED $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#DIRECTIVEINCOMPATIBLE $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#RESOLVED $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#DIRECTIVEPERIOD" /* $COMMENT#JSDOC#DEFINITIONS#ISIMPORTBLOCKED */,
12
+ makeIntroForSpecificViolationMessage:
13
+ "Makes the intro for each specific import rule violation messages." /* $COMMENT#JSDOC#DEFINITIONS#MAKEINTROFORSPECIFICVIOLATIONMESSAGE */,
14
+ makeMessageFromCurrentFileResolvedDirective:
15
+ "$COMMENT#JSDOC#FORCOMPOSEDVARIABLES#LISTSINMESSAGE $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#RESOLVED $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#MODULESINCOMPATIBLE $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#RESOLVED $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#MODULEBASEDON $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#RESOLVED $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#DIRECTIVEPERIOD" /* $COMMENT#JSDOC#DEFINITIONS#MAKEMESSAGEFROMCURRENTFILERESOLVEDDIRECTIVE */,
16
+ findSpecificViolationMessage:
17
+ "$COMMENT#JSDOC#FORCOMPOSEDVARIABLES#FINDTHEMESSAGE $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#RESOLVED $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#RULESBASEDON $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#RDBIPERIOD" /* $COMMENT#JSDOC#DEFINITIONS#FINDSPECIFICVIOLATIONMESSAGE */,
18
+ agnostic20: Object.freeze({
19
+ makeAgnostic20Config:
20
+ "$COMMENT#JSDOC#FORCOMPOSEDVARIABLES#MAKESTHE $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#AGNOSTIC20 $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#CONFIGFORPLUGIN" /* $COMMENT#JSDOC#DEFINITIONS#AGNOSTIC20#MAKEAGNOSTIC20CONFIG */,
21
+ makeBlockedImport:
22
+ "Makes a blockedImport object for the identified blocked import at hand." /* $COMMENT#JSDOC#DEFINITIONS#AGNOSTIC20#MAKEBLOCKEDIMPORT */,
23
+ makeBlockedImportSuggestingUseAgnostic:
24
+ "Makes a blockedImport object for the identified blocked import at hand enhanced with the suggestion to use the `'use agnostic'` directive." /* $COMMENT#JSDOC#DEFINITIONS#AGNOSTIC20#MAKEBLOCKEDIMPORTSUGGESTINGUSEAGNOSTIC */,
25
+ getDirectiveFromModule:
26
+ "$COMMENT#JSDOC#FORCOMPOSEDVARIABLES#GETSDIRECTIVEOF $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#AMODULE" /* $COMMENT#JSDOC#DEFINITIONS#AGNOSTIC20#GETDIRECTIVEFROMMODULE */,
27
+ getDirectiveFromCurrentModule:
28
+ "$COMMENT#JSDOC#FORCOMPOSEDVARIABLES#GETSDIRECTIVEOF $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#CURRENTMODULE" /* $COMMENT#JSDOC#DEFINITIONS#AGNOSTIC20#GETDIRECTIVEFROMCURRENTMODULE */,
29
+ getDirectiveFromImportedModule:
30
+ "$COMMENT#JSDOC#FORCOMPOSEDVARIABLES#GETSDIRECTIVEOF $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#IMPORTEDMODULE" /* $COMMENT#JSDOC#DEFINITIONS#AGNOSTIC20#GETDIRECTIVEFROMIMPORTEDMODULE */,
31
+ getEffectiveDirective:
32
+ "Gets the effective directive of a module, based on the combination of its directive (or lack thereof) and its extension (depending on whether it ends with 'x' for JSX)." /* $COMMENT#JSDOC#DEFINITIONS#AGNOSTIC20#GETEFFECTIVEDIRECTIVE */,
33
+ isImportBlocked:
34
+ "$COMMENT#JSDOC#FORCOMPOSEDVARIABLES#RETURNSDECIDING $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#EFFECTIVE $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#DIRECTIVEINCOMPATIBLE $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#EFFECTIVE $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#DIRECTIVEPERIOD" /* $COMMENT#JSDOC#DEFINITIONS#AGNOSTIC20#ISIMPORTBLOCKED */,
35
+ makeMessageFromCurrentFileEffectiveDirective:
36
+ "$COMMENT#JSDOC#FORCOMPOSEDVARIABLES#LISTSINMESSAGE $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#EFFECTIVE $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#MODULESINCOMPATIBLE $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#EFFECTIVE $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#MODULEBASEDON $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#EFFECTIVE $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#DIRECTIVEPERIOD" /* $COMMENT#JSDOC#DEFINITIONS#AGNOSTIC20#MAKEMESSAGEFROMCURRENTFILEEFFECTIVEDIRECTIVE */,
37
+ findSpecificViolationMessage:
38
+ "$COMMENT#JSDOC#FORCOMPOSEDVARIABLES#FINDTHEMESSAGE $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#EFFECTIVE $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#RULESBASEDON $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#EDBIPERIOD" /* $COMMENT#JSDOC#DEFINITIONS#AGNOSTIC20#FINDSPECIFICVIOLATIONMESSAGE */,
39
+ currentFileFlow:
40
+ "$COMMENT#JSDOC#FORCOMPOSEDVARIABLES#FLOWTHATBEGINS $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#EFFECTIVE $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#DIRECTIVE $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#OFCURRENTFILE $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#EFFECTIVE $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#DIRECTIVES $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#OFFILESITIMPORTS" /* $COMMENT#JSDOC#DEFINITIONS#AGNOSTIC20#CURRENTFILEFLOW */,
41
+ importedFileFlow:
42
+ "$COMMENT#JSDOC#FORCOMPOSEDVARIABLES#FLOWIMPORTREEXPORT $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#EFFECTIVE $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#DIRECTIVEPERIOD" /* $COMMENT#JSDOC#DEFINITIONS#AGNOSTIC20#IMPORTEDFILEFLOW */,
43
+ importsFlow:
44
+ "JSDOC#FORALIASVARIABLES#IMPORTSFLOW" /* $COMMENT#JSDOC#DEFINITIONS#AGNOSTIC20#IMPORTSFLOW */,
45
+ reExportsFlow:
46
+ "The full flow for export traversals, shared between `ExportNamedDeclaration` and `ExportAllDeclaration`, to ensure same effective directive re-exports." /* $COMMENT#JSDOC#DEFINITIONS#AGNOSTIC20#REEXPORTSFLOW */,
47
+ }),
48
+ directive21: Object.freeze({
49
+ makeDirective21Config:
50
+ "$COMMENT#JSDOC#FORCOMPOSEDVARIABLES#MAKESTHE $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#DIRECTIVE21 $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#CONFIGFORPLUGIN" /* $COMMENT#JSDOC#DEFINITIONS#DIRECTIVE21#MAKEDIRECTIVE21CONFIG */,
51
+ makeBlockedImport:
52
+ "JSDOC#DEFINITIONS#AGNOSTIC20#MAKEBLOCKEDIMPORT" /* $COMMENT#JSDOC#DEFINITIONS#DIRECTIVE21#MAKEBLOCKEDIMPORT */,
53
+ detectQuoteType:
54
+ "Detects whether a string is single- or double-quoted." /* $COMMENT#JSDOC#DEFINITIONS#DIRECTIVE21#DETECTQUOTETYPE */,
55
+ stripSingleQuotes:
56
+ "Removes single quotes from a string known to be single-quoted." /* $COMMENT#JSDOC#DEFINITIONS#DIRECTIVE21#STRIPSINGLEQUOTES */,
57
+ stripDoubleQuotes:
58
+ "Removes double quotes from a string known to be double-quoted." /* $COMMENT#JSDOC#DEFINITIONS#DIRECTIVE21#STRIPDOUBLEQUOTES */,
59
+ getCommentedDirectiveFromSourceCode1:
60
+ "Gets the commented directive of a module from its ESLint `SourceCode` object." /* $COMMENT#JSDOC#DEFINITIONS#DIRECTIVE21#GETCOMMENTEDDIRECTIVEFROMSOURCECODE1 */,
61
+ getCommentedDirectiveFromSourceCode2:
62
+ "Accepted directives for the default Directive-First Architecture are (single or double quotes included):" /* $COMMENT#JSDOC#DEFINITIONS#DIRECTIVE21#GETCOMMENTEDDIRECTIVEFROMSOURCECODE2 */,
63
+ getCommentedDirectiveFromCurrentModule1:
64
+ "$COMMENT#JSDOC#FORCOMPOSEDVARIABLES#GETCOMMENTEDDIRECTIVE $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#CURRENTMODULEPERIOD" /* $COMMENT#JSDOC#DEFINITIONS#DIRECTIVE21#GETCOMMENTEDDIRECTIVEFROMCURRENTMODULE1 */,
65
+ getCommentedDirectiveFromCurrentModule2:
66
+ "JSDOC#DEFINITIONS#DIRECTIVE21#GETCOMMENTEDDIRECTIVEFROMSOURCECODE2" /* $COMMENT#JSDOC#DEFINITIONS#DIRECTIVE21#GETCOMMENTEDDIRECTIVEFROMCURRENTMODULE2 */,
67
+ getCommentedDirectiveFromImportedModule1:
68
+ "$COMMENT#JSDOC#FORCOMPOSEDVARIABLES#GETCOMMENTEDDIRECTIVE $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#IMPORTEDMODULEPERIOD" /* $COMMENT#JSDOC#DEFINITIONS#DIRECTIVE21#GETCOMMENTEDDIRECTIVEFROMIMPORTEDMODULE1 */,
69
+ getCommentedDirectiveFromImportedModule2:
70
+ "JSDOC#DEFINITIONS#DIRECTIVE21#GETCOMMENTEDDIRECTIVEFROMSOURCECODE2" /* $COMMENT#JSDOC#DEFINITIONS#DIRECTIVE21#GETCOMMENTEDDIRECTIVEFROMIMPORTEDMODULE2 */,
71
+ getVerifiedCommentedDirective:
72
+ "Ensures that a module's commented directive is consistent with its file extension (depending on whether it ends with 'x' for JSX)." /* $COMMENT#JSDOC#DEFINITIONS#DIRECTIVE21#GETVERIFIEDCOMMENTEDDIRECTIVE */,
73
+ getStrategizedDirective:
74
+ "Gets the interpreted directive from a specified commented Strategy (such as `@serverLogics`) nested inside the import declaration for an import from an Agnostic Strategies Module." /* $COMMENT#JSDOC#DEFINITIONS#DIRECTIVE21#GETSTRATEGIZEDDIRECTIVE */,
75
+ addressDirectiveIfAgnosticStrategies:
76
+ 'Verifies the current node\'s export strategy if the current commented directive is `"use agnostic strategies"` by reporting `exportNotStrategized` in case an export is not strategized in an Agnostic Strategies Module.' /* $COMMENT#JSDOC#DEFINITIONS#DIRECTIVE21#ADDRESSDIRECTIVEIFAGNOSTICSTRATEGIES */,
77
+ isImportBlocked:
78
+ "$COMMENT#JSDOC#FORCOMPOSEDVARIABLES#RETURNSDECIDING $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#COMMENTED $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#DIRECTIVEINCOMPATIBLE $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#COMMENTED $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#DIRECTIVEPERIOD" /* $COMMENT#JSDOC#DEFINITIONS#DIRECTIVE21#ISIMPORTBLOCKED */,
79
+ makeMessageFromCurrentFileCommentedDirective:
80
+ "$COMMENT#JSDOC#FORCOMPOSEDVARIABLES#LISTSINMESSAGE $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#COMMENTED $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#MODULESINCOMPATIBLE $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#COMMENTED $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#MODULEBASEDON $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#COMMENTED $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#DIRECTIVEPERIOD" /* $COMMENT#JSDOC#DEFINITIONS#DIRECTIVE21#MAKEMESSAGEFROMCURRENTFILECOMMENTEDDIRECTIVE */,
81
+ findSpecificViolationMessage:
82
+ "$COMMENT#JSDOC#FORCOMPOSEDVARIABLES#FINDTHEMESSAGE $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#COMMENTED $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#RULESBASEDON $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#CDBIPERIOD" /* $COMMENT#JSDOC#DEFINITIONS#DIRECTIVE21#FINDSPECIFICVIOLATIONMESSAGE */,
83
+ currentFileFlow:
84
+ "$COMMENT#JSDOC#FORCOMPOSEDVARIABLES#FLOWTHATBEGINS $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#VERIFIEDCOMMENTED $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#DIRECTIVE $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#OFCURRENTFILE $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#VERIFIEDCOMMENTED $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#DIRECTIVES $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#OFFILESITIMPORTS" /* $COMMENT#JSDOC#DEFINITIONS#DIRECTIVE21#CURRENTFILEFLOW */,
85
+ importedFileFlow:
86
+ "$COMMENT#JSDOC#FORCOMPOSEDVARIABLES#FLOWIMPORTREEXPORT $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#COMMENTED $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#DIRECTIVEPERIOD" /* $COMMENT#JSDOC#DEFINITIONS#DIRECTIVE21#IMPORTEDFILEFLOW */,
87
+ importsFlow:
88
+ "JSDOC#FORALIASVARIABLES#IMPORTSFLOW" /* $COMMENT#JSDOC#DEFINITIONS#DIRECTIVE21#IMPORTSFLOW */,
89
+ allExportsFlow:
90
+ "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." /* $COMMENT#JSDOC#DEFINITIONS#DIRECTIVE21#ALLEXPORTSFLOW */,
91
+ }),
92
+ tests: Object.freeze({
93
+ readFilesRecursively:
94
+ "$COMMENT#JSDOC#FORCOMPOSEDVARIABLES#READANYDEPTHS $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#DIRECTORYPERIOD" /* $COMMENT#JSDOC#DEFINITIONS#TESTS#READFILESRECURSIVELY */,
95
+ readValidFilesRecursively:
96
+ "$COMMENT#JSDOC#FORCOMPOSEDVARIABLES#READANYDEPTHS $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#VALIDFILES $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#DIRECTORYPERIOD" /* $COMMENT#JSDOC#DEFINITIONS#TESTS#READVALIDFILESRECURSIVELY */,
97
+ readInvalidFilesRecursively:
98
+ "$COMMENT#JSDOC#FORCOMPOSEDVARIABLES#READANYDEPTHS $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#INVALIDFILES $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#DIRECTORYPERIOD" /* $COMMENT#JSDOC#DEFINITIONS#TESTS#READINVALIDFILESRECURSIVELY */,
99
+ readInvalidFilesRecursively20:
100
+ "$COMMENT#JSDOC#FORCOMPOSEDVARIABLES#READANYDEPTHS $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#INVALIDFILES $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#FORAGNOSTIC20" /* $COMMENT#JSDOC#DEFINITIONS#TESTS#READINVALIDFILESRECURSIVELY20 */,
101
+ readInvalidFilesRecursively21:
102
+ "$COMMENT#JSDOC#FORCOMPOSEDVARIABLES#READANYDEPTHS $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#INVALIDFILES $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#FORDIRECTIVE21" /* $COMMENT#JSDOC#DEFINITIONS#TESTS#READINVALIDFILESRECURSIVELY21 */,
103
+ }),
104
+ }),
105
+ params: Object.freeze({
106
+ validPath:
107
+ "The directory for the valid paths." /* $COMMENT#JSDOC#PARAMS#VALIDPATH */,
108
+ invalidPath:
109
+ "The directory for the invalid paths." /* $COMMENT#JSDOC#PARAMS#INVALIDPATH */,
110
+ contextA:
111
+ "An ESLint rule's `context` object." /* $COMMENT#JSDOC#PARAMS#CONTEXTA */,
112
+ contextB:
113
+ "The ESLint rule's `context` object." /* $COMMENT#JSDOC#PARAMS#CONTEXTB */,
114
+ resolvedDirectives_blockedImports:
115
+ "The blocked imports object, either for agnostic20 or for directive21." /* $COMMENT#JSDOC#PARAMS#RESOLVEDDIRECTIVES_BLOCKEDIMPORTS */,
116
+ currentFileResolvedDirectiveA:
117
+ "$COMMENT#JSDOC#FORCOMPOSEDVARIABLES#THECURRENTFILE $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#RESOLVED $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#DIRECTIVEPERIOD" /* $COMMENT#JSDOC#PARAMS#CURRENTFILERESOLVEDDIRECTIVEA */,
118
+ importedFileResolvedDirective:
119
+ "$COMMENT#JSDOC#FORCOMPOSEDVARIABLES#THEIMPORTEDFILE $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#RESOLVED $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#DIRECTIVEPERIOD" /* $COMMENT#JSDOC#PARAMS#IMPORTEDFILERESOLVEDDIRECTIVE */,
120
+ currentFileResolvedDirectiveB:
121
+ 'The "resolved" directive of the "resolved" module.' /* $COMMENT#JSDOC#PARAMS#CURRENTFILERESOLVEDDIRECTIVEB */,
122
+ plugin:
123
+ "The use-agnostic ESLint plugin itself." /* $COMMENT#JSDOC#PARAMS#PLUGIN */,
124
+ resolvedPath:
125
+ "The resolved path of the imported module." /* $COMMENT#JSDOC#PARAMS#RESOLVEDPATH */,
126
+ extension:
127
+ "The JavaScript (TypeScript) extension of the file." /* $COMMENT#JSDOC#PARAMS#EXTENSION */,
128
+ node: "The ESLint `node` of the rule's current traversal." /* $COMMENT#JSDOC#PARAMS#NODE */,
129
+ agnostic20: Object.freeze({
130
+ currentFileEffectiveDirective:
131
+ "$COMMENT#JSDOC#FORCOMPOSEDVARIABLES#THECURRENTFILE $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#EFFECTIVE $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#DIRECTIVEPERIOD" /* $COMMENT#JSDOC#PARAMS#AGNOSTIC20#CURRENTFILEEFFECTIVEDIRECTIVE */,
132
+ importedFileEffectiveDirective:
133
+ "$COMMENT#JSDOC#FORCOMPOSEDVARIABLES#THEIMPORTEDFILE $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#EFFECTIVE $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#DIRECTIVEPERIOD" /* $COMMENT#JSDOC#PARAMS#AGNOSTIC20#IMPORTEDFILEEFFECTIVEDIRECTIVE */,
134
+ ast: "The module's AST (Abstract Syntax Tree)." /* $COMMENT#JSDOC#PARAMS#AGNOSTIC20#AST */,
135
+ directive:
136
+ 'The directive as written on top of the file (`"no directive"` if no valid directive).' /* $COMMENT#JSDOC#PARAMS#AGNOSTIC20#DIRECTIVE */,
137
+ effectiveDirective:
138
+ "The effective directive of the effective module." /* $COMMENT#JSDOC#PARAMS#AGNOSTIC20#EFFECTIVEDIRECTIVE */,
139
+ }),
140
+ directive21: Object.freeze({
141
+ currentFileCommentedDirective:
142
+ "$COMMENT#JSDOC#FORCOMPOSEDVARIABLES#THECURRENTFILE $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#COMMENTED $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#DIRECTIVEPERIOD" /* $COMMENT#JSDOC#PARAMS#DIRECTIVE21#CURRENTFILECOMMENTEDDIRECTIVE */,
143
+ importedFileCommentedDirective:
144
+ "$COMMENT#JSDOC#FORCOMPOSEDVARIABLES#THEIMPORTEDFILE $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#COMMENTED $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#DIRECTIVEPERIOD" /* $COMMENT#JSDOC#PARAMS#DIRECTIVE21#IMPORTEDFILECOMMENTEDDIRECTIVE */,
145
+ string:
146
+ "The original string." /* $COMMENT#JSDOC#PARAMS#DIRECTIVE21#STRING */,
147
+ sourceCode:
148
+ "The ESLint SourceCode object." /* $COMMENT#JSDOC#PARAMS#DIRECTIVE21#SOURCECODE */,
149
+ directive:
150
+ "The commented directive as written on top of the file (cannot be `null` at that stage)." /* $COMMENT#JSDOC#PARAMS#DIRECTIVE21#DIRECTIVE */,
151
+ commentedDirective:
152
+ "The commented directive of the commented module." /* $COMMENT#JSDOC#PARAMS#DIRECTIVE21#COMMENTEDDIRECTIVE */,
153
+ }),
154
+ tests: Object.freeze({
155
+ folderPath:
156
+ "The provided directory." /* $COMMENT#JSDOC#PARAMS#TESTS#FOLDERPATH */,
157
+ allFiles:
158
+ "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." /* $COMMENT#JSDOC#PARAMS#TESTS#ALLFILES */,
159
+ javaScriptErrorsLength:
160
+ "The number of errors expected on JavaScript files." /* $COMMENT#JSDOC#PARAMS#TESTS#JAVASCRIPTERRORSLENGTH */,
161
+ typeScriptErrorsLength:
162
+ "The number of errors expected on TypeScript files." /* $COMMENT#JSDOC#PARAMS#TESTS#TYPESCRIPTERRORSLENGTH */,
163
+ messageId:
164
+ "The messageId of the errors expected." /* $COMMENT#JSDOC#PARAMS#TESTS#MESSAGEID */,
165
+ }),
166
+ }),
167
+ details: Object.freeze({
168
+ agnostic20: Object.freeze({
169
+ nullDirective:
170
+ "`null` denotes a server-by-default module, ideally a Server Module." /* $COMMENT#JSDOC#DETAILS#AGNOSTIC20#NULLDIRECTIVE */,
171
+ useServer:
172
+ "`'use server'` denotes a Server Functions Module." /* $COMMENT#JSDOC#DETAILS#AGNOSTIC20#USESERVER */,
173
+ useClient:
174
+ "`'use client'` denotes a Client Module." /* $COMMENT#JSDOC#DETAILS#AGNOSTIC20#USECLIENT */,
175
+ useAgnostic:
176
+ "`'use agnostic'` denotes an Agnostic Module (formerly Shared Module)." /* $COMMENT#JSDOC#DETAILS#AGNOSTIC20#USEAGNOSTIC */,
177
+ useServerLogics:
178
+ "`'use server logics'` denotes a Server Logics Module." /* $COMMENT#JSDOC#DETAILS#AGNOSTIC20#USESERVERLOGICS */,
179
+ useServerComponents:
180
+ "`'use server components'` denotes a Server Components Module." /* $COMMENT#JSDOC#DETAILS#AGNOSTIC20#USESERVERCOMPONENTS */,
181
+ useServerFunctions:
182
+ "`'use server functions'` denotes a Server Functions Module." /* $COMMENT#JSDOC#DETAILS#AGNOSTIC20#USESERVERFUNCTIONS */,
183
+ useClientLogics:
184
+ "`'use client logics'` denotes a Client Logics Module." /* $COMMENT#JSDOC#DETAILS#AGNOSTIC20#USECLIENTLOGICS */,
185
+ useClientComponents:
186
+ "`'use client components'` denotes a Client Components Module." /* $COMMENT#JSDOC#DETAILS#AGNOSTIC20#USECLIENTCOMPONENTS */,
187
+ useAgnosticLogics:
188
+ "`'use agnostic logics'` denotes an Agnostic Logics Module." /* $COMMENT#JSDOC#DETAILS#AGNOSTIC20#USEAGNOSTICLOGICS */,
189
+ useAgnosticComponents:
190
+ "`'use agnostic components'` denotes an Agnostic Components Module." /* $COMMENT#JSDOC#DETAILS#AGNOSTIC20#USEAGNOSTICCOMPONENTS */,
191
+ }),
192
+ directive21: Object.freeze({
193
+ useServerLogicsA:
194
+ "`'use server logics'`, `\"use server logics\"` denoting a Server Logics Module." /* $COMMENT#JSDOC#DETAILS#DIRECTIVE21#USESERVERLOGICSA */,
195
+ useClientLogicsA:
196
+ "`'use client logics'`, `\"use client logics\"` denoting a Client Logics Module." /* $COMMENT#JSDOC#DETAILS#DIRECTIVE21#USECLIENTLOGICSA */,
197
+ useAgnosticLogicsA:
198
+ "`'use agnostic logics'`, `\"use agnostic logics\"` denoting an Agnostic Logics Module." /* $COMMENT#JSDOC#DETAILS#DIRECTIVE21#USEAGNOSTICLOGICSA */,
199
+ useServerComponentsA:
200
+ "`'use server components'`, `\"use server components\"` denoting a Server Components Module." /* $COMMENT#JSDOC#DETAILS#DIRECTIVE21#USESERVERCOMPONENTSA */,
201
+ useClientComponentsA:
202
+ "`'use client components'`, `\"use client components\"` denoting a Client Components Module." /* $COMMENT#JSDOC#DETAILS#DIRECTIVE21#USECLIENTCOMPONENTSA */,
203
+ useAgnosticComponentsA:
204
+ "`'use agnostic components'`, `\"use agnostic components\"` denoting an Agnostic Components Module." /* $COMMENT#JSDOC#DETAILS#DIRECTIVE21#USEAGNOSTICCOMPONENTSA */,
205
+ useServerFunctionsA:
206
+ "`'use server functions'`, `\"use server functions\"` denoting a Server Functions Module." /* $COMMENT#JSDOC#DETAILS#DIRECTIVE21#USESERVERFUNCTIONSA */,
207
+ useClientContextsA:
208
+ "`'use client contexts'`, `\"use client contexts\"` denoting a Client Contexts Module." /* $COMMENT#JSDOC#DETAILS#DIRECTIVE21#USECLIENTCONTEXTSA */,
209
+ useAgnosticConditionsA:
210
+ "`'use agnostic conditions'`, `\"use agnostic conditions\"` denoting an Agnostic Conditions Module." /* $COMMENT#JSDOC#DETAILS#DIRECTIVE21#USEAGNOSTICCONDITIONSA */,
211
+ useAgnosticStrategiesA:
212
+ "`'use agnostic strategies'`, `\"use agnostic strategies\"` denoting an Agnostic Strategies Module." /* $COMMENT#JSDOC#DETAILS#DIRECTIVE21#USEAGNOSTICSTRATEGIESA */,
213
+ useServerLogicsB:
214
+ "`'use server logics'`: Server Logics Modules do NOT export JSX." /* $COMMENT#JSDOC#DETAILS#DIRECTIVE21#USESERVERLOGICSB */,
215
+ useClientLogicsB:
216
+ "`'use client logics'`: Client Logics Modules do NOT export JSX." /* $COMMENT#JSDOC#DETAILS#DIRECTIVE21#USECLIENTLOGICSB */,
217
+ useAgnosticLogicsB:
218
+ "`'use agnostic logics'`: Agnostic Logics Modules do NOT export JSX." /* $COMMENT#JSDOC#DETAILS#DIRECTIVE21#USEAGNOSTICLOGICSB */,
219
+ useServerComponentsB:
220
+ "`'use server components'`: Server Components Modules ONLY export JSX." /* $COMMENT#JSDOC#DETAILS#DIRECTIVE21#USESERVERCOMPONENTSB */,
221
+ useClientComponentsB:
222
+ "`'use client components'`: Client Components Modules ONLY export JSX." /* $COMMENT#JSDOC#DETAILS#DIRECTIVE21#USECLIENTCOMPONENTSB */,
223
+ useAgnosticComponentsB:
224
+ "`'use agnostic components'`: Agnostic Components Modules ONLY export JSX." /* $COMMENT#JSDOC#DETAILS#DIRECTIVE21#USEAGNOSTICCOMPONENTSB */,
225
+ useServerFunctionsB:
226
+ "`'use server functions'`: Server Functions Modules do NOT export JSX." /* $COMMENT#JSDOC#DETAILS#DIRECTIVE21#USESERVERFUNCTIONSB */,
227
+ useClientContextsB:
228
+ "`'use client contexts'`: Client Contexts Modules ONLY export JSX." /* $COMMENT#JSDOC#DETAILS#DIRECTIVE21#USECLIENTCONTEXTSB */,
229
+ useAgnosticConditionsB:
230
+ "`'use agnostic conditions'`: Agnostic Conditions Modules ONLY export JSX." /* $COMMENT#JSDOC#DETAILS#DIRECTIVE21#USEAGNOSTICCONDITIONSB */,
231
+ useAgnosticStrategiesB:
232
+ "`'use agnostic strategies'`: Agnostic Strategies Modules may export JSX." /* $COMMENT#JSDOC#DETAILS#DIRECTIVE21#USEAGNOSTICSTRATEGIESB */,
233
+ }),
234
+ }),
235
+ returns: Object.freeze({
236
+ makeTestFiles:
237
+ "The paths of the files to be linted for agnostic20 and directive21." /* $COMMENT#JSDOC#RETURNS#MAKETESTFILES */,
238
+ highlightFirstLineOfCode:
239
+ "The `context.report` `loc`-compatible coordinates for the first line of code of a file." /* $COMMENT#JSDOC#RETURNS#HIGHLIGHTFIRSTLINEOFCODE */,
240
+ isImportBlocked:
241
+ "$COMMENT#JSDOC#FORCOMPOSEDVARIABLES#TRUEIFIMPORTBLOCKED $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#RESPECTIVE $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#RDBIPERIOD" /* $COMMENT#JSDOC#RETURNS#ISIMPORTBLOCKED */,
242
+ makeIntroForSpecificViolationMessage:
243
+ "\"[Current file 'resolved' modules] are not allowed to import [imported file 'resolved' modules].\"" /* $COMMENT#JSDOC#RETURNS#MAKEINTROFORSPECIFICVIOLATIONMESSAGE */,
244
+ makeMessageFromCurrentFileResolvedDirective:
245
+ "$COMMENT#JSDOC#FORCOMPOSEDVARIABLES#THEMESSAGELISTING $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#RESOLVED $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#MODULESPERIOD" /* $COMMENT#JSDOC#RETURNS#MAKEMESSAGEFROMCURRENTFILERESOLVEDDIRECTIVE */,
246
+ findSpecificViolationMessage:
247
+ "The corresponding `message`." /* $COMMENT#JSDOC#RETURNS#FINDSPECIFICVIOLATIONMESSAGE */,
248
+ agnostic20: Object.freeze({
249
+ makeAgnostic20Config:
250
+ "$COMMENT#JSDOC#FORCOMPOSEDVARIABLES#INITIALTHE $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#AGNOSTIC20 $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#CONFIGSNAME" /* $COMMENT#JSDOC#RETURNS#AGNOSTIC20#MAKEAGNOSTIC20CONFIG */,
251
+ makeBlockedImport:
252
+ "The blockedImport object for the identified blocked import at hand." /* $COMMENT#JSDOC#RETURNS#AGNOSTIC20#MAKEBLOCKEDIMPORT */,
253
+ makeBlockedImportSuggestingUseAgnostic:
254
+ "The enhanced blockedImport object with the suggestion to use the `'use agnostic'` directive." /* $COMMENT#JSDOC#RETURNS#AGNOSTIC20#MAKEBLOCKEDIMPORTSUGGESTINGUSEAGNOSTIC */,
255
+ getDirectiveFromModule:
256
+ "The directive, or lack thereof via `null`. The lack of a directive is considered server-by-default." /* $COMMENT#JSDOC#RETURNS#AGNOSTIC20#GETDIRECTIVEFROMMODULE */,
257
+ getDirectiveFromCurrentModule:
258
+ "JSDOC#RETURNS#AGNOSTIC20#GETDIRECTIVEFROMMODULE" /* $COMMENT#JSDOC#RETURNS#AGNOSTIC20#GETDIRECTIVEFROMCURRENTMODULE */,
259
+ getDirectiveFromImportedModule:
260
+ "JSDOC#RETURNS#AGNOSTIC20#GETDIRECTIVEFROMMODULE" /* $COMMENT#JSDOC#RETURNS#AGNOSTIC20#GETDIRECTIVEFROMIMPORTEDMODULE */,
261
+ getEffectiveDirective:
262
+ "The effective directive, from which imports rules are applied." /* $COMMENT#JSDOC#RETURNS#AGNOSTIC20#GETEFFECTIVEDIRECTIVE */,
263
+ isImportBlocked:
264
+ "$COMMENT#JSDOC#FORCOMPOSEDVARIABLES#TRUEIFIMPORTBLOCKED $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#EDBIPERIOD" /* $COMMENT#JSDOC#RETURNS#AGNOSTIC20#ISIMPORTBLOCKED */,
265
+ makeMessageFromCurrentFileEffectiveDirective:
266
+ "$COMMENT#JSDOC#FORCOMPOSEDVARIABLES#THEMESSAGELISTING $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#EFFECTIVE $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#MODULESPERIOD" /* $COMMENT#JSDOC#RETURNS#AGNOSTIC20#MAKEMESSAGEFROMCURRENTFILEEFFECTIVEDIRECTIVE */,
267
+ findSpecificViolationMessage:
268
+ "JSDOC#RETURNS#FINDSPECIFICVIOLATIONMESSAGE" /* $COMMENT#JSDOC#RETURNS#AGNOSTIC20#FINDSPECIFICVIOLATIONMESSAGE */,
269
+ currentFileFlow:
270
+ "$COMMENT#JSDOC#FORCOMPOSEDVARIABLES#EITHERSKIPTRUENONNULL $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#CFEDPERIOD" /* $COMMENT#JSDOC#RETURNS#AGNOSTIC20#CURRENTFILEFLOW */,
271
+ importedFileFlow:
272
+ "$COMMENT#JSDOC#FORCOMPOSEDVARIABLES#EITHERSKIPTRUENONNULL $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#IFEDPERIOD" /* $COMMENT#JSDOC#RETURNS#AGNOSTIC20#IMPORTEDFILEFLOW */,
273
+ importsFlow:
274
+ "JSDOC#FORALIASVARIABLES#FLOWRETURNSEARLY" /* $COMMENT#JSDOC#RETURNS#AGNOSTIC20#IMPORTSFLOW */,
275
+ reExportsFlow:
276
+ "JSDOC#FORALIASVARIABLES#FLOWRETURNSEARLY" /* $COMMENT#JSDOC#RETURNS#AGNOSTIC20#REEXPORTSFLOW */,
277
+ }),
278
+ directive21: Object.freeze({
279
+ makeDirective21Config:
280
+ "$COMMENT#JSDOC#FORCOMPOSEDVARIABLES#INITIALTHE $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#DIRECTIVE21 $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#CONFIGSNAME" /* $COMMENT#JSDOC#RETURNS#DIRECTIVE21#MAKEDIRECTIVE21CONFIG */,
281
+ makeBlockedImport:
282
+ "JSDOC#RETURNS#AGNOSTIC20#MAKEBLOCKEDIMPORT" /* $COMMENT#JSDOC#RETURNS#DIRECTIVE21#MAKEBLOCKEDIMPORT */,
283
+ detectQuoteType:
284
+ "`true` if single-quoted, `false` if double-quoted, `null` if neither." /* $COMMENT#JSDOC#RETURNS#DIRECTIVE21#DETECTQUOTETYPE */,
285
+ stripSingleQuotes:
286
+ "The string with quotes removed." /* $COMMENT#JSDOC#RETURNS#DIRECTIVE21#STRIPSINGLEQUOTES */,
287
+ stripDoubleQuotes:
288
+ "JSDOC#RETURNS#DIRECTIVE21#STRIPSINGLEQUOTES" /* $COMMENT#JSDOC#RETURNS#DIRECTIVE21#STRIPDOUBLEQUOTES */,
289
+ getCommentedDirectiveFromSourceCode:
290
+ "The commented directive, or lack thereof via `null`. Given the strictness of this architecture, the lack of a directive is considered a mistake. (Though rules may provide the opportunity to declare a default, and configs with preset defaults may become provided.)" /* $COMMENT#JSDOC#RETURNS#DIRECTIVE21#GETCOMMENTEDDIRECTIVEFROMSOURCECODE */,
291
+ getCommentedDirectiveFromCurrentModule:
292
+ "JSDOC#RETURNS#DIRECTIVE21#GETCOMMENTEDDIRECTIVEFROMSOURCECODE" /* $COMMENT#JSDOC#RETURNS#DIRECTIVE21#GETCOMMENTEDDIRECTIVEFROMCURRENTMODULE */,
293
+ getCommentedDirectiveFromImportedModule:
294
+ "JSDOC#RETURNS#DIRECTIVE21#GETCOMMENTEDDIRECTIVEFROMSOURCECODE" /* $COMMENT#JSDOC#RETURNS#DIRECTIVE21#GETCOMMENTEDDIRECTIVEFROMIMPORTEDMODULE */,
295
+ getVerifiedCommentedDirective:
296
+ "The verified commented directive, from which imports rules are applied. Returns `null` if the verification failed, upon which an error will be reported depending on the commented directive, since the error logic here is strictly binary." /* $COMMENT#JSDOC#RETURNS#DIRECTIVE21#GETVERIFIEDCOMMENTEDDIRECTIVE */,
297
+ getStrategizedDirective:
298
+ "The interpreted directive, a.k.a. strategized directive, or lack thereof via `null`." /* $COMMENT#JSDOC#RETURNS#DIRECTIVE21#GETSTRATEGIZEDDIRECTIVE */,
299
+ addressDirectiveIfAgnosticStrategies:
300
+ "The commented directive, the addressed strategy (as a commented directive) or `null` in case of failure." /* $COMMENT#JSDOC#RETURNS#DIRECTIVE21#ADDRESSDIRECTIVEIFAGNOSTICSTRATEGIES */,
301
+ isImportBlocked:
302
+ "$COMMENT#JSDOC#FORCOMPOSEDVARIABLES#TRUEIFIMPORTBLOCKED $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#CDBIPERIOD" /* $COMMENT#JSDOC#RETURNS#DIRECTIVE21#ISIMPORTBLOCKED */,
303
+ makeMessageFromCurrentFileCommentedDirective:
304
+ "$COMMENT#JSDOC#FORCOMPOSEDVARIABLES#THEMESSAGELISTING $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#COMMENTED $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#MODULESPERIOD" /* $COMMENT#JSDOC#RETURNS#DIRECTIVE21#MAKEMESSAGEFROMCURRENTFILECOMMENTEDDIRECTIVE */,
305
+ findSpecificViolationMessage:
306
+ "JSDOC#RETURNS#FINDSPECIFICVIOLATIONMESSAGE" /* $COMMENT#JSDOC#RETURNS#DIRECTIVE21#FINDSPECIFICVIOLATIONMESSAGE */,
307
+ currentFileFlow:
308
+ "$COMMENT#JSDOC#FORCOMPOSEDVARIABLES#EITHERSKIPTRUENONNULL $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#VCDPERIOD" /* $COMMENT#JSDOC#RETURNS#DIRECTIVE21#CURRENTFILEFLOW */,
309
+ importedFileFlow:
310
+ "$COMMENT#JSDOC#FORCOMPOSEDVARIABLES#EITHERSKIPTRUENONNULL $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#IFCDPERIOD" /* $COMMENT#JSDOC#RETURNS#DIRECTIVE21#IMPORTEDFILEFLOW */,
311
+ importsFlow:
312
+ "JSDOC#FORALIASVARIABLES#FLOWRETURNSEARLY" /* $COMMENT#JSDOC#RETURNS#DIRECTIVE21#IMPORTSFLOW */,
313
+ allExportsFlow:
314
+ "JSDOC#FORALIASVARIABLES#FLOWRETURNSEARLY" /* $COMMENT#JSDOC#RETURNS#DIRECTIVE21#ALLEXPORTSFLOW */,
315
+ }),
316
+ tests: Object.freeze({
317
+ readFilesRecursively:
318
+ "All files at any depths within the provided directory." /* $COMMENT#JSDOC#RETURNS#TESTS#READFILESRECURSIVELY */,
319
+ readValidFilesRecursively:
320
+ "$COMMENT#JSDOC#FORCOMPOSEDVARIABLES#RULETESTERARRAY $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#VALIDFILES $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#WITHNEEDEDPROPERTIESPERIOD" /* $COMMENT#JSDOC#RETURNS#TESTS#READVALIDFILESRECURSIVELY */,
321
+ readInvalidFilesRecursively:
322
+ "$COMMENT#JSDOC#FORCOMPOSEDVARIABLES#RULETESTERARRAY $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#INVALIDFILES $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#WITHNEEDEDPROPERTIESPERIOD" /* $COMMENT#JSDOC#RETURNS#TESTS#READINVALIDFILESRECURSIVELY */,
323
+ readInvalidFilesRecursively20:
324
+ "$COMMENT#JSDOC#FORCOMPOSEDVARIABLES#RULETESTERARRAY $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#INVALIDFILES $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#WITHNEEDEDPROPERTIES $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#FORAGNOSTIC20" /* $COMMENT#JSDOC#RETURNS#TESTS#READINVALIDFILESRECURSIVELY20 */,
325
+ readInvalidFilesRecursively21:
326
+ "$COMMENT#JSDOC#FORCOMPOSEDVARIABLES#RULETESTERARRAY $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#INVALIDFILES $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#WITHNEEDEDPROPERTIES $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#FORDIRECTIVE21" /* $COMMENT#JSDOC#RETURNS#TESTS#READINVALIDFILESRECURSIVELY21 */,
327
+ }),
328
+ }),
329
+ forAliasVariables,
330
+ forComposedVariables,
331
+ });
@@ -0,0 +1,99 @@
1
+ export const forComposedVariables = Object.freeze({
2
+ resolved: '"resolved"' /* $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#RESOLVED */,
3
+ effective: "effective" /* $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#EFFECTIVE */,
4
+ commented: "commented" /* $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#COMMENTED */,
5
+ verifiedCommented:
6
+ "verified commented" /* $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#VERIFIEDCOMMENTED */,
7
+ returnsDeciding:
8
+ "Returns a boolean deciding if an imported file's" /* $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#RETURNSDECIDING */,
9
+ directiveIncompatible:
10
+ "directive is incompatible with the current file's" /* $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#DIRECTIVEINCOMPATIBLE */,
11
+ directive: "directive" /* $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#DIRECTIVE */,
12
+ directives: "directives" /* $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#DIRECTIVES */,
13
+ directivePeriod:
14
+ "directive." /* $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#DIRECTIVEPERIOD */,
15
+ listsInMessage:
16
+ "Lists in an message the" /* $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#LISTSINMESSAGE */,
17
+ modulesIncompatible:
18
+ "modules incompatible with a" /* $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#MODULESINCOMPATIBLE */,
19
+ moduleBasedOn:
20
+ "module based on its" /* $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#MODULEBASEDON */,
21
+ findTheMessage:
22
+ "Finds the `message` for the specific violation of" /* $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#FINDTHEMESSAGE */,
23
+ rulesBasedOn:
24
+ "directives import rules based on" /* $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#RULESBASEDON */,
25
+ rdbiPeriod:
26
+ "`resolvedDirectives_blockedImports`." /* $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#RDBIPERIOD */,
27
+ edbiPeriod:
28
+ "`effectiveDirectives_BlockedImports`." /* $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#EDBIPERIOD */,
29
+ cdbiPeriod:
30
+ "`commentedDirectives_BlockedImports`." /* $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#CDBIPERIOD */,
31
+ theMessageListing:
32
+ "The message listing the incompatible" /* $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#THEMESSAGELISTING */,
33
+ modulesPeriod:
34
+ "modules." /* $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#MODULESPERIOD */,
35
+ trueIfImportBlocked:
36
+ "`true` if the import is blocked, as established in" /* $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#TRUEIFIMPORTBLOCKED */,
37
+ respective: "respective" /* $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#RESPECTIVE */,
38
+ agnostic20: "agnostic20" /* $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#AGNOSTIC20 */,
39
+ directive21:
40
+ "directive21" /* $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#DIRECTIVE21 */,
41
+ makesThe: "Makes the" /* $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#MAKESTHE */,
42
+ configForPlugin:
43
+ "config for the use-agnostic ESLint plugin." /* $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#CONFIGFORPLUGIN */,
44
+ initialThe: "The" /* $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#INITIALTHE */,
45
+ configsName:
46
+ "config's name as a key and its config as its value." /* $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#CONFIGSNAME */,
47
+ getsDirectiveOf:
48
+ "Gets the directive of" /* $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#GETSDIRECTIVEOF */,
49
+ aModule:
50
+ "a module from its Abstract Syntax Tree." /* $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#AMODULE */,
51
+ currentModule:
52
+ "the current module." /* $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#CURRENTMODULE */,
53
+ importedModule:
54
+ "the imported module." /* $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#IMPORTEDMODULE */,
55
+ flowThatBegins:
56
+ "The flow that begins the import rules enforcement rule, retrieving the" /* $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#FLOWTHATBEGINS */,
57
+ ofCurrentFile:
58
+ "of the current file before comparing it to upcoming" /* $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#OFCURRENTFILE */,
59
+ ofFilesItImports:
60
+ "of the files it imports." /* $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#OFFILESITIMPORTS */,
61
+ flowImportReExport:
62
+ "The flow that is shared between import and re-export traversals to obtain the import file's" /* $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#FLOWIMPORTREEXPORT */,
63
+ getCommentedDirective:
64
+ "Gets the commented directive of the" /* $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#GETCOMMENTEDDIRECTIVE */,
65
+ currentModulePeriod:
66
+ "current module." /* $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#CURRENTMODULEPERIOD */,
67
+ importedModulePeriod:
68
+ "imported module." /* $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#IMPORTEDMODULEPERIOD */,
69
+ readAnyDepths:
70
+ "Reads file paths at any depths within a provided" /* $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#READANYDEPTHS */,
71
+ directory: "directory" /* $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#DIRECTORY */,
72
+ directoryPeriod:
73
+ "directory." /* $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#DIRECTORYPERIOD */,
74
+ validFiles:
75
+ "valid files" /* $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#VALIDFILES */,
76
+ invalidFiles:
77
+ "invalid files" /* $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#INVALIDFILES */,
78
+ forAgnostic20:
79
+ "for agnostic20." /* $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#FORAGNOSTIC20 */,
80
+ forDirective21:
81
+ "for directive21." /* $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#FORDIRECTIVE21 */,
82
+ ruleTesterArray: "The RuleTester's array of" /* $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#RULETESTERARRAY */,
83
+ withNeededProperties: "with needed properties" /* $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#WITHNEEDEDPROPERTIES */,
84
+ withNeededPropertiesPeriod: "with needed properties." /* $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#WITHNEEDEDPROPERTIESPERIOD */,
85
+ theCurrentFile:
86
+ "The current file's" /* $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#THECURRENTFILE */,
87
+ theImportedFile:
88
+ "The imported file's" /* $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#THEIMPORTEDFILE */,
89
+ eitherSkipTrueNonNull:
90
+ "Either an object with `skip: true` to disregard or one with the non-null" /* $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#EITHERSKIPTRUENONNULL */,
91
+ cfedPeriod:
92
+ "`currentFileEffectiveDirective`." /* $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#CFEDPERIOD */,
93
+ ifedPeriod:
94
+ "`importedFileEffectiveDirective`." /* $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#IFEDPERIOD */,
95
+ vcdPeriod:
96
+ "`verifiedCommentedDirective`." /* $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#VCDPERIOD */,
97
+ ifcdPeriod:
98
+ "`importedFileCommentedDirective`." /* $COMMENT#JSDOC#FORCOMPOSEDVARIABLES#IFCDPERIOD */,
99
+ });
@@ -0,0 +1,27 @@
1
+ export const testsComments = Object.freeze({
2
+ viaAlias: "Via alias." /* $COMMENT#TESTS#VIAALIAS */,
3
+ viaBaseUrl: "Via baseUrl." /* $COMMENT#TESTS#VIABASEURL */,
4
+ valid: "Valid." /* $COMMENT#TESTS#VALID */,
5
+ invalid: "Invalid." /* $COMMENT#TESTS#INVALID */,
6
+ withExtension: "with extension" /* $COMMENT#TESTS#WITHEXTENSION */,
7
+ forComposedVariables: Object.freeze({
8
+ thatsA: "That's a" /* $COMMENT#TESTS#FORCOMPOSEDVARIABLES#THATSA */,
9
+ thatsAn: "That's an" /* $COMMENT#TESTS#FORCOMPOSEDVARIABLES#THATSAN */,
10
+ importingA:
11
+ "...Importing a" /* $COMMENT#TESTS#FORCOMPOSEDVARIABLES#IMPORTINGA */,
12
+ importingAn:
13
+ "...Importing an" /* $COMMENT#TESTS#FORCOMPOSEDVARIABLES#IMPORTINGAN */,
14
+ module: "Module" /* $COMMENT#TESTS#FORCOMPOSEDVARIABLES#MODULE */,
15
+ modulePeriod:
16
+ "Module." /* $COMMENT#TESTS#FORCOMPOSEDVARIABLES#MODULEPERIOD */,
17
+ withExtensionParentheses:
18
+ "(with extension)." /* $COMMENT#TESTS#FORCOMPOSEDVARIABLES#WITHEXTENSIONPARENTHESES */,
19
+ byFolder: "by a folder." /* $COMMENT#TESTS#FORCOMPOSEDVARIABLES#BYFOLDER */,
20
+ importing:
21
+ "...Importing" /* $COMMENT#TESTS#FORCOMPOSEDVARIABLES#IMPORTING */,
22
+ viaStrategyPeriod:
23
+ "via Special Agnostic Strategy." /* $COMMENT#TESTS#FORCOMPOSEDVARIABLES#VIASTRATEGYPERIOD */,
24
+ viaStrategy:
25
+ "via Special Agnostic Strategy" /* $COMMENT#TESTS#FORCOMPOSEDVARIABLES#VIASTRATEGY */,
26
+ }),
27
+ });
@@ -17,9 +17,9 @@ import {
17
17
  /* highlightFirstLineOfCode */
18
18
 
19
19
  /**
20
- * Gets the coordinates for the first line of code of a file.
21
- * @param {Context} context An ESLint rule's `context` object.
22
- * @returns The `context.report` `loc`-compatible coordinates for the first line of code of a file.
20
+ * $COMMENT#JSDOC#DEFINITIONS#HIGHLIGHTFIRSTLINEOFCODE
21
+ * @param {Context} context $COMMENT#JSDOC#PARAMS#CONTEXTA
22
+ * @returns $COMMENT#JSDOC#RETURNS#HIGHLIGHTFIRSTLINEOFCODE
23
23
  */
24
24
  export const highlightFirstLineOfCode = (context) => ({
25
25
  start: { line: 1, column: 0 },
@@ -29,13 +29,13 @@ export const highlightFirstLineOfCode = (context) => ({
29
29
  /* isImportBlocked */
30
30
 
31
31
  /**
32
- * Returns a boolean deciding if an imported file's "resolved" directive is incompatible with the current file's "resolved" directive.
32
+ * $COMMENT#JSDOC#DEFINITIONS#ISIMPORTBLOCKED
33
33
  * @template {ResolvedDirectiveWithoutUseAgnosticStrategies} T
34
34
  * @template {ResolvedDirectiveWithoutUseAgnosticStrategies} U
35
- * @param {ResolvedDirectives_BlockedImports<T, U>} resolvedDirectives_blockedImports The blocked imports object, either for agnostic20 or for directive21.
36
- * @param {T} currentFileResolvedDirective The current file's "resolved" directive.
37
- * @param {U} importedFileResolvedDirective The imported file's "resolved" directive.
38
- * @returns `true` if the import is blocked, as established in respective `resolvedDirectives_blockedImports`.
35
+ * @param {ResolvedDirectives_BlockedImports<T, U>} resolvedDirectives_blockedImports $COMMENT#JSDOC#PARAMS#RESOLVEDDIRECTIVES_BLOCKEDIMPORTS
36
+ * @param {T} currentFileResolvedDirective $COMMENT#JSDOC#PARAMS#CURRENTFILERESOLVEDDIRECTIVEA
37
+ * @param {U} importedFileResolvedDirective $COMMENT#JSDOC#PARAMS#IMPORTEDFILERESOLVEDDIRECTIVE
38
+ * @returns $COMMENT#JSDOC#RETURNS#ISIMPORTBLOCKED
39
39
  */
40
40
  export const isImportBlocked = (
41
41
  // Note: "Blocked" here is preferred over "not allowed" because a specific message will be shared for each of the blocked situations, explaining their reasons and the solutions needed.
@@ -50,12 +50,12 @@ export const isImportBlocked = (
50
50
  /* makeIntroForSpecificViolationMessage */
51
51
 
52
52
  /**
53
- * Makes the intro for each specific import rule violation messages.
53
+ * $COMMENT#JSDOC#DEFINITIONS#MAKEINTROFORSPECIFICVIOLATIONMESSAGE
54
54
  * @template {ResolvedDirectiveWithoutUseAgnosticStrategies} T
55
55
  * @template {ResolvedDirectiveWithoutUseAgnosticStrategies} U
56
- * @param {T} currentFileResolvedDirective The current file's "resolved" directive.
57
- * @param {U} importedFileResolvedDirective The imported file's "resolved" directive.
58
- * @returns "[Current file 'resolved' modules] are not allowed to import [imported file 'resolved' modules]."
56
+ * @param {T} currentFileResolvedDirective $COMMENT#JSDOC#PARAMS#CURRENTFILERESOLVEDDIRECTIVEA
57
+ * @param {U} importedFileResolvedDirective $COMMENT#JSDOC#PARAMS#IMPORTEDFILERESOLVEDDIRECTIVE
58
+ * @returns $COMMENT#JSDOC#RETURNS#MAKEINTROFORSPECIFICVIOLATIONMESSAGE
59
59
  */
60
60
  export const makeIntroForSpecificViolationMessage = (
61
61
  currentFileResolvedDirective,
@@ -70,12 +70,12 @@ export const makeIntroForSpecificViolationMessage = (
70
70
  /* makeMessageFromCurrentFileResolvedDirective */
71
71
 
72
72
  /**
73
- * Lists in an message the "resolved" modules incompatible with a "resolved" module based on its "resolved" directive.
73
+ * $COMMENT#JSDOC#DEFINITIONS#MAKEMESSAGEFROMCURRENTFILERESOLVEDDIRECTIVE
74
74
  * @template {ResolvedDirectiveWithoutUseAgnosticStrategies} T
75
75
  * @template {ResolvedDirectiveWithoutUseAgnosticStrategies} U
76
- * @param {ResolvedDirectives_BlockedImports<T, U>} resolvedDirectives_blockedImports The blocked imports object, either for agnostic20 or for directive21.
77
- * @param {T} currentFileResolvedDirective The "resolved" directive of the "resolved" module.
78
- * @returns The message listing the incompatible "resolved" modules.
76
+ * @param {ResolvedDirectives_BlockedImports<T, U>} resolvedDirectives_blockedImports $COMMENT#JSDOC#PARAMS#RESOLVEDDIRECTIVES_BLOCKEDIMPORTS
77
+ * @param {T} currentFileResolvedDirective $COMMENT#JSDOC#PARAMS#CURRENTFILERESOLVEDDIRECTIVEB
78
+ * @returns $COMMENT#JSDOC#RETURNS#MAKEMESSAGEFROMCURRENTFILERESOLVEDDIRECTIVE
79
79
  */
80
80
  export const makeMessageFromCurrentFileResolvedDirective = (
81
81
  resolvedDirectives_blockedImports,
@@ -111,13 +111,13 @@ export const makeMessageFromCurrentFileResolvedDirective = (
111
111
  /* findSpecificViolationMessage */
112
112
 
113
113
  /**
114
- * Finds the `message` for the specific violation of "resolved" directives import rules based on `resolvedDirectives_blockedImports`.
114
+ * $COMMENT#JSDOC#DEFINITIONS#FINDSPECIFICVIOLATIONMESSAGE
115
115
  * @template {ResolvedDirectiveWithoutUseAgnosticStrategies} T
116
116
  * @template {ResolvedDirectiveWithoutUseAgnosticStrategies} U
117
- * @param {ResolvedDirectives_BlockedImports<T, U>} resolvedDirectives_blockedImports The blocked imports object, either for agnostic20 or for directive21.
118
- * @param {T} currentFileResolvedDirective The current file's "resolved" directive.
119
- * @param {U} importedFileResolvedDirective The imported file's "resolved" directive.
120
- * @returns The corresponding `message`.
117
+ * @param {ResolvedDirectives_BlockedImports<T, U>} resolvedDirectives_blockedImports $COMMENT#JSDOC#PARAMS#RESOLVEDDIRECTIVES_BLOCKEDIMPORTS
118
+ * @param {T} currentFileResolvedDirective $COMMENT#JSDOC#PARAMS#CURRENTFILERESOLVEDDIRECTIVEA
119
+ * @param {U} importedFileResolvedDirective $COMMENT#JSDOC#PARAMS#IMPORTEDFILERESOLVEDDIRECTIVE
120
+ * @returns $COMMENT#JSDOC#RETURNS#FINDSPECIFICVIOLATIONMESSAGE
121
121
  */
122
122
  export const findSpecificViolationMessage = (
123
123
  resolvedDirectives_blockedImports,