@zthun/janitor-options 19.1.0 → 19.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,26 +1,10 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
-
5
- /**
6
- * Represents options for linting in the zthunworks janitor system.
7
- */ function _define_property$1(obj, key, value) {
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
- */ esConfig(esConfig) {
32
- this.lint.esConfig = esConfig;
33
- return this;
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
- */ htmlConfig(htmlConfig) {
44
- this.lint.htmlConfig = htmlConfig;
45
- return this;
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
- */ markdownConfig(markdownConfig) {
56
- this.lint.markdownConfig = markdownConfig;
57
- return this;
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
- */ prettyConfig(prettyConfig) {
68
- this.lint.prettyConfig = prettyConfig;
69
- return this;
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
- */ spellingConfig(spellingConfig) {
80
- this.lint.spellingConfig = spellingConfig;
81
- return this;
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
- */ styleConfig(styleConfig) {
92
- this.lint.styleConfig = styleConfig;
93
- return this;
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
- */ esFile(file = []) {
104
- var _this_lint_esFiles;
105
- const files = (_this_lint_esFiles = this.lint.esFiles) !== null && _this_lint_esFiles !== void 0 ? _this_lint_esFiles : [];
106
- this.lint.esFiles = files.concat(file);
107
- return this;
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
- */ htmlFile(file = []) {
118
- var _this_lint_htmlFiles;
119
- const files = (_this_lint_htmlFiles = this.lint.htmlFiles) !== null && _this_lint_htmlFiles !== void 0 ? _this_lint_htmlFiles : [];
120
- this.lint.htmlFiles = files.concat(file);
121
- return this;
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
- */ jsonFile(file = []) {
132
- var _this_lint_jsonFiles;
133
- const files = (_this_lint_jsonFiles = this.lint.jsonFiles) !== null && _this_lint_jsonFiles !== void 0 ? _this_lint_jsonFiles : [];
134
- this.lint.jsonFiles = files.concat(file);
135
- return this;
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
- */ markdownFile(file = []) {
146
- var _this_lint_markdownFiles;
147
- const files = (_this_lint_markdownFiles = this.lint.markdownFiles) !== null && _this_lint_markdownFiles !== void 0 ? _this_lint_markdownFiles : [];
148
- this.lint.markdownFiles = files.concat(file);
149
- return this;
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
- */ prettyFile(file = []) {
160
- var _this_lint_prettyFiles;
161
- const files = (_this_lint_prettyFiles = this.lint.prettyFiles) !== null && _this_lint_prettyFiles !== void 0 ? _this_lint_prettyFiles : [];
162
- this.lint.prettyFiles = files.concat(file);
163
- return this;
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
- */ spellingFile(file = []) {
174
- var _this_lint_spellingFiles;
175
- const files = (_this_lint_spellingFiles = this.lint.spellingFiles) !== null && _this_lint_spellingFiles !== void 0 ? _this_lint_spellingFiles : [];
176
- this.lint.spellingFiles = files.concat(file);
177
- return this;
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
- */ styleFile(file = []) {
188
- var _this_lint_styleFiles;
189
- const files = (_this_lint_styleFiles = this.lint.styleFiles) !== null && _this_lint_styleFiles !== void 0 ? _this_lint_styleFiles : [];
190
- this.lint.styleFiles = files.concat(file);
191
- return this;
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
- */ yamlFile(file = []) {
202
- var _this_lint_yamlFiles;
203
- const files = (_this_lint_yamlFiles = this.lint.yamlFiles) !== null && _this_lint_yamlFiles !== void 0 ? _this_lint_yamlFiles : [];
204
- this.lint.yamlFiles = files.concat(file);
205
- return this;
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
- */ htmlExclude(files = []) {
216
- var _this_lint_htmlFilesExclude;
217
- const excludes = (_this_lint_htmlFilesExclude = this.lint.htmlFilesExclude) !== null && _this_lint_htmlFilesExclude !== void 0 ? _this_lint_htmlFilesExclude : [];
218
- this.lint.htmlFilesExclude = excludes.concat(files);
219
- return this;
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
- */ jsonExclude(file = []) {
230
- var _this_lint_jsonFilesExclude;
231
- const excludes = (_this_lint_jsonFilesExclude = this.lint.jsonFilesExclude) !== null && _this_lint_jsonFilesExclude !== void 0 ? _this_lint_jsonFilesExclude : [];
232
- this.lint.jsonFilesExclude = excludes.concat(file);
233
- return this;
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
- */ markdownExclude(file = []) {
244
- var _this_lint_markdownFilesExclude;
245
- const excludes = (_this_lint_markdownFilesExclude = this.lint.markdownFilesExclude) !== null && _this_lint_markdownFilesExclude !== void 0 ? _this_lint_markdownFilesExclude : [];
246
- this.lint.markdownFilesExclude = excludes.concat(file);
247
- return this;
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
- */ prettyExclude(file = []) {
258
- var _this_lint_prettyFilesExclude;
259
- const excludes = (_this_lint_prettyFilesExclude = this.lint.prettyFilesExclude) !== null && _this_lint_prettyFilesExclude !== void 0 ? _this_lint_prettyFilesExclude : [];
260
- this.lint.prettyFilesExclude = excludes.concat(file);
261
- return this;
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
- */ spellingExclude(file = []) {
272
- var _this_lint_spellingFilesExclude;
273
- const excludes = (_this_lint_spellingFilesExclude = this.lint.spellingFilesExclude) !== null && _this_lint_spellingFilesExclude !== void 0 ? _this_lint_spellingFilesExclude : [];
274
- this.lint.spellingFilesExclude = excludes.concat(file);
275
- return this;
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
- */ yamlExclude(file = []) {
286
- var _this_lint_yamlFilesExclude;
287
- const excludes = (_this_lint_yamlFilesExclude = this.lint.yamlFilesExclude) !== null && _this_lint_yamlFilesExclude !== void 0 ? _this_lint_yamlFilesExclude : [];
288
- this.lint.yamlFilesExclude = excludes.concat(file);
289
- return this;
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
- */ excludeAll(file = []) {
300
- return this.htmlExclude(file).jsonExclude(file).markdownExclude(file).prettyExclude(file).spellingExclude(file).yamlExclude(file);
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
- */ generateSpellingFiles() {
308
- 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);
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
- */ generatePrettyFiles() {
316
- 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);
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
- */ build() {
324
- return structuredClone(this.lint);
325
- }
326
- constructor(){
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
- * A builder for creating janitor options.
346
- */ class ZJanitorOptionsBuilder {
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
- */ lint(lint) {
356
- this.options.lint = lint;
357
- return this;
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
- */ build() {
365
- return structuredClone(this.options);
366
- }
367
- constructor(){
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
@@ -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;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KC,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.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":[],"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,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AAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASd,wBAAwB;AAC7B,WAAO,KAAK,aAAa,KAAK,KAAK,OAAO,EACvC,aAAa,KAAK,KAAK,SAAS,EAChC,aAAa,KAAK,KAAK,SAAS,EAChC,aAAa,KAAK,KAAK,aAAa,EACpC,aAAa,KAAK,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
- * Represents options for linting in the zthunworks janitor system.
3
- */ function _define_property$1(obj, key, value) {
4
- if (key in obj) {
5
- Object.defineProperty(obj, key, {
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
- */ esConfig(esConfig) {
28
- this.lint.esConfig = esConfig;
29
- return this;
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
- */ htmlConfig(htmlConfig) {
40
- this.lint.htmlConfig = htmlConfig;
41
- return this;
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
- */ markdownConfig(markdownConfig) {
52
- this.lint.markdownConfig = markdownConfig;
53
- return this;
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
- */ prettyConfig(prettyConfig) {
64
- this.lint.prettyConfig = prettyConfig;
65
- return this;
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
- */ spellingConfig(spellingConfig) {
76
- this.lint.spellingConfig = spellingConfig;
77
- return this;
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
- */ styleConfig(styleConfig) {
88
- this.lint.styleConfig = styleConfig;
89
- return this;
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
- */ esFile(file = []) {
100
- var _this_lint_esFiles;
101
- const files = (_this_lint_esFiles = this.lint.esFiles) !== null && _this_lint_esFiles !== void 0 ? _this_lint_esFiles : [];
102
- this.lint.esFiles = files.concat(file);
103
- return this;
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
- */ htmlFile(file = []) {
114
- var _this_lint_htmlFiles;
115
- const files = (_this_lint_htmlFiles = this.lint.htmlFiles) !== null && _this_lint_htmlFiles !== void 0 ? _this_lint_htmlFiles : [];
116
- this.lint.htmlFiles = files.concat(file);
117
- return this;
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
- */ jsonFile(file = []) {
128
- var _this_lint_jsonFiles;
129
- const files = (_this_lint_jsonFiles = this.lint.jsonFiles) !== null && _this_lint_jsonFiles !== void 0 ? _this_lint_jsonFiles : [];
130
- this.lint.jsonFiles = files.concat(file);
131
- return this;
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
- */ markdownFile(file = []) {
142
- var _this_lint_markdownFiles;
143
- const files = (_this_lint_markdownFiles = this.lint.markdownFiles) !== null && _this_lint_markdownFiles !== void 0 ? _this_lint_markdownFiles : [];
144
- this.lint.markdownFiles = files.concat(file);
145
- return this;
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
- */ prettyFile(file = []) {
156
- var _this_lint_prettyFiles;
157
- const files = (_this_lint_prettyFiles = this.lint.prettyFiles) !== null && _this_lint_prettyFiles !== void 0 ? _this_lint_prettyFiles : [];
158
- this.lint.prettyFiles = files.concat(file);
159
- return this;
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
- */ spellingFile(file = []) {
170
- var _this_lint_spellingFiles;
171
- const files = (_this_lint_spellingFiles = this.lint.spellingFiles) !== null && _this_lint_spellingFiles !== void 0 ? _this_lint_spellingFiles : [];
172
- this.lint.spellingFiles = files.concat(file);
173
- return this;
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
- */ styleFile(file = []) {
184
- var _this_lint_styleFiles;
185
- const files = (_this_lint_styleFiles = this.lint.styleFiles) !== null && _this_lint_styleFiles !== void 0 ? _this_lint_styleFiles : [];
186
- this.lint.styleFiles = files.concat(file);
187
- return this;
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
- */ yamlFile(file = []) {
198
- var _this_lint_yamlFiles;
199
- const files = (_this_lint_yamlFiles = this.lint.yamlFiles) !== null && _this_lint_yamlFiles !== void 0 ? _this_lint_yamlFiles : [];
200
- this.lint.yamlFiles = files.concat(file);
201
- return this;
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
- */ htmlExclude(files = []) {
212
- var _this_lint_htmlFilesExclude;
213
- const excludes = (_this_lint_htmlFilesExclude = this.lint.htmlFilesExclude) !== null && _this_lint_htmlFilesExclude !== void 0 ? _this_lint_htmlFilesExclude : [];
214
- this.lint.htmlFilesExclude = excludes.concat(files);
215
- return this;
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
- */ jsonExclude(file = []) {
226
- var _this_lint_jsonFilesExclude;
227
- const excludes = (_this_lint_jsonFilesExclude = this.lint.jsonFilesExclude) !== null && _this_lint_jsonFilesExclude !== void 0 ? _this_lint_jsonFilesExclude : [];
228
- this.lint.jsonFilesExclude = excludes.concat(file);
229
- return this;
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
- */ markdownExclude(file = []) {
240
- var _this_lint_markdownFilesExclude;
241
- const excludes = (_this_lint_markdownFilesExclude = this.lint.markdownFilesExclude) !== null && _this_lint_markdownFilesExclude !== void 0 ? _this_lint_markdownFilesExclude : [];
242
- this.lint.markdownFilesExclude = excludes.concat(file);
243
- return this;
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
- */ prettyExclude(file = []) {
254
- var _this_lint_prettyFilesExclude;
255
- const excludes = (_this_lint_prettyFilesExclude = this.lint.prettyFilesExclude) !== null && _this_lint_prettyFilesExclude !== void 0 ? _this_lint_prettyFilesExclude : [];
256
- this.lint.prettyFilesExclude = excludes.concat(file);
257
- return this;
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
- */ spellingExclude(file = []) {
268
- var _this_lint_spellingFilesExclude;
269
- const excludes = (_this_lint_spellingFilesExclude = this.lint.spellingFilesExclude) !== null && _this_lint_spellingFilesExclude !== void 0 ? _this_lint_spellingFilesExclude : [];
270
- this.lint.spellingFilesExclude = excludes.concat(file);
271
- return this;
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
- */ yamlExclude(file = []) {
282
- var _this_lint_yamlFilesExclude;
283
- const excludes = (_this_lint_yamlFilesExclude = this.lint.yamlFilesExclude) !== null && _this_lint_yamlFilesExclude !== void 0 ? _this_lint_yamlFilesExclude : [];
284
- this.lint.yamlFilesExclude = excludes.concat(file);
285
- return this;
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
- */ excludeAll(file = []) {
296
- return this.htmlExclude(file).jsonExclude(file).markdownExclude(file).prettyExclude(file).spellingExclude(file).yamlExclude(file);
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
- */ generateSpellingFiles() {
304
- 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);
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
- */ generatePrettyFiles() {
312
- 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);
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
- */ build() {
320
- return structuredClone(this.lint);
321
- }
322
- constructor(){
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
- * A builder for creating janitor options.
342
- */ class ZJanitorOptionsBuilder {
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
- */ lint(lint) {
352
- this.options.lint = lint;
353
- return this;
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
- */ build() {
361
- return structuredClone(this.options);
362
- }
363
- constructor(){
364
- _define_property(this, "options", {});
365
- }
341
+ */
342
+ build() {
343
+ return structuredClone(this.options);
344
+ }
366
345
  }
367
-
368
- export { ZJanitorOptionsBuilder, ZJanitorOptionsLintBuilder };
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,IA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AAA,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,WA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KAAK,KAAK,SAAS,EAChC,aAAa,KAAK,KAAK,SAAS,EAChC,aAAa,KAAK,KAAK,aAAa,EACpC,aAAa,KAAK,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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zthun/janitor-options",
3
- "version": "19.1.0",
3
+ "version": "19.1.2",
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.0",
34
+ "@zthun/janitor-build-config": "^19.1.2",
35
35
  "typescript": "~5.8.3",
36
36
  "vite": "^6.3.5",
37
37
  "vitest": "^3.2.2"
38
38
  },
39
- "gitHead": "bffd8ac7224b5b19ac3e60a0f6a339a1d4e3a0e1"
39
+ "gitHead": "d22fb90cbeab5d401243d360fde02f037d50edc1"
40
40
  }
File without changes