Skip to content
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: Upgrade eslint-plugin-jsdoc to v25 and remove --legacy-peer-deps #14244

Merged
merged 6 commits into from Mar 25, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/workflows/ci.yml
Expand Up @@ -40,10 +40,6 @@ jobs:
node-version: ${{ matrix.node }}
- name: Install Packages
run: npm install
if: ${{ !startswith(matrix.node, '15') }}
- name: Install Packages
run: npm install --legacy-peer-deps
if: ${{ startswith(matrix.node, '15') }}
- name: Test
run: node Makefile mocha
- name: Fuzz Test
Expand Down
5 changes: 4 additions & 1 deletion lib/cli.js
Expand Up @@ -32,6 +32,7 @@ const debug = require("debug")("eslint:cli");
/** @typedef {import("./eslint/eslint").ESLintOptions} ESLintOptions */
/** @typedef {import("./eslint/eslint").LintMessage} LintMessage */
/** @typedef {import("./eslint/eslint").LintResult} LintResult */
/** @typedef {import("./options").ParsedCLIOptions} ParsedCLIOptions */

//------------------------------------------------------------------------------
// Helpers
Expand All @@ -54,7 +55,7 @@ function quietFixPredicate(message) {

/**
* Translates the CLI options into the options expected by the CLIEngine.
* @param {Object} cliOptions The CLI options to translate.
* @param {ParsedCLIOptions} cliOptions The CLI options to translate.
* @returns {ESLintOptions} The options object for the CLIEngine.
* @private
*/
Expand Down Expand Up @@ -221,6 +222,8 @@ const cli = {
if (Array.isArray(args)) {
debug("CLI args: %o", args.slice(2));
}

/** @type {ParsedCLIOptions} */
let options;

try {
Expand Down
46 changes: 46 additions & 0 deletions lib/options.js
Expand Up @@ -11,6 +11,52 @@

const optionator = require("optionator");

//------------------------------------------------------------------------------
// Typedefs
//------------------------------------------------------------------------------

/**
* The options object parsed by Optionator.
* @typedef {Object} CLIOptions
btmills marked this conversation as resolved.
Show resolved Hide resolved
* @property {boolean} cache Only check changed files
* @property {string} cacheFile Path to the cache file. Deprecated: use --cache-location
* @property {string} [cacheLocation] Path to the cache file or directory
* @property {"metadata" | "content"} cacheStrategy Strategy to use for detecting changed files in the cache
* @property {boolean} [color] Force enabling/disabling of color
* @property {string} [config] Use this configuration, overriding .eslintrc.* config options if present
* @property {boolean} debug Output debugging information
* @property {string[]} [env] Specify environments
* @property {boolean} envInfo Output execution environment information
* @property {boolean} errorOnUnmatchedPattern Prevent errors when pattern is unmatched
* @property {boolean} [eslintrc] Disable use of configuration from .eslintrc.*
btmills marked this conversation as resolved.
Show resolved Hide resolved
* @property {string[]} [ext] Specify JavaScript file extensions
* @property {boolean} fix Automatically fix problems
* @property {boolean} fixDryRun Automatically fix problems without saving the changes to the file system
* @property {("problem" | "suggestion" | "layout")[]} fixType Specify the types of fixes to apply (problem, suggestion, layout)
btmills marked this conversation as resolved.
Show resolved Hide resolved
* @property {string} format Use a specific output format
* @property {string[]} [global] Define global variables
* @property {boolean} [help] Show help
* @property {boolean} ignore Disable use of ignore files and patterns
* @property {string} [ignorePath] Specify path of ignore file
* @property {string[]} [ignorePattern] Pattern of files to ignore (in addition to those in .eslintignore)
* @property {boolean} init Run config initialization wizard
* @property {boolean} [inlineConfig] Prevent comments from changing config or rules
btmills marked this conversation as resolved.
Show resolved Hide resolved
* @property {number} maxWarnings Number of warnings to trigger nonzero exit code
* @property {string} [outputFile] Specify file to write report to
* @property {string} [parser] Specify the parser to be used
* @property {Object} [parserOptions] Specify parser options
* @property {string[]} [plugin] Specify plugins
* @property {string} [printConfig] Print the configuration for the given file
* @property {boolean | undefined} reportUnusedDisableDirectives Adds reported errors for unused eslint-disable directives
* @property {string} [resolvePluginsRelativeTo] A folder where plugins should be resolved from, CWD by default
* @property {Object} [rule] Specify rules
* @property {string[]} [rulesdir] Use additional rules from this directory
* @property {boolean} stdin Lint code provided on <STDIN>
* @property {string} [stdinFilename] Specify filename to process STDIN as
* @property {boolean} [quiet] Report errors only
btmills marked this conversation as resolved.
Show resolved Hide resolved
* @property {boolean} [version] Output the version number
*/
btmills marked this conversation as resolved.
Show resolved Hide resolved

//------------------------------------------------------------------------------
// Initialization and Public Interface
//------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -100,7 +100,7 @@
"eslint-config-eslint": "file:packages/eslint-config-eslint",
"eslint-plugin-eslint-plugin": "^2.2.1",
"eslint-plugin-internal-rules": "file:tools/internal-rules",
"eslint-plugin-jsdoc": "^22.1.0",
"eslint-plugin-jsdoc": "^25.4.3",
"eslint-plugin-node": "^11.1.0",
"eslint-release": "^2.0.0",
"eslump": "^2.0.0",
Expand Down