{"version":3,"sources":["../../../src/checkers/eslint/options.ts"],"sourcesContent":["/* eslint-disable */\n\n/**\n * This file is directly copied from https://github.com/eslint/eslint/blob/main/lib/options.js\n *\n * @fileoverview Options configuration for optionator.\n * @author George Zahariev\n */\n\n'use strict'\n\nimport { createRequire } from 'node:module'\nimport { dirname } from 'node:path'\nconst _require = createRequire(import.meta.url)\n\n//------------------------------------------------------------------------------\n// Requirements\n//------------------------------------------------------------------------------\n\n// Try to resolve optionator from ESLint's own dependencies first (ESLint v9\n// bundles it), then fall back to a locally installed copy.\nlet optionator: any\ntry {\n const eslintDir = dirname(_require.resolve('eslint/package.json'))\n const optionatorPath = _require.resolve('optionator', { paths: [eslintDir] })\n optionator = _require(optionatorPath)\n} catch {\n optionator = _require('optionator')\n}\n\n//------------------------------------------------------------------------------\n// Typedefs\n//------------------------------------------------------------------------------\n\n/**\n * The options object parsed by Optionator.\n * @typedef {Object} ParsedCLIOptions\n * @property {boolean} cache Only check changed files\n * @property {string} cacheFile Path to the cache file. Deprecated: use --cache-location\n * @property {string} [cacheLocation] Path to the cache file or directory\n * @property {\"metadata\" | \"content\"} cacheStrategy Strategy to use for detecting changed files in the cache\n * @property {boolean} [color] Force enabling/disabling of color\n * @property {string} [config] Use this configuration, overriding .eslintrc.* config options if present\n * @property {boolean} debug Output debugging information\n * @property {string[]} [env] Specify environments\n * @property {boolean} envInfo Output execution environment information\n * @property {boolean} errorOnUnmatchedPattern Prevent errors when pattern is unmatched\n * @property {boolean} eslintrc Disable use of configuration from .eslintrc.*\n * @property {string[]} [ext] Specify JavaScript file extensions\n * @property {boolean} fix Automatically fix problems\n * @property {boolean} fixDryRun Automatically fix problems without saving the changes to the file system\n * @property {(\"directive\" | \"problem\" | \"suggestion\" | \"layout\")[]} [fixType] Specify the types of fixes to apply (directive, problem, suggestion, layout)\n * @property {string} format Use a specific output format\n * @property {string[]} [global] Define global variables\n * @property {boolean} [help] Show help\n * @property {boolean} ignore Disable use of ignore files and patterns\n * @property {string} [ignorePath] Specify path of ignore file\n * @property {string[]} [ignorePattern] Pattern of files to ignore (in addition to those in .eslintignore)\n * @property {boolean} init Run config initialization wizard\n * @property {boolean} inlineConfig Prevent comments from changing config or rules\n * @property {number} maxWarnings Number of warnings to trigger nonzero exit code\n * @property {string} [outputFile] Specify file to write report to\n * @property {string} [parser] Specify the parser to be used\n * @property {Object} [parserOptions] Specify parser options\n * @property {string[]} [plugin] Specify plugins\n * @property {string} [printConfig] Print the configuration for the given file\n * @property {boolean | undefined} reportUnusedDisableDirectives Adds reported errors for unused eslint-disable directives\n * @property {string} [resolvePluginsRelativeTo] A folder where plugins should be resolved from, CWD by default\n * @property {Object} [rule] Specify rules\n * @property {string[]} [rulesdir] Load additional rules from this directory. Deprecated: Use rules from plugins\n * @property {boolean} stdin Lint code provided on \n * @property {string} [stdinFilename] Specify filename to process STDIN as\n * @property {boolean} quiet Report errors only\n * @property {boolean} [version] Output the version number\n * @property {string[]} _ Positional filenames or patterns\n */\n\n//------------------------------------------------------------------------------\n// Initialization and Public Interface\n//------------------------------------------------------------------------------\n\n// exports \"parse(args)\", \"generateHelp()\", and \"generateHelpForOption(optionName)\"\nexport const options = optionator({\n prepend: 'eslint [options] file.js [file.js] [dir]',\n defaults: {\n concatRepeatedArrays: true,\n mergeRepeatedObjects: true,\n },\n options: [\n {\n heading: 'Basic configuration',\n },\n {\n option: 'eslintrc',\n type: 'Boolean',\n default: 'true',\n description: 'Disable use of configuration from .eslintrc.*',\n },\n {\n option: 'config',\n alias: 'c',\n type: 'path::String',\n description: 'Use this configuration, overriding .eslintrc.* config options if present',\n },\n {\n option: 'env',\n type: '[String]',\n description: 'Specify environments',\n },\n {\n option: 'ext',\n type: '[String]',\n description: 'Specify JavaScript file extensions',\n },\n {\n option: 'global',\n type: '[String]',\n description: 'Define global variables',\n },\n {\n option: 'parser',\n type: 'String',\n description: 'Specify the parser to be used',\n },\n {\n option: 'parser-options',\n type: 'Object',\n description: 'Specify parser options',\n },\n {\n option: 'resolve-plugins-relative-to',\n type: 'path::String',\n description: 'A folder where plugins should be resolved from, CWD by default',\n },\n {\n heading: 'Specifying rules and plugins',\n },\n {\n option: 'plugin',\n type: '[String]',\n description: 'Specify plugins',\n },\n {\n option: 'rule',\n type: 'Object',\n description: 'Specify rules',\n },\n {\n option: 'rulesdir',\n type: '[path::String]',\n description: 'Load additional rules from this directory. Deprecated: Use rules from plugins',\n },\n {\n heading: 'Fixing problems',\n },\n {\n option: 'fix',\n type: 'Boolean',\n default: false,\n description: 'Automatically fix problems',\n },\n {\n option: 'fix-dry-run',\n type: 'Boolean',\n default: false,\n description: 'Automatically fix problems without saving the changes to the file system',\n },\n {\n option: 'fix-type',\n type: 'Array',\n description: 'Specify the types of fixes to apply (directive, problem, suggestion, layout)',\n },\n {\n heading: 'Ignoring files',\n },\n {\n option: 'ignore-path',\n type: 'path::String',\n description: 'Specify path of ignore file',\n },\n {\n option: 'ignore',\n type: 'Boolean',\n default: 'true',\n description: 'Disable use of ignore files and patterns',\n },\n {\n option: 'ignore-pattern',\n type: '[String]',\n description: 'Pattern of files to ignore (in addition to those in .eslintignore)',\n concatRepeatedArrays: [\n true,\n {\n oneValuePerFlag: true,\n },\n ],\n },\n {\n heading: 'Using stdin',\n },\n {\n option: 'stdin',\n type: 'Boolean',\n default: 'false',\n description: 'Lint code provided on ',\n },\n {\n option: 'stdin-filename',\n type: 'String',\n description: 'Specify filename to process STDIN as',\n },\n {\n heading: 'Handling warnings',\n },\n {\n option: 'quiet',\n type: 'Boolean',\n default: 'false',\n description: 'Report errors only',\n },\n {\n option: 'max-warnings',\n type: 'Int',\n default: '-1',\n description: 'Number of warnings to trigger nonzero exit code',\n },\n {\n heading: 'Output',\n },\n {\n option: 'output-file',\n alias: 'o',\n type: 'path::String',\n description: 'Specify file to write report to',\n },\n {\n option: 'format',\n alias: 'f',\n type: 'String',\n default: 'stylish',\n description: 'Use a specific output format',\n },\n {\n option: 'color',\n type: 'Boolean',\n alias: 'no-color',\n description: 'Force enabling/disabling of color',\n },\n {\n heading: 'Inline configuration comments',\n },\n {\n option: 'inline-config',\n type: 'Boolean',\n default: 'true',\n description: 'Prevent comments from changing config or rules',\n },\n {\n option: 'report-unused-disable-directives',\n type: 'Boolean',\n default: void 0,\n description: 'Adds reported errors for unused eslint-disable directives',\n },\n {\n heading: 'Caching',\n },\n {\n option: 'cache',\n type: 'Boolean',\n default: 'false',\n description: 'Only check changed files',\n },\n {\n option: 'cache-file',\n type: 'path::String',\n default: '.eslintcache',\n description: 'Path to the cache file. Deprecated: use --cache-location',\n },\n {\n option: 'cache-location',\n type: 'path::String',\n description: 'Path to the cache file or directory',\n },\n {\n option: 'cache-strategy',\n dependsOn: ['cache'],\n type: 'String',\n default: 'metadata',\n enum: ['metadata', 'content'],\n description: 'Strategy to use for detecting changed files in the cache',\n },\n {\n heading: 'Miscellaneous',\n },\n {\n option: 'init',\n type: 'Boolean',\n default: 'false',\n description: 'Run config initialization wizard',\n },\n {\n option: 'env-info',\n type: 'Boolean',\n default: 'false',\n description: 'Output execution environment information',\n },\n {\n option: 'error-on-unmatched-pattern',\n type: 'Boolean',\n default: 'true',\n description: 'Prevent errors when pattern is unmatched',\n },\n {\n option: 'exit-on-fatal-error',\n type: 'Boolean',\n default: 'false',\n description: 'Exit with exit code 2 in case of fatal error',\n },\n {\n option: 'debug',\n type: 'Boolean',\n default: false,\n description: 'Output debugging information',\n },\n {\n option: 'help',\n alias: 'h',\n type: 'Boolean',\n description: 'Show help',\n },\n {\n option: 'version',\n alias: 'v',\n type: 'Boolean',\n description: 'Output the version number',\n },\n {\n option: 'print-config',\n type: 'path::String',\n description: 'Print the configuration for the given file',\n },\n ],\n})\n"],"mappings":"AAWA,SAAS,qBAAqB;AAC9B,SAAS,eAAe;AACxB,MAAM,WAAW,cAAc,YAAY,GAAG;AAQ9C,IAAI;AACJ,IAAI;AACF,QAAM,YAAY,QAAQ,SAAS,QAAQ,qBAAqB,CAAC;AACjE,QAAM,iBAAiB,SAAS,QAAQ,cAA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