summaryrefslogtreecommitdiff
path: root/tools/node_modules/eslint/lib/init
diff options
context:
space:
mode:
Diffstat (limited to 'tools/node_modules/eslint/lib/init')
-rw-r--r--tools/node_modules/eslint/lib/init/autoconfig.js12
-rw-r--r--tools/node_modules/eslint/lib/init/config-file.js1
-rw-r--r--tools/node_modules/eslint/lib/init/config-initializer.js1
-rw-r--r--tools/node_modules/eslint/lib/init/config-rule.js6
-rw-r--r--tools/node_modules/eslint/lib/init/npm-utils.js5
5 files changed, 2 insertions, 23 deletions
diff --git a/tools/node_modules/eslint/lib/init/autoconfig.js b/tools/node_modules/eslint/lib/init/autoconfig.js
index 19c4986c31..64be3d2a84 100644
--- a/tools/node_modules/eslint/lib/init/autoconfig.js
+++ b/tools/node_modules/eslint/lib/init/autoconfig.js
@@ -31,7 +31,6 @@ const MAX_CONFIG_COMBINATIONS = 17, // 16 combinations + 1 for severity only
/**
* Information about a rule configuration, in the context of a Registry.
- *
* @typedef {Object} registryItem
* @param {ruleConfig} config A valid configuration for the rule
* @param {number} specificity The number of elements in the ruleConfig array
@@ -70,6 +69,7 @@ function makeRegistryItems(rulesConfig) {
*/
class Registry {
+ // eslint-disable-next-line jsdoc/require-description
/**
* @param {rulesConfig} [rulesConfig] Hash of rule names and arrays of possible configurations
*/
@@ -82,7 +82,6 @@ class Registry {
*
* It will set the registry's `rule` property to an object having rule names
* as keys and an array of registryItems as values.
- *
* @returns {void}
*/
populateFromCoreRules() {
@@ -101,7 +100,6 @@ class Registry {
* configurations.
*
* The length of the returned array will be <= MAX_CONFIG_COMBINATIONS.
- *
* @returns {Object[]} "rules" configurations to use for linting
*/
buildRuleSets() {
@@ -114,7 +112,6 @@ class Registry {
*
* This is broken out into its own function so that it doesn't need to be
* created inside of the while loop.
- *
* @param {string} rule The ruleId to add.
* @returns {void}
*/
@@ -162,7 +159,6 @@ class Registry {
*
* Note: this also removes rule configurations which were not linted
* (meaning, they have an undefined errorCount).
- *
* @returns {void}
*/
stripFailingConfigs() {
@@ -185,7 +181,6 @@ class Registry {
/**
* Removes rule configurations which were not included in a ruleSet
- *
* @returns {void}
*/
stripExtraConfigs() {
@@ -204,7 +199,6 @@ class Registry {
* Creates a registry of rules which had no error-free configs.
* The new registry is intended to be analyzed to determine whether its rules
* should be disabled or set to warning.
- *
* @returns {Registry} A registry of failing rules.
*/
getFailingRulesRegistry() {
@@ -225,7 +219,6 @@ class Registry {
/**
* Create an eslint config for any rules which only have one configuration
* in the registry.
- *
* @returns {Object} An eslint config with rules section populated
*/
createConfig() {
@@ -243,7 +236,6 @@ class Registry {
/**
* Return a cloned registry containing only configs with a desired specificity
- *
* @param {number} specificity Only keep configs with this specificity
* @returns {Registry} A registry of rules
*/
@@ -261,7 +253,6 @@ class Registry {
/**
* Lint SourceCodes against all configurations in the registry, and record results
- *
* @param {Object[]} sourceCodes SourceCode objects for each filename
* @param {Object} config ESLint config object
* @param {progressCallback} [cb] Optional callback for reporting execution status
@@ -327,7 +318,6 @@ class Registry {
*
* This will return a new config with `"extends": "eslint:recommended"` and
* only the rules which have configurations different from the recommended config.
- *
* @param {Object} config config object
* @returns {Object} config object using `"extends": "eslint:recommended"`
*/
diff --git a/tools/node_modules/eslint/lib/init/config-file.js b/tools/node_modules/eslint/lib/init/config-file.js
index 77f14a4729..960b572cdd 100644
--- a/tools/node_modules/eslint/lib/init/config-file.js
+++ b/tools/node_modules/eslint/lib/init/config-file.js
@@ -23,7 +23,6 @@ const debug = require("debug")("eslint:config-file");
* Determines sort order for object keys for json-stable-stringify
*
* see: https://github.com/samn/json-stable-stringify#cmp
- *
* @param {Object} a The first comparison object ({key: akey, value: avalue})
* @param {Object} b The second comparison object ({key: bkey, value: bvalue})
* @returns {number} 1 or -1, used in stringify cmp method
diff --git a/tools/node_modules/eslint/lib/init/config-initializer.js b/tools/node_modules/eslint/lib/init/config-initializer.js
index 2e47e902c7..48e56ce526 100644
--- a/tools/node_modules/eslint/lib/init/config-initializer.js
+++ b/tools/node_modules/eslint/lib/init/config-initializer.js
@@ -147,7 +147,6 @@ function getModulesList(config, installESLint) {
*
* Note: This clones the config object and returns a new config to avoid mutating
* the original config parameter.
- *
* @param {Object} answers answers received from inquirer
* @param {Object} config config object
* @returns {Object} config object with configured rules
diff --git a/tools/node_modules/eslint/lib/init/config-rule.js b/tools/node_modules/eslint/lib/init/config-rule.js
index e40feb7145..7aec89c3df 100644
--- a/tools/node_modules/eslint/lib/init/config-rule.js
+++ b/tools/node_modules/eslint/lib/init/config-rule.js
@@ -33,7 +33,6 @@ function explodeArray(xs) {
*
* For example:
* combineArrays([a, [b, c]], [x, y]); // -> [[a, x], [a, y], [b, c, x], [b, c, y]]
- *
* @param {Array} arr1 The first array to combine.
* @param {Array} arr2 The second array to combine.
* @returns {Array} A mixture of the elements of the first and second arrays.
@@ -71,7 +70,6 @@ function combineArrays(arr1, arr2) {
* [{before: true}, {before: false}],
* [{after: true}, {after: false}]
* ]
- *
* @param {Object[]} objects Array of objects, each with one property/value pair
* @returns {Array[]} Array of arrays of objects grouped by property
*/
@@ -98,7 +96,6 @@ function groupByProperty(objects) {
* element in the array is the severity, and is the only required element.
* Configs may also have one or more additional elements to specify rule
* configuration or options.
- *
* @typedef {Array|number} ruleConfig
* @param {number} 0 The rule's severity (0, 1, 2).
*/
@@ -134,7 +131,6 @@ function groupByProperty(objects) {
* {before: false, after: true},
* {before: false, after: false}
* ]
- *
* @param {Object[]} objArr1 Single key/value objects, all with the same key
* @param {Object[]} objArr2 Single key/value objects, all with another key
* @returns {Object[]} Combined objects for each combination of input properties and values
@@ -178,6 +174,7 @@ function combinePropertyObjects(objArr1, objArr2) {
*/
class RuleConfigSet {
+ // eslint-disable-next-line jsdoc/require-description
/**
* @param {ruleConfig[]} configs Valid rule configurations
*/
@@ -193,7 +190,6 @@ class RuleConfigSet {
/**
* Add a severity level to the front of all configs in the instance.
* This should only be called after all configs have been added to the instance.
- *
* @returns {void}
*/
addErrorSeverity() {
diff --git a/tools/node_modules/eslint/lib/init/npm-utils.js b/tools/node_modules/eslint/lib/init/npm-utils.js
index 3d4a896b6f..28c198fc8a 100644
--- a/tools/node_modules/eslint/lib/init/npm-utils.js
+++ b/tools/node_modules/eslint/lib/init/npm-utils.js
@@ -21,7 +21,6 @@ const fs = require("fs"),
/**
* Find the closest package.json file, starting at process.cwd (by default),
* and working up to root.
- *
* @param {string} [startDir=process.cwd()] Starting directory
* @returns {string} Absolute path to closest package.json file
*/
@@ -88,7 +87,6 @@ function fetchPeerDependencies(packageName) {
/**
* Check whether node modules are include in a project's package.json.
- *
* @param {string[]} packages Array of node module names
* @param {Object} opt Options Object
* @param {boolean} opt.dependencies Set to true to check for direct dependencies
@@ -136,7 +134,6 @@ function check(packages, opt) {
* package.json.
*
* Convenience wrapper around check().
- *
* @param {string[]} packages Array of node modules to check.
* @param {string} rootDir The directory contianing a package.json
* @returns {Object} An object whose keys are the module names
@@ -151,7 +148,6 @@ function checkDeps(packages, rootDir) {
* package.json.
*
* Convenience wrapper around check().
- *
* @param {string[]} packages Array of node modules to check.
* @returns {Object} An object whose keys are the module names
* and values are booleans indicating installation.
@@ -162,7 +158,6 @@ function checkDevDeps(packages) {
/**
* Check whether package.json is found in current path.
- *
* @param {string} [startDir] Starting directory
* @returns {boolean} Whether a package.json is found in current path.
*/