Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit04b6adb

Browse files
kaicataldomysticatea
authored andcommitted
Chore: enable eslint-plugin-jsdoc (refs#11146) (#12332)
* Chore: enable eslint-plugin-jsdoc (refs#11146)* Chore: enable jsdoc/check-types* Chore: enable jsdoc/check-param-names* Chore: enable jsdoc/check-alignment* Chore: enable jsdoc/check-tag-names* Chore: enable jsdoc/check-syntax* Chore: enable jsdoc/implements-on-classes* Chore: enable jsdoc/require-param-descriptions* Chore: enable jsdoc/require-param-name* Chore: enable jsdoc/require-param-type* Chore: enable jsdoc/require-param* Chore: enable jsdoc/require-returns-description* Chore: enable jsdoc/require-returns-type* Chore: enable jsdoc/require-returns* Fix: eslint-plugin-jsdoc uses Function by default* Chore: fix test* Fix: remove out of date comment
1 parent9b86167 commit04b6adb

File tree

26 files changed

+56
-39
lines changed

26 files changed

+56
-39
lines changed

‎lib/cli-engine/cli-engine.js‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ const validFixTypes = new Set(["problem", "suggestion", "layout"]);
8585
*@property {number} warningCount Number of warnings for the result.
8686
*@property {number} fixableErrorCount Number of fixable errors for the result.
8787
*@property {number} fixableWarningCount Number of fixable warnings for the result.
88-
*@property {string=} [source] The source code of the file that was linted.
89-
*@property {string=} [output] The source code of the file that was linted, with as many fixes applied as possible.
88+
*@property {string} [source] The source code of the file that was linted.
89+
*@property {string} [output] The source code of the file that was linted, with as many fixes applied as possible.
9090
*/
9191

9292
/**
@@ -329,7 +329,6 @@ function getRule(ruleId, configArrays) {
329329
/**
330330
* Collect used deprecated rules.
331331
*@param {ConfigArray[]} usedConfigArrays The config arrays which were used.
332-
*@param {Map<string, Object>} ruleMap The rule definitions which were used (built-ins).
333332
*@returns {IterableIterator<DeprecatedRuleInfo>} Used deprecated rules.
334333
*/
335334
function*iterateRuleDeprecationWarnings(usedConfigArrays){
@@ -530,7 +529,6 @@ class CLIEngine {
530529
/**
531530
* Creates a new instance of the core CLI engine.
532531
*@param {CLIEngineOptions} providedOptions The options for this instance.
533-
*@constructor
534532
*/
535533
constructor(providedOptions){
536534
constoptions=Object.assign(

‎lib/cli-engine/ignored-paths.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ function mergeDefaultOptions(options) {
7878
returnObject.assign({},DEFAULT_OPTIONS,options);
7979
}
8080

81-
/* eslint-disablevalid-jsdoc */
81+
/* eslint-disablejsdoc/check-param-names,jsdoc/require-param */
8282
/**
8383
* Normalize the path separators in a given string.
8484
* On Windows environment, this replaces `\` by `/`.
@@ -89,7 +89,7 @@ function mergeDefaultOptions(options) {
8989
constnormalizePathSeps=path.sep==="/"
9090
?(str=>str)
9191
:((seps,str)=>str.replace(seps,"/")).bind(null,newRegExp(`\\${path.sep}`,"gu"));
92-
/* eslint-enablevalid-jsdoc */
92+
/* eslint-enablejsdoc/check-param-names,jsdoc/require-param */
9393

9494
/**
9595
* Converts a glob pattern to a new glob pattern relative to a different directory
@@ -298,7 +298,7 @@ class IgnoredPaths {
298298

299299
/**
300300
* read ignore filepath
301-
*@param {string} filePath, file to add to ig
301+
*@param {string} filePath file to add to ig
302302
*@returns {Array} raw ignore rules
303303
*/
304304
readIgnoreFile(filePath){

‎lib/cli-engine/lint-result-cache.js‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ class LintResultCache {
4747

4848
/**
4949
* Creates a new LintResultCache instance.
50-
*@constructor
5150
*@param {string} cacheFileLocation The cache file location.
5251
* configuration lookup by file path).
5352
*/

‎lib/init/config-rule.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ function groupByProperty(objects) {
9999
* Configs may also have one or more additional elements to specify rule
100100
* configuration or options.
101101
*
102-
*@typedef {array|number} ruleConfig
102+
*@typedef {Array|number} ruleConfig
103103
*@param {number} 0 The rule's severity (0, 1, 2).
104104
*/
105105

@@ -185,7 +185,7 @@ class RuleConfigSet {
185185

186186
/**
187187
* Stored valid rule configurations for this instance
188-
*@type {array}
188+
*@type {Array}
189189
*/
190190
this.ruleConfigs=configs||[];
191191
}

‎lib/init/npm-utils.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ function checkDevDeps(packages) {
163163
/**
164164
* Check whether package.json is found in current path.
165165
*
166-
*@param {string=}startDir Starting directory
166+
*@param {string} [startDir] Starting directory
167167
*@returns {boolean} Whether a package.json is found in current path.
168168
*/
169169
functioncheckPackageJson(startDir){

‎lib/linter/code-path-analysis/debug-helpers.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const debug = require("debug")("eslint:code-path");
2121
*@returns {string} Id of the segment.
2222
*/
2323
/* istanbul ignore next */
24-
functiongetId(segment){// eslint-disable-line require-jsdoc
24+
functiongetId(segment){// eslint-disable-linejsdoc/require-jsdoc
2525
returnsegment.id+(segment.reachable ?"" :"!");
2626
}
2727

‎lib/linter/linter.js‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,6 @@ function normalizeFilename(filename) {
472472
returnindex===-1 ?filename :parts.slice(index).join(path.sep);
473473
}
474474

475-
// eslint-disable-next-line valid-jsdoc
476475
/**
477476
* Normalizes the possible options for `linter.verify` and `linter.verifyAndFix` to a
478477
* consistent shape.

‎lib/rule-tester/rule-tester.js‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,6 @@ class RuleTester {
177177
/**
178178
* Creates a new instance of RuleTester.
179179
*@param {Object} [testerConfig] Optional, extra configuration for the tester
180-
*@constructor
181180
*/
182181
constructor(testerConfig){
183182

‎lib/rules/indent-legacy.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ module.exports = {
303303
*@param {int} needed Expected indentation character count
304304
*@param {int} gottenSpaces Indentation space count in the actual node/code
305305
*@param {int} gottenTabs Indentation tab count in the actual node/code
306-
*@param {Object=}loc Error line and column location
306+
*@param {Object} [loc] Error line and column location
307307
*@param {boolean} isLastNodeCheck Is the error for last node check
308308
*@returns {void}
309309
*/

‎lib/shared/logging.js‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ module.exports = {
1212

1313
/**
1414
* Cover for console.log
15+
*@param {...any} args The elements to log.
1516
*@returns {void}
1617
*/
1718
info(...args){
@@ -20,6 +21,7 @@ module.exports = {
2021

2122
/**
2223
* Cover for console.error
24+
*@param {...any} args The elements to log.
2325
*@returns {void}
2426
*/
2527
error(...args){

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp