New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chore: enable eslint-plugin-jsdoc (refs #11146) #12332
Changes from all commits
82a0db8
8376dd2
b119d8d
fc7a9af
d83af2e
b43eeeb
d9fea34
045a211
8488a92
f08f752
9fe2638
940cf74
2b8909f
8d93014
20fa178
8e67006
60486d1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -85,8 +85,8 @@ const validFixTypes = new Set(["problem", "suggestion", "layout"]); | |
* @property {number} warningCount Number of warnings for the result. | ||
* @property {number} fixableErrorCount Number of fixable errors for the result. | ||
* @property {number} fixableWarningCount Number of fixable warnings for the result. | ||
* @property {string=} [source] The source code of the file that was linted. | ||
* @property {string=} [output] The source code of the file that was linted, with as many fixes applied as possible. | ||
* @property {string} [source] The source code of the file that was linted. | ||
* @property {string} [output] The source code of the file that was linted, with as many fixes applied as possible. | ||
*/ | ||
|
||
/** | ||
|
@@ -329,7 +329,6 @@ function getRule(ruleId, configArrays) { | |
/** | ||
* Collect used deprecated rules. | ||
* @param {ConfigArray[]} usedConfigArrays The config arrays which were used. | ||
* @param {Map<string, Object>} ruleMap The rule definitions which were used (built-ins). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This parameter no longer exists. |
||
* @returns {IterableIterator<DeprecatedRuleInfo>} Used deprecated rules. | ||
*/ | ||
function *iterateRuleDeprecationWarnings(usedConfigArrays) { | ||
|
@@ -530,7 +529,6 @@ class CLIEngine { | |
/** | ||
* Creates a new instance of the core CLI engine. | ||
* @param {CLIEngineOptions} providedOptions The options for this instance. | ||
* @constructor | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ES2015 classes no longer need to be documented as |
||
*/ | ||
constructor(providedOptions) { | ||
const options = Object.assign( | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -78,7 +78,7 @@ function mergeDefaultOptions(options) { | |
return Object.assign({}, DEFAULT_OPTIONS, options); | ||
} | ||
|
||
/* eslint-disable valid-jsdoc */ | ||
/* eslint-disable jsdoc/check-param-names, jsdoc/require-param */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A really nice thing about the separate checks is that we can disable specific checks and still enforce other things we care about! |
||
/** | ||
* Normalize the path separators in a given string. | ||
* On Windows environment, this replaces `\` by `/`. | ||
|
@@ -89,7 +89,7 @@ function mergeDefaultOptions(options) { | |
const normalizePathSeps = path.sep === "/" | ||
? (str => str) | ||
: ((seps, str) => str.replace(seps, "/")).bind(null, new RegExp(`\\${path.sep}`, "gu")); | ||
/* eslint-enable valid-jsdoc */ | ||
/* eslint-enable jsdoc/check-param-names, jsdoc/require-param */ | ||
|
||
/** | ||
* Converts a glob pattern to a new glob pattern relative to a different directory | ||
|
@@ -298,7 +298,7 @@ class IgnoredPaths { | |
|
||
/** | ||
* read ignore filepath | ||
* @param {string} filePath, file to add to ig | ||
* @param {string} filePath file to add to ig | ||
* @returns {Array} raw ignore rules | ||
*/ | ||
readIgnoreFile(filePath) { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -99,7 +99,7 @@ function groupByProperty(objects) { | |
* Configs may also have one or more additional elements to specify rule | ||
* configuration or options. | ||
* | ||
* @typedef {array|number} ruleConfig | ||
* @typedef {Array|number} ruleConfig | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure why |
||
* @param {number} 0 The rule's severity (0, 1, 2). | ||
*/ | ||
|
||
|
@@ -185,7 +185,7 @@ class RuleConfigSet { | |
|
||
/** | ||
* Stored valid rule configurations for this instance | ||
* @type {array} | ||
* @type {Array} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure why |
||
*/ | ||
this.ruleConfigs = configs || []; | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -85,6 +85,7 @@ describe("CascadingConfigArrayFactory", () => { | |
|
||
/** | ||
* Returns the path inside of the fixture directory. | ||
* @param {...string} args file path segments. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It doesn't seem like |
||
* @returns {string} The path inside the fixture directory. | ||
* @private | ||
*/ | ||
|
@@ -671,6 +672,7 @@ describe("CascadingConfigArrayFactory", () => { | |
|
||
/** | ||
* Returns the path inside of the fixture directory. | ||
* @param {...string} args file path segments. | ||
* @returns {string} The path inside the fixture directory. | ||
* @private | ||
*/ | ||
|
@@ -766,6 +768,7 @@ describe("CascadingConfigArrayFactory", () => { | |
|
||
/** | ||
* Returns the path inside of the fixture directory. | ||
* @param {...string} args file path segments. | ||
* @returns {string} The path inside the fixture directory. | ||
* @private | ||
*/ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
jsdoc/check-syntax
enforces this syntax for optional parameters.