@zthun/janitor-options 19.1.0 → 19.1.1
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/dist/index.cjs +175 -199
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +177 -196
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -1,26 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
if (key in obj) {
|
|
9
|
-
Object.defineProperty(obj, key, {
|
|
10
|
-
value: value,
|
|
11
|
-
enumerable: true,
|
|
12
|
-
configurable: true,
|
|
13
|
-
writable: true
|
|
14
|
-
});
|
|
15
|
-
} else {
|
|
16
|
-
obj[key] = value;
|
|
17
|
-
}
|
|
18
|
-
return obj;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* A builder for creating linting options for the zthunworks janitor system.
|
|
22
|
-
*/ class ZJanitorOptionsLintBuilder {
|
|
23
|
-
/**
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
class ZJanitorOptionsLintBuilder {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.lint = {};
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
24
8
|
* Sets the path to the config file for eslint.
|
|
25
9
|
*
|
|
26
10
|
* @param esConfig -
|
|
@@ -28,11 +12,12 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
28
12
|
*
|
|
29
13
|
* @returns
|
|
30
14
|
* This object.
|
|
31
|
-
*/
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
15
|
+
*/
|
|
16
|
+
esConfig(esConfig) {
|
|
17
|
+
this.lint.esConfig = esConfig;
|
|
18
|
+
return this;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
36
21
|
* Sets the path to the config file for htmlhint.
|
|
37
22
|
*
|
|
38
23
|
* @param htmlConfig -
|
|
@@ -40,11 +25,12 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
40
25
|
*
|
|
41
26
|
* @returns
|
|
42
27
|
* This object.
|
|
43
|
-
*/
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
28
|
+
*/
|
|
29
|
+
htmlConfig(htmlConfig) {
|
|
30
|
+
this.lint.htmlConfig = htmlConfig;
|
|
31
|
+
return this;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
48
34
|
* Sets the path to the config file for markdownlint.
|
|
49
35
|
*
|
|
50
36
|
* @param markdownConfig -
|
|
@@ -52,11 +38,12 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
52
38
|
*
|
|
53
39
|
* @returns
|
|
54
40
|
* This object.
|
|
55
|
-
*/
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
41
|
+
*/
|
|
42
|
+
markdownConfig(markdownConfig) {
|
|
43
|
+
this.lint.markdownConfig = markdownConfig;
|
|
44
|
+
return this;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
60
47
|
* Sets the path to the config file for prettier.
|
|
61
48
|
*
|
|
62
49
|
* @param prettyConfig -
|
|
@@ -64,11 +51,12 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
64
51
|
*
|
|
65
52
|
* @returns
|
|
66
53
|
* This object.
|
|
67
|
-
*/
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
54
|
+
*/
|
|
55
|
+
prettyConfig(prettyConfig) {
|
|
56
|
+
this.lint.prettyConfig = prettyConfig;
|
|
57
|
+
return this;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
72
60
|
* Sets the path to the config file for cspell.
|
|
73
61
|
*
|
|
74
62
|
* @param spellingConfig -
|
|
@@ -76,11 +64,12 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
76
64
|
*
|
|
77
65
|
* @returns
|
|
78
66
|
* This object.
|
|
79
|
-
*/
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
67
|
+
*/
|
|
68
|
+
spellingConfig(spellingConfig) {
|
|
69
|
+
this.lint.spellingConfig = spellingConfig;
|
|
70
|
+
return this;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
84
73
|
* Sets the path to the config file for stylelint.
|
|
85
74
|
*
|
|
86
75
|
* @param styleConfig -
|
|
@@ -88,11 +77,12 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
88
77
|
*
|
|
89
78
|
* @returns
|
|
90
79
|
* This object.
|
|
91
|
-
*/
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
80
|
+
*/
|
|
81
|
+
styleConfig(styleConfig) {
|
|
82
|
+
this.lint.styleConfig = styleConfig;
|
|
83
|
+
return this;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
96
86
|
* Adds a list of globs to the list of files to lint with eslint.
|
|
97
87
|
*
|
|
98
88
|
* @param file -
|
|
@@ -100,13 +90,13 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
100
90
|
*
|
|
101
91
|
* @returns
|
|
102
92
|
* This object.
|
|
103
|
-
*/
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
93
|
+
*/
|
|
94
|
+
esFile(file = []) {
|
|
95
|
+
const files = this.lint.esFiles ?? [];
|
|
96
|
+
this.lint.esFiles = files.concat(file);
|
|
97
|
+
return this;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
110
100
|
* Adds a list of globs to the list of files to lint with htmlhint.
|
|
111
101
|
*
|
|
112
102
|
* @param file -
|
|
@@ -114,13 +104,13 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
114
104
|
*
|
|
115
105
|
* @returns
|
|
116
106
|
* This object.
|
|
117
|
-
*/
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
107
|
+
*/
|
|
108
|
+
htmlFile(file = []) {
|
|
109
|
+
const files = this.lint.htmlFiles ?? [];
|
|
110
|
+
this.lint.htmlFiles = files.concat(file);
|
|
111
|
+
return this;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
124
114
|
* Adds a list of globs to the list of files to lint with json.
|
|
125
115
|
*
|
|
126
116
|
* @param file -
|
|
@@ -128,13 +118,13 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
128
118
|
*
|
|
129
119
|
* @returns
|
|
130
120
|
* This object.
|
|
131
|
-
*/
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
121
|
+
*/
|
|
122
|
+
jsonFile(file = []) {
|
|
123
|
+
const files = this.lint.jsonFiles ?? [];
|
|
124
|
+
this.lint.jsonFiles = files.concat(file);
|
|
125
|
+
return this;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
138
128
|
* Adds a list of globs to the list of files to lint with markdownlint.
|
|
139
129
|
*
|
|
140
130
|
* @param file -
|
|
@@ -142,13 +132,13 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
142
132
|
*
|
|
143
133
|
* @returns
|
|
144
134
|
* This object.
|
|
145
|
-
*/
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
135
|
+
*/
|
|
136
|
+
markdownFile(file = []) {
|
|
137
|
+
const files = this.lint.markdownFiles ?? [];
|
|
138
|
+
this.lint.markdownFiles = files.concat(file);
|
|
139
|
+
return this;
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
152
142
|
* Adds a list of globs to the list of files to lint with prettier.
|
|
153
143
|
*
|
|
154
144
|
* @param file -
|
|
@@ -156,13 +146,13 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
156
146
|
*
|
|
157
147
|
* @returns
|
|
158
148
|
* This object.
|
|
159
|
-
*/
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
149
|
+
*/
|
|
150
|
+
prettyFile(file = []) {
|
|
151
|
+
const files = this.lint.prettyFiles ?? [];
|
|
152
|
+
this.lint.prettyFiles = files.concat(file);
|
|
153
|
+
return this;
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
166
156
|
* Adds a list of globs to the list of files to lint with cspell.
|
|
167
157
|
*
|
|
168
158
|
* @param file -
|
|
@@ -170,13 +160,13 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
170
160
|
*
|
|
171
161
|
* @returns
|
|
172
162
|
* This object.
|
|
173
|
-
*/
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
163
|
+
*/
|
|
164
|
+
spellingFile(file = []) {
|
|
165
|
+
const files = this.lint.spellingFiles ?? [];
|
|
166
|
+
this.lint.spellingFiles = files.concat(file);
|
|
167
|
+
return this;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
180
170
|
* Adds a list of globs to the list of files to lint with stylelint.
|
|
181
171
|
*
|
|
182
172
|
* @param file -
|
|
@@ -184,13 +174,13 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
184
174
|
*
|
|
185
175
|
* @returns
|
|
186
176
|
* This object.
|
|
187
|
-
*/
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
177
|
+
*/
|
|
178
|
+
styleFile(file = []) {
|
|
179
|
+
const files = this.lint.styleFiles ?? [];
|
|
180
|
+
this.lint.styleFiles = files.concat(file);
|
|
181
|
+
return this;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
194
184
|
* Adds a list of globs to the list of files to lint with yaml.
|
|
195
185
|
*
|
|
196
186
|
* @param file -
|
|
@@ -198,13 +188,13 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
198
188
|
*
|
|
199
189
|
* @returns
|
|
200
190
|
* This object.
|
|
201
|
-
*/
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
191
|
+
*/
|
|
192
|
+
yamlFile(file = []) {
|
|
193
|
+
const files = this.lint.yamlFiles ?? [];
|
|
194
|
+
this.lint.yamlFiles = files.concat(file);
|
|
195
|
+
return this;
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
208
198
|
* Adds a list of globs to the list of files to exclude from linting with htmlhint.
|
|
209
199
|
*
|
|
210
200
|
* @param files -
|
|
@@ -212,13 +202,13 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
212
202
|
*
|
|
213
203
|
* @returns
|
|
214
204
|
* This object.
|
|
215
|
-
*/
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
205
|
+
*/
|
|
206
|
+
htmlExclude(files = []) {
|
|
207
|
+
const excludes = this.lint.htmlFilesExclude ?? [];
|
|
208
|
+
this.lint.htmlFilesExclude = excludes.concat(files);
|
|
209
|
+
return this;
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
222
212
|
* Adds a list of globs to the list of files to exclude from linting with json.
|
|
223
213
|
*
|
|
224
214
|
* @param file -
|
|
@@ -226,13 +216,13 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
226
216
|
*
|
|
227
217
|
* @returns
|
|
228
218
|
* This object.
|
|
229
|
-
*/
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
219
|
+
*/
|
|
220
|
+
jsonExclude(file = []) {
|
|
221
|
+
const excludes = this.lint.jsonFilesExclude ?? [];
|
|
222
|
+
this.lint.jsonFilesExclude = excludes.concat(file);
|
|
223
|
+
return this;
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
236
226
|
* Adds a list of globs to the list of files to exclude from linting with markdownlint.
|
|
237
227
|
*
|
|
238
228
|
* @param file -
|
|
@@ -240,13 +230,13 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
240
230
|
*
|
|
241
231
|
* @returns
|
|
242
232
|
* This object.
|
|
243
|
-
*/
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
233
|
+
*/
|
|
234
|
+
markdownExclude(file = []) {
|
|
235
|
+
const excludes = this.lint.markdownFilesExclude ?? [];
|
|
236
|
+
this.lint.markdownFilesExclude = excludes.concat(file);
|
|
237
|
+
return this;
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
250
240
|
* Adds a list of globs to the list of files to exclude from linting with prettier.
|
|
251
241
|
*
|
|
252
242
|
* @param file -
|
|
@@ -254,13 +244,13 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
254
244
|
*
|
|
255
245
|
* @returns
|
|
256
246
|
* This object.
|
|
257
|
-
*/
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
247
|
+
*/
|
|
248
|
+
prettyExclude(file = []) {
|
|
249
|
+
const excludes = this.lint.prettyFilesExclude ?? [];
|
|
250
|
+
this.lint.prettyFilesExclude = excludes.concat(file);
|
|
251
|
+
return this;
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
264
254
|
* Adds a list of globs to the list of files to exclude from linting with cspell.
|
|
265
255
|
*
|
|
266
256
|
* @param file -
|
|
@@ -268,13 +258,13 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
268
258
|
*
|
|
269
259
|
* @returns
|
|
270
260
|
* This object.
|
|
271
|
-
*/
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
261
|
+
*/
|
|
262
|
+
spellingExclude(file = []) {
|
|
263
|
+
const excludes = this.lint.spellingFilesExclude ?? [];
|
|
264
|
+
this.lint.spellingFilesExclude = excludes.concat(file);
|
|
265
|
+
return this;
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
278
268
|
* Adds a single file glob to the list of files to exclude from linting with yaml.
|
|
279
269
|
*
|
|
280
270
|
* @param file -
|
|
@@ -282,13 +272,13 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
282
272
|
*
|
|
283
273
|
* @returns
|
|
284
274
|
* This object.
|
|
285
|
-
*/
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
275
|
+
*/
|
|
276
|
+
yamlExclude(file = []) {
|
|
277
|
+
const excludes = this.lint.yamlFilesExclude ?? [];
|
|
278
|
+
this.lint.yamlFilesExclude = excludes.concat(file);
|
|
279
|
+
return this;
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
292
282
|
* Adds a file to all exclusion lists.
|
|
293
283
|
*
|
|
294
284
|
* @param file -
|
|
@@ -296,55 +286,43 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
296
286
|
*
|
|
297
287
|
* @returns
|
|
298
288
|
* This object.
|
|
299
|
-
*/
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
289
|
+
*/
|
|
290
|
+
excludeAll(file = []) {
|
|
291
|
+
return this.htmlExclude(file).jsonExclude(file).markdownExclude(file).prettyExclude(file).spellingExclude(file).yamlExclude(file);
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
303
294
|
* Generates the spelling files based on the other files that have been set.
|
|
304
295
|
*
|
|
305
296
|
* @returns
|
|
306
297
|
* This object.
|
|
307
|
-
*/
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
298
|
+
*/
|
|
299
|
+
generateSpellingFiles() {
|
|
300
|
+
return this.spellingFile(this.lint.esFiles).spellingFile(this.lint.htmlFiles).spellingFile(this.lint.jsonFiles).spellingFile(this.lint.markdownFiles).spellingFile(this.lint.styleFiles).spellingFile(this.lint.yamlFiles);
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
311
303
|
* Generates the pretty files based on the other files that have been set.
|
|
312
304
|
*
|
|
313
305
|
* @returns
|
|
314
306
|
* This object.
|
|
315
|
-
*/
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
307
|
+
*/
|
|
308
|
+
generatePrettyFiles() {
|
|
309
|
+
return this.prettyFile(this.lint.esFiles).prettyFile(this.lint.htmlFiles).prettyFile(this.lint.jsonFiles).prettyFile(this.lint.markdownFiles).prettyFile(this.lint.styleFiles).prettyFile(this.lint.yamlFiles);
|
|
310
|
+
}
|
|
311
|
+
/**
|
|
319
312
|
* Returns the built linting options object.
|
|
320
313
|
*
|
|
321
314
|
* @returns
|
|
322
315
|
* A clone of the current linting options object.
|
|
323
|
-
*/
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
_define_property$1(this, "lint", {});
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
function _define_property(obj, key, value) {
|
|
332
|
-
if (key in obj) {
|
|
333
|
-
Object.defineProperty(obj, key, {
|
|
334
|
-
value: value,
|
|
335
|
-
enumerable: true,
|
|
336
|
-
configurable: true,
|
|
337
|
-
writable: true
|
|
338
|
-
});
|
|
339
|
-
} else {
|
|
340
|
-
obj[key] = value;
|
|
341
|
-
}
|
|
342
|
-
return obj;
|
|
316
|
+
*/
|
|
317
|
+
build() {
|
|
318
|
+
return structuredClone(this.lint);
|
|
319
|
+
}
|
|
343
320
|
}
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
321
|
+
class ZJanitorOptionsBuilder {
|
|
322
|
+
constructor() {
|
|
323
|
+
this.options = {};
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
348
326
|
* Sets the linting options for the janitor system.
|
|
349
327
|
*
|
|
350
328
|
* @param lint -
|
|
@@ -352,23 +330,21 @@ function _define_property(obj, key, value) {
|
|
|
352
330
|
*
|
|
353
331
|
* @returns
|
|
354
332
|
* This object.
|
|
355
|
-
*/
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
333
|
+
*/
|
|
334
|
+
lint(lint) {
|
|
335
|
+
this.options.lint = lint;
|
|
336
|
+
return this;
|
|
337
|
+
}
|
|
338
|
+
/**
|
|
360
339
|
* Builds the options object.
|
|
361
340
|
*
|
|
362
341
|
* @returns
|
|
363
342
|
* A clone of the current options object.
|
|
364
|
-
*/
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
_define_property(this, "options", {});
|
|
369
|
-
}
|
|
343
|
+
*/
|
|
344
|
+
build() {
|
|
345
|
+
return structuredClone(this.options);
|
|
346
|
+
}
|
|
370
347
|
}
|
|
371
|
-
|
|
372
348
|
exports.ZJanitorOptionsBuilder = ZJanitorOptionsBuilder;
|
|
373
349
|
exports.ZJanitorOptionsLintBuilder = ZJanitorOptionsLintBuilder;
|
|
374
350
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../src/options/janitor-options-lint.mts","../src/options/janitor-options.mts"],"sourcesContent":["/**\n * Represents options for linting in the zthunworks janitor system.\n */\nexport interface IZJanitorOptionsLint {\n /**\n * The path to the config file for eslint.\n */\n esConfig?: string;\n /**\n * The path to the config file for htmlhint.\n */\n htmlConfig?: string;\n /**\n * The path to the config file for markdownlint.\n */\n markdownConfig?: string;\n /**\n * The path to the config file for prettier.\n */\n prettyConfig?: string;\n /**\n * The path to the config file for cspell.\n */\n spellingConfig?: string;\n /**\n * The path to the config file for stylelint.\n */\n styleConfig?: string;\n\n /**\n * The file globs to lint with eslint.\n */\n esFiles?: string[];\n /**\n * The file globs to lint with htmlhint.\n */\n htmlFiles?: string[];\n /**\n * The file globs to lint with json.\n */\n jsonFiles?: string[];\n /**\n * The file globs to lint with markdownlint.\n */\n markdownFiles?: string[];\n /**\n * The file globs to lint with prettier.\n */\n prettyFiles?: string[];\n /**\n * The file globs to lint with cspell.\n */\n spellingFiles?: string[];\n /**\n * The file globs to lint with stylelint.\n */\n styleFiles?: string[];\n /**\n * The file globs to lint with yaml.\n */\n yamlFiles?: string[];\n\n /**\n * The files globs to exclude from linting with htmlhint.\n */\n htmlFilesExclude?: string[];\n /**\n * The files globs to exclude from linting with json.\n */\n jsonFilesExclude?: string[];\n /**\n * The files globs to exclude from linting with markdownlint.\n */\n markdownFilesExclude?: string[];\n /**\n * The files globs to exclude from linting with prettier.\n */\n prettyFilesExclude?: string[];\n /**\n * The files globs to exclude from linting with cspell.\n */\n spellingFilesExclude?: string[];\n /**\n * The files globs to exclude from linting with yaml.\n */\n yamlFilesExclude?: string[];\n}\n\n/**\n * A builder for creating linting options for the zthunworks janitor system.\n */\nexport class ZJanitorOptionsLintBuilder {\n private lint: IZJanitorOptionsLint = {};\n\n /**\n * Sets the path to the config file for eslint.\n *\n * @param esConfig -\n * The path to the config file for eslint.\n *\n * @returns\n * This object.\n */\n public esConfig(esConfig: string): ZJanitorOptionsLintBuilder {\n this.lint.esConfig = esConfig;\n return this;\n }\n\n /**\n * Sets the path to the config file for htmlhint.\n *\n * @param htmlConfig -\n * The path to the config file for htmlhint.\n *\n * @returns\n * This object.\n */\n public htmlConfig(htmlConfig: string): ZJanitorOptionsLintBuilder {\n this.lint.htmlConfig = htmlConfig;\n return this;\n }\n\n /**\n * Sets the path to the config file for markdownlint.\n *\n * @param markdownConfig -\n * The path to the config file for markdownlint.\n *\n * @returns\n * This object.\n */\n public markdownConfig(markdownConfig: string): ZJanitorOptionsLintBuilder {\n this.lint.markdownConfig = markdownConfig;\n return this;\n }\n\n /**\n * Sets the path to the config file for prettier.\n *\n * @param prettyConfig -\n * The path to the config file for prettier.\n *\n * @returns\n * This object.\n */\n public prettyConfig(prettyConfig: string): ZJanitorOptionsLintBuilder {\n this.lint.prettyConfig = prettyConfig;\n return this;\n }\n\n /**\n * Sets the path to the config file for cspell.\n *\n * @param spellingConfig -\n * The path to the config file for cspell.\n *\n * @returns\n * This object.\n */\n public spellingConfig(spellingConfig: string): ZJanitorOptionsLintBuilder {\n this.lint.spellingConfig = spellingConfig;\n return this;\n }\n\n /**\n * Sets the path to the config file for stylelint.\n *\n * @param styleConfig -\n * The path to the config file for stylelint.\n *\n * @returns\n * This object.\n */\n public styleConfig(styleConfig: string): ZJanitorOptionsLintBuilder {\n this.lint.styleConfig = styleConfig;\n return this;\n }\n\n /**\n * Adds a list of globs to the list of files to lint with eslint.\n *\n * @param file -\n * The file globs to lint with eslint.\n *\n * @returns\n * This object.\n */\n public esFile(file: string | string[] = []) {\n const files = this.lint.esFiles ?? [];\n this.lint.esFiles = files.concat(file);\n return this;\n }\n\n /**\n * Adds a list of globs to the list of files to lint with htmlhint.\n *\n * @param file -\n * The file globs to lint with htmlhint.\n *\n * @returns\n * This object.\n */\n public htmlFile(file: string | string[] = []) {\n const files = this.lint.htmlFiles ?? [];\n this.lint.htmlFiles = files.concat(file);\n return this;\n }\n\n /**\n * Adds a list of globs to the list of files to lint with json.\n *\n * @param file -\n * The file globs to lint with json.\n *\n * @returns\n * This object.\n */\n public jsonFile(file: string | string[] = []) {\n const files = this.lint.jsonFiles ?? [];\n this.lint.jsonFiles = files.concat(file);\n return this;\n }\n\n /**\n * Adds a list of globs to the list of files to lint with markdownlint.\n *\n * @param file -\n * The globs to lint with markdownlint.\n *\n * @returns\n * This object.\n */\n public markdownFile(file: string | string[] = []) {\n const files = this.lint.markdownFiles ?? [];\n this.lint.markdownFiles = files.concat(file);\n return this;\n }\n\n /**\n * Adds a list of globs to the list of files to lint with prettier.\n *\n * @param file -\n * The globs to lint with prettier.\n *\n * @returns\n * This object.\n */\n public prettyFile(file: string | string[] = []) {\n const files = this.lint.prettyFiles ?? [];\n this.lint.prettyFiles = files.concat(file);\n return this;\n }\n\n /**\n * Adds a list of globs to the list of files to lint with cspell.\n *\n * @param file -\n * The file globs to lint with cspell.\n *\n * @returns\n * This object.\n */\n public spellingFile(file: string | string[] = []) {\n const files = this.lint.spellingFiles ?? [];\n this.lint.spellingFiles = files.concat(file);\n return this;\n }\n\n /**\n * Adds a list of globs to the list of files to lint with stylelint.\n *\n * @param file -\n * The file globs to lint with stylelint.\n *\n * @returns\n * This object.\n */\n public styleFile(file: string | string[] = []) {\n const files = this.lint.styleFiles ?? [];\n this.lint.styleFiles = files.concat(file);\n return this;\n }\n\n /**\n * Adds a list of globs to the list of files to lint with yaml.\n *\n * @param file -\n * The file globs to lint with yaml.\n *\n * @returns\n * This object.\n */\n public yamlFile(file: string | string[] = []) {\n const files = this.lint.yamlFiles ?? [];\n this.lint.yamlFiles = files.concat(file);\n return this;\n }\n\n /**\n * Adds a list of globs to the list of files to exclude from linting with htmlhint.\n *\n * @param files -\n * The file globs to exclude from linting with htmlhint.\n *\n * @returns\n * This object.\n */\n public htmlExclude(files: string | string[] = []) {\n const excludes = this.lint.htmlFilesExclude ?? [];\n this.lint.htmlFilesExclude = excludes.concat(files);\n return this;\n }\n\n /**\n * Adds a list of globs to the list of files to exclude from linting with json.\n *\n * @param file -\n * The globs to exclude from linting with json.\n *\n * @returns\n * This object.\n */\n public jsonExclude(file: string | string[] = []) {\n const excludes = this.lint.jsonFilesExclude ?? [];\n this.lint.jsonFilesExclude = excludes.concat(file);\n return this;\n }\n\n /**\n * Adds a list of globs to the list of files to exclude from linting with markdownlint.\n *\n * @param file -\n * The globs to exclude from linting with markdownlint.\n *\n * @returns\n * This object.\n */\n public markdownExclude(file: string | string[] = []) {\n const excludes = this.lint.markdownFilesExclude ?? [];\n this.lint.markdownFilesExclude = excludes.concat(file);\n return this;\n }\n\n /**\n * Adds a list of globs to the list of files to exclude from linting with prettier.\n *\n * @param file -\n * The globs to exclude from linting with prettier.\n *\n * @returns\n * This object.\n */\n public prettyExclude(file: string | string[] = []) {\n const excludes = this.lint.prettyFilesExclude ?? [];\n this.lint.prettyFilesExclude = excludes.concat(file);\n return this;\n }\n\n /**\n * Adds a list of globs to the list of files to exclude from linting with cspell.\n *\n * @param file -\n * The globs to exclude from linting with cspell.\n *\n * @returns\n * This object.\n */\n public spellingExclude(file: string | string[] = []) {\n const excludes = this.lint.spellingFilesExclude ?? [];\n this.lint.spellingFilesExclude = excludes.concat(file);\n return this;\n }\n\n /**\n * Adds a single file glob to the list of files to exclude from linting with yaml.\n *\n * @param file -\n * The file glob to exclude from linting with yaml.\n *\n * @returns\n * This object.\n */\n public yamlExclude(file: string | string[] = []) {\n const excludes = this.lint.yamlFilesExclude ?? [];\n this.lint.yamlFilesExclude = excludes.concat(file);\n return this;\n }\n\n /**\n * Adds a file to all exclusion lists.\n *\n * @param file -\n * The file to exclude from all linting.\n *\n * @returns\n * This object.\n */\n public excludeAll(file: string | string[] = []) {\n return this.htmlExclude(file)\n .jsonExclude(file)\n .markdownExclude(file)\n .prettyExclude(file)\n .spellingExclude(file)\n .yamlExclude(file);\n }\n\n /**\n * Generates the spelling files based on the other files that have been set.\n *\n * @returns\n * This object.\n */\n public generateSpellingFiles() {\n return this.spellingFile(this.lint.esFiles)\n .spellingFile(this.lint.htmlFiles)\n .spellingFile(this.lint.jsonFiles)\n .spellingFile(this.lint.markdownFiles)\n .spellingFile(this.lint.styleFiles)\n .spellingFile(this.lint.yamlFiles);\n }\n\n /**\n * Generates the pretty files based on the other files that have been set.\n *\n * @returns\n * This object.\n */\n public generatePrettyFiles() {\n return this.prettyFile(this.lint.esFiles)\n .prettyFile(this.lint.htmlFiles)\n .prettyFile(this.lint.jsonFiles)\n .prettyFile(this.lint.markdownFiles)\n .prettyFile(this.lint.styleFiles)\n .prettyFile(this.lint.yamlFiles);\n }\n\n /**\n * Returns the built linting options object.\n *\n * @returns\n * A clone of the current linting options object.\n */\n public build() {\n return structuredClone(this.lint);\n }\n}\n","import type { IZJanitorOptionsLint } from \"./janitor-options-lint.mjs\";\n\n/**\n * Options for the zthunworks janitor system.\n */\nexport interface IZJanitorOptions {\n /**\n * Linting options for janitor-lint.\n */\n lint?: IZJanitorOptionsLint;\n}\n\n/**\n * A builder for creating janitor options.\n */\nexport class ZJanitorOptionsBuilder {\n private options: IZJanitorOptions = {};\n\n /**\n * Sets the linting options for the janitor system.\n *\n * @param lint -\n * The linting options to set.\n *\n * @returns\n * This object.\n */\n public lint(lint: IZJanitorOptionsLint): ZJanitorOptionsBuilder {\n this.options.lint = lint;\n return this;\n }\n\n /**\n * Builds the options object.\n *\n * @returns\n * A clone of the current options object.\n */\n public build(): IZJanitorOptions {\n return structuredClone(this.options);\n }\n}\n"],"names":["_define_property","ZJanitorOptionsLintBuilder","esConfig","lint","htmlConfig","markdownConfig","prettyConfig","spellingConfig","styleConfig","esFile","file","files","esFiles","concat","htmlFile","htmlFiles","jsonFile","jsonFiles","markdownFile","markdownFiles","prettyFile","prettyFiles","spellingFile","spellingFiles","styleFile","styleFiles","yamlFile","yamlFiles","htmlExclude","excludes","htmlFilesExclude","jsonExclude","jsonFilesExclude","markdownExclude","markdownFilesExclude","prettyExclude","prettyFilesExclude","spellingExclude","spellingFilesExclude","yamlExclude","yamlFilesExclude","excludeAll","structuredClone","ZJanitorOptionsBuilder","options"],"mappings":";;;;AAAA;;AAEC,IAAA,SAAAA,kBAAA,CAAA,GAAA,EAAA,GAAA,EAAA,KAAA,EAAA;;;;;;;;;;;;;AAsFD;;AAEC,IACM,MAAMC,0BAAAA,CAAAA;AAGX;;;;;;;;MASOC,QAASA,CAAAA,QAAgB,EAA8B;AAC5D,QAAA,IAAI,CAACC,IAAI,CAACD,QAAQ,GAAGA,QAAAA;AACrB,QAAA,OAAO,IAAI;AACb;AAEA;;;;;;;;MASOE,UAAWA,CAA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janitor-options-lint.mts","../src/options/janitor-options.mts"],"sourcesContent":["/**\n * Represents options for linting in the zthunworks janitor system.\n */\nexport interface IZJanitorOptionsLint {\n /**\n * The path to the config file for eslint.\n */\n esConfig?: string;\n /**\n * The path to the config file for htmlhint.\n */\n htmlConfig?: string;\n /**\n * The path to the config file for markdownlint.\n */\n markdownConfig?: string;\n /**\n * The path to the config file for prettier.\n */\n prettyConfig?: string;\n /**\n * The path to the config file for cspell.\n */\n spellingConfig?: string;\n /**\n * The path to the config file for stylelint.\n */\n styleConfig?: string;\n\n /**\n * The file globs to lint with eslint.\n */\n esFiles?: string[];\n /**\n * The file globs to lint with htmlhint.\n */\n htmlFiles?: string[];\n /**\n * The file globs to lint with json.\n */\n jsonFiles?: string[];\n /**\n * The file globs to lint with markdownlint.\n */\n markdownFiles?: string[];\n /**\n * The file globs to lint with prettier.\n */\n prettyFiles?: string[];\n /**\n * The file globs to lint with cspell.\n */\n spellingFiles?: string[];\n /**\n * The file globs to lint with stylelint.\n */\n styleFiles?: string[];\n /**\n * The file globs to lint with yaml.\n */\n yamlFiles?: string[];\n\n /**\n * The files globs to exclude from linting with htmlhint.\n */\n htmlFilesExclude?: string[];\n /**\n * The files globs to exclude from linting with json.\n */\n jsonFilesExclude?: string[];\n /**\n * The files globs to exclude from linting with markdownlint.\n */\n markdownFilesExclude?: string[];\n /**\n * The files globs to exclude from linting with prettier.\n */\n prettyFilesExclude?: string[];\n /**\n * The files globs to exclude from linting with cspell.\n */\n spellingFilesExclude?: string[];\n /**\n * The files globs to exclude from linting with yaml.\n */\n yamlFilesExclude?: string[];\n}\n\n/**\n * A builder for creating linting options for the zthunworks janitor system.\n */\nexport class ZJanitorOptionsLintBuilder {\n private lint: IZJanitorOptionsLint = {};\n\n /**\n * Sets the path to the config file for eslint.\n *\n * @param esConfig -\n * The path to the config file for eslint.\n *\n * @returns\n * This object.\n */\n public esConfig(esConfig: string): ZJanitorOptionsLintBuilder {\n this.lint.esConfig = esConfig;\n return this;\n }\n\n /**\n * Sets the path to the config file for htmlhint.\n *\n * @param htmlConfig -\n * The path to the config file for htmlhint.\n *\n * @returns\n * This object.\n */\n public htmlConfig(htmlConfig: string): ZJanitorOptionsLintBuilder {\n this.lint.htmlConfig = htmlConfig;\n return this;\n }\n\n /**\n * Sets the path to the config file for markdownlint.\n *\n * @param markdownConfig -\n * The path to the config file for markdownlint.\n *\n * @returns\n * This object.\n */\n public markdownConfig(markdownConfig: string): ZJanitorOptionsLintBuilder {\n this.lint.markdownConfig = markdownConfig;\n return this;\n }\n\n /**\n * Sets the path to the config file for prettier.\n *\n * @param prettyConfig -\n * The path to the config file for prettier.\n *\n * @returns\n * This object.\n */\n public prettyConfig(prettyConfig: string): ZJanitorOptionsLintBuilder {\n this.lint.prettyConfig = prettyConfig;\n return this;\n }\n\n /**\n * Sets the path to the config file for cspell.\n *\n * @param spellingConfig -\n * The path to the config file for cspell.\n *\n * @returns\n * This object.\n */\n public spellingConfig(spellingConfig: string): ZJanitorOptionsLintBuilder {\n this.lint.spellingConfig = spellingConfig;\n return this;\n }\n\n /**\n * Sets the path to the config file for stylelint.\n *\n * @param styleConfig -\n * The path to the config file for stylelint.\n *\n * @returns\n * This object.\n */\n public styleConfig(styleConfig: string): ZJanitorOptionsLintBuilder {\n this.lint.styleConfig = styleConfig;\n return this;\n }\n\n /**\n * Adds a list of globs to the list of files to lint with eslint.\n *\n * @param file -\n * The file globs to lint with eslint.\n *\n * @returns\n * This object.\n */\n public esFile(file: string | string[] = []) {\n const files = this.lint.esFiles ?? [];\n this.lint.esFiles = files.concat(file);\n return this;\n }\n\n /**\n * Adds a list of globs to the list of files to lint with htmlhint.\n *\n * @param file -\n * The file globs to lint with htmlhint.\n *\n * @returns\n * This object.\n */\n public htmlFile(file: string | string[] = []) {\n const files = this.lint.htmlFiles ?? [];\n this.lint.htmlFiles = files.concat(file);\n return this;\n }\n\n /**\n * Adds a list of globs to the list of files to lint with json.\n *\n * @param file -\n * The file globs to lint with json.\n *\n * @returns\n * This object.\n */\n public jsonFile(file: string | string[] = []) {\n const files = this.lint.jsonFiles ?? [];\n this.lint.jsonFiles = files.concat(file);\n return this;\n }\n\n /**\n * Adds a list of globs to the list of files to lint with markdownlint.\n *\n * @param file -\n * The globs to lint with markdownlint.\n *\n * @returns\n * This object.\n */\n public markdownFile(file: string | string[] = []) {\n const files = this.lint.markdownFiles ?? [];\n this.lint.markdownFiles = files.concat(file);\n return this;\n }\n\n /**\n * Adds a list of globs to the list of files to lint with prettier.\n *\n * @param file -\n * The globs to lint with prettier.\n *\n * @returns\n * This object.\n */\n public prettyFile(file: string | string[] = []) {\n const files = this.lint.prettyFiles ?? [];\n this.lint.prettyFiles = files.concat(file);\n return this;\n }\n\n /**\n * Adds a list of globs to the list of files to lint with cspell.\n *\n * @param file -\n * The file globs to lint with cspell.\n *\n * @returns\n * This object.\n */\n public spellingFile(file: string | string[] = []) {\n const files = this.lint.spellingFiles ?? [];\n this.lint.spellingFiles = files.concat(file);\n return this;\n }\n\n /**\n * Adds a list of globs to the list of files to lint with stylelint.\n *\n * @param file -\n * The file globs to lint with stylelint.\n *\n * @returns\n * This object.\n */\n public styleFile(file: string | string[] = []) {\n const files = this.lint.styleFiles ?? [];\n this.lint.styleFiles = files.concat(file);\n return this;\n }\n\n /**\n * Adds a list of globs to the list of files to lint with yaml.\n *\n * @param file -\n * The file globs to lint with yaml.\n *\n * @returns\n * This object.\n */\n public yamlFile(file: string | string[] = []) {\n const files = this.lint.yamlFiles ?? [];\n this.lint.yamlFiles = files.concat(file);\n return this;\n }\n\n /**\n * Adds a list of globs to the list of files to exclude from linting with htmlhint.\n *\n * @param files -\n * The file globs to exclude from linting with htmlhint.\n *\n * @returns\n * This object.\n */\n public htmlExclude(files: string | string[] = []) {\n const excludes = this.lint.htmlFilesExclude ?? [];\n this.lint.htmlFilesExclude = excludes.concat(files);\n return this;\n }\n\n /**\n * Adds a list of globs to the list of files to exclude from linting with json.\n *\n * @param file -\n * The globs to exclude from linting with json.\n *\n * @returns\n * This object.\n */\n public jsonExclude(file: string | string[] = []) {\n const excludes = this.lint.jsonFilesExclude ?? [];\n this.lint.jsonFilesExclude = excludes.concat(file);\n return this;\n }\n\n /**\n * Adds a list of globs to the list of files to exclude from linting with markdownlint.\n *\n * @param file -\n * The globs to exclude from linting with markdownlint.\n *\n * @returns\n * This object.\n */\n public markdownExclude(file: string | string[] = []) {\n const excludes = this.lint.markdownFilesExclude ?? [];\n this.lint.markdownFilesExclude = excludes.concat(file);\n return this;\n }\n\n /**\n * Adds a list of globs to the list of files to exclude from linting with prettier.\n *\n * @param file -\n * The globs to exclude from linting with prettier.\n *\n * @returns\n * This object.\n */\n public prettyExclude(file: string | string[] = []) {\n const excludes = this.lint.prettyFilesExclude ?? [];\n this.lint.prettyFilesExclude = excludes.concat(file);\n return this;\n }\n\n /**\n * Adds a list of globs to the list of files to exclude from linting with cspell.\n *\n * @param file -\n * The globs to exclude from linting with cspell.\n *\n * @returns\n * This object.\n */\n public spellingExclude(file: string | string[] = []) {\n const excludes = this.lint.spellingFilesExclude ?? [];\n this.lint.spellingFilesExclude = excludes.concat(file);\n return this;\n }\n\n /**\n * Adds a single file glob to the list of files to exclude from linting with yaml.\n *\n * @param file -\n * The file glob to exclude from linting with yaml.\n *\n * @returns\n * This object.\n */\n public yamlExclude(file: string | string[] = []) {\n const excludes = this.lint.yamlFilesExclude ?? [];\n this.lint.yamlFilesExclude = excludes.concat(file);\n return this;\n }\n\n /**\n * Adds a file to all exclusion lists.\n *\n * @param file -\n * The file to exclude from all linting.\n *\n * @returns\n * This object.\n */\n public excludeAll(file: string | string[] = []) {\n return this.htmlExclude(file)\n .jsonExclude(file)\n .markdownExclude(file)\n .prettyExclude(file)\n .spellingExclude(file)\n .yamlExclude(file);\n }\n\n /**\n * Generates the spelling files based on the other files that have been set.\n *\n * @returns\n * This object.\n */\n public generateSpellingFiles() {\n return this.spellingFile(this.lint.esFiles)\n .spellingFile(this.lint.htmlFiles)\n .spellingFile(this.lint.jsonFiles)\n .spellingFile(this.lint.markdownFiles)\n .spellingFile(this.lint.styleFiles)\n .spellingFile(this.lint.yamlFiles);\n }\n\n /**\n * Generates the pretty files based on the other files that have been set.\n *\n * @returns\n * This object.\n */\n public generatePrettyFiles() {\n return this.prettyFile(this.lint.esFiles)\n .prettyFile(this.lint.htmlFiles)\n .prettyFile(this.lint.jsonFiles)\n .prettyFile(this.lint.markdownFiles)\n .prettyFile(this.lint.styleFiles)\n .prettyFile(this.lint.yamlFiles);\n }\n\n /**\n * Returns the built linting options object.\n *\n * @returns\n * A clone of the current linting options object.\n */\n public build() {\n return structuredClone(this.lint);\n }\n}\n","import type { IZJanitorOptionsLint } from \"./janitor-options-lint.mjs\";\n\n/**\n * Options for the zthunworks janitor system.\n */\nexport interface IZJanitorOptions {\n /**\n * Linting options for janitor-lint.\n */\n lint?: IZJanitorOptionsLint;\n}\n\n/**\n * A builder for creating janitor options.\n */\nexport class ZJanitorOptionsBuilder {\n private options: IZJanitorOptions = {};\n\n /**\n * Sets the linting options for the janitor system.\n *\n * @param lint -\n * The linting options to set.\n *\n * @returns\n * This object.\n */\n public lint(lint: IZJanitorOptionsLint): ZJanitorOptionsBuilder {\n this.options.lint = lint;\n return this;\n }\n\n /**\n * Builds the options object.\n *\n * @returns\n * A clone of the current options object.\n */\n public build(): IZJanitorOptions {\n return structuredClone(this.options);\n }\n}\n"],"names":[],"mappings":";;AA2FO,MAAM,2BAA2B;AAAA,EAAjC,cAAA;AACL,SAAQ,OAA6B,CAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAW/B,SAAS,UAA8C;AAC5D,SAAK,KAAK,WAAW;AACd,WAAA;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYF,WAAW,YAAgD;AAChE,SAAK,KAAK,aAAa;AAChB,WAAA;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA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AAK,KAAK,UAAU,EACjC,aAAa,KAAK,KAAK,SAAS;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAS9B,sBAAsB;AAC3B,WAAO,KAAK,WAAW,KAAK,KAAK,OAAO,EACrC,WAAW,KAAK,KAAK,SAAS,EAC9B,WAAW,KAAK,KAAK,SAAS,EAC9B,WAAW,KAAK,KAAK,aAAa,EAClC,WAAW,KAAK,KAAK,UAAU,EAC/B,WAAW,KAAK,KAAK,SAAS;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAS5B,QAAQ;AACN,WAAA,gBAAgB,KAAK,IAAI;AAAA,EAAA;AAEpC;AC9aO,MAAM,uBAAuB;AAAA,EAA7B,cAAA;AACL,SAAQ,UAA4B,CAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAW9B,KAAK,MAAoD;AAC9D,SAAK,QAAQ,OAAO;AACb,WAAA;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASF,QAA0B;AACxB,WAAA,gBAAgB,KAAK,OAAO;AAAA,EAAA;AAEvC;;;"}
|
package/dist/index.js
CHANGED
|
@@ -1,22 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
value: value,
|
|
7
|
-
enumerable: true,
|
|
8
|
-
configurable: true,
|
|
9
|
-
writable: true
|
|
10
|
-
});
|
|
11
|
-
} else {
|
|
12
|
-
obj[key] = value;
|
|
13
|
-
}
|
|
14
|
-
return obj;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* A builder for creating linting options for the zthunworks janitor system.
|
|
18
|
-
*/ class ZJanitorOptionsLintBuilder {
|
|
19
|
-
/**
|
|
1
|
+
class ZJanitorOptionsLintBuilder {
|
|
2
|
+
constructor() {
|
|
3
|
+
this.lint = {};
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
20
6
|
* Sets the path to the config file for eslint.
|
|
21
7
|
*
|
|
22
8
|
* @param esConfig -
|
|
@@ -24,11 +10,12 @@
|
|
|
24
10
|
*
|
|
25
11
|
* @returns
|
|
26
12
|
* This object.
|
|
27
|
-
*/
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
13
|
+
*/
|
|
14
|
+
esConfig(esConfig) {
|
|
15
|
+
this.lint.esConfig = esConfig;
|
|
16
|
+
return this;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
32
19
|
* Sets the path to the config file for htmlhint.
|
|
33
20
|
*
|
|
34
21
|
* @param htmlConfig -
|
|
@@ -36,11 +23,12 @@
|
|
|
36
23
|
*
|
|
37
24
|
* @returns
|
|
38
25
|
* This object.
|
|
39
|
-
*/
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
26
|
+
*/
|
|
27
|
+
htmlConfig(htmlConfig) {
|
|
28
|
+
this.lint.htmlConfig = htmlConfig;
|
|
29
|
+
return this;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
44
32
|
* Sets the path to the config file for markdownlint.
|
|
45
33
|
*
|
|
46
34
|
* @param markdownConfig -
|
|
@@ -48,11 +36,12 @@
|
|
|
48
36
|
*
|
|
49
37
|
* @returns
|
|
50
38
|
* This object.
|
|
51
|
-
*/
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
39
|
+
*/
|
|
40
|
+
markdownConfig(markdownConfig) {
|
|
41
|
+
this.lint.markdownConfig = markdownConfig;
|
|
42
|
+
return this;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
56
45
|
* Sets the path to the config file for prettier.
|
|
57
46
|
*
|
|
58
47
|
* @param prettyConfig -
|
|
@@ -60,11 +49,12 @@
|
|
|
60
49
|
*
|
|
61
50
|
* @returns
|
|
62
51
|
* This object.
|
|
63
|
-
*/
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
52
|
+
*/
|
|
53
|
+
prettyConfig(prettyConfig) {
|
|
54
|
+
this.lint.prettyConfig = prettyConfig;
|
|
55
|
+
return this;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
68
58
|
* Sets the path to the config file for cspell.
|
|
69
59
|
*
|
|
70
60
|
* @param spellingConfig -
|
|
@@ -72,11 +62,12 @@
|
|
|
72
62
|
*
|
|
73
63
|
* @returns
|
|
74
64
|
* This object.
|
|
75
|
-
*/
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
65
|
+
*/
|
|
66
|
+
spellingConfig(spellingConfig) {
|
|
67
|
+
this.lint.spellingConfig = spellingConfig;
|
|
68
|
+
return this;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
80
71
|
* Sets the path to the config file for stylelint.
|
|
81
72
|
*
|
|
82
73
|
* @param styleConfig -
|
|
@@ -84,11 +75,12 @@
|
|
|
84
75
|
*
|
|
85
76
|
* @returns
|
|
86
77
|
* This object.
|
|
87
|
-
*/
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
78
|
+
*/
|
|
79
|
+
styleConfig(styleConfig) {
|
|
80
|
+
this.lint.styleConfig = styleConfig;
|
|
81
|
+
return this;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
92
84
|
* Adds a list of globs to the list of files to lint with eslint.
|
|
93
85
|
*
|
|
94
86
|
* @param file -
|
|
@@ -96,13 +88,13 @@
|
|
|
96
88
|
*
|
|
97
89
|
* @returns
|
|
98
90
|
* This object.
|
|
99
|
-
*/
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
91
|
+
*/
|
|
92
|
+
esFile(file = []) {
|
|
93
|
+
const files = this.lint.esFiles ?? [];
|
|
94
|
+
this.lint.esFiles = files.concat(file);
|
|
95
|
+
return this;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
106
98
|
* Adds a list of globs to the list of files to lint with htmlhint.
|
|
107
99
|
*
|
|
108
100
|
* @param file -
|
|
@@ -110,13 +102,13 @@
|
|
|
110
102
|
*
|
|
111
103
|
* @returns
|
|
112
104
|
* This object.
|
|
113
|
-
*/
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
105
|
+
*/
|
|
106
|
+
htmlFile(file = []) {
|
|
107
|
+
const files = this.lint.htmlFiles ?? [];
|
|
108
|
+
this.lint.htmlFiles = files.concat(file);
|
|
109
|
+
return this;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
120
112
|
* Adds a list of globs to the list of files to lint with json.
|
|
121
113
|
*
|
|
122
114
|
* @param file -
|
|
@@ -124,13 +116,13 @@
|
|
|
124
116
|
*
|
|
125
117
|
* @returns
|
|
126
118
|
* This object.
|
|
127
|
-
*/
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
119
|
+
*/
|
|
120
|
+
jsonFile(file = []) {
|
|
121
|
+
const files = this.lint.jsonFiles ?? [];
|
|
122
|
+
this.lint.jsonFiles = files.concat(file);
|
|
123
|
+
return this;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
134
126
|
* Adds a list of globs to the list of files to lint with markdownlint.
|
|
135
127
|
*
|
|
136
128
|
* @param file -
|
|
@@ -138,13 +130,13 @@
|
|
|
138
130
|
*
|
|
139
131
|
* @returns
|
|
140
132
|
* This object.
|
|
141
|
-
*/
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
133
|
+
*/
|
|
134
|
+
markdownFile(file = []) {
|
|
135
|
+
const files = this.lint.markdownFiles ?? [];
|
|
136
|
+
this.lint.markdownFiles = files.concat(file);
|
|
137
|
+
return this;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
148
140
|
* Adds a list of globs to the list of files to lint with prettier.
|
|
149
141
|
*
|
|
150
142
|
* @param file -
|
|
@@ -152,13 +144,13 @@
|
|
|
152
144
|
*
|
|
153
145
|
* @returns
|
|
154
146
|
* This object.
|
|
155
|
-
*/
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
147
|
+
*/
|
|
148
|
+
prettyFile(file = []) {
|
|
149
|
+
const files = this.lint.prettyFiles ?? [];
|
|
150
|
+
this.lint.prettyFiles = files.concat(file);
|
|
151
|
+
return this;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
162
154
|
* Adds a list of globs to the list of files to lint with cspell.
|
|
163
155
|
*
|
|
164
156
|
* @param file -
|
|
@@ -166,13 +158,13 @@
|
|
|
166
158
|
*
|
|
167
159
|
* @returns
|
|
168
160
|
* This object.
|
|
169
|
-
*/
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
161
|
+
*/
|
|
162
|
+
spellingFile(file = []) {
|
|
163
|
+
const files = this.lint.spellingFiles ?? [];
|
|
164
|
+
this.lint.spellingFiles = files.concat(file);
|
|
165
|
+
return this;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
176
168
|
* Adds a list of globs to the list of files to lint with stylelint.
|
|
177
169
|
*
|
|
178
170
|
* @param file -
|
|
@@ -180,13 +172,13 @@
|
|
|
180
172
|
*
|
|
181
173
|
* @returns
|
|
182
174
|
* This object.
|
|
183
|
-
*/
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
175
|
+
*/
|
|
176
|
+
styleFile(file = []) {
|
|
177
|
+
const files = this.lint.styleFiles ?? [];
|
|
178
|
+
this.lint.styleFiles = files.concat(file);
|
|
179
|
+
return this;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
190
182
|
* Adds a list of globs to the list of files to lint with yaml.
|
|
191
183
|
*
|
|
192
184
|
* @param file -
|
|
@@ -194,13 +186,13 @@
|
|
|
194
186
|
*
|
|
195
187
|
* @returns
|
|
196
188
|
* This object.
|
|
197
|
-
*/
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
189
|
+
*/
|
|
190
|
+
yamlFile(file = []) {
|
|
191
|
+
const files = this.lint.yamlFiles ?? [];
|
|
192
|
+
this.lint.yamlFiles = files.concat(file);
|
|
193
|
+
return this;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
204
196
|
* Adds a list of globs to the list of files to exclude from linting with htmlhint.
|
|
205
197
|
*
|
|
206
198
|
* @param files -
|
|
@@ -208,13 +200,13 @@
|
|
|
208
200
|
*
|
|
209
201
|
* @returns
|
|
210
202
|
* This object.
|
|
211
|
-
*/
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
203
|
+
*/
|
|
204
|
+
htmlExclude(files = []) {
|
|
205
|
+
const excludes = this.lint.htmlFilesExclude ?? [];
|
|
206
|
+
this.lint.htmlFilesExclude = excludes.concat(files);
|
|
207
|
+
return this;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
218
210
|
* Adds a list of globs to the list of files to exclude from linting with json.
|
|
219
211
|
*
|
|
220
212
|
* @param file -
|
|
@@ -222,13 +214,13 @@
|
|
|
222
214
|
*
|
|
223
215
|
* @returns
|
|
224
216
|
* This object.
|
|
225
|
-
*/
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
217
|
+
*/
|
|
218
|
+
jsonExclude(file = []) {
|
|
219
|
+
const excludes = this.lint.jsonFilesExclude ?? [];
|
|
220
|
+
this.lint.jsonFilesExclude = excludes.concat(file);
|
|
221
|
+
return this;
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
232
224
|
* Adds a list of globs to the list of files to exclude from linting with markdownlint.
|
|
233
225
|
*
|
|
234
226
|
* @param file -
|
|
@@ -236,13 +228,13 @@
|
|
|
236
228
|
*
|
|
237
229
|
* @returns
|
|
238
230
|
* This object.
|
|
239
|
-
*/
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
231
|
+
*/
|
|
232
|
+
markdownExclude(file = []) {
|
|
233
|
+
const excludes = this.lint.markdownFilesExclude ?? [];
|
|
234
|
+
this.lint.markdownFilesExclude = excludes.concat(file);
|
|
235
|
+
return this;
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
246
238
|
* Adds a list of globs to the list of files to exclude from linting with prettier.
|
|
247
239
|
*
|
|
248
240
|
* @param file -
|
|
@@ -250,13 +242,13 @@
|
|
|
250
242
|
*
|
|
251
243
|
* @returns
|
|
252
244
|
* This object.
|
|
253
|
-
*/
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
245
|
+
*/
|
|
246
|
+
prettyExclude(file = []) {
|
|
247
|
+
const excludes = this.lint.prettyFilesExclude ?? [];
|
|
248
|
+
this.lint.prettyFilesExclude = excludes.concat(file);
|
|
249
|
+
return this;
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
260
252
|
* Adds a list of globs to the list of files to exclude from linting with cspell.
|
|
261
253
|
*
|
|
262
254
|
* @param file -
|
|
@@ -264,13 +256,13 @@
|
|
|
264
256
|
*
|
|
265
257
|
* @returns
|
|
266
258
|
* This object.
|
|
267
|
-
*/
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
259
|
+
*/
|
|
260
|
+
spellingExclude(file = []) {
|
|
261
|
+
const excludes = this.lint.spellingFilesExclude ?? [];
|
|
262
|
+
this.lint.spellingFilesExclude = excludes.concat(file);
|
|
263
|
+
return this;
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
274
266
|
* Adds a single file glob to the list of files to exclude from linting with yaml.
|
|
275
267
|
*
|
|
276
268
|
* @param file -
|
|
@@ -278,13 +270,13 @@
|
|
|
278
270
|
*
|
|
279
271
|
* @returns
|
|
280
272
|
* This object.
|
|
281
|
-
*/
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
273
|
+
*/
|
|
274
|
+
yamlExclude(file = []) {
|
|
275
|
+
const excludes = this.lint.yamlFilesExclude ?? [];
|
|
276
|
+
this.lint.yamlFilesExclude = excludes.concat(file);
|
|
277
|
+
return this;
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
288
280
|
* Adds a file to all exclusion lists.
|
|
289
281
|
*
|
|
290
282
|
* @param file -
|
|
@@ -292,55 +284,43 @@
|
|
|
292
284
|
*
|
|
293
285
|
* @returns
|
|
294
286
|
* This object.
|
|
295
|
-
*/
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
287
|
+
*/
|
|
288
|
+
excludeAll(file = []) {
|
|
289
|
+
return this.htmlExclude(file).jsonExclude(file).markdownExclude(file).prettyExclude(file).spellingExclude(file).yamlExclude(file);
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
299
292
|
* Generates the spelling files based on the other files that have been set.
|
|
300
293
|
*
|
|
301
294
|
* @returns
|
|
302
295
|
* This object.
|
|
303
|
-
*/
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
296
|
+
*/
|
|
297
|
+
generateSpellingFiles() {
|
|
298
|
+
return this.spellingFile(this.lint.esFiles).spellingFile(this.lint.htmlFiles).spellingFile(this.lint.jsonFiles).spellingFile(this.lint.markdownFiles).spellingFile(this.lint.styleFiles).spellingFile(this.lint.yamlFiles);
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
307
301
|
* Generates the pretty files based on the other files that have been set.
|
|
308
302
|
*
|
|
309
303
|
* @returns
|
|
310
304
|
* This object.
|
|
311
|
-
*/
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
305
|
+
*/
|
|
306
|
+
generatePrettyFiles() {
|
|
307
|
+
return this.prettyFile(this.lint.esFiles).prettyFile(this.lint.htmlFiles).prettyFile(this.lint.jsonFiles).prettyFile(this.lint.markdownFiles).prettyFile(this.lint.styleFiles).prettyFile(this.lint.yamlFiles);
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
315
310
|
* Returns the built linting options object.
|
|
316
311
|
*
|
|
317
312
|
* @returns
|
|
318
313
|
* A clone of the current linting options object.
|
|
319
|
-
*/
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
_define_property$1(this, "lint", {});
|
|
324
|
-
}
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
function _define_property(obj, key, value) {
|
|
328
|
-
if (key in obj) {
|
|
329
|
-
Object.defineProperty(obj, key, {
|
|
330
|
-
value: value,
|
|
331
|
-
enumerable: true,
|
|
332
|
-
configurable: true,
|
|
333
|
-
writable: true
|
|
334
|
-
});
|
|
335
|
-
} else {
|
|
336
|
-
obj[key] = value;
|
|
337
|
-
}
|
|
338
|
-
return obj;
|
|
314
|
+
*/
|
|
315
|
+
build() {
|
|
316
|
+
return structuredClone(this.lint);
|
|
317
|
+
}
|
|
339
318
|
}
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
319
|
+
class ZJanitorOptionsBuilder {
|
|
320
|
+
constructor() {
|
|
321
|
+
this.options = {};
|
|
322
|
+
}
|
|
323
|
+
/**
|
|
344
324
|
* Sets the linting options for the janitor system.
|
|
345
325
|
*
|
|
346
326
|
* @param lint -
|
|
@@ -348,22 +328,23 @@ function _define_property(obj, key, value) {
|
|
|
348
328
|
*
|
|
349
329
|
* @returns
|
|
350
330
|
* This object.
|
|
351
|
-
*/
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
331
|
+
*/
|
|
332
|
+
lint(lint) {
|
|
333
|
+
this.options.lint = lint;
|
|
334
|
+
return this;
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
356
337
|
* Builds the options object.
|
|
357
338
|
*
|
|
358
339
|
* @returns
|
|
359
340
|
* A clone of the current options object.
|
|
360
|
-
*/
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
_define_property(this, "options", {});
|
|
365
|
-
}
|
|
341
|
+
*/
|
|
342
|
+
build() {
|
|
343
|
+
return structuredClone(this.options);
|
|
344
|
+
}
|
|
366
345
|
}
|
|
367
|
-
|
|
368
|
-
|
|
346
|
+
export {
|
|
347
|
+
ZJanitorOptionsBuilder,
|
|
348
|
+
ZJanitorOptionsLintBuilder
|
|
349
|
+
};
|
|
369
350
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/options/janitor-options-lint.mts","../src/options/janitor-options.mts"],"sourcesContent":["/**\n * Represents options for linting in the zthunworks janitor system.\n */\nexport interface IZJanitorOptionsLint {\n /**\n * The path to the config file for eslint.\n */\n esConfig?: string;\n /**\n * The path to the config file for htmlhint.\n */\n htmlConfig?: string;\n /**\n * The path to the config file for markdownlint.\n */\n markdownConfig?: string;\n /**\n * The path to the config file for prettier.\n */\n prettyConfig?: string;\n /**\n * The path to the config file for cspell.\n */\n spellingConfig?: string;\n /**\n * The path to the config file for stylelint.\n */\n styleConfig?: string;\n\n /**\n * The file globs to lint with eslint.\n */\n esFiles?: string[];\n /**\n * The file globs to lint with htmlhint.\n */\n htmlFiles?: string[];\n /**\n * The file globs to lint with json.\n */\n jsonFiles?: string[];\n /**\n * The file globs to lint with markdownlint.\n */\n markdownFiles?: string[];\n /**\n * The file globs to lint with prettier.\n */\n prettyFiles?: string[];\n /**\n * The file globs to lint with cspell.\n */\n spellingFiles?: string[];\n /**\n * The file globs to lint with stylelint.\n */\n styleFiles?: string[];\n /**\n * The file globs to lint with yaml.\n */\n yamlFiles?: string[];\n\n /**\n * The files globs to exclude from linting with htmlhint.\n */\n htmlFilesExclude?: string[];\n /**\n * The files globs to exclude from linting with json.\n */\n jsonFilesExclude?: string[];\n /**\n * The files globs to exclude from linting with markdownlint.\n */\n markdownFilesExclude?: string[];\n /**\n * The files globs to exclude from linting with prettier.\n */\n prettyFilesExclude?: string[];\n /**\n * The files globs to exclude from linting with cspell.\n */\n spellingFilesExclude?: string[];\n /**\n * The files globs to exclude from linting with yaml.\n */\n yamlFilesExclude?: string[];\n}\n\n/**\n * A builder for creating linting options for the zthunworks janitor system.\n */\nexport class ZJanitorOptionsLintBuilder {\n private lint: IZJanitorOptionsLint = {};\n\n /**\n * Sets the path to the config file for eslint.\n *\n * @param esConfig -\n * The path to the config file for eslint.\n *\n * @returns\n * This object.\n */\n public esConfig(esConfig: string): ZJanitorOptionsLintBuilder {\n this.lint.esConfig = esConfig;\n return this;\n }\n\n /**\n * Sets the path to the config file for htmlhint.\n *\n * @param htmlConfig -\n * The path to the config file for htmlhint.\n *\n * @returns\n * This object.\n */\n public htmlConfig(htmlConfig: string): ZJanitorOptionsLintBuilder {\n this.lint.htmlConfig = htmlConfig;\n return this;\n }\n\n /**\n * Sets the path to the config file for markdownlint.\n *\n * @param markdownConfig -\n * The path to the config file for markdownlint.\n *\n * @returns\n * This object.\n */\n public markdownConfig(markdownConfig: string): ZJanitorOptionsLintBuilder {\n this.lint.markdownConfig = markdownConfig;\n return this;\n }\n\n /**\n * Sets the path to the config file for prettier.\n *\n * @param prettyConfig -\n * The path to the config file for prettier.\n *\n * @returns\n * This object.\n */\n public prettyConfig(prettyConfig: string): ZJanitorOptionsLintBuilder {\n this.lint.prettyConfig = prettyConfig;\n return this;\n }\n\n /**\n * Sets the path to the config file for cspell.\n *\n * @param spellingConfig -\n * The path to the config file for cspell.\n *\n * @returns\n * This object.\n */\n public spellingConfig(spellingConfig: string): ZJanitorOptionsLintBuilder {\n this.lint.spellingConfig = spellingConfig;\n return this;\n }\n\n /**\n * Sets the path to the config file for stylelint.\n *\n * @param styleConfig -\n * The path to the config file for stylelint.\n *\n * @returns\n * This object.\n */\n public styleConfig(styleConfig: string): ZJanitorOptionsLintBuilder {\n this.lint.styleConfig = styleConfig;\n return this;\n }\n\n /**\n * Adds a list of globs to the list of files to lint with eslint.\n *\n * @param file -\n * The file globs to lint with eslint.\n *\n * @returns\n * This object.\n */\n public esFile(file: string | string[] = []) {\n const files = this.lint.esFiles ?? [];\n this.lint.esFiles = files.concat(file);\n return this;\n }\n\n /**\n * Adds a list of globs to the list of files to lint with htmlhint.\n *\n * @param file -\n * The file globs to lint with htmlhint.\n *\n * @returns\n * This object.\n */\n public htmlFile(file: string | string[] = []) {\n const files = this.lint.htmlFiles ?? [];\n this.lint.htmlFiles = files.concat(file);\n return this;\n }\n\n /**\n * Adds a list of globs to the list of files to lint with json.\n *\n * @param file -\n * The file globs to lint with json.\n *\n * @returns\n * This object.\n */\n public jsonFile(file: string | string[] = []) {\n const files = this.lint.jsonFiles ?? [];\n this.lint.jsonFiles = files.concat(file);\n return this;\n }\n\n /**\n * Adds a list of globs to the list of files to lint with markdownlint.\n *\n * @param file -\n * The globs to lint with markdownlint.\n *\n * @returns\n * This object.\n */\n public markdownFile(file: string | string[] = []) {\n const files = this.lint.markdownFiles ?? [];\n this.lint.markdownFiles = files.concat(file);\n return this;\n }\n\n /**\n * Adds a list of globs to the list of files to lint with prettier.\n *\n * @param file -\n * The globs to lint with prettier.\n *\n * @returns\n * This object.\n */\n public prettyFile(file: string | string[] = []) {\n const files = this.lint.prettyFiles ?? [];\n this.lint.prettyFiles = files.concat(file);\n return this;\n }\n\n /**\n * Adds a list of globs to the list of files to lint with cspell.\n *\n * @param file -\n * The file globs to lint with cspell.\n *\n * @returns\n * This object.\n */\n public spellingFile(file: string | string[] = []) {\n const files = this.lint.spellingFiles ?? [];\n this.lint.spellingFiles = files.concat(file);\n return this;\n }\n\n /**\n * Adds a list of globs to the list of files to lint with stylelint.\n *\n * @param file -\n * The file globs to lint with stylelint.\n *\n * @returns\n * This object.\n */\n public styleFile(file: string | string[] = []) {\n const files = this.lint.styleFiles ?? [];\n this.lint.styleFiles = files.concat(file);\n return this;\n }\n\n /**\n * Adds a list of globs to the list of files to lint with yaml.\n *\n * @param file -\n * The file globs to lint with yaml.\n *\n * @returns\n * This object.\n */\n public yamlFile(file: string | string[] = []) {\n const files = this.lint.yamlFiles ?? [];\n this.lint.yamlFiles = files.concat(file);\n return this;\n }\n\n /**\n * Adds a list of globs to the list of files to exclude from linting with htmlhint.\n *\n * @param files -\n * The file globs to exclude from linting with htmlhint.\n *\n * @returns\n * This object.\n */\n public htmlExclude(files: string | string[] = []) {\n const excludes = this.lint.htmlFilesExclude ?? [];\n this.lint.htmlFilesExclude = excludes.concat(files);\n return this;\n }\n\n /**\n * Adds a list of globs to the list of files to exclude from linting with json.\n *\n * @param file -\n * The globs to exclude from linting with json.\n *\n * @returns\n * This object.\n */\n public jsonExclude(file: string | string[] = []) {\n const excludes = this.lint.jsonFilesExclude ?? [];\n this.lint.jsonFilesExclude = excludes.concat(file);\n return this;\n }\n\n /**\n * Adds a list of globs to the list of files to exclude from linting with markdownlint.\n *\n * @param file -\n * The globs to exclude from linting with markdownlint.\n *\n * @returns\n * This object.\n */\n public markdownExclude(file: string | string[] = []) {\n const excludes = this.lint.markdownFilesExclude ?? [];\n this.lint.markdownFilesExclude = excludes.concat(file);\n return this;\n }\n\n /**\n * Adds a list of globs to the list of files to exclude from linting with prettier.\n *\n * @param file -\n * The globs to exclude from linting with prettier.\n *\n * @returns\n * This object.\n */\n public prettyExclude(file: string | string[] = []) {\n const excludes = this.lint.prettyFilesExclude ?? [];\n this.lint.prettyFilesExclude = excludes.concat(file);\n return this;\n }\n\n /**\n * Adds a list of globs to the list of files to exclude from linting with cspell.\n *\n * @param file -\n * The globs to exclude from linting with cspell.\n *\n * @returns\n * This object.\n */\n public spellingExclude(file: string | string[] = []) {\n const excludes = this.lint.spellingFilesExclude ?? [];\n this.lint.spellingFilesExclude = excludes.concat(file);\n return this;\n }\n\n /**\n * Adds a single file glob to the list of files to exclude from linting with yaml.\n *\n * @param file -\n * The file glob to exclude from linting with yaml.\n *\n * @returns\n * This object.\n */\n public yamlExclude(file: string | string[] = []) {\n const excludes = this.lint.yamlFilesExclude ?? [];\n this.lint.yamlFilesExclude = excludes.concat(file);\n return this;\n }\n\n /**\n * Adds a file to all exclusion lists.\n *\n * @param file -\n * The file to exclude from all linting.\n *\n * @returns\n * This object.\n */\n public excludeAll(file: string | string[] = []) {\n return this.htmlExclude(file)\n .jsonExclude(file)\n .markdownExclude(file)\n .prettyExclude(file)\n .spellingExclude(file)\n .yamlExclude(file);\n }\n\n /**\n * Generates the spelling files based on the other files that have been set.\n *\n * @returns\n * This object.\n */\n public generateSpellingFiles() {\n return this.spellingFile(this.lint.esFiles)\n .spellingFile(this.lint.htmlFiles)\n .spellingFile(this.lint.jsonFiles)\n .spellingFile(this.lint.markdownFiles)\n .spellingFile(this.lint.styleFiles)\n .spellingFile(this.lint.yamlFiles);\n }\n\n /**\n * Generates the pretty files based on the other files that have been set.\n *\n * @returns\n * This object.\n */\n public generatePrettyFiles() {\n return this.prettyFile(this.lint.esFiles)\n .prettyFile(this.lint.htmlFiles)\n .prettyFile(this.lint.jsonFiles)\n .prettyFile(this.lint.markdownFiles)\n .prettyFile(this.lint.styleFiles)\n .prettyFile(this.lint.yamlFiles);\n }\n\n /**\n * Returns the built linting options object.\n *\n * @returns\n * A clone of the current linting options object.\n */\n public build() {\n return structuredClone(this.lint);\n }\n}\n","import type { IZJanitorOptionsLint } from \"./janitor-options-lint.mjs\";\n\n/**\n * Options for the zthunworks janitor system.\n */\nexport interface IZJanitorOptions {\n /**\n * Linting options for janitor-lint.\n */\n lint?: IZJanitorOptionsLint;\n}\n\n/**\n * A builder for creating janitor options.\n */\nexport class ZJanitorOptionsBuilder {\n private options: IZJanitorOptions = {};\n\n /**\n * Sets the linting options for the janitor system.\n *\n * @param lint -\n * The linting options to set.\n *\n * @returns\n * This object.\n */\n public lint(lint: IZJanitorOptionsLint): ZJanitorOptionsBuilder {\n this.options.lint = lint;\n return this;\n }\n\n /**\n * Builds the options object.\n *\n * @returns\n * A clone of the current options object.\n */\n public build(): IZJanitorOptions {\n return structuredClone(this.options);\n }\n}\n"],"names":["_define_property","ZJanitorOptionsLintBuilder","esConfig","lint","htmlConfig","markdownConfig","prettyConfig","spellingConfig","styleConfig","esFile","file","files","esFiles","concat","htmlFile","htmlFiles","jsonFile","jsonFiles","markdownFile","markdownFiles","prettyFile","prettyFiles","spellingFile","spellingFiles","styleFile","styleFiles","yamlFile","yamlFiles","htmlExclude","excludes","htmlFilesExclude","jsonExclude","jsonFilesExclude","markdownExclude","markdownFilesExclude","prettyExclude","prettyFilesExclude","spellingExclude","spellingFilesExclude","yamlExclude","yamlFilesExclude","excludeAll","structuredClone","ZJanitorOptionsBuilder","options"],"mappings":"AAAA;;AAEC,IAAA,SAAAA,kBAAA,CAAA,GAAA,EAAA,GAAA,EAAA,KAAA,EAAA;;;;;;;;;;;;;AAsFD;;AAEC,IACM,MAAMC,0BAAAA,CAAAA;AAGX;;;;;;;;MASOC,QAASA,CAAAA,QAAgB,EAA8B;AAC5D,QAAA,IAAI,CAACC,IAAI,CAACD,QAAQ,GAAGA,QAAAA;AACrB,QAAA,OAAO,IAAI;AACb;AAEA;;;;;;;;MASOE,UAAWA,CAAAA,UAAkB,EAA8B;AAChE,QAAA,IAAI,CAACD,IAAI,CAACC,UAAU,GAAGA,UAAAA;AACvB,QAAA,OAAO,IAAI;AACb;AAEA;;;;;;;;MASOC,cAAeA,CAAAA,cAAsB,EAA8B;AACxE,QAAA,IAAI,CAACF,IAAI,CAACE,cAAc,GAAGA,cAAAA;AAC3B,QAAA,OAAO,IAAI;AACb;AAEA;;;;;;;;MASOC,YAAaA,CAAAA,YAAoB,EAA8B;AACpE,QAAA,IAAI,CAACH,IAAI,CAACG,YAAY,GAAGA,YAAAA;AACzB,QAAA,OAAO,IAAI;AACb;AAEA;;;;;;;;MASOC,cAAeA,CAAAA,cAAsB,EAA8B;AACxE,QAAA,IAAI,CAACJ,IAAI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ACc,SAAS,CAC9BG,CAAAA,UAAU,CAAC,IAAI,CAACjB,IAAI,CAACgB,aAAa,CAClCC,CAAAA,UAAU,CAAC,IAAI,CAACjB,IAAI,CAACsB,UAAU,CAC/BL,CAAAA,UAAU,CAAC,IAAI,CAACjB,IAAI,CAACwB,SAAS,CAAA;AACnC;AAEA;;;;;AAKC,MACD,KAAe,GAAA;QACb,OAAOe,eAAAA,CAAgB,IAAI,CAACvC,IAAI,CAAA;AAClC;;AAhWA,QAAAH,kBAAA,CAAA,IAAA,EAAQG,QAA6B,EAAC,CAAA;;AAiWxC;;;;;;;;;;;;;;;ACjbA;;AAEC,IACM,MAAMwC,sBAAAA,CAAAA;AAGX;;;;;;;;MASOxC,IAAKA,CAAAA,IAA0B,EAA0B;AAC9D,QAAA,IAAI,CAACyC,OAAO,CAACzC,IAAI,GAAGA,IAAAA;AACpB,QAAA,OAAO,IAAI;AACb;AAEA;;;;;AAKC,MACD,KAAiC,GAAA;QAC/B,OAAOuC,eAAAA,CAAgB,IAAI,CAACE,OAAO,CAAA;AACrC;;AAxBA,QAAA,gBAAA,CAAA,IAAA,EAAQA,WAA4B,EAAC,CAAA;;AAyBvC;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/options/janitor-options-lint.mts","../src/options/janitor-options.mts"],"sourcesContent":["/**\n * Represents options for linting in the zthunworks janitor system.\n */\nexport interface IZJanitorOptionsLint {\n /**\n * The path to the config file for eslint.\n */\n esConfig?: string;\n /**\n * The path to the config file for htmlhint.\n */\n htmlConfig?: string;\n /**\n * The path to the config file for markdownlint.\n */\n markdownConfig?: string;\n /**\n * The path to the config file for prettier.\n */\n prettyConfig?: string;\n /**\n * The path to the config file for cspell.\n */\n spellingConfig?: string;\n /**\n * The path to the config file for stylelint.\n */\n styleConfig?: string;\n\n /**\n * The file globs to lint with eslint.\n */\n esFiles?: string[];\n /**\n * The file globs to lint with htmlhint.\n */\n htmlFiles?: string[];\n /**\n * The file globs to lint with json.\n */\n jsonFiles?: string[];\n /**\n * The file globs to lint with markdownlint.\n */\n markdownFiles?: string[];\n /**\n * The file globs to lint with prettier.\n */\n prettyFiles?: string[];\n /**\n * The file globs to lint with cspell.\n */\n spellingFiles?: string[];\n /**\n * The file globs to lint with stylelint.\n */\n styleFiles?: string[];\n /**\n * The file globs to lint with yaml.\n */\n yamlFiles?: string[];\n\n /**\n * The files globs to exclude from linting with htmlhint.\n */\n htmlFilesExclude?: string[];\n /**\n * The files globs to exclude from linting with json.\n */\n jsonFilesExclude?: string[];\n /**\n * The files globs to exclude from linting with markdownlint.\n */\n markdownFilesExclude?: string[];\n /**\n * The files globs to exclude from linting with prettier.\n */\n prettyFilesExclude?: string[];\n /**\n * The files globs to exclude from linting with cspell.\n */\n spellingFilesExclude?: string[];\n /**\n * The files globs to exclude from linting with yaml.\n */\n yamlFilesExclude?: string[];\n}\n\n/**\n * A builder for creating linting options for the zthunworks janitor system.\n */\nexport class ZJanitorOptionsLintBuilder {\n private lint: IZJanitorOptionsLint = {};\n\n /**\n * Sets the path to the config file for eslint.\n *\n * @param esConfig -\n * The path to the config file for eslint.\n *\n * @returns\n * This object.\n */\n public esConfig(esConfig: string): ZJanitorOptionsLintBuilder {\n this.lint.esConfig = esConfig;\n return this;\n }\n\n /**\n * Sets the path to the config file for htmlhint.\n *\n * @param htmlConfig -\n * The path to the config file for htmlhint.\n *\n * @returns\n * This object.\n */\n public htmlConfig(htmlConfig: string): ZJanitorOptionsLintBuilder {\n this.lint.htmlConfig = htmlConfig;\n return this;\n }\n\n /**\n * Sets the path to the config file for markdownlint.\n *\n * @param markdownConfig -\n * The path to the config file for markdownlint.\n *\n * @returns\n * This object.\n */\n public markdownConfig(markdownConfig: string): ZJanitorOptionsLintBuilder {\n this.lint.markdownConfig = markdownConfig;\n return this;\n }\n\n /**\n * Sets the path to the config file for prettier.\n *\n * @param prettyConfig -\n * The path to the config file for prettier.\n *\n * @returns\n * This object.\n */\n public prettyConfig(prettyConfig: string): ZJanitorOptionsLintBuilder {\n this.lint.prettyConfig = prettyConfig;\n return this;\n }\n\n /**\n * Sets the path to the config file for cspell.\n *\n * @param spellingConfig -\n * The path to the config file for cspell.\n *\n * @returns\n * This object.\n */\n public spellingConfig(spellingConfig: string): ZJanitorOptionsLintBuilder {\n this.lint.spellingConfig = spellingConfig;\n return this;\n }\n\n /**\n * Sets the path to the config file for stylelint.\n *\n * @param styleConfig -\n * The path to the config file for stylelint.\n *\n * @returns\n * This object.\n */\n public styleConfig(styleConfig: string): ZJanitorOptionsLintBuilder {\n this.lint.styleConfig = styleConfig;\n return this;\n }\n\n /**\n * Adds a list of globs to the list of files to lint with eslint.\n *\n * @param file -\n * The file globs to lint with eslint.\n *\n * @returns\n * This object.\n */\n public esFile(file: string | string[] = []) {\n const files = this.lint.esFiles ?? [];\n this.lint.esFiles = files.concat(file);\n return this;\n }\n\n /**\n * Adds a list of globs to the list of files to lint with htmlhint.\n *\n * @param file -\n * The file globs to lint with htmlhint.\n *\n * @returns\n * This object.\n */\n public htmlFile(file: string | string[] = []) {\n const files = this.lint.htmlFiles ?? [];\n this.lint.htmlFiles = files.concat(file);\n return this;\n }\n\n /**\n * Adds a list of globs to the list of files to lint with json.\n *\n * @param file -\n * The file globs to lint with json.\n *\n * @returns\n * This object.\n */\n public jsonFile(file: string | string[] = []) {\n const files = this.lint.jsonFiles ?? [];\n this.lint.jsonFiles = files.concat(file);\n return this;\n }\n\n /**\n * Adds a list of globs to the list of files to lint with markdownlint.\n *\n * @param file -\n * The globs to lint with markdownlint.\n *\n * @returns\n * This object.\n */\n public markdownFile(file: string | string[] = []) {\n const files = this.lint.markdownFiles ?? [];\n this.lint.markdownFiles = files.concat(file);\n return this;\n }\n\n /**\n * Adds a list of globs to the list of files to lint with prettier.\n *\n * @param file -\n * The globs to lint with prettier.\n *\n * @returns\n * This object.\n */\n public prettyFile(file: string | string[] = []) {\n const files = this.lint.prettyFiles ?? [];\n this.lint.prettyFiles = files.concat(file);\n return this;\n }\n\n /**\n * Adds a list of globs to the list of files to lint with cspell.\n *\n * @param file -\n * The file globs to lint with cspell.\n *\n * @returns\n * This object.\n */\n public spellingFile(file: string | string[] = []) {\n const files = this.lint.spellingFiles ?? [];\n this.lint.spellingFiles = files.concat(file);\n return this;\n }\n\n /**\n * Adds a list of globs to the list of files to lint with stylelint.\n *\n * @param file -\n * The file globs to lint with stylelint.\n *\n * @returns\n * This object.\n */\n public styleFile(file: string | string[] = []) {\n const files = this.lint.styleFiles ?? [];\n this.lint.styleFiles = files.concat(file);\n return this;\n }\n\n /**\n * Adds a list of globs to the list of files to lint with yaml.\n *\n * @param file -\n * The file globs to lint with yaml.\n *\n * @returns\n * This object.\n */\n public yamlFile(file: string | string[] = []) {\n const files = this.lint.yamlFiles ?? [];\n this.lint.yamlFiles = files.concat(file);\n return this;\n }\n\n /**\n * Adds a list of globs to the list of files to exclude from linting with htmlhint.\n *\n * @param files -\n * The file globs to exclude from linting with htmlhint.\n *\n * @returns\n * This object.\n */\n public htmlExclude(files: string | string[] = []) {\n const excludes = this.lint.htmlFilesExclude ?? [];\n this.lint.htmlFilesExclude = excludes.concat(files);\n return this;\n }\n\n /**\n * Adds a list of globs to the list of files to exclude from linting with json.\n *\n * @param file -\n * The globs to exclude from linting with json.\n *\n * @returns\n * This object.\n */\n public jsonExclude(file: string | string[] = []) {\n const excludes = this.lint.jsonFilesExclude ?? [];\n this.lint.jsonFilesExclude = excludes.concat(file);\n return this;\n }\n\n /**\n * Adds a list of globs to the list of files to exclude from linting with markdownlint.\n *\n * @param file -\n * The globs to exclude from linting with markdownlint.\n *\n * @returns\n * This object.\n */\n public markdownExclude(file: string | string[] = []) {\n const excludes = this.lint.markdownFilesExclude ?? [];\n this.lint.markdownFilesExclude = excludes.concat(file);\n return this;\n }\n\n /**\n * Adds a list of globs to the list of files to exclude from linting with prettier.\n *\n * @param file -\n * The globs to exclude from linting with prettier.\n *\n * @returns\n * This object.\n */\n public prettyExclude(file: string | string[] = []) {\n const excludes = this.lint.prettyFilesExclude ?? [];\n this.lint.prettyFilesExclude = excludes.concat(file);\n return this;\n }\n\n /**\n * Adds a list of globs to the list of files to exclude from linting with cspell.\n *\n * @param file -\n * The globs to exclude from linting with cspell.\n *\n * @returns\n * This object.\n */\n public spellingExclude(file: string | string[] = []) {\n const excludes = this.lint.spellingFilesExclude ?? [];\n this.lint.spellingFilesExclude = excludes.concat(file);\n return this;\n }\n\n /**\n * Adds a single file glob to the list of files to exclude from linting with yaml.\n *\n * @param file -\n * The file glob to exclude from linting with yaml.\n *\n * @returns\n * This object.\n */\n public yamlExclude(file: string | string[] = []) {\n const excludes = this.lint.yamlFilesExclude ?? [];\n this.lint.yamlFilesExclude = excludes.concat(file);\n return this;\n }\n\n /**\n * Adds a file to all exclusion lists.\n *\n * @param file -\n * The file to exclude from all linting.\n *\n * @returns\n * This object.\n */\n public excludeAll(file: string | string[] = []) {\n return this.htmlExclude(file)\n .jsonExclude(file)\n .markdownExclude(file)\n .prettyExclude(file)\n .spellingExclude(file)\n .yamlExclude(file);\n }\n\n /**\n * Generates the spelling files based on the other files that have been set.\n *\n * @returns\n * This object.\n */\n public generateSpellingFiles() {\n return this.spellingFile(this.lint.esFiles)\n .spellingFile(this.lint.htmlFiles)\n .spellingFile(this.lint.jsonFiles)\n .spellingFile(this.lint.markdownFiles)\n .spellingFile(this.lint.styleFiles)\n .spellingFile(this.lint.yamlFiles);\n }\n\n /**\n * Generates the pretty files based on the other files that have been set.\n *\n * @returns\n * This object.\n */\n public generatePrettyFiles() {\n return this.prettyFile(this.lint.esFiles)\n .prettyFile(this.lint.htmlFiles)\n .prettyFile(this.lint.jsonFiles)\n .prettyFile(this.lint.markdownFiles)\n .prettyFile(this.lint.styleFiles)\n .prettyFile(this.lint.yamlFiles);\n }\n\n /**\n * Returns the built linting options object.\n *\n * @returns\n * A clone of the current linting options object.\n */\n public build() {\n return structuredClone(this.lint);\n }\n}\n","import type { IZJanitorOptionsLint } from \"./janitor-options-lint.mjs\";\n\n/**\n * Options for the zthunworks janitor system.\n */\nexport interface IZJanitorOptions {\n /**\n * Linting options for janitor-lint.\n */\n lint?: IZJanitorOptionsLint;\n}\n\n/**\n * A builder for creating janitor options.\n */\nexport class ZJanitorOptionsBuilder {\n private options: IZJanitorOptions = {};\n\n /**\n * Sets the linting options for the janitor system.\n *\n * @param lint -\n * The linting options to set.\n *\n * @returns\n * This object.\n */\n public lint(lint: IZJanitorOptionsLint): ZJanitorOptionsBuilder {\n this.options.lint = lint;\n return this;\n }\n\n /**\n * Builds the options object.\n *\n * @returns\n * A clone of the current options object.\n */\n public build(): IZJanitorOptions {\n return structuredClone(this.options);\n }\n}\n"],"names":[],"mappings":"AA2FO,MAAM,2BAA2B;AAAA,EAAjC,cAAA;AACL,SAAQ,OAA6B,CAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAW/B,SAAS,UAA8C;AAC5D,SAAK,KAAK,WAAW;AACd,WAAA;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYF,WAAW,YAAgD;AAChE,SAAK,KAAK,aAAa;AAChB,WAAA;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYF,eAAe,gBAAoD;AACxE,SAAK,KAAK,iBAAiB;AACpB,WAAA;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYF,aAAa,cAAkD;AACpE,SAAK,KAAK,eAAe;AAClB,WAAA;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYF,eAAe,gBAAoD;AACxE,SAAK,KAAK,iBAAiB;AACpB,WAAA;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYF,YAAY,aAAiD;AAClE,SAAK,KAAK,cAA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A,EAA7B,cAAA;AACL,SAAQ,UAA4B,CAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAW9B,KAAK,MAAoD;AAC9D,SAAK,QAAQ,OAAO;AACb,WAAA;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASF,QAA0B;AACxB,WAAA,gBAAgB,KAAK,OAAO;AAAA,EAAA;AAEvC;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zthun/janitor-options",
|
|
3
|
-
"version": "19.1.
|
|
3
|
+
"version": "19.1.1",
|
|
4
4
|
"description": "Option builders and interfaces for the zthunworks janitor system.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"linters"
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
"dist"
|
|
32
32
|
],
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@zthun/janitor-build-config": "^19.1.
|
|
34
|
+
"@zthun/janitor-build-config": "^19.1.1",
|
|
35
35
|
"typescript": "~5.8.3",
|
|
36
36
|
"vite": "^6.3.5",
|
|
37
37
|
"vitest": "^3.2.2"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "ad805eb1111b858e833925d150acf12e48c09b1b"
|
|
40
40
|
}
|