You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `@cloudfour/jsdoc/tag-lines` rule is now configured to enforce one blank line in JSDoc comments between the description of a function and the `@param`/other tags.
10
+
11
+
For example, the blank line after the description is enforced here:
12
+
13
+
```js
14
+
/**
15
+
* This is the description for the function, the blank line below this is enforced
Copy file name to clipboardExpand all lines: fixtures/eslint/lib/cli-engine/config-array-factory.js
+33Lines changed: 33 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -111,6 +111,7 @@ const internalSlotsMap = new WeakMap();
111
111
112
112
/**
113
113
* Check if a given string is a file path.
114
+
*
114
115
* @param {string} nameOrPath A module name or file path.
115
116
* @returns {boolean} `true` if the `nameOrPath` is a file path.
116
117
*/
@@ -120,6 +121,7 @@ function isFilePath(nameOrPath) {
120
121
121
122
/**
122
123
* Convenience wrapper for synchronously reading file contents.
124
+
*
123
125
* @param {string} filePath The filename to read.
124
126
* @returns {string} The file contents, with the BOM removed.
125
127
* @private
@@ -130,6 +132,7 @@ function readFile(filePath) {
130
132
131
133
/**
132
134
* Loads a YAML configuration from a file.
135
+
*
133
136
* @param {string} filePath The filename to load.
134
137
* @returns {ConfigData} The configuration object from the file.
135
138
* @throws {Error} If the file cannot be read.
@@ -153,6 +156,7 @@ function loadYAMLConfigFile(filePath) {
153
156
154
157
/**
155
158
* Loads a JSON configuration from a file.
159
+
*
156
160
* @param {string} filePath The filename to load.
157
161
* @returns {ConfigData} The configuration object from the file.
158
162
* @throws {Error} If the file cannot be read.
@@ -177,6 +181,7 @@ function loadJSONConfigFile(filePath) {
177
181
178
182
/**
179
183
* Loads a legacy (.eslintrc) configuration from a file.
184
+
*
180
185
* @param {string} filePath The filename to load.
181
186
* @returns {ConfigData} The configuration object from the file.
182
187
* @throws {Error} If the file cannot be read.
@@ -202,6 +207,7 @@ function loadLegacyConfigFile(filePath) {
202
207
203
208
/**
204
209
* Loads a JavaScript configuration from a file.
210
+
*
205
211
* @param {string} filePath The filename to load.
206
212
* @returns {ConfigData} The configuration object from the file.
207
213
* @throws {Error} If the file cannot be read.
@@ -220,6 +226,7 @@ function loadJSConfigFile(filePath) {
220
226
221
227
/**
222
228
* Loads a configuration from a package.json file.
229
+
*
223
230
* @param {string} filePath The filename to load.
224
231
* @returns {ConfigData} The configuration object from the file.
225
232
* @throws {Error} If the file cannot be read.
@@ -247,6 +254,7 @@ function loadPackageJSONConfigFile(filePath) {
247
254
248
255
/**
249
256
* Loads a `.eslintignore` from a file.
257
+
*
250
258
* @param {string} filePath The filename to load.
251
259
* @returns {string[]} The ignore patterns from the file.
252
260
* @private
@@ -267,6 +275,7 @@ function loadESLintIgnoreFile(filePath) {
267
275
268
276
/**
269
277
* Creates an error to notify about a missing config to extend from.
278
+
*
270
279
* @param {string} configName The name of the missing config.
271
280
* @param {string} importerName The name of the config that imported the missing config
272
281
* @returns {Error} The error object to throw
@@ -285,6 +294,7 @@ function configMissingError(configName, importerName) {
285
294
/**
286
295
* Loads a configuration file regardless of the source. Inspects the file path
287
296
* to determine the correctly way to load the config file.
297
+
*
288
298
* @param {string} filePath The path to the configuration.
289
299
* @returns {ConfigData|null} The configuration information.
290
300
* @private
@@ -317,6 +327,7 @@ function loadConfigFile(filePath) {
317
327
318
328
/**
319
329
* Write debug log.
330
+
*
320
331
* @param {string} request The requested module name.
321
332
* @param {string} relativeTo The file path to resolve the request relative to.
322
333
* @param {string} filePath The resolved file path.
@@ -345,6 +356,7 @@ function writeDebugLogForLoading(request, relativeTo, filePath) {
345
356
346
357
/**
347
358
* Create a new context with default values.
359
+
*
348
360
* @param {string | undefined} cwd The current working directory.
349
361
* @param {"config" | "ignore" | "implicit-processor" | undefined} providedType The type of the current configuration. Default is `"config"`.
350
362
* @param {string | undefined} providedName The name of the current configuration. Default is the relative path from `cwd` to `filePath`.
@@ -373,6 +385,7 @@ function createContext(
373
385
* Normalize a given plugin.
374
386
* - Ensure the object to have four properties: configs, environments, processors, and rules.
375
387
* - Ensure the object to not have other properties.
388
+
*
376
389
* @param {Plugin} plugin The plugin to normalize.
377
390
* @returns {Plugin} The normalized plugin.
378
391
*/
@@ -395,6 +408,7 @@ function normalizePlugin(plugin) {
395
408
classConfigArrayFactory{
396
409
/**
397
410
* Initialize this instance.
411
+
*
398
412
* @param {ConfigArrayFactoryOptions} [options] The map for additional plugins.
399
413
*/
400
414
constructor({
@@ -411,6 +425,7 @@ class ConfigArrayFactory {
411
425
412
426
/**
413
427
* Create `ConfigArray` instance from a config data.
428
+
*
414
429
* @param {ConfigData|null} configData The config data to create.
415
430
* @param {object} [options] The options.
416
431
* @param {string} [options.basePath] The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`.
@@ -432,6 +447,7 @@ class ConfigArrayFactory {
432
447
433
448
/**
434
449
* Load a config file.
450
+
*
435
451
* @param {string} filePath The path to a config file.
436
452
* @param {object} [options] The options.
437
453
* @param {string} [options.basePath] The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`.
@@ -447,6 +463,7 @@ class ConfigArrayFactory {
447
463
448
464
/**
449
465
* Load the config file on a given directory if exists.
466
+
*
450
467
* @param {string} directoryPath The path to a directory.
451
468
* @param {object} [options] The options.
452
469
* @param {string} [options.basePath] The base path to resolve relative paths in `overrides[].files`, `overrides[].excludedFiles`, and `ignorePatterns`.
@@ -489,6 +506,7 @@ class ConfigArrayFactory {
489
506
490
507
/**
491
508
* Check if a config file on a given directory exists or not.
509
+
*
492
510
* @param {string} directoryPath The path to a directory.
493
511
* @returns {string | null} The path to the found config file. If not found then null.
494
512
*/
@@ -515,6 +533,7 @@ class ConfigArrayFactory {
515
533
516
534
/**
517
535
* Load `.eslintignore` file.
536
+
*
518
537
* @param {string} filePath The path to a `.eslintignore` file to load.
519
538
* @returns {ConfigArray} Loaded config. An empty `ConfigArray` if any config doesn't exist.
520
539
*/
@@ -531,6 +550,7 @@ class ConfigArrayFactory {
531
550
532
551
/**
533
552
* Load `.eslintignore` file in the current working directory.
553
+
*
534
554
* @returns {ConfigArray} Loaded config. An empty `ConfigArray` if any config doesn't exist.
535
555
*/
536
556
loadDefaultESLintIgnore(){
@@ -571,6 +591,7 @@ class ConfigArrayFactory {
571
591
572
592
/**
573
593
* Load a given config file.
594
+
*
574
595
* @param {ConfigArrayFactoryLoadingContext} ctx The loading context.
0 commit comments