eslint-seatbelt
Version:
Gradually tighten ESLint rules in your codebase
1 lines • 35.4 kB
Source Map (JSON)
{"version":3,"sources":["../src/pluginGlobals.ts","../src/SeatbeltProcessor.ts","../src/rules/configure.ts","../src/index.ts"],"sourcesContent":["/**\n * Facilitates caching and passing of state between different parts of the plugin.\n */\n\nimport {\n FallbackEnv,\n logStderr,\n padVarName,\n SEATBELT_VERBOSE,\n SeatbeltArgs,\n SeatbeltConfig,\n SeatbeltConfigWithPwd,\n SeatbeltEnv,\n} from \"./SeatbeltConfig\"\nimport { SeatbeltFile } from \"./SeatbeltFile\"\nimport { name, version } from \"../package.json\"\nimport fs from \"node:fs\"\n\nlet ANY_CONFIG_DISABLED = false\nlet LAST_VERBOSE_ARGS: SeatbeltArgs | undefined\nconst VERBOSE_SEATBELT_FILES = new Set<string>()\nconst CLI_ARGS = new Set<SeatbeltArgs>()\n\nconst EMPTY_CONFIG: SeatbeltConfig = {}\nconst argsCache = new WeakMap<SeatbeltConfig, SeatbeltArgs>()\nconst seatbeltFileCache = new Map<string, SeatbeltFile>()\nconst mergedConfigCache = new WeakMap<\n /* settings.seatbelt */ SeatbeltConfig,\n WeakMap</* from rule settings override*/ SeatbeltConfig, SeatbeltConfig>\n>()\n\nlet envFallbackConfig: SeatbeltConfig | undefined\nlet envOverrideConfig: SeatbeltConfigWithPwd | undefined\nlet hasAnyEnvVars = false\nlet lastLintedFile: { filename: string; args: SeatbeltArgs } | undefined\nconst temporaryFileArgs = new Map<string, SeatbeltArgs>()\n\nfunction getProcessEnvFallbackConfig(): SeatbeltConfig {\n if (!envFallbackConfig) {\n envFallbackConfig = SeatbeltConfig.fromFallbackEnv(\n process.env as FallbackEnv,\n )\n hasAnyEnvVars = Object.keys(envFallbackConfig).length > 0\n }\n return envFallbackConfig\n}\n\nfunction getProcessEnvOverrideConfig(): SeatbeltConfigWithPwd {\n if (!envOverrideConfig) {\n envOverrideConfig = SeatbeltConfig.fromEnvOverrides(\n process.env as SeatbeltEnv,\n )\n ANY_CONFIG_DISABLED ||= envOverrideConfig.disable ?? false\n hasAnyEnvVars = Object.keys(envOverrideConfig).length > 0\n }\n return envOverrideConfig\n}\n\nexport function ruleOverrideConfigToArgs(\n settingsConfig: SeatbeltConfig | undefined,\n ruleOverrideConfig: SeatbeltConfig | undefined,\n): SeatbeltArgs {\n if (settingsConfig && ruleOverrideConfig) {\n let settingsConfigMergeMap = mergedConfigCache.get(settingsConfig)\n if (!settingsConfigMergeMap) {\n settingsConfigMergeMap = new WeakMap()\n mergedConfigCache.set(settingsConfig, settingsConfigMergeMap)\n }\n let mergedConfig = settingsConfigMergeMap.get(ruleOverrideConfig)\n if (!mergedConfig) {\n mergedConfig = { ...settingsConfig, ...ruleOverrideConfig }\n settingsConfigMergeMap.set(ruleOverrideConfig, mergedConfig)\n }\n return configToArgs(mergedConfig)\n }\n return configToArgs(ruleOverrideConfig ?? settingsConfig ?? EMPTY_CONFIG)\n}\n\nfunction configToArgs(config: SeatbeltConfig): SeatbeltArgs {\n let args = argsCache.get(config)\n if (!args) {\n const compiledConfig = {\n ...getProcessEnvFallbackConfig(),\n ...config,\n ...getProcessEnvOverrideConfig(),\n }\n args = SeatbeltArgs.fromConfig(compiledConfig)\n ANY_CONFIG_DISABLED ||= args.disable\n if (args.verbose) {\n LAST_VERBOSE_ARGS = args\n VERBOSE_SEATBELT_FILES.add(args.seatbeltFile)\n if (!args.disable) {\n logConfig(args, config)\n }\n }\n argsCache.set(config, args)\n }\n return args\n}\n\nconst configureRuleName = `${name}/configure`\n\nfunction logRuleSetupHint() {\n logStderr(\n `\nMake sure you have rule ${configureRuleName} enabled in your ESLint config for all files:\n\n rules: {\n // ...\n \"${configureRuleName}\": \"error\",\n }\n\nDocs: https://github.com/justjake/${name}#setup`,\n )\n}\n\nfunction logConfig(args: SeatbeltArgs, baseConfig: SeatbeltConfig) {\n const log = SeatbeltArgs.getLogger(args)\n SeatbeltConfig.fromFallbackEnv(process.env as FallbackEnv, log)\n for (const [key, value] of Object.entries(baseConfig)) {\n log(`${padVarName(\"ESLint settings\")} config.${key} =`, value)\n }\n SeatbeltConfig.fromEnvOverrides(process.env as SeatbeltEnv, log)\n}\n\nexport function pushFileArgs(filename: string, args: SeatbeltArgs) {\n lastLintedFile = { filename, args }\n temporaryFileArgs.set(filename, args)\n if (isEslintCli()) {\n CLI_ARGS.add(args)\n }\n}\n\nexport function popFileArgs(filename: string): SeatbeltArgs {\n const args = temporaryFileArgs.get(filename)\n temporaryFileArgs.delete(filename)\n if (args) {\n return args\n }\n\n if (!hasAnyEnvVars) {\n if (lastLintedFile) {\n logStderr(\n `WARNING: last configured by file \\`${lastLintedFile.filename}\\` but linting file \\`${filename}\\`.\nYou may have rule ${configureRuleName} enabled for some files, but not this one.\n`.trim(),\n )\n } else {\n logStderr(\n `WARNING: rule ${configureRuleName} not enabled in ESLint config and no SEATBELT environment variables set`,\n )\n }\n logRuleSetupHint()\n }\n return configToArgs(EMPTY_CONFIG)\n}\n\nexport function getSeatbeltFile(filename: string): SeatbeltFile {\n let seatbeltFile = seatbeltFileCache.get(filename)\n if (!seatbeltFile) {\n seatbeltFile = SeatbeltFile.openSync(filename)\n seatbeltFileCache.set(filename, seatbeltFile)\n }\n return seatbeltFile\n}\n\nlet didRegisterProcessExitHandler = false\n\ntype RunContext = {\n runner: \"eslint-cli\" | \"editor\" | \"unknown\"\n inEditorTerminal?: boolean\n vscodeLike?: boolean\n ci?: boolean\n npmLifecycleScript?: string\n}\n\nfunction detectRunContext(): RunContext {\n const isVscodeExtension = Boolean(process.env.VSCODE_IPC_HOOK)\n const isVscodeShell = process.env.TERM_PROGRAM === \"vscode\"\n const isEslintCli = process.argv.some(\n (arg) =>\n arg.endsWith(\"bin/eslint.js\") || arg.includes(\"node_modules/eslint/\"),\n )\n\n return {\n runner: isVscodeExtension\n ? \"editor\"\n : isEslintCli\n ? \"eslint-cli\"\n : \"unknown\",\n inEditorTerminal: isVscodeShell,\n npmLifecycleScript: process.env.npm_lifecycle_script,\n ci: Boolean(process.env.CI),\n }\n}\n\nlet runContext: RunContext | undefined\nfunction getRunContext(): RunContext {\n if (!runContext) {\n runContext = detectRunContext()\n }\n return runContext\n}\n\nconst pluginStats = {\n processorRuns: 0,\n ruleRuns: 0,\n removedFiles: 0,\n}\n\nexport function incrementStat(key: keyof typeof pluginStats, value = 1) {\n pluginStats[key] += value\n}\n\nexport function onPreprocess(_filename: string) {\n incrementStat(\"processorRuns\")\n}\n\nexport function onPostprocess(_filename: string) {}\n\nexport function onConfigureRule(_filename: string) {\n incrementStat(\"ruleRuns\")\n}\n\nexport function registerEslintCliExitHandler() {\n if (ANY_CONFIG_DISABLED) {\n return\n }\n if (didRegisterProcessExitHandler) {\n return\n }\n didRegisterProcessExitHandler = true\n const runContext = detectRunContext()\n if (isEslintCli()) {\n process.once(\"exit\", () => handleEslintCliExit(runContext))\n }\n}\n\n// Detect configuration errors\nfunction handleEslintCliExit(_runContext: RunContext) {\n if (ANY_CONFIG_DISABLED) {\n return\n }\n\n cleanUpRemovedFiles()\n\n if (LAST_VERBOSE_ARGS) {\n logEslintRunSummary()\n }\n}\n\nfunction cleanUpRemovedFiles() {\n for (const args of CLI_ARGS) {\n const seatbeltFile = getSeatbeltFile(args.seatbeltFile)\n // TODO: args.threadsafe\n seatbeltFile.readSync()\n for (const filename of seatbeltFile.filenames()) {\n if (!fs.existsSync(filename)) {\n seatbeltFile.removeFile(filename, args)\n incrementStat(\"removedFiles\")\n }\n }\n seatbeltFile.writeSync()\n }\n}\n\nfunction logEslintRunSummary() {\n const log = LAST_VERBOSE_ARGS\n ? SeatbeltArgs.getLogger(LAST_VERBOSE_ARGS)\n : logStderr\n\n const seatbeltFiles = Array.from(VERBOSE_SEATBELT_FILES).map(getSeatbeltFile)\n const ruleInfo = new Map<string, { allowed: number; inFiles: number }>()\n const totalInfo = { allowed: 0, inFiles: 0 }\n for (const seatbeltFile of seatbeltFiles) {\n for (const filename of seatbeltFile.filenames()) {\n const maxErrors = seatbeltFile.getMaxErrors(filename)\n if (maxErrors) {\n for (const [ruleId, errorCount] of maxErrors.entries()) {\n const info = getDefault(ruleInfo, ruleId, () => ({\n allowed: 0,\n inFiles: 0,\n }))\n info.allowed += errorCount\n info.inFiles++\n totalInfo.allowed += errorCount\n totalInfo.inFiles++\n }\n }\n }\n }\n\n const ruleStatsMessages: string[] = []\n ruleStatsMessages.push(\n `${SEATBELT_VERBOSE}: ${name}@${version} checked ${pluginStats.processorRuns} source files\\n`,\n )\n\n const seatbeltFileCount =\n seatbeltFiles.length === 1\n ? \"seatbelt file\"\n : `${seatbeltFiles.length} seatbelt files`\n\n if (pluginStats.removedFiles > 0) {\n ruleStatsMessages.push(\n `Removed ${pluginStats.removedFiles} non-existent source files from ${seatbeltFileCount}\\n`,\n )\n }\n ruleStatsMessages.push(`Allowed errors in ${seatbeltFileCount}:\\n`)\n for (const ruleId of Array.from(ruleInfo.keys()).sort()) {\n const info = ruleInfo.get(ruleId)!\n const sourceFilesCount =\n info.inFiles === 1 ? \"1 source file\" : `${info.inFiles} source files`\n ruleStatsMessages.push(\n ` ${ruleId}: ${info.allowed} allowed in ${sourceFilesCount}\\n`,\n )\n }\n log(ruleStatsMessages.join(\"\"))\n}\n\nexport function hasProcessorRun() {\n return pluginStats.processorRuns > 0\n}\n\nexport function anyDisabled() {\n return ANY_CONFIG_DISABLED\n}\n\nfunction getDefault<K, V>(map: Map<K, V>, key: K, defaultValue: () => V) {\n if (!map.has(key)) {\n const value = defaultValue()\n map.set(key, value)\n return value\n }\n return map.get(key)!\n}\n\nexport function isEslintCli() {\n return getRunContext().runner === \"eslint-cli\"\n}\n","import type { Linter } from \"eslint\"\nimport packageJson from \"../package.json\"\nimport { RuleId, SeatbeltFile } from \"./SeatbeltFile\"\nimport {\n formatFilename,\n formatRuleId,\n SEATBELT_FROZEN,\n SEATBELT_INCREASE,\n SeatbeltArgs,\n} from \"./SeatbeltConfig\"\nimport * as pluginGlobals from \"./pluginGlobals\"\nimport { appendErrorContext } from \"./errorHanding\"\n\nconst { name, version } = packageJson\n\n/**\n * seatbelt works by observing the list messages and filtering out\n * messages that are allowed by the seatbelt file. Note that ESLint is a\n * completely synchronous codebase, so we also need to be synchronous.\n *\n * https://eslint.org/docs/latest/extend/custom-processors\n */\nexport const SeatbeltProcessor: Linter.Processor = {\n supportsAutofix: true,\n meta: {\n name,\n version,\n },\n // takes text of the file and filename\n preprocess(text, filename) {\n pluginGlobals.onPreprocess(filename)\n // We don't need to do anything here, pass through the data unchanged.\n return [text]\n },\n\n /** Where the action happens. */\n postprocess(messagesPerSection, filename) {\n pluginGlobals.onPostprocess(filename)\n // takes a Message[][] and filename\n // `messages` argument contains two-dimensional array of Message objects\n // where each top-level array item contains array of lint messages related\n // to the text that was returned in array from preprocess() method\n if (messagesPerSection.length !== 1) {\n throw new Error(\n `${name} bug: expected preprocess to return 1 section, got ${messagesPerSection.length}`,\n )\n }\n const messages = messagesPerSection[0]\n\n const args = pluginGlobals.popFileArgs(filename)\n if (args.disable) {\n return messages\n }\n\n const seatbeltFile = pluginGlobals.getSeatbeltFile(args.seatbeltFile)\n if (args.threadsafe || !pluginGlobals.isEslintCli()) {\n seatbeltFile.readSync()\n }\n const ruleToErrorCount = countRuleIds(messages)\n const verboseOnce = args.verbose ? createOnce<RuleId>() : () => false\n try {\n const transformed = transformMessages(\n args,\n seatbeltFile,\n filename,\n messages,\n ruleToErrorCount,\n verboseOnce,\n )\n\n try {\n // Ideally we could find a way to batch writes until all linting is finished, but I haven't found a\n // good way to schedule our code to run after all files but before\n // ESLint returns to its caller or exits.\n const additionalMessages = maybeWriteStateUpdate(\n args,\n seatbeltFile,\n filename,\n ruleToErrorCount,\n )\n\n if (additionalMessages) {\n return transformed.concat(additionalMessages)\n } else {\n return transformed\n }\n } catch (e) {\n return [...transformed, handleProcessingError(filename, e)]\n }\n } catch (e) {\n return [...messages, handleProcessingError(filename, e)]\n }\n },\n}\n\nfunction createOnce<T>(): (value: T) => boolean {\n const seen = new Set<T>()\n return (value: T) => {\n if (seen.has(value)) {\n return false\n }\n seen.add(value)\n return true\n }\n}\n\nfunction transformMessages(\n args: SeatbeltArgs,\n seatbeltFile: SeatbeltFile,\n filename: string,\n messages: Linter.LintMessage[],\n ruleToErrorCount: Map<RuleId, number>,\n verboseOnce: (ruleId: RuleId) => boolean,\n) {\n if (args.disable) {\n return messages\n }\n\n const ruleToMaxErrorCount = seatbeltFile.getMaxErrors(filename)\n const allowIncrease =\n args.allowIncreaseRules === \"all\" || args.allowIncreaseRules.size > 0\n if (!ruleToMaxErrorCount && !allowIncrease) {\n // We have no state related to this file, so no need to consider it.\n return messages\n }\n\n return messages.map((message) => {\n if (message.ruleId === null) {\n SeatbeltArgs.verboseLog(\n args,\n () =>\n `${formatFilename(filename)}:${message.line}:${message.column}: cannot transform message with null ruleId`,\n )\n return message\n }\n\n if (!isCountableLintError(message)) {\n return message\n }\n\n const errorCount = ruleToErrorCount.get(message.ruleId)\n if (errorCount === undefined) {\n throw new Error(\n `${name} bug: errorCount not found for rule ${message.ruleId}`,\n )\n }\n\n const maxErrorCount = ruleToMaxErrorCount?.get(message.ruleId) ?? 0\n const allowIncrease = SeatbeltArgs.ruleSetHas(\n args.allowIncreaseRules,\n message.ruleId,\n )\n if (maxErrorCount === 0 && !allowIncrease) {\n // Rule not controlled by seatbelt, just pass it through unchanged.\n return message\n } else if (errorCount > maxErrorCount) {\n if (allowIncrease) {\n // Rule is allowed to increase from 0 -> any, so it should become a warning.\n return messageOverMaxErrorCountButIncreaseAllowed(\n message,\n errorCount,\n maxErrorCount,\n )\n }\n\n // Rule controlled by seatbelt, but too many errorCount:\n // keep the message as an error, but add a notice about seatbelt\n // violation count\n if (verboseOnce(message.ruleId)) {\n SeatbeltArgs.verboseLog(\n args,\n () =>\n `${formatFilename(filename)}: ${formatRuleId(message.ruleId)}: error: ${errorCount} ${pluralErrors(errorCount)} found > max ${maxErrorCount}`,\n )\n }\n return messageOverMaxErrorCount(message, errorCount, maxErrorCount)\n } else if (errorCount === maxErrorCount) {\n // For rules under the limit, turn errors into warnings.\n // Add an appropriate notice about seatbelt violation status.\n if (verboseOnce(message.ruleId)) {\n SeatbeltArgs.verboseLog(\n args,\n () =>\n `${formatFilename(filename)}: ${formatRuleId(message.ruleId)}: ok: ${errorCount} ${pluralErrors(errorCount)} found == max ${maxErrorCount}`,\n )\n }\n\n return messageAtMaxErrorCount(message, errorCount)\n } else {\n if (args.frozen) {\n // We're frozen, so it's actually an error to decrease the error count.\n return messageFrozenUnderMaxErrorCount(\n message,\n filename,\n errorCount,\n maxErrorCount,\n )\n }\n // Can tighten the seatbelt.\n return messageUnderMaxErrorCount(message, errorCount, maxErrorCount)\n }\n })\n}\n\nfunction isCountableLintError(\n message: Linter.LintMessage | Linter.SuppressedLintMessage,\n): message is Linter.LintMessage & { ruleId: string } {\n if (!message.severity || message.severity < 2) {\n return false\n }\n\n if (\n (\"suppressions\" satisfies keyof Linter.SuppressedLintMessage) in message &&\n message.suppressions.length > 0\n ) {\n return false\n }\n\n if (!message.ruleId) {\n return false\n }\n\n return true\n}\n\nfunction countRuleIds(messages: Linter.LintMessage[]): Map<RuleId, number> {\n const ruleToErrorCount = new Map<RuleId, number>()\n messages.forEach((message) => {\n if (!isCountableLintError(message)) {\n return\n }\n ruleToErrorCount.set(\n message.ruleId,\n (ruleToErrorCount.get(message.ruleId) ?? 0) + 1,\n )\n })\n return ruleToErrorCount\n}\n\nfunction maybeWriteStateUpdate(\n args: SeatbeltArgs,\n stateFile: SeatbeltFile,\n filename: string,\n ruleToErrorCount: Map<RuleId, number>,\n): Linter.LintMessage[] | undefined {\n if (args.disable) {\n return\n }\n if (args.threadsafe) {\n // TODO: Implement locking\n // For now just refresh the file.\n stateFile.readSync()\n }\n\n const ruleToMaxErrorCount = stateFile.getMaxErrors(filename)\n const { removedRules } = stateFile.updateMaxErrors(\n filename,\n args,\n ruleToErrorCount,\n )\n if (!args.frozen) {\n stateFile.flushChanges()\n } else if (removedRules && removedRules.size > 0) {\n // We didn't actually update the state file in this case.\n // We need to add an original error message about the inconsistent state.\n return Array.from(removedRules).map((ruleId) => {\n const maxErrorCount = ruleToMaxErrorCount?.get(ruleId)\n if (maxErrorCount === undefined) {\n throw new Error(\n `${name} bug: maxErrorCount not found for removed frozen rule ${ruleId}`,\n )\n }\n const message: Linter.LintMessage = {\n ruleId,\n column: 0,\n line: 1,\n severity: 2,\n message: messageFrozenUnderMaxErrorCountText(\n filename,\n 0,\n maxErrorCount,\n ),\n }\n return message\n })\n }\n}\n\nfunction messageOverMaxErrorCount(\n message: Linter.LintMessage,\n errorCount: number,\n maxErrorCount: number,\n): Linter.LintMessage {\n return {\n ...message,\n message: `${message.message}\n[${name}]: There are ${errorCount} ${pluralErrors(errorCount)} of this type, but only ${maxErrorCount} are allowed.\nRemove ${errorCount - maxErrorCount} to turn these errors into warnings.\n `.trim(),\n }\n}\n\nfunction messageOverMaxErrorCountButIncreaseAllowed(\n message: Linter.LintMessage,\n errorCount: number,\n maxErrorCount: number,\n): Linter.LintMessage {\n const increaseCount = errorCount - maxErrorCount\n\n return {\n ...message,\n severity: 1,\n message: `${message.message}\n[${name}]: ${SEATBELT_INCREASE}: Temporarily allowing ${increaseCount} new ${pluralErrors(increaseCount)} of this type.\n `.trim(),\n }\n}\n\nfunction messageAtMaxErrorCount(\n message: Linter.LintMessage,\n errorCount: number,\n): Linter.LintMessage {\n return {\n ...message,\n severity: 1,\n message: `${message.message}\n[${name}]: This file is temporarily allowed to have ${errorCount} ${pluralErrors(errorCount)} of this type.\nPlease tend the garden by fixing if you have the time.\n `.trim(),\n }\n}\n\nfunction messageUnderMaxErrorCount(\n message: Linter.LintMessage,\n errorCount: number,\n maxErrorCount: number,\n): Linter.LintMessage {\n const fixed = errorCount - maxErrorCount\n const fixedMessage = fixed === 1 ? \"one\" : `${fixed} errors`\n return {\n ...message,\n severity: 1,\n message: `${message.message}\n[${name}]: This file is temporarily allowed to have ${maxErrorCount} ${pluralErrors(maxErrorCount)} of this type.\nThank you for fixing ${fixedMessage}, it really helps.\n `.trim(),\n }\n}\n\nfunction messageFrozenUnderMaxErrorCountText(\n seatbeltFilename: string,\n errorCount: number,\n maxErrorCount: number,\n) {\n const fixed = errorCount - maxErrorCount\n const fixedMessage = fixed === 1 ? \"error\" : \"errors\"\n return `\n[${name}]: ${SEATBELT_FROZEN}: Expected ${maxErrorCount} ${pluralErrors(maxErrorCount)}, found ${errorCount}.\nIf you fixed ${fixed} ${fixedMessage}, thank you, but you'll need to update the seatbelt file to match.\nTry running eslint, then committing ${seatbeltFilename}.\n`.trim()\n}\n\nfunction messageFrozenUnderMaxErrorCount(\n message: Linter.LintMessage,\n seatbeltFilename: string,\n errorCount: number,\n maxErrorCount: number,\n): Linter.LintMessage {\n return {\n ...message,\n severity: 1,\n message: `${message.message}\\n${messageFrozenUnderMaxErrorCountText(seatbeltFilename, errorCount, maxErrorCount)}`,\n }\n}\n\nconst alreadyModifiedError = new WeakSet<Error>()\n\nfunction handleProcessingError(\n filename: string,\n e: unknown,\n): Linter.LintMessage {\n if (e instanceof Error && !alreadyModifiedError.has(e)) {\n alreadyModifiedError.add(e)\n appendErrorContext(e, `while processing \\`${filename}\\``)\n appendErrorContext(\n e,\n `this may be a bug in ${name}@${version} or a problem with your setup`,\n )\n }\n throw e\n}\n\nfunction pluralErrors(count: number) {\n return count === 1 ? \"error\" : \"errors\"\n}\n","import type { Rule } from \"eslint\"\nimport { SeatbeltConfigSchema } from \"../jsonSchema/SeatbeltConfigSchema\"\nimport { name } from \"../../package.json\"\nimport { SeatbeltConfig } from \"../SeatbeltConfig\"\nimport * as pluginGlobals from \"../pluginGlobals\"\n\n/**\n * This rule is required to capture the `seatbelt` configuration from the ESLint\n * config.\n */\nexport const configure: Rule.RuleModule = {\n meta: {\n docs: {\n description: `Applies ${name} configuration from ESLint config`,\n url: `https://github.com/justjake/${name}`,\n },\n schema: [SeatbeltConfigSchema],\n },\n create(context) {\n const filename = context.getFilename?.() ?? context.filename\n pluginGlobals.onConfigureRule(filename)\n\n const eslintSharedConfigViaShortName = context.settings?.seatbelt as\n | SeatbeltConfig\n | undefined\n const eslintSharedConfigViaPackageName = context.settings?.[name] as\n | SeatbeltConfig\n | undefined\n const eslintSharedConfig =\n eslintSharedConfigViaShortName ?? eslintSharedConfigViaPackageName\n const fileOverrideConfig = context.options[0] as SeatbeltConfig | undefined\n const args = pluginGlobals.ruleOverrideConfigToArgs(\n eslintSharedConfig,\n fileOverrideConfig,\n )\n pluginGlobals.pushFileArgs(filename, args)\n\n // No linting happening here.\n return {}\n },\n}\n","import type { ESLint, Linter } from \"eslint\"\nimport packageJson from \"../package.json\"\nimport { SeatbeltProcessor } from \"./SeatbeltProcessor\"\nimport { configure } from \"./rules/configure\"\nconst { name, version } = packageJson\n\n/**\n * See the package README for usage instructions.\n * https://github.com/justjake/eslint-seatbelt#readme\n */\nconst plugin = {\n meta: {\n name,\n version,\n },\n /**\n * https://eslint.org/docs/latest/extend/custom-processors\n */\n processors: {\n seatbelt: SeatbeltProcessor,\n },\n rules: {\n configure,\n },\n /**\n *\n */\n configs: {\n /**\n * Config preset for ESLint 9 and above.\n *\n * Usage:\n *\n * ```\n * // eslint.config.js\n * module.exports = [\n * require(\"eslint-seatbelt\").configs.enable,\n * // ... your configs\n * ]\n */\n enable: undefined as any as ReturnType<typeof createESLint9Config>,\n /**\n * Config preset for ESLint 8 and below.\n *\n * Usage:\n *\n * ```\n * // eslintrc.js\n * module.exports = {\n * plugins: [\"eslint-seatbelt\"],\n * extends: [\"plugin:eslint-seatbelt/enable-legacy\"],\n * // ... your configs\n * }\n * ```\n *\n * https://eslint.org/docs/latest/use/configure/configuration-files-deprecated#using-a-configuration-from-a-plugin\n */\n \"enable-legacy\": undefined as any as ReturnType<typeof createLegacyConfig>,\n },\n} satisfies ESLint.Plugin & ESLint.Plugin\n\nplugin.configs.enable = createESLint9Config()\nplugin.configs[\"enable-legacy\"] = createLegacyConfig()\n\nfunction createESLint9Config() {\n const ownPlugin: ESLint.Plugin = plugin\n return {\n name: `${name}/enable`,\n plugins: {\n [name]: ownPlugin,\n },\n rules: {\n [`${name}/configure`]: \"error\",\n },\n processor: `${name}/seatbelt`,\n } satisfies Linter.Config\n}\n\nfunction createLegacyConfig() {\n return {\n plugins: [name],\n rules: {\n [`${name}/configure`]: \"error\",\n },\n processor: `${name}/seatbelt`,\n } satisfies Linter.LegacyConfig\n}\n\nexport default plugin\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAkBA,IAAI,sBAAsB;AAC1B,IAAI;AACJ,IAAM,yBAAyB,oBAAI,IAAY;AAC/C,IAAM,WAAW,oBAAI,IAAkB;AAEvC,IAAM,eAA+B,CAAC;AACtC,IAAM,YAAY,oBAAI,QAAsC;AAC5D,IAAM,oBAAoB,oBAAI,IAA0B;AACxD,IAAM,oBAAoB,oBAAI,QAG5B;AAEF,IAAI;AACJ,IAAI;AACJ,IAAI,gBAAgB;AACpB,IAAI;AACJ,IAAM,oBAAoB,oBAAI,IAA0B;AAExD,SAAS,8BAA8C;AACrD,MAAI,CAAC,mBAAmB;AACtB,wBAAoB,eAAe;AAAA,MACjC,QAAQ;AAAA,IACV;AACA,oBAAgB,OAAO,KAAK,iBAAiB,EAAE,SAAS;AAAA,EAC1D;AACA,SAAO;AACT;AAEA,SAAS,8BAAqD;AAC5D,MAAI,CAAC,mBAAmB;AACtB,wBAAoB,eAAe;AAAA,MACjC,QAAQ;AAAA,IACV;AACA,4BAAwB,kBAAkB,WAAW;AACrD,oBAAgB,OAAO,KAAK,iBAAiB,EAAE,SAAS;AAAA,EAC1D;AACA,SAAO;AACT;AAEO,SAAS,yBACd,gBACA,oBACc;AACd,MAAI,kBAAkB,oBAAoB;AACxC,QAAI,yBAAyB,kBAAkB,IAAI,cAAc;AACjE,QAAI,CAAC,wBAAwB;AAC3B,+BAAyB,oBAAI,QAAQ;AACrC,wBAAkB,IAAI,gBAAgB,sBAAsB;AAAA,IAC9D;AACA,QAAI,eAAe,uBAAuB,IAAI,kBAAkB;AAChE,QAAI,CAAC,cAAc;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