@borela-tech/eslint-config 2.3.0 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +327 -52
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -8
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../src/rules/shared/getLineIndent.ts","../src/rules/arrayItemsLineBreak/buildMultilineFix.ts","../src/rules/arrayItemsLineBreak/defaultOptions.ts","../src/rules/arrayItemsLineBreak/getBrackets.ts","../src/rules/shared/getLineLength.ts","../src/rules/arrayItemsLineBreak/checkArray.ts","../src/rules/arrayItemsLineBreak/messageIds.ts","../src/rules/arrayItemsLineBreak/index.ts","../src/rules/braceStyleControlStatements/getIndentation.ts","../src/rules/braceStyleControlStatements/createBraceStyleFix.ts","../src/rules/braceStyleControlStatements/isOnSameLineAsCondition.ts","../src/rules/braceStyleControlStatements/isSingleLineStatement.ts","../src/rules/braceStyleControlStatements/reportBodyOnSameLineAsCondition.ts","../src/rules/braceStyleControlStatements/checkDoWhileStatementBraceStyle.ts","../src/rules/braceStyleControlStatements/checkForStatementBraceStyle.ts","../src/rules/braceStyleControlStatements/checkIfStatementBraceStyle.ts","../src/rules/braceStyleControlStatements/checkWhileStatementBraceStyle.ts","../src/rules/braceStyleControlStatements/index.ts","../src/rules/braceStyleObjectLiteral/checkClosingBrace.ts","../src/rules/braceStyleObjectLiteral/checkNestedObjects.ts","../src/rules/braceStyleObjectLiteral/checkOpeningBrace.ts","../src/rules/braceStyleObjectLiteral/checkPropertyOnOwnLine.ts","../src/rules/braceStyleObjectLiteral/checkObjectExpression.ts","../src/rules/braceStyleObjectLiteral/messageIds.ts","../src/rules/braceStyleObjectLiteral/index.ts","../src/rules/compactArrayItems/buildCompactFix.ts","../src/rules/compactArrayItems/findBracketByRange.ts","../src/rules/compactArrayItems/findClosingBracketByRange.ts","../src/rules/compactArrayItems/hasElements.ts","../src/rules/compactArrayItems/hasMultilineItems.ts","../src/rules/compactArrayItems/isBracketOnOwnLine.ts","../src/rules/compactArrayItems/messageIds.ts","../src/rules/compactArrayItems/index.ts","../src/rules/exportFilenameMatch/getNameFromDeclaration.ts","../src/rules/exportFilenameMatch/getNamesFromSpecifiers.ts","../src/rules/exportFilenameMatch/getExportedNames.ts","../src/rules/shared/stripExtension.ts","../src/rules/shared/isExempt.ts","../src/rules/exportFilenameMatch/messageIds.ts","../src/rules/exportFilenameMatch/index.ts","../src/rules/shared/findLinesWithMultipleNodes.ts","../src/rules/functionCallArgumentLineBreak/formatArgs.ts","../src/rules/shared/getLineStartIndex.ts","../src/rules/functionCallArgumentLineBreak/checkMultilineArgs.ts","../src/rules/functionCallArgumentLineBreak/checkSingleLineArgs.ts","../src/rules/functionCallArgumentLineBreak/defaultOptions.ts","../src/rules/shared/getParens.ts","../src/rules/shared/isValidParens.ts","../src/rules/functionCallArgumentLineBreak/checkCall.ts","../src/rules/functionCallArgumentLineBreak/messageIds.ts","../src/rules/functionCallArgumentLineBreak/index.ts","../src/rules/functionCognitiveComplexity/isNodeWithType.ts","../src/rules/functionCognitiveComplexity/getChildNodes.ts","../src/rules/functionCognitiveComplexity/isIncrementableControlFlow.ts","../src/rules/functionCognitiveComplexity/traverse.ts","../src/rules/functionCognitiveComplexity/calculateCognitiveComplexity.ts","../src/rules/functionCognitiveComplexity/getNameFromCallExpression.ts","../src/rules/functionCognitiveComplexity/getNameFromProperty.ts","../src/rules/functionCognitiveComplexity/getNameFromVariableDeclarator.ts","../src/rules/functionCognitiveComplexity/getArrowFunctionExpressionName.ts","../src/rules/functionCognitiveComplexity/getNameFromMethodDefinition.ts","../src/rules/functionCognitiveComplexity/getFunctionExpressionName.ts","../src/rules/functionCognitiveComplexity/getFunctionName.ts","../src/rules/functionCognitiveComplexity/messageIds.ts","../src/rules/functionCognitiveComplexity/index.ts","../src/rules/functionParameterLineBreak/formatParams.ts","../src/rules/functionParameterLineBreak/checkMultilineParams.ts","../src/rules/functionParameterLineBreak/checkSingleLineParams.ts","../src/rules/functionParameterLineBreak/defaultOptions.ts","../src/rules/functionParameterLineBreak/checkFunction.ts","../src/rules/functionParameterLineBreak/messageIds.ts","../src/rules/functionParameterLineBreak/index.ts","../src/rules/importsAndReExportsAtTop/getStatementType.ts","../src/rules/importsAndReExportsAtTop/isImportDeclaration.ts","../src/rules/importsAndReExportsAtTop/isReExport.ts","../src/rules/importsAndReExportsAtTop/categorizeStatements.ts","../src/rules/importsAndReExportsAtTop/findStatementIndices.ts","../src/rules/importsAndReExportsAtTop/generateSortedText.ts","../src/rules/importsAndReExportsAtTop/hasImportOrderViolation.ts","../src/rules/importsAndReExportsAtTop/index.ts","../src/rules/individualImports/index.ts","../src/rules/individualReExports/index.ts","../src/rules/interfacePropertyLineBreak/formatTypeLiteral.ts","../src/rules/interfacePropertyLineBreak/checkMultilineMembers.ts","../src/rules/interfacePropertyLineBreak/checkSingleLineMembers.ts","../src/rules/interfacePropertyLineBreak/defaultOptions.ts","../src/rules/interfacePropertyLineBreak/getBraces.ts","../src/rules/interfacePropertyLineBreak/checkInterface.ts","../src/rules/interfacePropertyLineBreak/messageIds.ts","../src/rules/interfacePropertyLineBreak/index.ts","../src/rules/maxDeclarationsPerFile/collectVariableDeclarators.ts","../src/rules/maxDeclarationsPerFile/isTopLevel.ts","../src/rules/maxDeclarationsPerFile/handleClassDeclaration.ts","../src/rules/maxDeclarationsPerFile/handleFunctionDeclaration.ts","../src/rules/maxDeclarationsPerFile/handleTSDeclareFunction.ts","../src/rules/maxDeclarationsPerFile/handleTSEnumDeclaration.ts","../src/rules/maxDeclarationsPerFile/handleTSInterfaceDeclaration.ts","../src/rules/maxDeclarationsPerFile/handleTSTypeAliasDeclaration.ts","../src/rules/maxDeclarationsPerFile/isExempt.ts","../src/rules/maxDeclarationsPerFile/isExportedDeclaration.ts","../src/rules/maxDeclarationsPerFile/messageIds.ts","../src/rules/maxDeclarationsPerFile/index.ts","../src/rules/multilineUnionTypeAliases/createFix.ts","../src/rules/multilineUnionTypeAliases/isMultiline.ts","../src/rules/multilineUnionTypeAliases/index.ts","../src/rules/noInlineObjectTypes/checkTypeParameters.ts","../src/rules/noInlineObjectTypes/checkUnionOrIntersectionTypes.ts","../src/rules/noInlineObjectTypes/isInlineObjectType.ts","../src/rules/noInlineObjectTypes/containsInlineObjectType.ts","../src/rules/noInlineObjectTypes/toPascalCase.ts","../src/rules/noInlineObjectTypes/getInlineTypeName.ts","../src/rules/noInlineObjectTypes/getParameterNameFromFunction.ts","../src/rules/noInlineObjectTypes/getParameterNameFromIdentifier.ts","../src/rules/noInlineObjectTypes/getParameterNameFromObjectPattern.ts","../src/rules/noInlineObjectTypes/getTopLevelDeclaration.ts","../src/rules/noInlineObjectTypes/handleInlineType.ts","../src/rules/noInlineObjectTypes/isIdentifierInFunction.ts","../src/rules/noInlineObjectTypes/isPropertySignatureInTypeLiteral.ts","../src/rules/noInlineObjectTypes/traverseUpForTypeLiteral.ts","../src/rules/noInlineObjectTypes/isNestedTypeAnnotation.ts","../src/rules/noInlineObjectTypes/prepareFix.ts","../src/rules/noInlineObjectTypes/index.ts","../src/rules/noUnnecessaryBraces/getLineIndent.ts","../src/rules/noUnnecessaryBraces/getReplacementText.ts","../src/rules/noUnnecessaryBraces/isSingleLineStatement.ts","../src/rules/noUnnecessaryBraces/checkBlockStatement.ts","../src/rules/shared/detectIndentStep.ts","../src/rules/shared/reindentText.ts","../src/rules/noUnnecessaryBraces/checkNonBlockStatement.ts","../src/rules/noUnnecessaryBraces/checkDoWhileStatement.ts","../src/rules/noUnnecessaryBraces/checkForInStatement.ts","../src/rules/noUnnecessaryBraces/checkForOfStatement.ts","../src/rules/noUnnecessaryBraces/checkForStatement.ts","../src/rules/noUnnecessaryBraces/checkIfStatement.ts","../src/rules/noUnnecessaryBraces/checkWhileStatement.ts","../src/rules/noUnnecessaryBraces/index.ts","../src/rules/objectPropertyLineBreak/isShorthandProperty.ts","../src/rules/objectPropertyLineBreak/areAllShorthand.ts","../src/rules/objectPropertyLineBreak/getPropertyText.ts","../src/rules/objectPropertyLineBreak/getInlineObjectLength.ts","../src/rules/objectPropertyLineBreak/checkMultiline.ts","../src/rules/objectPropertyLineBreak/buildMultilineFix.ts","../src/rules/objectPropertyLineBreak/getPropertyName.ts","../src/rules/objectPropertyLineBreak/buildShorthandFix.ts","../src/rules/objectPropertyLineBreak/canConvertToShorthand.ts","../src/rules/objectPropertyLineBreak/shouldCollapseToShorthand.ts","../src/rules/objectPropertyLineBreak/checkSingleLine.ts","../src/rules/objectPropertyLineBreak/defaultOptions.ts","../src/rules/objectPropertyLineBreak/getBraces.ts","../src/rules/objectPropertyLineBreak/checkObject.ts","../src/rules/objectPropertyLineBreak/messageIds.ts","../src/rules/objectPropertyLineBreak/index.ts","../src/rules/oneExportPerFile/messageIds.ts","../src/rules/oneExportPerFile/index.ts","../src/rules/preferInlineExport/isValidExportSpecifier.ts","../src/rules/preferInlineExport/canInlineSpecifiers.ts","../src/rules/preferInlineExport/getDeclarationName.ts","../src/rules/preferInlineExport/isExportableDeclaration.ts","../src/rules/preferInlineExport/index.ts","../src/rules/singleLineArrowFunctionParameters/buildCollapsedParams.ts","../src/rules/singleLineArrowFunctionParameters/calculateCollapsedLength.ts","../src/rules/singleLineArrowFunctionParameters/defaultOptions.ts","../src/rules/singleLineArrowFunctionParameters/getArrowFunctionParens.ts","../src/rules/singleLineArrowFunctionParameters/isShorthand.ts","../src/rules/singleLineArrowFunctionParameters/reportViolation.ts","../src/rules/singleLineArrowFunctionParameters/checkArrowFunction.ts","../src/rules/singleLineArrowFunctionParameters/messageIds.ts","../src/rules/singleLineArrowFunctionParameters/index.ts","../src/rules/singleLineFunctionParameters/defaultOptions.ts","../src/rules/singleLineFunctionParameters/getParens.ts","../src/rules/singleLineFunctionParameters/checkFunction.ts","../src/rules/singleLineFunctionParameters/messageIds.ts","../src/rules/singleLineFunctionParameters/index.ts","../src/rules/singleLineImports/formatAttributes.ts","../src/rules/singleLineImports/formatNamed.ts","../src/rules/singleLineImports/formatSpecifiers.ts","../src/rules/singleLineImports/createImportFix.ts","../src/rules/singleLineImports/isMultilineImport.ts","../src/rules/singleLineImports/index.ts","../src/rules/singleLineReExports/createReExportFix.ts","../src/rules/singleLineReExports/isMultilineReExport.ts","../src/rules/singleLineReExports/index.ts","../src/rules/sortedImports/categorizeImport.ts","../src/rules/sortedImports/getImportSortKey.ts","../src/rules/sortedImports/categorizeImports.ts","../src/lib/compare.ts","../src/rules/sortedImports/importGroupOrder.ts","../src/rules/sortedImports/checkAlphabeticalSorting.ts","../src/rules/sortedImports/checkGroupOrdering.ts","../src/rules/sortedImports/getImportSpecifierName.ts","../src/rules/sortedImports/areSpecifiersSorted.ts","../src/rules/sortedImports/getImportNamedSpecifiers.ts","../src/rules/sortedImports/checkSpecifiersSorting.ts","../src/rules/sortedImports/sortImportSpecifiersText.ts","../src/rules/sortedImports/createFix/formatNamedImportSpecifiers.ts","../src/rules/sortedImports/createFix/buildSortedImportCode.ts","../src/rules/sortedImports/createFix/groupImportsByType.ts","../src/rules/sortedImports/createFix/sortImportGroups.ts","../src/rules/sortedImports/createFix/createFixForGroup.ts","../src/rules/sortedImports/createFix/index.ts","../src/rules/sortedImports/getImportGroups.ts","../src/rules/sortedImports/index.ts","../src/rules/sortedReExports/categorizeReExport.ts","../src/rules/sortedReExports/getReExportSortKey.ts","../src/rules/sortedReExports/categorizeReExports.ts","../src/rules/sortedReExports/reExportGroupOrder.ts","../src/rules/sortedReExports/checkAlphabeticalSorting.ts","../src/rules/sortedReExports/checkGroupOrdering.ts","../src/rules/sortedReExports/getSpecifierName.ts","../src/rules/sortedReExports/areSpecifiersSorted.ts","../src/rules/sortedReExports/getReExportNamedSpecifiers.ts","../src/rules/sortedReExports/isNamedReExport.ts","../src/rules/sortedReExports/checkSpecifiersSorting.ts","../src/rules/sortedReExports/sortSpecifiersText.ts","../src/rules/sortedReExports/createFix/formatNamedReExportSpecifiers.ts","../src/rules/sortedReExports/createFix/buildSortedReExportCode.ts","../src/rules/sortedReExports/createFix/groupReExportsByType.ts","../src/rules/sortedReExports/createFix/sortExportGroups.ts","../src/rules/sortedReExports/createFix/createFixForGroup.ts","../src/rules/sortedReExports/createFix/index.ts","../src/rules/sortedReExports/isReExportDeclaration.ts","../src/rules/sortedReExports/getReExportGroups.ts","../src/rules/sortedReExports/index.ts","../src/main/customRules.ts","../src/main/generalRules.ts","../src/main/ignores.ts","../src/main/languageOptions.ts","../src/main/perfectionistRules.ts","../src/main/reactHooks.ts","../src/main/stylisticRules.ts","../src/main/typescriptRules.ts","../node_modules/globals/index.js","../src/main/unicornRules.ts","../src/index.ts"],"sourcesContent":["import type {TSESLint} from '@typescript-eslint/utils'\n\nexport function getLineIndent(\n sourceCode: TSESLint.SourceCode,\n line: number,\n): string {\n const text = sourceCode.getText()\n const lines = text.split('\\n')\n const lineText = lines[line - 1] ?? ''\n const match = lineText.match(/^(\\s*)/)\n return match?.[1] ?? ''\n}\n","import {getLineIndent} from '../shared/getLineIndent'\nimport type {Brackets} from './Brackets'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function buildMultilineFix(\n fixer: TSESLint.RuleFixer,\n brackets: Brackets,\n elements: (null | TSESTree.Node)[],\n sourceCode: TSESLint.SourceCode,\n): TSESLint.RuleFix {\n const openingLine = brackets.openingBracket.loc.start.line\n const baseIndent = getLineIndent(sourceCode, openingLine)\n const itemIndent = baseIndent + ' '\n\n const nonNullElements = elements\n .filter((el): el is TSESTree.Node => el !== null)\n\n const formattedItems = nonNullElements\n .map(element => {\n const text = sourceCode.getText(element)\n return `${itemIndent}${text}`\n })\n .join(',\\n')\n\n const newText = `\\n${formattedItems},\\n${baseIndent}`\n\n return fixer.replaceTextRange(\n [brackets.openingBracket.range[1], brackets.closingBracket.range[0]],\n newText,\n )\n}\n","import type {Options} from './Options'\n\nexport const defaultOptions: Options = {\n maxLength: 80,\n}\n","import type {Brackets} from './Brackets'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function getBrackets(\n sourceCode: TSESLint.SourceCode,\n node: TSESTree.ArrayExpression,\n): Brackets | null {\n const elements = node.elements\n if (elements.length === 0)\n return null\n\n // Find the first non-null element\n const firstElement = elements.find(el => el !== null)\n if (!firstElement)\n return null\n\n // Find the last non-null element\n const lastElement = [...elements].reverse().find(el => el !== null)\n if (!lastElement)\n return null\n\n const openingBracket = sourceCode.getTokenBefore(firstElement)\n const closingBracket = sourceCode.getTokenAfter(lastElement)\n\n if (!openingBracket || !closingBracket)\n return null\n\n if (openingBracket.value !== '[' || closingBracket.value !== ']')\n return null\n\n return {closingBracket, openingBracket}\n}\n","import type {TSESLint} from '@typescript-eslint/utils'\n\nexport function getLineLength(\n sourceCode: TSESLint.SourceCode,\n lineNumber: number,\n): number {\n const line = sourceCode.getLines()[lineNumber - 1]\n return line?.length ?? 0\n}\n","import {buildMultilineFix} from './buildMultilineFix'\nimport {defaultOptions} from './defaultOptions'\nimport {getBrackets} from './getBrackets'\nimport {getLineLength} from '../shared/getLineLength'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function checkArray(\n sourceCode: TSESLint.SourceCode,\n context: TSESLint.RuleContext<MessageId, [Options]>,\n node: TSESTree.ArrayExpression,\n): void {\n const options = context.options[0] as Options ?? {}\n const maxLength = options.maxLength ?? defaultOptions.maxLength!\n\n const elements = node.elements\n\n // Ignore empty arrays and single-element arrays\n if (elements.length <= 1)\n return\n\n const brackets = getBrackets(sourceCode, node)\n if (!brackets)\n return\n\n const firstLine = brackets.openingBracket.loc.start.line\n const lastLine = brackets.closingBracket.loc.end.line\n\n // Only check single-line arrays\n if (firstLine !== lastLine)\n return\n\n // Check if line length exceeds maxLength\n const lineLength = getLineLength(sourceCode, firstLine)\n if (lineLength <= maxLength)\n return\n\n // Report and fix\n context.report({\n fix: fixer => buildMultilineFix(\n fixer,\n brackets,\n elements,\n sourceCode,\n ),\n messageId: 'arrayItemsOnNewLine',\n node: elements[0]!,\n })\n}\n","export const messageIds = {\n arrayItemsOnNewLine: 'arrayItemsOnNewLine',\n} as const\n","import {checkArray} from './checkArray'\nimport {messageIds} from './messageIds'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {TSESLint} from '@typescript-eslint/utils'\n\nexport const arrayItemsLineBreak: TSESLint.RuleModule<MessageId, [Options]> = {\n create(context) {\n const sourceCode = context.sourceCode ?? context.getSourceCode()\n\n return {\n ArrayExpression(node): void {\n checkArray(sourceCode, context, node)\n },\n }\n },\n\n meta: {\n docs: {\n description: 'Enforce each array item to be on its own line when the array expression exceeds a configurable maximum line length.',\n },\n fixable: 'code',\n messages: messageIds,\n schema: [{\n additionalProperties: false,\n properties: {\n maxLength: {\n type: 'number',\n },\n },\n type: 'object',\n }],\n type: 'layout',\n },\n}\n","import type {SourceCode} from './SourceCode'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function getIndentation(\n node: TSESTree.Statement,\n sourceCode: SourceCode,\n): string {\n const tokenBeforeBody = sourceCode.getTokenBefore(node)\n if (!tokenBeforeBody)\n return ''\n\n const line = sourceCode\n .getText()\n .split('\\n')[tokenBeforeBody.loc.start.line - 1]\n\n if (!line)\n return ''\n\n const match = line.match(/^(\\s*)/)\n return match?.[1] ?? ''\n}\n","import {getIndentation} from './getIndentation'\nimport type {SourceCode} from './SourceCode'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function createBraceStyleFix(\n fixer: TSESLint.RuleFixer,\n body: TSESTree.Statement,\n sourceCode: SourceCode,\n): null | TSESLint.RuleFix {\n if (body.type === 'BlockStatement') {\n const firstToken = sourceCode.getFirstToken(body)\n if (!firstToken)\n return null\n\n return fixer.insertTextBefore(firstToken, '\\n')\n }\n\n const bodyText = sourceCode.getText(body)\n const indentation = getIndentation(body, sourceCode)\n const fixedText = `{\\n${indentation} ${bodyText}\\n${indentation}}`\n\n return fixer.replaceText(body, fixedText)\n}\n","import type {SourceCode} from './SourceCode'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function isOnSameLineAsCondition(\n node: TSESTree.Statement,\n sourceCode: SourceCode,\n): boolean {\n const tokenBeforeBody = sourceCode.getTokenBefore(node)\n if (!tokenBeforeBody)\n return false\n\n const firstToken = sourceCode.getFirstToken(node)\n if (!firstToken)\n return false\n\n return tokenBeforeBody.loc.end.line === firstToken.loc.start.line\n}\n","import type {SourceCode} from './SourceCode'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function isSingleLineStatement(\n node: TSESTree.Statement,\n sourceCode: SourceCode,\n): boolean {\n const firstToken = sourceCode.getFirstToken(node)\n if (!firstToken)\n return false\n\n const lastToken = sourceCode.getLastToken(node)\n if (!lastToken)\n return false\n\n return firstToken.loc.start.line === lastToken.loc.end.line\n}\n","import {createBraceStyleFix} from './createBraceStyleFix'\nimport {isOnSameLineAsCondition} from './isOnSameLineAsCondition'\nimport {isSingleLineStatement} from './isSingleLineStatement'\nimport type {RuleContext} from './RuleContext'\nimport type {SourceCode} from './SourceCode'\nimport type {StatementBody} from './StatementBody'\n\nexport function reportBodyOnSameLineAsCondition(\n context: RuleContext,\n body: StatementBody,\n): void {\n const sourceCode = context.sourceCode as SourceCode\n\n if (body.type !== 'BlockStatement') {\n if (isOnSameLineAsCondition(body, sourceCode)) {\n context.report({\n fix: fixer => createBraceStyleFix(fixer, body, sourceCode),\n messageId: 'singleLine',\n node: body,\n })\n }\n } else {\n const isOnSameLine = isOnSameLineAsCondition(body, sourceCode)\n const isSingleLine = isSingleLineStatement(body, sourceCode)\n\n if (isOnSameLine && isSingleLine) {\n context.report({\n fix: fixer => createBraceStyleFix(fixer, body, sourceCode),\n messageId: 'singleLine',\n node: body,\n })\n }\n }\n}\n","import {reportBodyOnSameLineAsCondition} from './reportBodyOnSameLineAsCondition'\nimport type {RuleContext} from './RuleContext'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function checkDoWhileStatementBraceStyle(\n node: TSESTree.DoWhileStatement,\n context: RuleContext,\n): void {\n reportBodyOnSameLineAsCondition(context, node.body)\n}\n","import {reportBodyOnSameLineAsCondition} from './reportBodyOnSameLineAsCondition'\nimport type {RuleContext} from './RuleContext'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function checkForStatementBraceStyle(\n node: TSESTree.ForStatement,\n context: RuleContext,\n): void {\n reportBodyOnSameLineAsCondition(context, node.body)\n}\n","import {createBraceStyleFix} from './createBraceStyleFix'\nimport {isOnSameLineAsCondition} from './isOnSameLineAsCondition'\nimport {reportBodyOnSameLineAsCondition} from './reportBodyOnSameLineAsCondition'\nimport type {RuleContext} from './RuleContext'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function checkIfStatementBraceStyle(\n node: TSESTree.IfStatement,\n context: RuleContext,\n): void {\n const sourceCode = context.sourceCode\n reportBodyOnSameLineAsCondition(context, node.consequent)\n\n if (!node.alternate)\n return\n\n if (node.alternate.type === 'BlockStatement') {\n reportBodyOnSameLineAsCondition(context, node.alternate)\n return\n }\n\n if (node.alternate.type !== 'IfStatement') {\n const alternate = node.alternate\n if (isOnSameLineAsCondition(alternate, sourceCode)) {\n context.report({\n fix: fixer => createBraceStyleFix(fixer, alternate, sourceCode),\n messageId: 'singleLine',\n node: alternate,\n })\n }\n }\n}\n","import {reportBodyOnSameLineAsCondition} from './reportBodyOnSameLineAsCondition'\nimport type {RuleContext} from './RuleContext'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function checkWhileStatementBraceStyle(\n node: TSESTree.WhileStatement,\n context: RuleContext,\n): void {\n reportBodyOnSameLineAsCondition(context, node.body)\n}\n","import {checkDoWhileStatementBraceStyle} from './checkDoWhileStatementBraceStyle'\nimport {checkForStatementBraceStyle} from './checkForStatementBraceStyle'\nimport {checkIfStatementBraceStyle} from './checkIfStatementBraceStyle'\nimport {checkWhileStatementBraceStyle} from './checkWhileStatementBraceStyle'\nimport type {MessageIds} from './MessageIds'\nimport type {TSESLint} from '@typescript-eslint/utils'\n\nexport const braceStyleControlStatements: TSESLint.RuleModule<MessageIds, []> = {\n create(context) {\n return {\n DoWhileStatement: node => checkDoWhileStatementBraceStyle(node, context),\n ForStatement: node => checkForStatementBraceStyle(node, context),\n IfStatement: node => checkIfStatementBraceStyle(node, context),\n WhileStatement: node => checkWhileStatementBraceStyle(node, context),\n }\n },\n meta: {\n docs: {\n description: 'Enforce control statements to have multi-line body.',\n },\n fixable: 'code',\n messages: {\n singleLine: 'Control statement body must be on a separate line',\n },\n schema: [],\n type: 'layout',\n },\n}\n","import {getLineIndent} from '../shared/getLineIndent'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function checkClosingBrace(\n sourceCode: TSESLint.SourceCode,\n context: TSESLint.RuleContext<MessageId, [Options]>,\n node: TSESTree.ObjectExpression,\n closingBrace: TSESTree.Token,\n): void {\n const lastProperty = node.properties[node.properties.length - 1]\n const closingLine = closingBrace.loc.end.line\n const closingBraceOnOwnLine = lastProperty.loc.end.line < closingLine\n\n if (!closingBraceOnOwnLine) {\n context.report({\n fix(fixer) {\n return fixer.replaceTextRange(\n [lastProperty.range[1], closingBrace.range[0]],\n ',\\n' + getLineIndent(sourceCode, lastProperty.loc.end.line),\n )\n },\n loc: closingBrace.loc,\n messageId: 'braceOnPropertyLine',\n })\n }\n}\n","import type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function checkNestedObjects(\n sourceCode: TSESLint.SourceCode,\n context: TSESLint.RuleContext<MessageId, [Options]>,\n node: TSESTree.ObjectExpression,\n checkObjectExpression: (\n sourceCode: TSESLint.SourceCode,\n context: TSESLint.RuleContext<MessageId, [Options]>,\n node: TSESTree.ObjectExpression,\n ) => void,\n): void {\n for (const property of node.properties) {\n if (property.type === 'Property' && property.value.type === 'ObjectExpression')\n checkObjectExpression(sourceCode, context, property.value)\n else if (property.type === 'SpreadElement' && property.argument.type === 'ObjectExpression')\n checkObjectExpression(sourceCode, context, property.argument)\n }\n}\n","import {getLineIndent} from '../shared/getLineIndent'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function checkOpeningBrace(\n sourceCode: TSESLint.SourceCode,\n context: TSESLint.RuleContext<MessageId, [Options]>,\n node: TSESTree.ObjectExpression,\n openingBrace: TSESTree.Token,\n): void {\n const firstProperty = node.properties[0]\n const openingLine = openingBrace.loc.start.line\n const openingBraceOnOwnLine = firstProperty.loc.start.line > openingLine\n\n if (!openingBraceOnOwnLine) {\n context.report({\n fix(fixer) {\n return fixer.replaceTextRange(\n [openingBrace.range[1], firstProperty.range[0]],\n '\\n' + getLineIndent(sourceCode, firstProperty.loc.start.line),\n )\n },\n loc: openingBrace.loc,\n messageId: 'braceOnPropertyLine',\n })\n }\n}\n","import {getLineIndent} from '../shared/getLineIndent'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function checkPropertyOnOwnLine(\n sourceCode: TSESLint.SourceCode,\n context: TSESLint.RuleContext<MessageId, [Options]>,\n prevPropertyEndLine: number,\n property: TSESTree.ObjectLiteralElement,\n): void {\n const propStartLine = property.loc.start.line\n if (propStartLine === prevPropertyEndLine) {\n context.report({\n fix(fixer) {\n const lastNewLineIndex = sourceCode\n .getText()\n .lastIndexOf('\\n', property.range[0] - 1)\n\n return fixer.replaceTextRange(\n [lastNewLineIndex, property.range[0]],\n '\\n' + getLineIndent(sourceCode, property.loc.start.line),\n )\n },\n loc: property.loc,\n messageId: 'propertiesOnSameLine',\n })\n }\n}\n","import {checkClosingBrace} from './checkClosingBrace'\nimport {checkNestedObjects} from './checkNestedObjects'\nimport {checkOpeningBrace} from './checkOpeningBrace'\nimport {checkPropertyOnOwnLine} from './checkPropertyOnOwnLine'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function checkObjectExpression(\n sourceCode: TSESLint.SourceCode,\n context: TSESLint.RuleContext<MessageId, [Options]>,\n node: TSESTree.ObjectExpression,\n): void {\n if (node.properties.length === 0)\n return\n\n const openingBrace = sourceCode.getFirstToken(node)\n const closingBrace = sourceCode.getLastToken(node)\n\n if (!openingBrace || !closingBrace)\n return\n\n const openingLine = openingBrace.loc.start.line\n const closingLine = closingBrace.loc.end.line\n\n if (openingLine === closingLine)\n return\n\n checkOpeningBrace(sourceCode, context, node, openingBrace)\n\n let prevPropertyEndLine = node.properties[0].loc.start.line\n for (const property of node.properties) {\n if (property !== node.properties[0])\n checkPropertyOnOwnLine(sourceCode, context, prevPropertyEndLine, property)\n\n prevPropertyEndLine = property.loc.end.line\n }\n\n checkClosingBrace(sourceCode, context, node, closingBrace)\n checkNestedObjects(sourceCode, context, node, checkObjectExpression)\n}\n","export const messageIds = {\n braceOnPropertyLine: 'Opening brace should be on its own line',\n propertiesOnSameLine: 'Multi-line objects must have each property on its own line',\n} as const\n","import {checkObjectExpression} from './checkObjectExpression'\nimport {messageIds} from './messageIds'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport const braceStyleObjectLiteral: TSESLint.RuleModule<MessageId, [Options]> = {\n create(context) {\n const sourceCode = context.sourceCode ?? context.getSourceCode()\n\n return {\n ObjectExpression(node: TSESTree.ObjectExpression): void {\n checkObjectExpression(sourceCode, context, node)\n },\n }\n },\n\n meta: {\n docs: {\n description: 'Enforce consistent brace positioning for object literals.',\n },\n fixable: 'code',\n messages: messageIds,\n schema: [{\n additionalProperties: false,\n properties: {},\n type: 'object',\n }],\n type: 'layout',\n },\n}\n","import type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function buildCompactFix(\n fixer: TSESLint.RuleFixer,\n openingBracket: TSESLint.AST.Token,\n closingBracket: TSESLint.AST.Token,\n elements: (null | TSESTree.Node)[],\n sourceCode: TSESLint.SourceCode,\n): TSESLint.RuleFix {\n const nonNullElements = elements.filter(\n (el): el is NonNullable<typeof el> => el !== null,\n )\n\n const formattedItems = nonNullElements\n .map(element => sourceCode.getText(element))\n .join(', ')\n\n const newText = `[${formattedItems}]`\n\n return fixer.replaceTextRange(\n [openingBracket.range[0], closingBracket.range[1]],\n newText,\n )\n}\n","import type {TSESLint} from '@typescript-eslint/utils'\n\nexport function findBracketByRange(\n tokens: readonly TSESLint.AST.Token[] | undefined,\n range: readonly [number, number],\n value: string,\n): TSESLint.AST.Token | undefined {\n return tokens?.find(\n t => t.range[0] === range[0] && t.value === value,\n )\n}\n","import type {TSESLint} from '@typescript-eslint/utils'\n\nexport function findClosingBracketByRange(\n tokens: readonly TSESLint.AST.Token[] | undefined,\n range: readonly [number, number],\n): TSESLint.AST.Token | undefined {\n return tokens?.find(\n t => t.range[1] === range[1] && t.value === ']',\n )\n}\n","import type {TSESTree} from '@typescript-eslint/types'\n\nexport function hasElements(elements: (null | TSESTree.Node)[]): boolean {\n const nonNull = elements.filter(\n (el): el is NonNullable<typeof el> => el !== null,\n )\n return nonNull.length >= 1\n}\n","import type {TSESTree} from '@typescript-eslint/types'\n\nexport function hasMultilineItems(nonNullElements: TSESTree.Node[]): boolean {\n return nonNullElements.some(\n el => el.loc.start.line !== el.loc.end.line,\n )\n}\n","import type {TSESLint} from '@typescript-eslint/utils'\n\nexport function isBracketOnOwnLine(\n sourceCode: TSESLint.SourceCode,\n openingBracket: TSESLint.AST.Token,\n): boolean {\n const nextToken = sourceCode.getTokenAfter(openingBracket, {\n includeComments: false,\n })\n\n if (!nextToken)\n return false\n\n const text = sourceCode.getText()\n const openingBracketEndIndex = openingBracket.range[1]\n const textBetween = text.slice(\n openingBracketEndIndex,\n nextToken.range[0],\n )\n\n return textBetween.includes('\\n')\n}\n","import type {MessageId} from './MessageId'\n\nexport const messageIds: Record<MessageId, string> = {\n compactItems: 'Array items should be compact when the array spans multiple lines.',\n}\n","import {buildCompactFix} from './buildCompactFix'\nimport {findBracketByRange} from './findBracketByRange'\nimport {findClosingBracketByRange} from './findClosingBracketByRange'\nimport {hasElements} from './hasElements'\nimport {hasMultilineItems} from './hasMultilineItems'\nimport {isBracketOnOwnLine} from './isBracketOnOwnLine'\nimport {messageIds} from './messageIds'\nimport type {MessageId} from './MessageId'\nimport type {TSESLint} from '@typescript-eslint/utils'\n\nexport const compactArrayItems: TSESLint.RuleModule<MessageId, []> = {\n create(context) {\n const sourceCode = context.sourceCode ?? context.getSourceCode()\n\n return {\n ArrayExpression(node): void {\n if (!hasElements(node.elements))\n return\n\n const tokens = sourceCode.ast.tokens\n const openingBracket = findBracketByRange(tokens, node.range, '[')\n const closingBracket = findClosingBracketByRange(\n tokens,\n node.range,\n )\n\n if (!openingBracket || !closingBracket)\n return\n\n if (!isBracketOnOwnLine(sourceCode, openingBracket))\n return\n\n const nonNullElements = node.elements.filter(\n (el): el is NonNullable<typeof el> => el !== null,\n )\n\n if (!hasMultilineItems(nonNullElements))\n return\n\n context.report({\n fix: fixer => buildCompactFix(\n fixer,\n openingBracket,\n closingBracket,\n node.elements,\n sourceCode,\n ),\n messageId: 'compactItems',\n node,\n })\n },\n }\n },\n\n meta: {\n docs: {\n description:\n 'Enforce arrays with multiline items to have a compact, inline bracket style.',\n },\n fixable: 'code',\n messages: messageIds,\n schema: [],\n type: 'layout',\n },\n}\n","import type {TSESTree} from '@typescript-eslint/utils'\n\nexport function getNameFromDeclaration(node: TSESTree.Node): string[] {\n const names: string[] = []\n\n switch (node.type) {\n case 'ClassDeclaration':\n if (node.id)\n names.push(node.id.name)\n break\n case 'FunctionDeclaration':\n if (node.id)\n names.push(node.id.name)\n break\n case 'TSInterfaceDeclaration':\n names.push(node.id.name)\n break\n case 'TSTypeAliasDeclaration':\n names.push(node.id.name)\n break\n case 'VariableDeclaration':\n for (const d of node.declarations) {\n if (d.id.type === 'Identifier')\n names.push(d.id.name)\n }\n break\n }\n\n return names\n}\n","import type {TSESTree} from '@typescript-eslint/utils'\n\nexport function getNamesFromSpecifiers(\n node: TSESTree.ExportNamedDeclaration,\n): string[] {\n if (!node.specifiers?.length)\n return []\n\n const names: string[] = []\n for (const specifier of node.specifiers) {\n if (specifier.exported.type === 'Identifier')\n names.push(specifier.exported.name)\n }\n return names\n}\n","import {getNameFromDeclaration} from './getNameFromDeclaration'\nimport {getNamesFromSpecifiers} from './getNamesFromSpecifiers'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function getExportedNames(\n node: TSESTree.ExportNamedDeclaration,\n): string[] {\n const specifierNames = getNamesFromSpecifiers(node)\n\n if (!node.declaration)\n return specifierNames\n\n const declarationNames = getNameFromDeclaration(node.declaration)\n\n return [...specifierNames, ...declarationNames]\n}\n","import * as path from 'path'\n\nexport function stripExtension(filename: string): string {\n return path.basename(filename, path.extname(filename))\n}\n","import {stripExtension} from './stripExtension'\n\nexport function isExempt(filename: string): boolean {\n const name = stripExtension(filename)\n\n return (\n name === 'index'\n || name.endsWith('.test')\n || name.endsWith('.spec')\n || name.endsWith('.config')\n )\n}\n","export const messageIds = {\n filenameMismatch:\n \"File name must be '{{expectedName}}' instead of '{{currentName}}'.\",\n} as const\n","import * as path from 'path'\nimport {getExportedNames} from './getExportedNames'\nimport {isExempt} from '../shared/isExempt'\nimport {messageIds} from './messageIds'\nimport type {MessageId} from './MessageId'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport const exportFilenameMatch: TSESLint.RuleModule<MessageId, []> = {\n create(context) {\n const fileName = context.filename\n const baseName = path.basename(fileName)\n const ext = path.extname(baseName)\n const fileNameWithoutExt = baseName.slice(0, -ext.length)\n\n if (isExempt(fileName))\n return {}\n\n const exportNames: string[] = []\n\n return {\n ExportNamedDeclaration(node: TSESTree.ExportNamedDeclaration): void {\n const names = getExportedNames(node)\n exportNames.push(...names)\n },\n\n 'Program:exit'(programNode: TSESTree.Program): void {\n if (exportNames.length === 1) {\n const [exportName] = exportNames\n\n if (exportName !== fileNameWithoutExt) {\n context.report({\n data: {\n currentName: `${fileNameWithoutExt}${ext}`,\n expectedName: `${exportName}${ext}`,\n },\n messageId: 'filenameMismatch',\n node: programNode,\n })\n }\n }\n },\n }\n },\n\n meta: {\n docs: {\n description: 'Enforce filename matches the single named export.',\n },\n messages: messageIds,\n schema: [],\n type: 'suggestion',\n },\n}\n","import type {Nodes} from './Nodes'\n\nexport function findLinesWithMultipleNodes(nodes: Nodes[]): number[] {\n const lines: number[] = []\n\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i]\n const nodeLine = node.loc.start.line\n\n if (i < nodes.length - 1) {\n const nextNode = nodes[i + 1]\n if (nextNode.loc.start.line === nodeLine)\n lines.push(nodeLine)\n }\n }\n\n return lines\n}\n","import type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function formatArgs(\n sourceCode: TSESLint.SourceCode,\n nodes: TSESTree.Node[],\n indent: string,\n): string {\n return nodes\n .map((arg, index) => {\n const argText = sourceCode.getText(arg)\n const isLast = index === nodes.length - 1\n if (isLast)\n return argText\n const comma = sourceCode.getTokenAfter(arg, token => token.value === ',')\n if (comma && comma.loc.end.line === arg.loc.end.line)\n return argText + ','\n return argText\n })\n .map((text, index) =>\n index === 0 ? `${indent}${text}` : `\\n${indent}${text}`,\n )\n .join('')\n}\n","import type {TSESLint} from '@typescript-eslint/utils'\n\nexport function getLineStartIndex(\n sourceCode: TSESLint.SourceCode,\n line: number,\n): number {\n const lines = sourceCode.getLines()\n return lines.slice(0, line - 1).reduce(\n (acc, l) => acc + l.length + 1,\n 0,\n )\n}\n","import {findLinesWithMultipleNodes} from '../shared/findLinesWithMultipleNodes'\nimport {formatArgs} from './formatArgs'\nimport {getLineLength} from '../shared/getLineLength'\nimport {getLineStartIndex} from '../shared/getLineStartIndex'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function checkMultilineArgs(\n sourceCode: TSESLint.SourceCode,\n context: TSESLint.RuleContext<MessageId, [Options]>,\n args: TSESTree.Node[],\n maxLength: number,\n): void {\n const linesWithMultipleArgs = findLinesWithMultipleNodes(args)\n\n for (const line of linesWithMultipleArgs) {\n const lineLength = getLineLength(sourceCode, line)\n\n if (lineLength > maxLength) {\n context.report({\n data: {maxLength},\n fix: (fixer): TSESLint.RuleFix => {\n const nodesOnLine = args.filter(\n arg =>\n arg.loc.start.line <= line && arg.loc.end.line >= line,\n )\n const lastNode = nodesOnLine[nodesOnLine.length - 1]\n const lineStartIndex = getLineStartIndex(sourceCode, line)\n const baseIndent = sourceCode.getText().match(/^[\\t ]*/)?.[0] ?? ''\n const indent = baseIndent + ' '\n const fixed = formatArgs(sourceCode, nodesOnLine, indent)\n return fixer.replaceTextRange(\n [lineStartIndex, lastNode.range[1]],\n fixed,\n )\n },\n loc: {\n end: {\n column: lineLength,\n line,\n },\n start: {\n column: 0,\n line,\n },\n },\n messageId: 'multipleOnSameLine',\n })\n }\n }\n}\n","import {getLineLength} from '../shared/getLineLength'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {Parens} from './Parens'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function checkSingleLineArgs(\n sourceCode: TSESLint.SourceCode,\n context: TSESLint.RuleContext<MessageId, [Options]>,\n args: TSESTree.Node[],\n parens: Parens,\n maxLength: number,\n): void {\n const {closingParen, openingParen} = parens\n const lineLength = getLineLength(sourceCode, openingParen.loc.start.line)\n\n if (lineLength <= maxLength)\n return\n\n if (args.length === 1) {\n context.report({\n data: {maxLength},\n loc: {\n end: {\n column: lineLength,\n line: closingParen.loc.end.line,\n },\n start: {\n column: 0,\n line: openingParen.loc.start.line,\n },\n },\n messageId: 'exceedsMaxLength',\n })\n return\n }\n\n context.report({\n data: {maxLength},\n fix: (fixer): TSESLint.RuleFix => {\n const indent = sourceCode.getText().match(/^[\\t ]*/)?.[0] ?? ''\n\n const argTexts = args.map(arg => {\n const argText = sourceCode.getText(arg)\n const comma = sourceCode.getTokenAfter(\n arg,\n token => token.value === ',',\n )\n if (comma && comma.loc.end.line === arg.loc.end.line)\n return argText + ','\n return argText\n })\n\n const fixed = [\n '(\\n',\n `${indent} ${argTexts.join(`\\n${indent} `)}\\n`,\n `${indent})`,\n ].join('')\n\n return fixer.replaceTextRange(\n [openingParen.range[0], closingParen.range[1]],\n fixed,\n )\n },\n loc: {\n end: {\n column: lineLength,\n line: closingParen.loc.end.line,\n },\n start: {\n column: 0,\n line: openingParen.loc.start.line,\n },\n },\n messageId: 'multipleOnSameLine',\n })\n}\n","import type {Options} from './Options'\n\nexport const defaultOptions = {\n maxLength: 80,\n} as const satisfies Options\n","import type {Parens} from './Parens'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function getParens(\n sourceCode: TSESLint.SourceCode,\n nodes: TSESTree.Node[],\n): null | Parens {\n if (nodes.length === 0)\n return null\n\n const firstNode = nodes[0]\n const lastNode = nodes[nodes.length - 1]\n\n const openingParen = sourceCode.getTokenBefore(firstNode)\n const closingParen = sourceCode.getTokenAfter(lastNode)\n\n if (!openingParen || !closingParen)\n return null\n\n return {closingParen, openingParen}\n}\n","import type {Parens} from './Parens'\n\nexport function isValidParens(parens: null | Parens): parens is Parens {\n if (!parens)\n return false\n return parens.openingParen.value === '(' && parens.closingParen.value === ')'\n}\n","import {checkMultilineArgs} from './checkMultilineArgs'\nimport {checkSingleLineArgs} from './checkSingleLineArgs'\nimport {defaultOptions} from './defaultOptions'\nimport {getParens} from '../shared/getParens'\nimport {isValidParens} from '../shared/isValidParens'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function checkCall(\n sourceCode: TSESLint.SourceCode,\n context: TSESLint.RuleContext<MessageId, [Options]>,\n node: TSESTree.CallExpression,\n): void {\n const options = context.options[0] as Options ?? {}\n const maxLength = options.maxLength ?? defaultOptions.maxLength\n\n const args = node.arguments as TSESTree.Node[]\n const parens = getParens(sourceCode, args)\n\n if (!isValidParens(parens))\n return\n\n const firstLine = parens.openingParen.loc.start.line\n const lastLine = parens.closingParen.loc.end.line\n\n if (firstLine === lastLine)\n checkSingleLineArgs(sourceCode, context, args, parens, maxLength)\n else\n checkMultilineArgs(sourceCode, context, args, maxLength)\n}\n","export const messageIds = {\n exceedsMaxLength: 'Refactor this function call as it exceeds {{maxLength}} characters',\n multipleOnSameLine: 'Each argument must be on its own line',\n} as const\n","import {checkCall} from './checkCall'\nimport {messageIds} from './messageIds'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport const functionCallArgumentLineBreak: TSESLint.RuleModule<MessageId, [Options]> = {\n create(context) {\n const sourceCode = context.sourceCode ?? context.getSourceCode()\n\n return {\n CallExpression(node): void {\n checkCall(sourceCode, context, node)\n },\n\n OptionalCallExpression(node): void {\n checkCall(sourceCode, context, node as TSESTree.CallExpression)\n },\n }\n },\n\n meta: {\n docs: {\n description: 'Enforce each function call argument to be on its own line when line exceeds max length.',\n },\n fixable: 'code',\n messages: messageIds,\n schema: [{\n additionalProperties: false,\n properties: {\n maxLength: {\n type: 'number',\n },\n },\n type: 'object',\n }],\n type: 'layout',\n },\n}\n","import type {TSESTree} from '@typescript-eslint/utils'\n\nexport function isNodeWithType(value: unknown): value is TSESTree.Node {\n return value !== null && typeof value === 'object' && 'type' in value\n}\n","import {isNodeWithType} from './isNodeWithType'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nconst SKIP_KEYS = new Set(['loc', 'parent', 'range'])\n\nexport function getChildNodes(node: TSESTree.Node): TSESTree.Node[] {\n const children: TSESTree.Node[] = []\n\n for (const key of Object.keys(node)) {\n if (SKIP_KEYS.has(key))\n continue\n\n const value = (node as unknown as Record<string, unknown>)[key]\n\n if (Array.isArray(value)) {\n for (const item of value) {\n if (isNodeWithType(item))\n children.push(item)\n }\n } else if (isNodeWithType(value))\n children.push(value)\n }\n\n return children\n}\n","import type {TSESTree} from '@typescript-eslint/utils'\n\nconst INCREMENTABLE_TYPES = new Set([\n 'ConditionalExpression',\n 'DoWhileStatement',\n 'ForInStatement',\n 'ForOfStatement',\n 'ForStatement',\n 'IfStatement',\n 'LogicalExpression',\n 'SwitchStatement',\n 'TryStatement',\n 'WhileStatement',\n])\n\nexport function isIncrementableControlFlow(node: TSESTree.Node): boolean {\n return INCREMENTABLE_TYPES.has(node.type)\n}\n","import {getChildNodes} from './getChildNodes'\nimport {isIncrementableControlFlow} from './isIncrementableControlFlow'\nimport type {ComplexityState} from './ComplexityState'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function traverse(\n node: TSESTree.Node,\n nestingLevel: number,\n state: ComplexityState,\n): void {\n if (isIncrementableControlFlow(node)) {\n state.complexity += 1 + nestingLevel\n nestingLevel++\n }\n\n const children = getChildNodes(node)\n\n for (const child of children)\n traverse(child, nestingLevel, state)\n}\n","import {getChildNodes} from './getChildNodes'\nimport {traverse} from './traverse'\nimport type {ComplexityState} from './ComplexityState'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function calculateCognitiveComplexity(node: TSESTree.Node): number {\n const state: ComplexityState = {\n complexity: 0,\n nestingLevel: 0,\n }\n\n const children = getChildNodes(node)\n\n for (const child of children)\n traverse(child, 0, state)\n\n return state.complexity\n}\n","import type {TSESTree} from '@typescript-eslint/utils'\n\nexport function getNameFromCallExpression(\n node: TSESTree.Node | undefined,\n): null | string {\n if (node?.type === 'CallExpression' && node.callee?.type === 'Identifier')\n return `${node.callee.name} callback`\n\n return null\n}\n","import type {TSESTree} from '@typescript-eslint/utils'\n\nexport function getNameFromProperty(\n node: TSESTree.Node | undefined,\n): null | string {\n if (node?.type === 'Property' && node.key?.type === 'Identifier')\n return node.key.name\n\n return null\n}\n","import type {TSESTree} from '@typescript-eslint/utils'\n\nexport function getNameFromVariableDeclarator(\n node: TSESTree.Node | undefined,\n): null | string {\n if (node?.type === 'VariableDeclarator' && node.id?.type === 'Identifier')\n return node.id.name\n\n return null\n}\n","import {getNameFromCallExpression} from './getNameFromCallExpression'\nimport {getNameFromProperty} from './getNameFromProperty'\nimport {getNameFromVariableDeclarator} from './getNameFromVariableDeclarator'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function getArrowFunctionExpressionName(\n node: TSESTree.ArrowFunctionExpression,\n): null | string {\n const parent = node.parent\n\n const nameFromVar = getNameFromVariableDeclarator(parent)\n if (nameFromVar)\n return nameFromVar\n\n const nameFromProp = getNameFromProperty(parent)\n if (nameFromProp)\n return nameFromProp\n\n const nameFromCall = getNameFromCallExpression(parent)\n if (nameFromCall)\n return nameFromCall\n\n return null\n}\n","import type {TSESTree} from '@typescript-eslint/utils'\n\nexport function getNameFromMethodDefinition(\n node: TSESTree.Node | undefined,\n): null | string {\n if (node?.type === 'MethodDefinition' && node.key?.type === 'Identifier')\n return node.key.name\n\n return null\n}\n","import {getNameFromMethodDefinition} from './getNameFromMethodDefinition'\nimport {getNameFromProperty} from './getNameFromProperty'\nimport {getNameFromVariableDeclarator} from './getNameFromVariableDeclarator'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function getFunctionExpressionName(\n node: TSESTree.FunctionExpression,\n): null | string {\n const parent = node.parent\n\n const nameFromVar = getNameFromVariableDeclarator(parent)\n if (nameFromVar)\n return nameFromVar\n\n const nameFromProp = getNameFromProperty(parent)\n if (nameFromProp)\n return nameFromProp\n\n const nameFromMethod = getNameFromMethodDefinition(parent)\n if (nameFromMethod)\n return nameFromMethod\n\n return null\n}\n","import {getArrowFunctionExpressionName} from './getArrowFunctionExpressionName'\nimport {getFunctionExpressionName} from './getFunctionExpressionName'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function getFunctionName(\n node:\n | TSESTree.ArrowFunctionExpression\n | TSESTree.FunctionDeclaration\n | TSESTree.FunctionExpression,\n): null | string {\n if (node.type === 'FunctionDeclaration' && node.id?.name)\n return node.id.name\n\n if (node.type === 'FunctionExpression')\n return getFunctionExpressionName(node)\n\n if (node.type === 'ArrowFunctionExpression')\n return getArrowFunctionExpressionName(node)\n\n return null\n}\n","export const messageIds = {\n tooHighCognitiveComplexity:\n 'Function \\'{{name}}\\' has cognitive complexity of {{actual}} (max: {{max}}). Consider extracting sub-functions.',\n tooHighCognitiveComplexityAnonymous:\n 'Anonymous function has cognitive complexity of {{actual}} (max: {{max}}). Consider extracting sub-functions.',\n}\n","import {calculateCognitiveComplexity} from './calculateCognitiveComplexity'\nimport {getFunctionName} from './getFunctionName'\nimport {messageIds} from './messageIds'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nconst DEFAULT_MAX_COGNITIVE_COMPLEXITY = 15\n\nexport const functionCognitiveComplexity: TSESLint.RuleModule<MessageId, [Options]> = {\n create(context) {\n const options = context.options[0] ?? {}\n const maxCognitiveComplexity = options.maxCognitiveComplexity ?? DEFAULT_MAX_COGNITIVE_COMPLEXITY\n\n function checkFunction(\n node:\n | TSESTree.ArrowFunctionExpression\n | TSESTree.FunctionDeclaration\n | TSESTree.FunctionExpression,\n ): void {\n const complexity = calculateCognitiveComplexity(node)\n\n if (complexity > maxCognitiveComplexity) {\n const name = getFunctionName(node)\n\n if (name) {\n context.report({\n data: {\n actual: complexity,\n max: maxCognitiveComplexity,\n name,\n },\n messageId: 'tooHighCognitiveComplexity',\n node,\n })\n } else {\n context.report({\n data: {\n actual: complexity,\n max: maxCognitiveComplexity,\n },\n messageId: 'tooHighCognitiveComplexityAnonymous',\n node,\n })\n }\n }\n }\n\n return {\n ArrowFunctionExpression(node: TSESTree.ArrowFunctionExpression): void {\n checkFunction(node)\n },\n\n FunctionDeclaration(node: TSESTree.FunctionDeclaration): void {\n checkFunction(node)\n },\n\n FunctionExpression(node: TSESTree.FunctionExpression): void {\n checkFunction(node)\n },\n }\n },\n\n meta: {\n docs: {\n description: 'Enforce cognitive complexity threshold for functions.',\n },\n messages: messageIds,\n schema: [{\n additionalProperties: false,\n properties: {\n maxCognitiveComplexity: {\n type: 'number',\n },\n },\n type: 'object',\n }],\n type: 'suggestion',\n },\n}\n","import type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function formatParams(\n sourceCode: TSESLint.SourceCode,\n nodes: TSESTree.Parameter[],\n indent: string,\n): string {\n return nodes\n .map((param, index) => {\n const paramText = sourceCode.getText(param)\n const isLast = index === nodes.length - 1\n if (isLast)\n return paramText\n const comma = sourceCode.getTokenAfter(\n param,\n token => token.value === ',',\n )\n if (comma && comma.loc.end.line === param.loc.end.line)\n return paramText + ','\n return paramText\n })\n .map((text, index) =>\n index === 0 ? `${indent}${text}` : `\\n${indent}${text}`,\n )\n .join('')\n}\n","import {findLinesWithMultipleNodes} from '../shared/findLinesWithMultipleNodes'\nimport {formatParams} from './formatParams'\nimport {getLineLength} from '../shared/getLineLength'\nimport {getLineStartIndex} from '../shared/getLineStartIndex'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {Parens} from './Parens'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function checkMultilineParams(\n sourceCode: TSESLint.SourceCode,\n context: TSESLint.RuleContext<MessageId, [Options]>,\n params: TSESTree.Parameter[],\n parens: Parens,\n maxLength: number,\n): void {\n const linesWithMultipleParams = findLinesWithMultipleNodes(params)\n\n for (const line of linesWithMultipleParams) {\n const lineLength = getLineLength(sourceCode, line)\n\n if (lineLength > maxLength) {\n context.report({\n data: {maxLength},\n fix: (fixer): TSESLint.RuleFix => {\n const nodesOnLine = params.filter(\n param =>\n param.loc.start.line <= line && param.loc.end.line >= line,\n )\n const lastNode = nodesOnLine[nodesOnLine.length - 1]\n const lineStartIndex = getLineStartIndex(sourceCode, line)\n const baseIndent = sourceCode.getText().match(/^[\\t ]*/)?.[0] ?? ''\n const indent = baseIndent + ' '\n const fixed = formatParams(sourceCode, nodesOnLine, indent)\n return fixer.replaceTextRange(\n [lineStartIndex, lastNode.range[1]],\n fixed,\n )\n },\n loc: {\n end: {\n column: lineLength,\n line,\n },\n start: {\n column: 0,\n line,\n },\n },\n messageId: 'multipleOnSameLine',\n })\n }\n }\n}\n","import {getLineLength} from '../shared/getLineLength'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {Parens} from './Parens'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function checkSingleLineParams(\n sourceCode: TSESLint.SourceCode,\n context: TSESLint.RuleContext<MessageId, [Options]>,\n params: TSESTree.Parameter[],\n parens: Parens,\n maxLength: number,\n): void {\n const {closingParen, openingParen} = parens\n const lineLength = getLineLength(sourceCode, openingParen.loc.start.line)\n\n if (lineLength <= maxLength)\n return\n\n if (params.length === 1) {\n context.report({\n data: {maxLength},\n loc: {\n end: {\n column: lineLength,\n line: closingParen.loc.end.line,\n },\n start: {\n column: 0,\n line: openingParen.loc.start.line,\n },\n },\n messageId: 'exceedsMaxLength',\n })\n return\n }\n\n context.report({\n data: {maxLength},\n fix: (fixer): TSESLint.RuleFix => {\n const indent = sourceCode.getText().match(/^[\\t ]*/)?.[0] ?? ''\n\n const paramTexts = params.map(param => {\n const paramText = sourceCode.getText(param)\n const comma = sourceCode.getTokenAfter(\n param,\n token => token.value === ',',\n )\n if (comma && comma.loc.end.line === param.loc.end.line)\n return paramText + ','\n return paramText\n })\n\n const fixed = [\n '(\\n',\n `${indent} ${paramTexts.join(`\\n${indent} `)}\\n`,\n `${indent})`,\n ].join('')\n\n return fixer.replaceTextRange(\n [openingParen.range[0], closingParen.range[1]],\n fixed,\n )\n },\n loc: {\n end: {\n column: lineLength,\n line: closingParen.loc.end.line,\n },\n start: {\n column: 0,\n line: openingParen.loc.start.line,\n },\n },\n messageId: 'multipleOnSameLine',\n })\n}\n","import type {Options} from './Options'\n\nexport const defaultOptions = {\n maxLength: 80,\n} as const satisfies Options\n","import {checkMultilineParams} from './checkMultilineParams'\nimport {checkSingleLineParams} from './checkSingleLineParams'\nimport {defaultOptions} from './defaultOptions'\nimport {getParens} from '../shared/getParens'\nimport {isValidParens} from '../shared/isValidParens'\nimport type {FunctionNode} from './FunctionNode'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {TSESLint} from '@typescript-eslint/utils'\n\nexport function checkFunction(\n sourceCode: TSESLint.SourceCode,\n context: TSESLint.RuleContext<MessageId, [Options]>,\n node: FunctionNode,\n): void {\n const options = context.options[0] as Options ?? {}\n const maxLength = options.maxLength ?? defaultOptions.maxLength\n\n const params = node.params\n if (params.length === 0)\n return\n\n const parens = getParens(sourceCode, params)\n\n if (!isValidParens(parens))\n return\n\n const firstLine = parens.openingParen.loc.start.line\n const lastLine = parens.closingParen.loc.end.line\n\n if (firstLine === lastLine)\n checkSingleLineParams(sourceCode, context, params, parens, maxLength)\n else\n checkMultilineParams(sourceCode, context, params, parens, maxLength)\n}\n","export const messageIds = {\n exceedsMaxLength: 'Refactor this function signature as it exceeds {{maxLength}} characters',\n multipleOnSameLine: 'Each parameter must be on its own line',\n} as const\n","import {checkFunction} from './checkFunction'\nimport {messageIds} from './messageIds'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {TSESLint} from '@typescript-eslint/utils'\n\nexport const functionParameterLineBreak: TSESLint.RuleModule<MessageId, [Options]> = {\n create(context) {\n const sourceCode = context.sourceCode ?? context.getSourceCode()\n\n return {\n ArrowFunctionExpression(node): void {\n if (node.expression)\n return\n\n checkFunction(sourceCode, context, node)\n },\n\n FunctionDeclaration(node): void {\n checkFunction(sourceCode, context, node)\n },\n\n FunctionExpression(node): void {\n checkFunction(sourceCode, context, node)\n },\n\n TSCallSignatureDeclaration(node): void {\n checkFunction(sourceCode, context, node)\n },\n\n TSFunctionType(node): void {\n checkFunction(sourceCode, context, node)\n },\n\n TSMethodSignature(node): void {\n checkFunction(sourceCode, context, node)\n },\n }\n },\n\n meta: {\n docs: {\n description: 'Enforce each function parameter to be on its own line when line exceeds max length.',\n },\n fixable: 'code',\n messages: messageIds,\n schema: [{\n additionalProperties: false,\n properties: {\n maxLength: {\n type: 'number',\n },\n },\n type: 'object',\n }],\n type: 'layout',\n },\n}\n","import type {StatementType} from './StatementType'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function getStatementType(statement: TSESTree.Statement): StatementType {\n if (statement.type === 'ImportDeclaration')\n return 'import'\n\n if (statement.type === 'ExportAllDeclaration')\n return 're-export'\n\n if (statement.type === 'ExportNamedDeclaration') {\n if (statement.source !== null)\n return 're-export'\n }\n\n return 'other'\n}\n","import type {TSESTree} from '@typescript-eslint/types'\n\nexport function isImportDeclaration(\n statement: TSESTree.ProgramStatement,\n): statement is TSESTree.ImportDeclaration {\n return statement.type === 'ImportDeclaration'\n}\n","import type {ReExportDeclaration} from '@lib/ReExportDeclaration'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function isReExport(\n statement: TSESTree.ProgramStatement,\n): statement is ReExportDeclaration {\n if (statement.type === 'ExportAllDeclaration')\n return true\n if (statement.type === 'ExportNamedDeclaration')\n return statement.source !== null\n return false\n}\n","import {getStatementType} from './getStatementType'\nimport {isImportDeclaration} from './isImportDeclaration'\nimport {isReExport} from './isReExport'\nimport type {CategorizedStatements} from './CategorizedStatements'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function categorizeStatements(\n statements: TSESTree.ProgramStatement[],\n): CategorizedStatements {\n const result: CategorizedStatements = {\n imports: [],\n other: [],\n reExports: [],\n }\n\n for (const statement of statements) {\n const type = getStatementType(statement)\n\n if (type === 'import' && isImportDeclaration(statement))\n result.imports.push(statement)\n else if (type === 're-export' && isReExport(statement))\n result.reExports.push(statement)\n else\n result.other.push(statement)\n }\n\n return result\n}\n","import {getStatementType} from './getStatementType'\nimport type {StatementIndices} from './StatementIndices'\nimport type {StatementType} from './StatementType'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function findStatementIndices(\n statements: TSESTree.Statement[],\n): StatementIndices {\n let firstRegularStatement = -1\n let lastImport = -1\n let lastReExport = -1\n\n for (let i = 0; i < statements.length; i++) {\n const type: StatementType = getStatementType(statements[i])\n\n if (type === 'import')\n lastImport = i\n else if (type === 're-export')\n lastReExport = i\n else if (type === 'other' && firstRegularStatement === -1)\n firstRegularStatement = i\n }\n\n return {firstRegularStatement, lastImport, lastReExport}\n}\n","import type {CategorizedStatements} from './CategorizedStatements'\nimport type {TSESLint} from '@typescript-eslint/utils'\n\nexport function generateSortedText(\n context: TSESLint.RuleContext<'importsAndReExportsAtTop', []>,\n categories: CategorizedStatements,\n): string {\n const allStatements = [\n ...categories.imports,\n ...categories.reExports,\n ...categories.other,\n ]\n return allStatements.map(\n node => context.sourceCode.getText(node),\n ).join('\\n')\n}\n","import type {CategorizedStatements} from './CategorizedStatements'\nimport type {StatementIndices} from './StatementIndices'\n\nexport function hasImportOrderViolation(\n indices: StatementIndices,\n categories: CategorizedStatements,\n): boolean {\n const {firstRegularStatement, lastImport, lastReExport} = indices\n\n if (categories.imports.length === 0 && categories.reExports.length === 0)\n return false\n\n const hasImportAfterRegularStatement = (\n categories.imports.length > 0\n && firstRegularStatement !== -1\n && lastImport > firstRegularStatement\n )\n const hasReExportAfterRegularStatement = (\n categories.reExports.length > 0\n && firstRegularStatement !== -1\n && lastReExport > firstRegularStatement\n )\n\n return hasImportAfterRegularStatement || hasReExportAfterRegularStatement\n}\n","import {categorizeStatements} from './categorizeStatements'\nimport {findStatementIndices} from './findStatementIndices'\nimport {generateSortedText} from './generateSortedText'\nimport {hasImportOrderViolation} from './hasImportOrderViolation'\nimport type {MessageIds} from './MessageIds'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport const importsAndReExportsAtTop: TSESLint.RuleModule<MessageIds, []> = {\n create(context) {\n return {\n Program(node: TSESTree.Program): void {\n const statements = node.body\n const categories = categorizeStatements(statements)\n const indices = findStatementIndices(statements)\n\n if (!hasImportOrderViolation(indices, categories))\n return\n\n context.report({\n fix(fixer) {\n const sortedText = generateSortedText(context, categories)\n return fixer.replaceText(node, sortedText)\n },\n messageId: 'importsAndReExportsAtTop',\n\n node,\n })\n },\n }\n },\n\n meta: {\n docs: {\n description: 'Enforce imports and re-exports at the top of the file.',\n },\n fixable: 'code',\n messages: {\n importsAndReExportsAtTop:\n 'Imports and re-exports should be at the top of the file.',\n },\n schema: [],\n type: 'suggestion',\n },\n}\n","import type {MessageIds} from './MessageIds'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport const individualImports: TSESLint.RuleModule<MessageIds, []> = {\n create(context) {\n return {\n ImportDeclaration(node: TSESTree.ImportDeclaration): void {\n if (node.specifiers.length <= 1)\n return\n\n context.report({\n fix(fixer) {\n const source = node.source.raw\n const specifiers = node.specifiers\n .filter(s => s.type === 'ImportSpecifier')\n .map(s => `import {${s.local.name}} from ${source}`)\n .join('\\n')\n return fixer.replaceText(node, specifiers)\n },\n messageId: 'individualImports',\n node,\n })\n },\n }\n },\n meta: {\n docs: {\n description: 'Enforce individual imports instead of grouped imports.',\n },\n fixable: 'code',\n messages: {\n individualImports: 'Use individual imports instead of grouped imports.',\n },\n schema: [],\n type: 'suggestion',\n },\n}\n","import type {MessageIds} from './MessageIds'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport const individualReExports: TSESLint.RuleModule<MessageIds, []> = {\n create(context) {\n return {\n ExportNamedDeclaration(node: TSESTree.ExportNamedDeclaration): void {\n if (!node.source || node.specifiers.length <= 1)\n return\n\n context.report({\n fix(fixer) {\n const source = node.source.value\n const typeKeyword = node.exportKind === 'type'\n ? 'type '\n : ''\n const specifiers = node.specifiers\n .map(s => {\n const localName = s.local.type === 'Identifier'\n ? s.local.name\n : s.local.value\n const exportedName = s.exported.type === 'Identifier'\n ? s.exported.name\n : s.exported.value\n const name = localName === exportedName\n ? localName\n : `${localName} as ${exportedName}`\n return `export ${typeKeyword}{${name}} from '${source}'`\n })\n .join('\\n')\n return fixer.replaceText(node, specifiers)\n },\n messageId: 'individualReExports',\n node,\n })\n },\n }\n },\n meta: {\n docs: {\n description: 'Enforce individual exports instead of grouped exports.',\n },\n fixable: 'code',\n messages: {\n individualReExports: 'Use individual exports instead of grouped exports.',\n },\n schema: [],\n type: 'suggestion',\n },\n}\n","import type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function formatTypeLiteral(\n sourceCode: TSESLint.SourceCode,\n typeLiteral: TSESTree.TSTypeLiteral,\n baseIndent: string,\n): string {\n const members = typeLiteral.members\n if (members.length === 0)\n return '{}'\n\n const memberTexts = members.map(member => {\n if (member.type === 'TSPropertySignature') {\n const memberText = sourceCode.getText(member)\n return memberText.replace(/,\\s*$/, '')\n }\n return sourceCode.getText(member).replace(/,\\s*$/, '')\n })\n\n const innerIndent = baseIndent + ' '\n const lines = [\n '{',\n innerIndent + memberTexts.join(`\\n${innerIndent}`),\n `${baseIndent}}`,\n ]\n return lines.join('\\n')\n}\n","import {formatTypeLiteral} from './formatTypeLiteral'\nimport {getLineIndent} from '../shared/getLineIndent'\nimport {getLineLength} from '../shared/getLineLength'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function checkMultilineMembers(\n sourceCode: TSESLint.SourceCode,\n context: TSESLint.RuleContext<MessageId, [Options]>,\n members: TSESTree.TSInterfaceBody['body'],\n maxLength: number,\n): void {\n for (const member of members) {\n const memberLine = member.loc.start.line\n const lineLength = getLineLength(sourceCode, memberLine)\n\n if (lineLength > maxLength) {\n let fix: ((fixer: TSESLint.RuleFixer) => TSESLint.RuleFix) | undefined\n\n if (\n member.type === 'TSPropertySignature'\n && member.typeAnnotation\n && member.typeAnnotation.typeAnnotation.type === 'TSTypeLiteral'\n ) {\n const typeLiteral = member.typeAnnotation.typeAnnotation as TSESTree.TSTypeLiteral\n\n fix = (fixer): TSESLint.RuleFix => {\n const baseIndent = getLineIndent(sourceCode, memberLine)\n const formatted = formatTypeLiteral(\n sourceCode,\n typeLiteral,\n baseIndent,\n )\n return fixer.replaceText(typeLiteral, formatted)\n }\n }\n\n context.report({\n data: {maxLength},\n fix,\n loc: {\n end: {\n column: lineLength,\n line: memberLine,\n },\n start: {\n column: 0,\n line: memberLine,\n },\n },\n messageId: 'exceedsMaxLength',\n })\n }\n }\n}\n","import {getLineLength} from '../shared/getLineLength'\nimport type {Braces} from './Braces'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function checkSingleLineMembers(\n sourceCode: TSESLint.SourceCode,\n context: TSESLint.RuleContext<MessageId, [Options]>,\n members: TSESTree.TSInterfaceBody['body'],\n parens: Braces,\n maxLength: number,\n): void {\n const {closingBrace, openingBrace} = parens\n const lineLength = getLineLength(sourceCode, openingBrace.loc.start.line)\n\n if (lineLength <= maxLength)\n return\n\n if (members.length === 1) {\n context.report({\n data: {maxLength},\n loc: {\n end: {\n column: lineLength,\n line: closingBrace.loc.end.line,\n },\n start: {\n column: 0,\n line: openingBrace.loc.start.line,\n },\n },\n messageId: 'exceedsMaxLength',\n })\n return\n }\n\n context.report({\n data: {maxLength},\n fix: (fixer): TSESLint.RuleFix => {\n const indent = sourceCode.getText().match(/^[\\t ]*/)?.[0] ?? ''\n\n const memberTexts = members.map((member, index) => {\n const memberText = sourceCode.getText(member).replace(/,\\s*$/, '')\n const isLast = index === members.length - 1\n if (!isLast)\n return memberText + ','\n return memberText\n })\n\n const fixed = [\n '{\\n',\n `${indent} ${memberTexts.join(`\\n${indent} `)}\\n`,\n `${indent}}`,\n ].join('')\n\n return fixer.replaceTextRange(\n [openingBrace.range[0], closingBrace.range[1]],\n fixed,\n )\n },\n loc: {\n end: {\n column: lineLength,\n line: closingBrace.loc.end.line,\n },\n start: {\n column: 0,\n line: openingBrace.loc.start.line,\n },\n },\n messageId: 'multipleOnSameLine',\n })\n}\n","import type {Options} from './Options'\n\nexport const defaultOptions = {\n maxLength: 80,\n} as const satisfies Options\n","import type {Braces} from './Braces'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function getBraces(\n sourceCode: TSESLint.SourceCode,\n body: TSESTree.TSInterfaceBody,\n): Braces | null {\n const openingBrace = sourceCode.getTokenBefore(body.body[0])\n const closingBrace = sourceCode.getTokenAfter(body.body[body.body.length - 1])\n\n if (!openingBrace || !closingBrace)\n return null\n\n return {closingBrace, openingBrace}\n}\n","import {checkMultilineMembers} from './checkMultilineMembers'\nimport {checkSingleLineMembers} from './checkSingleLineMembers'\nimport {defaultOptions} from './defaultOptions'\nimport {getBraces} from './getBraces'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function checkInterface(\n sourceCode: TSESLint.SourceCode,\n context: TSESLint.RuleContext<MessageId, [Options]>,\n node: TSESTree.TSInterfaceDeclaration,\n): void {\n const options = context.options[0] as Options ?? {}\n const maxLength = options.maxLength ?? defaultOptions.maxLength\n\n const body = node.body\n if (!body || body.body.length === 0)\n return\n\n const braces = getBraces(sourceCode, body)\n\n if (!braces)\n return\n\n const firstLine = braces.openingBrace.loc.start.line\n const lastLine = braces.closingBrace.loc.end.line\n\n if (firstLine === lastLine)\n checkSingleLineMembers(sourceCode, context, body.body, braces, maxLength)\n else\n checkMultilineMembers(sourceCode, context, body.body, maxLength)\n}\n","import type {MessageId} from './MessageId'\n\nexport const messageIds: Record<MessageId, string> = {\n exceedsMaxLength: 'Interface line exceeds {{maxLength}} characters',\n multipleOnSameLine: 'Interface members should each be on their own line when line exceeds {{maxLength}} characters',\n}\n","import {checkInterface} from './checkInterface'\nimport {messageIds} from './messageIds'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {TSESLint} from '@typescript-eslint/utils'\n\nexport const interfacePropertyLineBreak: TSESLint.RuleModule<MessageId, [Options]> = {\n create(context) {\n const sourceCode = context.sourceCode ?? context.getSourceCode()\n\n return {\n TSInterfaceDeclaration(node): void {\n checkInterface(sourceCode, context, node)\n },\n }\n },\n\n meta: {\n docs: {\n description: 'Enforce each interface member to be on its own line when line exceeds max length.',\n },\n fixable: 'code',\n messages: messageIds,\n schema: [{\n additionalProperties: false,\n properties: {\n maxLength: {\n type: 'number',\n },\n },\n type: 'object',\n }],\n type: 'layout',\n },\n}\n","import type {TSESTree} from '@typescript-eslint/utils'\n\nexport function collectVariableDeclarators(\n node: TSESTree.VariableDeclaration,\n types: Set<string>,\n): void {\n for (const declarator of node.declarations) {\n if (declarator.id.type === 'Identifier' && declarator.id.name)\n types.add(declarator.id.name)\n }\n}\n","import type {TSESTree} from '@typescript-eslint/utils'\n\nexport function isTopLevel(node: TSESTree.Node): boolean {\n if (node.parent?.type === 'Program')\n return true\n if (\n node.parent?.type === 'ExportNamedDeclaration'\n && node.parent.parent?.type === 'Program'\n )\n return true\n return false\n}\n","import {isTopLevel} from './isTopLevel'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function handleClassDeclaration(\n node: TSESTree.ClassDeclaration,\n functions: Set<string>,\n): void {\n if (isTopLevel(node) && node.id?.name)\n functions.add(node.id.name)\n}\n","import {isTopLevel} from './isTopLevel'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function handleFunctionDeclaration(\n node: TSESTree.FunctionDeclaration,\n functions: Set<string>,\n): void {\n if (isTopLevel(node) && node.id?.name)\n functions.add(node.id.name)\n}\n","import {isTopLevel} from './isTopLevel'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function handleTSDeclareFunction(\n node: TSESTree.TSDeclareFunction,\n functions: Set<string>,\n): void {\n if (isTopLevel(node) && node.id?.name)\n functions.add(node.id.name)\n}\n","import {isTopLevel} from './isTopLevel'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function handleTSEnumDeclaration(\n node: TSESTree.TSEnumDeclaration,\n types: Set<string>,\n): void {\n if (isTopLevel(node) && node.id?.name)\n types.add(node.id.name)\n}\n","import {isTopLevel} from './isTopLevel'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function handleTSInterfaceDeclaration(\n node: TSESTree.TSInterfaceDeclaration,\n types: Set<string>,\n): void {\n if (isTopLevel(node) && node.id?.name)\n types.add(node.id.name)\n}\n","import {isTopLevel} from './isTopLevel'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function handleTSTypeAliasDeclaration(\n node: TSESTree.TSTypeAliasDeclaration,\n types: Set<string>,\n): void {\n if (isTopLevel(node) && node.id?.name)\n types.add(node.id.name)\n}\n","import * as path from 'path'\n\nexport function isExempt(filename: string): boolean {\n const name = path.basename(filename, path.extname(filename))\n const isTest = name.endsWith('.test')\n const isSpec = name.endsWith('.spec')\n const isConfig = name.endsWith('.config')\n return isTest || isSpec || isConfig\n}\n","import type {TSESTree} from '@typescript-eslint/utils'\n\nexport function isExportedDeclaration(\n parent: TSESTree.Node | undefined,\n): boolean {\n return parent?.type === 'ExportNamedDeclaration'\n}\n","export const messageIds = {\n tooManyDeclarations:\n 'File has {{count}} declarations. Put each function/class/const/type declaration in its own file.',\n}\n","import {collectVariableDeclarators} from './collectVariableDeclarators'\nimport {handleClassDeclaration} from './handleClassDeclaration'\nimport {handleFunctionDeclaration} from './handleFunctionDeclaration'\nimport {handleTSDeclareFunction} from './handleTSDeclareFunction'\nimport {handleTSEnumDeclaration} from './handleTSEnumDeclaration'\nimport {handleTSInterfaceDeclaration} from './handleTSInterfaceDeclaration'\nimport {handleTSTypeAliasDeclaration} from './handleTSTypeAliasDeclaration'\nimport {isExempt} from './isExempt'\nimport {isExportedDeclaration} from './isExportedDeclaration'\nimport {isTopLevel} from './isTopLevel'\nimport {messageIds} from './messageIds'\nimport type {MessageId} from './MessageId'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport const maxDeclarationsPerFile: TSESLint.RuleModule<MessageId, []> = {\n create(context) {\n const filename = context.filename\n\n if (isExempt(filename))\n return {}\n\n const functions = new Set<string>()\n const types = new Set<string>()\n\n return {\n ClassDeclaration(node: TSESTree.ClassDeclaration): void {\n handleClassDeclaration(node, functions)\n },\n\n FunctionDeclaration(node: TSESTree.FunctionDeclaration): void {\n handleFunctionDeclaration(node, functions)\n },\n\n 'Program:exit'(_programNode: TSESTree.Program): void {\n const totalDeclarations = functions.size + types.size\n\n if (totalDeclarations > 1) {\n context.report({\n data: {\n count: totalDeclarations,\n functions: functions.size,\n types: types.size,\n },\n messageId: 'tooManyDeclarations',\n node: _programNode,\n })\n }\n },\n\n TSDeclareFunction(node: TSESTree.TSDeclareFunction): void {\n handleTSDeclareFunction(node, functions)\n },\n\n TSEnumDeclaration(node: TSESTree.TSEnumDeclaration): void {\n handleTSEnumDeclaration(node, types)\n },\n\n TSInterfaceDeclaration(node: TSESTree.TSInterfaceDeclaration): void {\n handleTSInterfaceDeclaration(node, types)\n },\n\n TSTypeAliasDeclaration(node: TSESTree.TSTypeAliasDeclaration): void {\n handleTSTypeAliasDeclaration(node, types)\n },\n\n VariableDeclaration(node: TSESTree.VariableDeclaration): void {\n if (!isTopLevel(node))\n return\n\n const parent = node.parent\n\n if (!isExportedDeclaration(parent) && !node.declare)\n return\n\n collectVariableDeclarators(node, types)\n },\n\n 'VariableDeclaration > VariableDeclarator > ArrowFunctionExpression'(\n _node: TSESTree.Node,\n ): void {\n if (!isTopLevel(_node.parent?.parent as TSESTree.Node))\n return\n const declarator = _node.parent as TSESTree.VariableDeclarator\n if (declarator.id.type === 'Identifier' && declarator.id.name)\n functions.add(declarator.id.name)\n },\n }\n },\n\n meta: {\n docs: {\n description: 'Enforce single top-level declaration per file.',\n },\n messages: messageIds,\n schema: [],\n type: 'suggestion',\n },\n}\n","import type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function createFix(\n fixer: TSESLint.RuleFixer,\n node: TSESTree.TSUnionType,\n sourceCode: TSESLint.SourceCode,\n): TSESLint.RuleFix {\n const types = node.types.map(t => sourceCode.getText(t))\n const formattedTypes = types.map(t => ` | ${t}`).join('\\n')\n const result = `\\n${formattedTypes}`\n return fixer.replaceText(node, result)\n}\n","import type {TSESTree} from '@typescript-eslint/types'\n\nexport function isMultiline(unionType: TSESTree.TSUnionType): boolean {\n const {end, start} = unionType.loc ?? {}\n return start?.line !== end?.line\n}\n","import {createFix} from './createFix'\nimport {isMultiline} from './isMultiline'\nimport type {MessageIds} from './MessageIds'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport const multilineUnionTypeAliases: TSESLint.RuleModule<MessageIds, []> = {\n create(context) {\n return {\n TSUnionType(node: TSESTree.TSUnionType): void {\n if (node.types.length < 2)\n return\n\n const parent = node.parent\n if (!parent || parent.type !== 'TSTypeAliasDeclaration')\n return\n\n const sourceCode = context.sourceCode\n const text = sourceCode.getText(node)\n\n if (text.trim().startsWith('|'))\n return\n\n if (!isMultiline(node)) {\n context.report({\n fix: fixer => createFix(fixer, node, sourceCode),\n messageId: 'singleLine',\n node,\n })\n return\n }\n\n context.report({\n fix: fixer => createFix(fixer, node, sourceCode),\n messageId: 'missingPipes',\n node,\n })\n },\n }\n },\n\n meta: {\n docs: {\n description: 'Enforce union type aliases with multiple members to be on multiple lines.',\n },\n fixable: 'code',\n messages: {\n missingPipes: 'Multiline union type aliases should have leading pipes on each member',\n singleLine: 'Union type aliases with multiple members should be on multiple lines',\n },\n schema: [],\n type: 'layout',\n },\n}\n","import type {TSESTree} from '@typescript-eslint/utils'\n\nexport function checkTypeParameters(\n node: TSESTree.Node,\n containsInline: (node: TSESTree.Node) => null | TSESTree.TSTypeLiteral,\n): null | TSESTree.TSTypeLiteral {\n if (!('typeParameters' in node) || !node.typeParameters)\n return null\n\n for (const param of node.typeParameters.params) {\n const result = containsInline(param as TSESTree.Node)\n if (result)\n return result\n }\n return null\n}\n","import type {TSESTree} from '@typescript-eslint/utils'\n\nexport function checkUnionOrIntersectionTypes(\n node: TSESTree.TSIntersectionType | TSESTree.TSUnionType,\n containsInline: (node: TSESTree.Node) => null | TSESTree.TSTypeLiteral,\n): null | TSESTree.TSTypeLiteral {\n for (const type of node.types) {\n const result = containsInline(type)\n if (result)\n return result\n }\n return null\n}\n","import type {TSESTree} from '@typescript-eslint/utils'\n\nexport function isInlineObjectType(\n node: TSESTree.Node,\n): node is TSESTree.TSTypeLiteral {\n return node.type === 'TSTypeLiteral'\n}\n","import {checkTypeParameters} from './checkTypeParameters'\nimport {checkUnionOrIntersectionTypes} from './checkUnionOrIntersectionTypes'\nimport {isInlineObjectType} from './isInlineObjectType'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function containsInlineObjectType(\n node: TSESTree.Node,\n): null | TSESTree.TSTypeLiteral {\n if (isInlineObjectType(node))\n return node\n\n if (node.type === 'TSIntersectionType' || node.type === 'TSUnionType') {\n const result = checkUnionOrIntersectionTypes(\n node as TSESTree.TSIntersectionType | TSESTree.TSUnionType,\n containsInlineObjectType,\n )\n if (result)\n return result\n }\n\n if (node.type === 'TSArrayType')\n return containsInlineObjectType(node.elementType)\n\n const typeParamResult = checkTypeParameters(node, containsInlineObjectType)\n if (typeParamResult)\n return typeParamResult\n\n if (node.type === 'TSTypeAnnotation')\n return containsInlineObjectType(node.typeAnnotation)\n\n return null\n}\n","export function toPascalCase(str: string): string {\n return str.charAt(0).toUpperCase() + str.slice(1)\n}\n","import {toPascalCase} from './toPascalCase'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function getInlineTypeName(\n usedNames: Set<string>,\n _existingInterfaces: TSESTree.TSInterfaceDeclaration[],\n parameterName?: string,\n): string {\n const baseName = parameterName\n ? toPascalCase(parameterName)\n : 'InlineType'\n\n if (!usedNames.has(baseName)) {\n usedNames.add(baseName)\n return baseName\n }\n\n let counter = 2\n while (usedNames.has(`${baseName}${counter}`))\n counter++\n\n const name = `${baseName}${counter}`\n usedNames.add(name)\n return name\n}\n","import type {TSESTree} from '@typescript-eslint/utils'\n\nexport function getParameterNameFromFunction(\n parent: TSESTree.Node,\n): string | undefined {\n if (\n parent.type === 'ArrowFunctionExpression'\n || parent.type === 'FunctionDeclaration'\n || parent.type === 'FunctionExpression'\n ) {\n const funcNode = parent as\n | TSESTree.ArrowFunctionExpression\n | TSESTree.FunctionDeclaration\n | TSESTree.FunctionExpression\n return funcNode.id?.name\n }\n\n return undefined\n}\n","import type {TSESTree} from '@typescript-eslint/utils'\n\nexport function getParameterNameFromIdentifier(\n parent: TSESTree.Node,\n): string | undefined {\n const grandParent = parent.parent\n if (\n grandParent?.type === 'ArrowFunctionExpression'\n || grandParent?.type === 'FunctionDeclaration'\n || grandParent?.type === 'FunctionExpression'\n )\n return (parent as TSESTree.Identifier).name\n\n return undefined\n}\n","import type {TSESTree} from '@typescript-eslint/utils'\n\nexport function getParameterNameFromObjectPattern(\n parent: TSESTree.Node,\n): string | undefined {\n const grandParent = parent.parent\n if (\n grandParent?.type === 'ArrowFunctionExpression'\n || grandParent?.type === 'FunctionDeclaration'\n || grandParent?.type === 'FunctionExpression'\n )\n return 'Options'\n\n return undefined\n}\n","import type {TopLevelDeclaration} from './TopLevelDeclaration'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function getTopLevelDeclaration(\n node: TSESTree.Node,\n): TopLevelDeclaration | undefined {\n let current: TSESTree.Node | undefined = node\n const topLevelTypes = new Set([\n 'ArrowFunctionExpression',\n 'FunctionDeclaration',\n 'FunctionExpression',\n 'TSInterfaceDeclaration',\n 'TSTypeAliasDeclaration',\n 'VariableDeclaration',\n ])\n\n while (current) {\n if (topLevelTypes.has(current.type)) {\n const parent = current.parent\n const exported = parent?.type === 'ExportNamedDeclaration'\n\n if (exported && parent) {\n return {\n insertLocation: parent,\n isExported: true,\n node: current,\n }\n }\n\n return {\n insertLocation: current,\n isExported: false,\n node: current,\n }\n }\n current = current.parent as TSESTree.Node | undefined\n }\n\n return undefined\n}\n","import {getParameterNameFromFunction} from './getParameterNameFromFunction'\nimport {getParameterNameFromIdentifier} from './getParameterNameFromIdentifier'\nimport {getParameterNameFromObjectPattern} from './getParameterNameFromObjectPattern'\nimport {getTopLevelDeclaration} from './getTopLevelDeclaration'\nimport type {InlineTypeEntry} from './InlineTypeEntry'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function handleInlineType(\n node: TSESTree.TSTypeAnnotation,\n typeLiteral: TSESTree.TSTypeLiteral,\n inlineTypes: InlineTypeEntry[],\n): void {\n const result = getTopLevelDeclaration(node)\n if (!result)\n return\n\n let parameterName: string | undefined\n const parent = node.parent\n\n if (parent?.type === 'Identifier')\n parameterName = getParameterNameFromIdentifier(parent)\n else if (parent?.type === 'ObjectPattern')\n parameterName = getParameterNameFromObjectPattern(parent)\n else\n parameterName = getParameterNameFromFunction(parent)\n\n inlineTypes.push({\n annotationNode: node,\n insertLocation: result.insertLocation,\n isExported: result.isExported,\n location: result.node,\n parameterName,\n typeLiteral,\n })\n}\n","import type {TSESTree} from '@typescript-eslint/utils'\n\nexport function isIdentifierInFunction(\n parent: TSESTree.Node | undefined,\n): boolean {\n return parent?.type === 'Identifier'\n && (\n parent.parent?.type === 'FunctionDeclaration'\n || parent.parent?.type === 'FunctionExpression'\n || parent.parent?.type === 'ArrowFunctionExpression'\n )\n}\n","import type {TSESTree} from '@typescript-eslint/utils'\n\nexport function isPropertySignatureInTypeLiteral(\n parent: TSESTree.Node | undefined,\n): boolean {\n return parent?.type === 'TSPropertySignature'\n && (\n parent.parent?.type === 'TSTypeLiteral'\n || parent.parent?.type === 'TSInterfaceBody'\n )\n}\n","import type {TSESTree} from '@typescript-eslint/utils'\n\nexport function traverseUpForTypeLiteral(\n current: TSESTree.Node | undefined,\n): boolean {\n const skipTypes = new Set([\n 'TSArrayType',\n 'TSIntersectionType',\n 'TSPropertySignature',\n 'TSTypeReference',\n 'TSUnionType',\n ])\n\n while (current) {\n if (current.type === 'TSTypeLiteral')\n return true\n if (skipTypes.has(current.type)) {\n current = current.parent\n continue\n }\n break\n }\n return false\n}\n","import {isIdentifierInFunction} from './isIdentifierInFunction'\nimport {isPropertySignatureInTypeLiteral} from './isPropertySignatureInTypeLiteral'\nimport {traverseUpForTypeLiteral} from './traverseUpForTypeLiteral'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function isNestedTypeAnnotation(\n node: TSESTree.TSTypeAnnotation,\n): boolean | undefined {\n const parent = node.parent\n\n if (isPropertySignatureInTypeLiteral(parent))\n return true\n\n if (isIdentifierInFunction(parent))\n return false\n\n if (\n parent?.type === 'ArrowFunctionExpression'\n || parent?.type === 'FunctionDeclaration'\n || parent?.type === 'FunctionExpression'\n )\n return false\n\n const foundTypeLiteral = traverseUpForTypeLiteral(parent)\n return foundTypeLiteral\n}\n","import type {FixResult} from './FixResult'\nimport type {InlineTypeInfo} from './InlineTypeInfo'\nimport type {TSESLint} from '@typescript-eslint/utils'\n\nexport function prepareFix(\n sourceCode: TSESLint.SourceCode,\n inlineTypes: InlineTypeInfo[],\n): FixResult {\n const interfaceDeclarations = inlineTypes.map(({name, typeLiteral}) => {\n const typeText = sourceCode.getText(typeLiteral)\n return `interface ${name} ${typeText}`\n })\n\n const interfaceBlock = interfaceDeclarations.join('\\n')\n\n const replacements = inlineTypes.map(\n ({name, typeLiteral}) => ({name, typeLiteral}),\n )\n\n return {\n firstUsageLocation: inlineTypes[0].typeLiteral,\n interfaceBlock,\n replacements,\n }\n}\n","import {containsInlineObjectType} from './containsInlineObjectType'\nimport {getInlineTypeName} from './getInlineTypeName'\nimport {handleInlineType} from './handleInlineType'\nimport {isNestedTypeAnnotation} from './isNestedTypeAnnotation'\nimport {prepareFix} from './prepareFix'\nimport type {InlineTypeEntry} from './InlineTypeEntry'\nimport type {InlineTypeInfo} from './InlineTypeInfo'\nimport type {MessageIds} from './MessageIds'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport const noInlineObjectTypes: TSESLint.RuleModule<\n MessageIds,\n []\n> = {\n create(context) {\n const sourceCode = context.sourceCode\n const inlineTypes: InlineTypeEntry[] = []\n\n const listener = {\n TSTypeAnnotation(node: TSESTree.TSTypeAnnotation): void {\n if (isNestedTypeAnnotation(node))\n return\n\n const typeLiteral = containsInlineObjectType(node)\n if (!typeLiteral)\n return\n\n handleInlineType(node, typeLiteral, inlineTypes)\n },\n }\n\n return {\n ...listener,\n 'Program:exit'(): void {\n if (inlineTypes.length === 0)\n return\n\n const usedNames = new Set<string>()\n\n const locations = [...new Set(inlineTypes.map(t => t.insertLocation))]\n for (const loc of locations) {\n const typesAtLocation = inlineTypes.filter(\n t => t.insertLocation === loc,\n )\n\n const typesForLocation: InlineTypeInfo[] = typesAtLocation.map(entry => {\n const name = getInlineTypeName(usedNames, [], entry.parameterName)\n return {\n name,\n parameterName: entry.parameterName,\n typeLiteral: entry.typeLiteral,\n }\n })\n\n const fixResult = prepareFix(\n sourceCode,\n typesForLocation,\n )\n\n context.report({\n fix(fixer) {\n const fixes: TSESLint.RuleFix[] = []\n\n for (const replacement of fixResult.replacements) {\n fixes.push(\n fixer.replaceText(\n replacement.typeLiteral,\n replacement.name,\n ),\n )\n }\n\n const isExported = typesAtLocation[0].isExported\n if (isExported && typesAtLocation[0].insertLocation.type === 'ExportNamedDeclaration') {\n fixes.push(\n fixer.insertTextAfter(\n typesAtLocation[0].insertLocation,\n `\\n${fixResult.interfaceBlock}`,\n ),\n )\n } else {\n fixes.push(\n fixer.insertTextBefore(\n loc,\n `${fixResult.interfaceBlock}\\n`,\n ),\n )\n }\n\n return fixes\n },\n messageId: 'inlineObjectType',\n node: typesAtLocation[0].annotationNode,\n })\n }\n },\n }\n },\n\n meta: {\n docs: {\n description: 'Disallow inline object type literals in type annotations.',\n },\n fixable: 'code',\n messages: {\n inlineObjectType:\n 'Inline object types are not allowed. Use a named interface or type instead.',\n },\n schema: [],\n type: 'suggestion',\n },\n}\n","import type {TSESLint} from '@typescript-eslint/utils'\n\nexport function getLineIndent(\n sourceCode: TSESLint.SourceCode,\n line: number,\n): string {\n const text = sourceCode.getText()\n const lines = text.split('\\n')\n const lineText = lines[line - 1] ?? ''\n const match = lineText.match(/^(\\s*)/)\n return match?.[1] ?? ''\n}\n","export function getReplacementText(\n statementText: string,\n baseIndent: string,\n hasElseAfter: boolean | null,\n): string {\n const statementIndent = `${baseIndent} `\n\n if (hasElseAfter)\n return `\\n${statementIndent}${statementText}\\n${baseIndent}`\n\n return `\\n${statementIndent}${statementText}`\n}\n","import type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function isSingleLineStatement(\n node: TSESTree.Statement,\n sourceCode: TSESLint.SourceCode,\n): boolean {\n const firstToken = sourceCode.getFirstToken(node)\n const lastToken = sourceCode.getLastToken(node)\n\n if (!firstToken || !lastToken)\n return false\n\n return firstToken.loc.start.line === lastToken.loc.end.line\n}\n","import {getLineIndent} from './getLineIndent'\nimport {getReplacementText} from './getReplacementText'\nimport {isSingleLineStatement} from './isSingleLineStatement'\nimport type {MessageIds} from './MessageIds'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function checkBlockStatement(\n node: TSESTree.BlockStatement,\n context: TSESLint.RuleContext<MessageIds, []>,\n): void {\n if (node.body.length !== 1)\n return\n\n const statement = node.body[0]\n const sourceCode = context.getSourceCode()\n\n if (isSingleLineStatement(statement, sourceCode)) {\n context.report({\n fix(fixer) {\n const statementText = sourceCode.getText(statement)\n const tokenBefore = sourceCode.getTokenBefore(node)\n const tokenBeforeLine = tokenBefore?.loc?.start?.line ?? node.loc?.start?.line ?? 1\n const baseIndent = getLineIndent(sourceCode, tokenBeforeLine)\n\n const rangeStart = tokenBefore ? tokenBefore.range[1] : node.range[0]\n const range: Readonly<[number, number]> = [rangeStart, node.range[1]]\n\n const tokenAfter = sourceCode.getTokenAfter(node)\n const hasElseAfter = tokenAfter && tokenAfter.value === 'else'\n\n const replacementText = getReplacementText(\n statementText,\n baseIndent,\n hasElseAfter,\n )\n\n return fixer.replaceTextRange(range, replacementText)\n },\n messageId: 'unnecessaryBraces',\n node,\n })\n }\n}\n","import type {TSESLint} from '@typescript-eslint/utils'\n\nexport function detectIndentStep(sourceCode: TSESLint.SourceCode): number {\n const text = sourceCode.getText()\n const lines = text.split('\\n')\n const indentCounts = new Map<number, number>()\n\n for (const line of lines) {\n const match = line.match(/^( *)/)\n if (match) {\n const spaces = match[1].length\n if (spaces > 0)\n indentCounts.set(spaces, (indentCounts.get(spaces) ?? 0) + 1)\n }\n }\n\n const sortedIndents = Array.from(indentCounts.entries())\n .filter(([spaces]) => spaces > 0)\n .sort((a, b) => a[0] - b[0])\n\n if (sortedIndents.length === 0)\n return 2\n\n const minIndent = sortedIndents[0][0]\n\n for (const step of [2, 4]) {\n const isMultipleOfStep = sortedIndents.every(([n]) => n % step === 0)\n if (isMultipleOfStep)\n return step\n }\n\n return minIndent\n}\n","export function reindentText(\n text: string,\n newBaseIndent: string,\n indentStep: string,\n): string {\n const lines = text.split('\\n')\n\n let minIndent = Infinity\n for (let i = 1; i < lines.length; i++) {\n const line = lines[i]\n if (line.trim() === '')\n continue\n const match = line.match(/^( *)/)\n if (match)\n minIndent = Math.min(minIndent, match[1].length)\n }\n\n if (minIndent === Infinity) {\n return lines\n .map(line => {\n if (line.trim() === '')\n return ''\n return newBaseIndent + indentStep + line.trimStart()\n })\n .join('\\n')\n }\n\n return lines\n .map((line, index) => {\n if (line.trim() === '')\n return ''\n\n if (index === 0)\n return newBaseIndent + indentStep + line.trimStart()\n\n const relativeIndent = line.slice(minIndent)\n return newBaseIndent + indentStep + relativeIndent\n })\n .join('\\n')\n}\n","import {detectIndentStep} from '../shared/detectIndentStep'\nimport {getLineIndent} from '../shared/getLineIndent'\nimport {isSingleLineStatement} from './isSingleLineStatement'\nimport {reindentText} from '../shared/reindentText'\nimport type {MessageIds} from './MessageIds'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function checkNonBlockStatement(\n node: TSESTree.Statement,\n context: TSESLint.RuleContext<MessageIds, []>,\n): void {\n // Skip if it's already a block statement\n if (node.type === 'BlockStatement')\n return\n\n const sourceCode = context.getSourceCode()\n\n // If the statement spans multiple lines, it needs braces\n if (!isSingleLineStatement(node, sourceCode)) {\n context.report({\n fix(fixer) {\n const statementText = sourceCode.getText(node)\n const parent = node.parent\n\n // Get the base indentation from the parent control statement's line\n const parentLine = parent?.loc?.start?.line ?? node.loc?.start?.line ?? 1\n const baseIndent = getLineIndent(sourceCode, parentLine)\n\n // Detect indentation step size\n const indentStepSize = detectIndentStep(sourceCode)\n const indentStep = ' '.repeat(indentStepSize)\n\n // Re-indent the statement\n const reindentedText = reindentText(\n statementText,\n baseIndent,\n indentStep,\n )\n\n // Format with opening brace on same line, properly indented body, and closing brace\n const fixed = `{\\n${reindentedText}\\n${baseIndent}}`\n\n return [fixer.replaceText(node, fixed)]\n },\n messageId: 'missingBraces',\n node,\n })\n }\n}\n","import {checkBlockStatement} from './checkBlockStatement'\nimport {checkNonBlockStatement} from './checkNonBlockStatement'\nimport type {RuleContext} from './RuleContext'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function checkDoWhileStatement(\n node: TSESTree.DoWhileStatement,\n context: RuleContext,\n): void {\n if (node.body.type === 'BlockStatement')\n checkBlockStatement(node.body, context)\n else\n checkNonBlockStatement(node.body, context)\n}\n","import {checkBlockStatement} from './checkBlockStatement'\nimport {checkNonBlockStatement} from './checkNonBlockStatement'\nimport type {RuleContext} from './RuleContext'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function checkForInStatement(\n node: TSESTree.ForInStatement,\n context: RuleContext,\n): void {\n if (node.body.type === 'BlockStatement')\n checkBlockStatement(node.body, context)\n else\n checkNonBlockStatement(node.body, context)\n}\n","import {checkBlockStatement} from './checkBlockStatement'\nimport {checkNonBlockStatement} from './checkNonBlockStatement'\nimport type {RuleContext} from './RuleContext'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function checkForOfStatement(\n node: TSESTree.ForOfStatement,\n context: RuleContext,\n): void {\n if (node.body.type === 'BlockStatement')\n checkBlockStatement(node.body, context)\n else\n checkNonBlockStatement(node.body, context)\n}\n","import {checkBlockStatement} from './checkBlockStatement'\nimport {checkNonBlockStatement} from './checkNonBlockStatement'\nimport type {RuleContext} from './RuleContext'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function checkForStatement(\n node: TSESTree.ForStatement,\n context: RuleContext,\n): void {\n if (node.body.type === 'BlockStatement')\n checkBlockStatement(node.body, context)\n else\n checkNonBlockStatement(node.body, context)\n}\n","import {checkBlockStatement} from './checkBlockStatement'\nimport {checkNonBlockStatement} from './checkNonBlockStatement'\nimport type {RuleContext} from './RuleContext'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function checkIfStatement(\n node: TSESTree.IfStatement,\n context: RuleContext,\n): void {\n // Check consequent (the main if body)\n if (node.consequent.type === 'BlockStatement')\n checkBlockStatement(node.consequent, context)\n else\n checkNonBlockStatement(node.consequent, context)\n\n // Check alternate (the else body)\n if (!node.alternate)\n return\n\n // Don't check else-if - let the nested IfStatement handle it\n if (node.alternate.type === 'IfStatement')\n return\n\n if (node.alternate.type === 'BlockStatement')\n checkBlockStatement(node.alternate, context)\n else\n checkNonBlockStatement(node.alternate, context)\n}\n","import {checkBlockStatement} from './checkBlockStatement'\nimport {checkNonBlockStatement} from './checkNonBlockStatement'\nimport type {RuleContext} from './RuleContext'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function checkWhileStatement(\n node: TSESTree.WhileStatement,\n context: RuleContext,\n): void {\n if (node.body.type === 'BlockStatement')\n checkBlockStatement(node.body, context)\n else\n checkNonBlockStatement(node.body, context)\n}\n","import {checkDoWhileStatement} from './checkDoWhileStatement'\nimport {checkForInStatement} from './checkForInStatement'\nimport {checkForOfStatement} from './checkForOfStatement'\nimport {checkForStatement} from './checkForStatement'\nimport {checkIfStatement} from './checkIfStatement'\nimport {checkWhileStatement} from './checkWhileStatement'\nimport type {MessageIds} from './MessageIds'\nimport type {TSESLint} from '@typescript-eslint/utils'\n\nexport const noUnnecessaryBraces: TSESLint.RuleModule<MessageIds, []> = {\n create(context) {\n return {\n DoWhileStatement: node => checkDoWhileStatement(node, context),\n ForInStatement: node => checkForInStatement(node, context),\n ForOfStatement: node => checkForOfStatement(node, context),\n ForStatement: node => checkForStatement(node, context),\n IfStatement: node => checkIfStatement(node, context),\n WhileStatement: node => checkWhileStatement(node, context),\n }\n },\n\n meta: {\n docs: {\n description:\n 'Enforce consistent brace usage for single-statement control bodies.',\n },\n fixable: 'code',\n messages: {\n missingBraces: 'Multi-line statement must be wrapped in braces',\n unnecessaryBraces: 'Unnecessary braces around single-line statement',\n },\n schema: [],\n type: 'suggestion',\n },\n}\n","import type {TSESTree} from '@typescript-eslint/types'\n\nexport function isShorthandProperty(property: TSESTree.Property): boolean {\n return property.shorthand\n}\n","import {isShorthandProperty} from './isShorthandProperty'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function areAllShorthand(properties: TSESTree.Property[]): boolean {\n return properties.every(isShorthandProperty)\n}\n","import type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function getPropertyText(\n sourceCode: TSESLint.SourceCode,\n property: TSESTree.Property,\n): string {\n return sourceCode.getText(property)\n}\n","import {getPropertyText} from './getPropertyText'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function getInlineObjectLength(\n sourceCode: TSESLint.SourceCode,\n properties: TSESTree.Property[],\n): number {\n if (properties.length === 0)\n return 2\n\n const propLengths = properties.map(p => getPropertyText(sourceCode, p).length)\n const propsTotal = propLengths.reduce((a, b) => a + b, 0)\n const commas = Math.max(0, properties.length - 1)\n\n return 2 + propsTotal + commas\n}\n","import {areAllShorthand} from './areAllShorthand'\nimport {getInlineObjectLength} from './getInlineObjectLength'\nimport type {Braces} from './Braces'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function checkMultiline(\n sourceCode: TSESLint.SourceCode,\n context: TSESLint.RuleContext<MessageId, [Options]>,\n node: TSESTree.ObjectExpression,\n braces: Braces,\n maxLength: number,\n): void {\n const properties = node.properties as TSESTree.Property[]\n const allShorthand = areAllShorthand(properties)\n\n if (!allShorthand)\n return\n\n const inlineLength = getInlineObjectLength(sourceCode, properties)\n\n if (inlineLength > maxLength)\n return\n\n context.report({\n fix(fixer) {\n const names: string[] = []\n for (const prop of properties) {\n if (prop.key.type === 'Identifier')\n names.push(prop.key.name)\n else\n names.push(sourceCode.getText(prop))\n }\n\n return fixer.replaceText(node, `{${names.join(', ')}}`)\n },\n messageId: 'multilineCanBeSingleLine',\n node: properties[0],\n })\n}\n","import {detectIndentStep} from '../shared/detectIndentStep'\nimport type {Braces} from './Braces'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function buildMultilineFix(\n fixer: TSESLint.RuleFixer,\n braces: Braces,\n properties: TSESTree.Property[],\n sourceCode: TSESLint.SourceCode,\n): TSESLint.RuleFix {\n const indentStep = detectIndentStep(sourceCode)\n const lineIndent = sourceCode\n .getLines()[braces.openingBrace.loc.start.line - 1]\n .match(/^\\s*/)?.[0] ?? ''\n const indent = lineIndent + ' '.repeat(indentStep)\n\n const lines: string[] = ['{']\n for (const prop of properties) {\n const propText = sourceCode.getText(prop)\n lines.push(`${indent}${propText},`)\n }\n lines.push(`${lineIndent}}`)\n\n return fixer.replaceTextRange(\n [braces.openingBrace.range[0], braces.closingBrace.range[1]],\n lines.join('\\n'),\n )\n}\n","import type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function getPropertyName(\n sourceCode: TSESLint.SourceCode,\n prop: TSESTree.Property,\n): string {\n if (prop.key.type === 'Identifier')\n return prop.key.name\n return sourceCode.getText(prop)\n}\n","import {getPropertyName} from './getPropertyName'\nimport type {Braces} from './Braces'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function buildShorthandFix(\n fixer: TSESLint.RuleFixer,\n braces: Braces,\n properties: TSESTree.Property[],\n sourceCode: TSESLint.SourceCode,\n): TSESLint.RuleFix {\n const names = properties.map(p => getPropertyName(sourceCode, p))\n\n return fixer.replaceTextRange(\n [braces.openingBrace.range[0], braces.closingBrace.range[1]],\n `{${names.join(', ')}}`,\n )\n}\n","import type {TSESTree} from '@typescript-eslint/types'\n\nexport function canConvertToShorthand(property: TSESTree.Property): boolean {\n if (property.shorthand)\n return true\n\n if (property.kind !== 'init')\n return false\n\n if (property.key.type !== 'Identifier')\n return false\n\n if (property.value.type !== 'Identifier')\n return false\n\n return property.key.name === property.value.name\n}\n","import {canConvertToShorthand} from './canConvertToShorthand'\nimport {getInlineObjectLength} from './getInlineObjectLength'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function shouldCollapseToShorthand(\n properties: TSESTree.Property[],\n sourceCode: TSESLint.SourceCode,\n maxLength: number,\n): boolean {\n const anyShorthand = properties.some(p => p.shorthand)\n const allCanConvert = properties.every(canConvertToShorthand)\n const shorthandLength = allCanConvert\n ? getInlineObjectLength(sourceCode, properties)\n : Infinity\n\n return !anyShorthand && allCanConvert && shorthandLength <= maxLength\n}\n","import {areAllShorthand} from './areAllShorthand'\nimport {buildMultilineFix} from './buildMultilineFix'\nimport {buildShorthandFix} from './buildShorthandFix'\nimport {getInlineObjectLength} from './getInlineObjectLength'\nimport {shouldCollapseToShorthand} from './shouldCollapseToShorthand'\nimport type {Braces} from './Braces'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function checkSingleLine(\n sourceCode: TSESLint.SourceCode,\n context: TSESLint.RuleContext<MessageId, [Options]>,\n properties: TSESTree.Property[],\n braces: Braces,\n maxLength: number,\n): void {\n if (properties.length === 1)\n return\n\n const allShorthand = areAllShorthand(properties)\n const inlineLength = getInlineObjectLength(sourceCode, properties)\n\n if (allShorthand && inlineLength <= maxLength)\n return\n\n if (!allShorthand) {\n if (shouldCollapseToShorthand(properties, sourceCode, maxLength)) {\n context.report({\n fix: fixer => buildShorthandFix(fixer, braces, properties, sourceCode),\n messageId: 'mixedPropertiesNotAllowed',\n node: properties[0],\n })\n return\n }\n\n context.report({\n fix: fixer => buildMultilineFix(fixer, braces, properties, sourceCode),\n messageId: 'mixedPropertiesNotAllowed',\n node: properties[0],\n })\n return\n }\n\n context.report({\n fix: fixer => buildMultilineFix(fixer, braces, properties, sourceCode),\n messageId: 'singleLineExceedsMaxLength',\n node: properties[0],\n })\n}\n","import type {Options} from './Options'\n\nexport const defaultOptions: Options = {\n maxLength: 80,\n}\n","import type {Braces} from './Braces'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function getBraces(\n sourceCode: TSESLint.SourceCode,\n node: TSESTree.ObjectExpression,\n): Braces | null {\n const properties = node.properties\n if (properties.length === 0)\n return null\n\n const firstProp = properties[0]\n const lastProp = properties[properties.length - 1]\n\n const openingBrace = sourceCode.getTokenBefore(firstProp)\n const closingBrace = sourceCode.getTokenAfter(lastProp)\n\n if (!openingBrace || !closingBrace)\n return null\n\n return {closingBrace, openingBrace}\n}\n","import {checkMultiline} from './checkMultiline'\nimport {checkSingleLine} from './checkSingleLine'\nimport {defaultOptions} from './defaultOptions'\nimport {getBraces} from './getBraces'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function checkObject(\n sourceCode: TSESLint.SourceCode,\n context: TSESLint.RuleContext<MessageId, [Options]>,\n node: TSESTree.ObjectExpression,\n): void {\n const options = context.options[0] as Options ?? {}\n const maxLength = options.maxLength ?? defaultOptions.maxLength!\n\n const properties = node.properties as TSESTree.Property[]\n\n if (properties.length === 0)\n return\n\n const braces = getBraces(sourceCode, node)\n if (!braces)\n return\n\n const firstLine = braces.openingBrace.loc.start.line\n const lastLine = braces.closingBrace.loc.end.line\n\n if (firstLine === lastLine)\n checkSingleLine(sourceCode, context, properties, braces, maxLength)\n else\n checkMultiline(sourceCode, context, node, braces, maxLength)\n}\n","export const messageIds = {\n mixedPropertiesNotAllowed: 'mixedPropertiesNotAllowed',\n multilineCanBeSingleLine: 'multilineCanBeSingleLine',\n singleLineExceedsMaxLength: 'singleLineExceedsMaxLength',\n} as const\n","import {checkObject} from './checkObject'\nimport {messageIds} from './messageIds'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {TSESLint} from '@typescript-eslint/utils'\n\nexport const objectPropertyLineBreak: TSESLint.RuleModule<MessageId, [Options]> = {\n create(context) {\n const sourceCode = context.sourceCode ?? context.getSourceCode()\n\n return {\n ObjectExpression(node): void {\n checkObject(sourceCode, context, node)\n },\n }\n },\n\n meta: {\n docs: {\n description: 'Enforce object literal formatting based on complexity and line length.',\n },\n fixable: 'code',\n messages: messageIds,\n schema: [{\n additionalProperties: false,\n properties: {\n maxLength: {\n type: 'number',\n },\n },\n type: 'object',\n }],\n type: 'layout',\n },\n}\n","export const messageIds = {\n tooManyExports:\n 'Only one export is allowed per file. Found {{count}} exports.',\n} as const\n","import {isExempt} from '../shared/isExempt'\nimport {messageIds} from './messageIds'\nimport type {MessageId} from './MessageId'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport const oneExportPerFile: TSESLint.RuleModule<MessageId, []> = {\n create(context) {\n const filename = context.filename\n\n if (isExempt(filename))\n return {}\n\n let exportCount = 0\n\n return {\n ExportDefaultDeclaration(_node: TSESTree.ExportDefaultDeclaration): void {\n exportCount++\n },\n\n ExportNamedDeclaration(_node: TSESTree.ExportNamedDeclaration): void {\n exportCount++\n },\n\n 'Program:exit'(programNode: TSESTree.Program): void {\n if (exportCount > 1) {\n context.report({\n data: {count: exportCount},\n messageId: 'tooManyExports',\n node: programNode,\n })\n }\n },\n }\n },\n\n meta: {\n docs: {\n description: 'Enforce single export per file.',\n },\n messages: messageIds,\n schema: [],\n type: 'suggestion',\n },\n}\n","import type {LocalDeclaration} from './LocalDeclaration'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function isValidExportSpecifier(\n specifier: TSESTree.ExportSpecifier,\n localDeclarations: Map<string, LocalDeclaration>,\n): boolean {\n if (specifier.local.type !== 'Identifier')\n return false\n\n if (specifier.exported.type !== 'Identifier')\n return false\n\n if (specifier.local.name !== specifier.exported.name)\n return false\n\n return localDeclarations.has(specifier.local.name)\n}\n","import {isValidExportSpecifier} from './isValidExportSpecifier'\nimport type {LocalDeclaration} from './LocalDeclaration'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function canInlineSpecifiers(\n specifiers: TSESTree.ExportSpecifier[],\n localDeclarations: Map<string, LocalDeclaration>,\n): boolean {\n return specifiers.every(spec =>\n isValidExportSpecifier(spec, localDeclarations),\n )\n}\n","import type {DeclarationNode} from './DeclarationNode'\n\nexport function getDeclarationName(node: DeclarationNode): null | string {\n if (node.type !== 'VariableDeclaration')\n return node.id?.name ?? null\n\n const declarations = node.declarations\n\n if (declarations.length === 1) {\n const id = declarations[0].id\n if (id.type === 'Identifier')\n return id.name\n }\n\n return null\n}\n","import type {DeclarationNode} from './DeclarationNode'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function isExportableDeclaration(\n node: TSESTree.Node,\n): node is DeclarationNode {\n const type = node.type\n return (\n type === 'TSInterfaceDeclaration'\n || type === 'TSTypeAliasDeclaration'\n || type === 'ClassDeclaration'\n || type === 'FunctionDeclaration'\n || type === 'VariableDeclaration'\n )\n}\n","import {canInlineSpecifiers} from './canInlineSpecifiers'\nimport {getDeclarationName} from './getDeclarationName'\nimport {isExportableDeclaration} from './isExportableDeclaration'\nimport type {LocalDeclaration} from './LocalDeclaration'\nimport type {MessageIds} from './MessageIds'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport const preferInlineExport: TSESLint.RuleModule<MessageIds, []> = {\n create(context) {\n const localDeclarations = new Map<string, LocalDeclaration>()\n\n function visitDeclaration(node: TSESTree.Node): void {\n if (!isExportableDeclaration(node))\n return\n\n const name = getDeclarationName(node)\n if (name)\n localDeclarations.set(name, {name, node})\n }\n\n return {\n ClassDeclaration: visitDeclaration,\n ExportNamedDeclaration(node: TSESTree.ExportNamedDeclaration): void {\n if (node.source)\n return\n\n if (!node.specifiers || node.specifiers.length === 0)\n return\n\n if (!canInlineSpecifiers(node.specifiers, localDeclarations))\n return\n\n context.report({\n fix(fixer) {\n const fixes: ReturnType<typeof fixer.insertTextBefore>[] = []\n\n for (const specifier of node.specifiers) {\n const name = (specifier.local as TSESTree.Identifier).name\n const decl = localDeclarations.get(name)\n if (decl)\n fixes.push(fixer.insertTextBefore(decl.node, 'export '))\n }\n\n fixes.push(fixer.remove(node))\n\n return fixes\n },\n messageId: 'preferInline',\n node,\n })\n },\n FunctionDeclaration: visitDeclaration,\n TSInterfaceDeclaration: visitDeclaration,\n TSTypeAliasDeclaration: visitDeclaration,\n VariableDeclaration: visitDeclaration,\n }\n },\n\n meta: {\n docs: {\n description:\n 'Enforce using inline export syntax instead of separate export statements.',\n },\n fixable: 'code',\n messages: {\n preferInline:\n 'Use inline export instead of separate export statement',\n },\n schema: [],\n type: 'suggestion',\n },\n}\n","import type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function buildCollapsedParams(\n sourceCode: TSESLint.SourceCode,\n params: TSESTree.Parameter[],\n): string {\n const paramsText = params\n .map((param, index) => {\n const text = sourceCode.getText(param)\n const isLastParam = index === params.length - 1\n return isLastParam ? text : text + ','\n })\n .join(' ')\n\n return `(${paramsText})`\n}\n","import type {ArrowFunctionParens} from './ArrowFunctionParens'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function calculateCollapsedLength(\n sourceCode: TSESLint.SourceCode,\n openingParen: ArrowFunctionParens['openingParen'],\n collapsedParams: string,\n returnType: TSESTree.TSTypeAnnotation | undefined,\n): number {\n let returnTypeText = ''\n if (returnType)\n returnTypeText = sourceCode.getText(returnType)\n\n const allLines = sourceCode.getText().split('\\n')\n const closingLine = allLines[openingParen.loc.start.line - 1]\n const textAfterClosingParen = closingLine.slice(openingParen.loc.start.column)\n\n return openingParen.loc.start.column + collapsedParams.length + returnTypeText.length + textAfterClosingParen.length\n}\n","import type {Options} from './Options'\n\nexport const defaultOptions = {\n maxLength: 80,\n} as const satisfies Options\n","import type {ArrowFunctionParens} from './ArrowFunctionParens'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function getArrowFunctionParens(\n sourceCode: TSESLint.SourceCode,\n params: TSESTree.Parameter[],\n): ArrowFunctionParens | null {\n if (params.length === 0)\n return null\n\n const firstParam = params[0]\n const lastParam = params[params.length - 1]\n\n const openingParen = sourceCode.getTokenBefore(firstParam)\n let closingParen = sourceCode.getTokenAfter(lastParam)\n\n while (closingParen && closingParen.value === ',')\n closingParen = sourceCode.getTokenAfter(closingParen)\n\n if (!openingParen || !closingParen)\n return null\n\n if (openingParen.value !== '(' || closingParen.value !== ')')\n return null\n\n return {closingParen, openingParen}\n}\n","import type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function isShorthand(\n sourceCode: TSESLint.SourceCode,\n node: TSESTree.ArrowFunctionExpression,\n): boolean {\n if (node.params.length !== 1)\n return false\n\n const firstParam = node.params[0]\n const tokenBefore = sourceCode.getTokenBefore(firstParam)\n return !tokenBefore || tokenBefore.value !== '('\n}\n","import type {ArrowFunctionParens} from './ArrowFunctionParens'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function reportViolation(\n context: TSESLint.RuleContext<MessageId, [Options]>,\n node: TSESTree.ArrowFunctionExpression,\n collapsedParams: string,\n returnTypeText: string,\n arrowToken: TSESTree.Token,\n openingParen: ArrowFunctionParens['openingParen'],\n): void {\n context.report({\n fix: fixer => fixer.replaceTextRange(\n [openingParen.range[0], arrowToken.range[1]],\n collapsedParams + returnTypeText + ' =>',\n ),\n messageId: 'singleLine',\n node,\n })\n}\n","import {buildCollapsedParams} from './buildCollapsedParams'\nimport {calculateCollapsedLength} from './calculateCollapsedLength'\nimport {defaultOptions} from './defaultOptions'\nimport {getArrowFunctionParens} from './getArrowFunctionParens'\nimport {isShorthand} from './isShorthand'\nimport {reportViolation} from './reportViolation'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function checkArrowFunction(\n sourceCode: TSESLint.SourceCode,\n context: TSESLint.RuleContext<MessageId, [Options]>,\n node: TSESTree.ArrowFunctionExpression,\n): void {\n const options = context.options[0] as Options ?? {}\n const maxLength = options.maxLength ?? defaultOptions.maxLength\n\n if (isShorthand(sourceCode, node))\n return\n\n const parens = getArrowFunctionParens(sourceCode, node.params)\n if (!parens)\n return\n\n const {closingParen, openingParen} = parens\n if (openingParen.loc.start.line === closingParen.loc.end.line)\n return\n\n const arrowToken = sourceCode.getTokenAfter(\n closingParen,\n token => token.value === '=>',\n )\n if (!arrowToken)\n return\n\n const collapsedParams = buildCollapsedParams(sourceCode, node.params)\n const collapsedLength = calculateCollapsedLength(\n sourceCode,\n openingParen,\n collapsedParams,\n node.returnType,\n )\n\n if (collapsedLength <= maxLength) {\n const returnTypeText = node.returnType\n ? sourceCode.getText(node.returnType)\n : ''\n reportViolation(\n context,\n node,\n collapsedParams,\n returnTypeText,\n arrowToken,\n openingParen,\n )\n }\n}\n","import type {MessageId} from './MessageId'\n\nexport const messageIds: Record<MessageId, string> = {\n singleLine: 'Arrow function parameters can be on a single line',\n}\n","import {checkArrowFunction} from './checkArrowFunction'\nimport {messageIds} from './messageIds'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {TSESLint} from '@typescript-eslint/utils'\n\nexport const singleLineArrowFunctionParameters: TSESLint.RuleModule<MessageId, [Options]> = {\n create(context) {\n const sourceCode = context.sourceCode ?? context.getSourceCode()\n\n return {\n ArrowFunctionExpression(node): void {\n if (node.params.length === 0)\n return\n\n checkArrowFunction(sourceCode, context, node)\n },\n }\n },\n\n meta: {\n docs: {\n description: 'Enforce arrow function parameters to be on a single line when they fit.',\n },\n fixable: 'code',\n messages: messageIds,\n schema: [{\n additionalProperties: false,\n properties: {\n maxLength: {\n type: 'number',\n },\n },\n type: 'object',\n }],\n type: 'layout',\n },\n}\n","import type {Options} from './Options'\n\nexport const defaultOptions = {\n maxLength: 80,\n} as const satisfies Options\n","import type {Parens} from './Parens'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function getParens(\n sourceCode: TSESLint.SourceCode,\n nodes: TSESTree.Node[],\n): null | Parens {\n if (nodes.length === 0)\n return null\n\n const firstNode = nodes[0]\n const lastNode = nodes[nodes.length - 1]\n\n const openingParen = sourceCode.getTokenBefore(\n firstNode,\n token => token.value === '(',\n )\n const closingParen = sourceCode.getTokenAfter(\n lastNode,\n token => token.value === ')',\n )\n\n if (!openingParen || !closingParen)\n return null\n\n return {closingParen, openingParen}\n}\n","import {defaultOptions} from './defaultOptions'\nimport {getLineLength} from '../shared/getLineLength'\nimport {getParens} from './getParens'\nimport {isValidParens} from '../shared/isValidParens'\nimport type {FunctionNode} from './FunctionNode'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {TSESLint} from '@typescript-eslint/utils'\n\nexport function checkFunction(\n sourceCode: TSESLint.SourceCode,\n context: TSESLint.RuleContext<MessageId, [Options]>,\n node: FunctionNode,\n): void {\n const options = context.options[0] as Options ?? {}\n const maxLength = options.maxLength ?? defaultOptions.maxLength\n\n const params = node.params\n if (params.length === 0)\n return\n\n const parens = getParens(sourceCode, params)\n\n if (!isValidParens(parens))\n return\n\n if (parens.openingParen.loc.start.line === parens.closingParen.loc.end.line)\n return\n\n const paramsText = params\n .map((param, index) => {\n const text = sourceCode.getText(param)\n const isLastParam = index === params.length - 1\n if (isLastParam)\n return text\n const comma = sourceCode.getTokenAfter(\n param,\n token => token.value === ',',\n )\n if (comma && comma.loc.end.line === param.loc.end.line)\n return text + ','\n return text\n })\n .join(' ')\n\n const closingLine = parens.closingParen.loc.end.line\n const closingCol = parens.closingParen.loc.end.column\n const closingLineText = getLineLength(sourceCode, closingLine) > closingCol\n ? sourceCode.getText().split('\\n')[closingLine - 1].slice(closingCol)\n : ''\n const singleLineLength = parens.openingParen.loc.start.column + 1 + paramsText.length + 1 + closingLineText.length\n\n if (singleLineLength <= maxLength) {\n context.report({\n fix: fixer => fixer.replaceTextRange(\n [parens.openingParen.range[0], parens.closingParen.range[1]],\n `(${paramsText})`,\n ),\n messageId: 'singleLine',\n node,\n })\n }\n}\n","import type {MessageId} from './MessageId'\n\nexport const messageIds: Record<MessageId, string> = {\n singleLine: 'Function parameters can be on a single line',\n}\n","import {checkFunction} from './checkFunction'\nimport {messageIds} from './messageIds'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {TSESLint} from '@typescript-eslint/utils'\n\nexport const singleLineFunctionParameters: TSESLint.RuleModule<MessageId, [Options]> = {\n create(context) {\n const sourceCode = context.sourceCode ?? context.getSourceCode()\n\n return {\n FunctionDeclaration(node): void {\n checkFunction(sourceCode, context, node)\n },\n\n FunctionExpression(node): void {\n checkFunction(sourceCode, context, node)\n },\n\n TSCallSignatureDeclaration(node): void {\n checkFunction(sourceCode, context, node)\n },\n\n TSFunctionType(node): void {\n checkFunction(sourceCode, context, node)\n },\n\n TSMethodSignature(node): void {\n checkFunction(sourceCode, context, node)\n },\n }\n },\n\n meta: {\n docs: {\n description: 'Enforce function parameters to be on a single line when they fit.',\n },\n fixable: 'code',\n messages: messageIds,\n schema: [{\n additionalProperties: false,\n properties: {\n maxLength: {\n type: 'number',\n },\n },\n type: 'object',\n }],\n type: 'layout',\n },\n}\n","import type {TSESTree} from '@typescript-eslint/types'\n\nexport function formatAttributes(\n attributes: readonly TSESTree.ImportAttribute[],\n): string {\n if (attributes.length === 0)\n return ''\n\n const formatted = attributes.map(\n attr => {\n const key = attr.key.type === 'Identifier'\n ? attr.key.name\n : attr.key.value\n const value = attr.value.value\n return `${key}: '${value}'`\n },\n ).join(', ')\n\n return ` with {${formatted}}`\n}\n","import type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function formatNamed(\n specifiers: TSESTree.ImportSpecifier[],\n sourceCode: TSESLint.SourceCode,\n): string {\n return specifiers.map(s => sourceCode.getText(s)).join(', ')\n}\n","import {formatNamed} from './formatNamed'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function formatSpecifiers(\n declaration: TSESTree.ImportDeclaration,\n sourceCode: TSESLint.SourceCode,\n): string {\n const defaultSpecifier = declaration.specifiers.find(\n (s): s is TSESTree.ImportDefaultSpecifier => s.type === 'ImportDefaultSpecifier',\n )\n const namespaceSpecifier = declaration.specifiers.find(\n (s): s is TSESTree.ImportNamespaceSpecifier => s.type === 'ImportNamespaceSpecifier',\n )\n const namedSpecifiers = declaration.specifiers.filter(\n (s): s is TSESTree.ImportSpecifier => s.type === 'ImportSpecifier',\n )\n\n if (namespaceSpecifier)\n return `* as ${namespaceSpecifier.local.name}`\n\n if (defaultSpecifier && namedSpecifiers.length > 0) {\n return `${defaultSpecifier.local.name}, {${formatNamed(\n namedSpecifiers,\n sourceCode,\n )}}`\n }\n\n if (defaultSpecifier)\n return defaultSpecifier.local.name\n\n if (namedSpecifiers.length === 0)\n return ''\n\n return `{${formatNamed(namedSpecifiers, sourceCode)}}`\n}\n","import {formatAttributes} from './formatAttributes'\nimport {formatSpecifiers} from './formatSpecifiers'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function createImportFix(\n fixer: TSESLint.RuleFixer,\n declaration: TSESTree.ImportDeclaration,\n sourceCode: TSESLint.SourceCode,\n): TSESLint.RuleFix {\n const source = declaration.source.value\n const prefix = declaration.importKind === 'type' ? 'import type ' : 'import '\n const specifiers = formatSpecifiers(declaration, sourceCode)\n const attributes = formatAttributes(declaration.attributes)\n\n if (specifiers === '') {\n const result = `${prefix}'${source}'${attributes}`\n return fixer.replaceText(declaration, result)\n }\n\n const result = `${prefix}${specifiers} from '${source}'${attributes}`\n return fixer.replaceText(declaration, result)\n}\n","import type {TSESTree} from '@typescript-eslint/types'\n\nexport function isMultilineImport(\n declaration: TSESTree.ImportDeclaration,\n): boolean {\n const {end, start} = declaration.loc ?? {}\n return start?.line !== end?.line\n}\n","import {createImportFix} from './createImportFix'\nimport {isMultilineImport} from './isMultilineImport'\nimport type {MessageIds} from './MessageIds'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport const singleLineImports: TSESLint.RuleModule<MessageIds, []> = {\n create(context) {\n return {\n ImportDeclaration(node: TSESTree.ImportDeclaration): void {\n if (!isMultilineImport(node))\n return\n\n context.report({\n fix: fixer => createImportFix(fixer, node, context.sourceCode),\n messageId: 'multiline',\n node,\n })\n },\n }\n },\n\n meta: {\n docs: {\n description: 'Enforce imports to be on a single line.',\n },\n fixable: 'code',\n messages: {\n multiline: 'Import should be on a single line',\n },\n schema: [],\n type: 'layout',\n },\n}\n","import {formatAttributes} from '../singleLineImports/formatAttributes'\nimport type {ReExportDeclaration} from '@lib/ReExportDeclaration'\nimport type {TSESLint} from '@typescript-eslint/utils'\n\nexport function createReExportFix(\n fixer: TSESLint.RuleFixer,\n declaration: ReExportDeclaration,\n sourceCode: TSESLint.SourceCode,\n): TSESLint.RuleFix {\n const source = declaration.source!.value\n\n if (declaration.type === 'ExportAllDeclaration') {\n const exported = declaration.exported\n ? `* as ${sourceCode.getText(declaration.exported)}`\n : '*'\n const attributes = formatAttributes(declaration.attributes)\n const result = `export ${exported} from '${source}'${attributes}`\n return fixer.replaceText(declaration, result)\n }\n\n const prefix = declaration.exportKind === 'type' ? 'export type ' : 'export '\n const specifiers = declaration.specifiers.map(\n s => sourceCode.getText(s),\n ).join(', ')\n const attributes = formatAttributes(declaration.attributes)\n const result = `${prefix}{${specifiers}} from '${source}'${attributes}`\n\n return fixer.replaceText(declaration, result)\n}\n","import type {ReExportDeclaration} from '@lib/ReExportDeclaration'\n\nexport function isMultilineReExport(declaration: ReExportDeclaration): boolean {\n const {end, start} = declaration.loc ?? {}\n return start?.line !== end?.line\n}\n","import {createReExportFix} from './createReExportFix'\nimport {isMultilineReExport} from './isMultilineReExport'\nimport type {MessageIds} from './MessageIds'\nimport type {ReExportDeclaration} from '@lib/ReExportDeclaration'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport const singleLineReExports: TSESLint.RuleModule<MessageIds, []> = {\n create(context) {\n const checkDeclaration = (\n node: TSESTree.Node,\n declaration: ReExportDeclaration,\n ): void => {\n // Skip local exports (only process re-exports with a source)\n if (!declaration.source)\n return\n\n if (!isMultilineReExport(declaration))\n return\n\n context.report({\n fix: fixer => createReExportFix(fixer, declaration, context.sourceCode),\n messageId: 'multiline',\n node,\n })\n }\n\n return {\n ExportAllDeclaration: (node: TSESTree.ExportAllDeclaration): void => {\n checkDeclaration(node, node)\n },\n ExportNamedDeclaration: (node: TSESTree.ExportNamedDeclaration): void => {\n checkDeclaration(node, node)\n },\n }\n },\n\n meta: {\n docs: {\n description: 'Enforce re-exports to be on a single line.',\n },\n fixable: 'code',\n messages: {\n multiline: 'Re-export should be on a single line',\n },\n schema: [],\n type: 'layout',\n },\n}\n","import type {ImportGroup} from './ImportGroup'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function categorizeImport(\n declaration: TSESTree.ImportDeclaration,\n): ImportGroup {\n if (declaration.specifiers.some(s => s.type === 'ImportNamespaceSpecifier')) {\n return declaration.importKind === 'type'\n ? 'type-namespace'\n : 'namespace'\n }\n\n if (declaration.specifiers.some(s => s.type === 'ImportDefaultSpecifier')) {\n return declaration.importKind === 'type'\n ? 'type-default'\n : 'default'\n }\n\n if (declaration.importKind === 'type')\n return 'type-named'\n\n if (declaration.specifiers.length === 0)\n return 'side-effect'\n\n return 'named'\n}\n","import {categorizeImport} from './categorizeImport'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function getImportSortKey(\n declaration: TSESTree.ImportDeclaration,\n): string {\n const group = categorizeImport(declaration)\n\n if (group === 'side-effect')\n return declaration.source.value\n\n if (group === 'namespace' || group === 'type-namespace') {\n const namespaceSpecifier = declaration.specifiers.find(\n s => s.type === 'ImportNamespaceSpecifier',\n )\n return `*${namespaceSpecifier?.local.name ?? ''}`\n }\n\n if (group === 'default' || group === 'type-default') {\n const defaultSpecifier = declaration.specifiers.find(\n s => s.type === 'ImportDefaultSpecifier',\n )\n return defaultSpecifier?.local.name ?? ''\n }\n\n const specifier = declaration.specifiers[0]\n return specifier.local.name\n}\n","import {categorizeImport} from './categorizeImport'\nimport {getImportSortKey} from './getImportSortKey'\nimport type {CategorizedImport} from './CategorizedImport'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function categorizeImports(\n declarations: TSESTree.ImportDeclaration[],\n): CategorizedImport[] {\n return declarations.map(declaration => ({\n declaration,\n group: categorizeImport(declaration),\n sortKey: getImportSortKey(declaration),\n }))\n}\n","export function compare(a: string, b: string): number {\n return a.localeCompare(b, 'en', {sensitivity: 'case'})\n}\n","import type {ImportGroup} from './ImportGroup'\n\nexport const importGroupOrder: ImportGroup[] = [\n 'side-effect',\n 'namespace',\n 'default',\n 'named',\n 'type-namespace',\n 'type-default',\n 'type-named',\n]\n","import {compare} from '@lib/compare'\nimport {importGroupOrder} from './importGroupOrder'\nimport type {CategorizedImport} from './CategorizedImport'\nimport type {ImportValidationError} from './ImportValidationError'\n\nexport function checkAlphabeticalSorting(\n categorizedImports: CategorizedImport[],\n): ImportValidationError[] {\n const errors: ImportValidationError[] = []\n\n for (const importGroup of importGroupOrder) {\n const groupImports = categorizedImports.filter(c => c.group === importGroup)\n const expectedSortedImports = [...groupImports].sort((a, b) => compare(\n a.sortKey,\n b.sortKey,\n ))\n for (let i = 0; i < groupImports.length; i++) {\n if (groupImports[i] !== expectedSortedImports[i]) {\n errors.push({\n messageId: 'sortedImports',\n node: groupImports[i].declaration,\n })\n }\n }\n }\n\n return errors\n}\n","import {importGroupOrder} from './importGroupOrder'\nimport type {CategorizedImport} from './CategorizedImport'\nimport type {ImportValidationError} from './ImportValidationError'\n\nexport function checkGroupOrdering(\n categorizedImports: CategorizedImport[],\n): ImportValidationError[] {\n const errors: ImportValidationError[] = []\n\n let currentGroupIndex = -1\n for (const {declaration, group: importGroup} of categorizedImports) {\n const groupIndex = importGroupOrder.indexOf(importGroup)\n if (groupIndex < currentGroupIndex) {\n errors.push({\n messageId: 'wrongGroup',\n node: declaration,\n })\n } else\n currentGroupIndex = groupIndex\n }\n\n return errors\n}\n","import type {TSESTree} from '@typescript-eslint/types'\n\nexport function getImportSpecifierName(\n specifier: TSESTree.ImportSpecifier,\n): string {\n return specifier.imported.type === 'Identifier'\n ? specifier.imported.name\n : String(specifier.imported.value)\n}\n","import {compare} from '@lib/compare'\nimport {getImportSpecifierName} from './getImportSpecifierName'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function areSpecifiersSorted(\n specifiers: TSESTree.ImportSpecifier[],\n): boolean {\n const names = specifiers.map(s => getImportSpecifierName(s))\n const sorted = [...names].sort((a, b) => compare(a, b))\n return names.every((name, i) => name === sorted[i])\n}\n","import type {TSESTree} from '@typescript-eslint/types'\n\nexport function getImportNamedSpecifiers(\n declaration: TSESTree.ImportDeclaration,\n): TSESTree.ImportSpecifier[] {\n return declaration.specifiers.filter(\n (s): s is TSESTree.ImportSpecifier => s.type === 'ImportSpecifier',\n )\n}\n","import {areSpecifiersSorted} from './areSpecifiersSorted'\nimport {getImportNamedSpecifiers} from './getImportNamedSpecifiers'\nimport type {CategorizedImport} from './CategorizedImport'\nimport type {ImportValidationError} from './ImportValidationError'\n\nexport function checkSpecifiersSorting(\n categorized: CategorizedImport[],\n): ImportValidationError[] {\n const errors: ImportValidationError[] = []\n const namedImportDeclarations = categorized.filter(c => c.group === 'named')\n\n for (const {declaration} of namedImportDeclarations) {\n const namedSpecifiers = getImportNamedSpecifiers(declaration)\n if (namedSpecifiers.length > 1 && !areSpecifiersSorted(namedSpecifiers)) {\n errors.push({\n messageId: 'sortedNames',\n node: declaration,\n })\n }\n }\n\n return errors\n}\n","import {compare} from '@lib/compare'\nimport {getImportSpecifierName} from './getImportSpecifierName'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function sortImportSpecifiersText(\n specifiers: TSESTree.ImportSpecifier[],\n sourceCode: TSESLint.SourceCode,\n): string {\n const sorted = [...specifiers].sort((a, b) => {\n const nameA = getImportSpecifierName(a)\n const nameB = getImportSpecifierName(b)\n return compare(nameA, nameB)\n })\n return sorted.map(s => sourceCode.getText(s)).join(', ')\n}\n","import {areSpecifiersSorted} from '../areSpecifiersSorted'\nimport {getImportNamedSpecifiers} from '../getImportNamedSpecifiers'\nimport {sortImportSpecifiersText} from '../sortImportSpecifiersText'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function formatNamedImportSpecifiers(\n declaration: TSESTree.ImportDeclaration,\n sourceCode: TSESLint.SourceCode,\n): string {\n const specifiers = getImportNamedSpecifiers(declaration)\n\n if (specifiers.length > 1 && !areSpecifiersSorted(specifiers)) {\n const sortedSpecifiers = sortImportSpecifiersText(specifiers, sourceCode)\n const source = declaration.source.value\n const prefix = declaration.importKind === 'type' ? 'import type ' : 'import '\n return `${prefix}{${sortedSpecifiers}} from '${source}'`\n }\n\n return sourceCode.getText(declaration)\n}\n","import {formatNamedImportSpecifiers} from './formatNamedImportSpecifiers'\nimport {importGroupOrder} from '../importGroupOrder'\nimport type {CategorizedImport} from '../CategorizedImport'\nimport type {ImportGroup} from '../ImportGroup'\nimport type {TSESLint} from '@typescript-eslint/utils'\n\nexport function buildSortedImportCode(\n grouped: Record<ImportGroup, CategorizedImport[]>,\n sourceCode: TSESLint.SourceCode,\n): string[] {\n const sortedCode: string[] = []\n\n for (const group of importGroupOrder) {\n for (const {declaration} of grouped[group] ?? []) {\n if (group === 'named' || group === 'type-named')\n sortedCode.push(formatNamedImportSpecifiers(declaration, sourceCode))\n else\n sortedCode.push(sourceCode.getText(declaration))\n }\n }\n\n return sortedCode\n}\n","import type {CategorizedImport} from '../CategorizedImport'\nimport type {ImportGroup} from '../ImportGroup'\n\nexport function groupImportsByType(\n categorized: CategorizedImport[],\n): Record<ImportGroup, CategorizedImport[]> {\n const grouped: Record<ImportGroup, CategorizedImport[]> = {\n default: [],\n named: [],\n namespace: [],\n 'side-effect': [],\n 'type-default': [],\n 'type-named': [],\n 'type-namespace': [],\n }\n\n for (const item of categorized)\n grouped[item.group].push(item)\n\n return grouped\n}\n","import {compare} from '@lib/compare'\nimport type {CategorizedImport} from '../CategorizedImport'\nimport type {ImportGroup} from '../ImportGroup'\n\nexport function sortImportGroups(\n grouped: Record<ImportGroup, CategorizedImport[]>,\n): void {\n grouped['side-effect'].sort((a, b) => compare(a.sortKey, b.sortKey))\n grouped['namespace'].sort((a, b) => compare(a.sortKey, b.sortKey))\n grouped['default'].sort((a, b) => compare(a.sortKey, b.sortKey))\n grouped['named'].sort((a, b) => compare(a.sortKey, b.sortKey))\n grouped['type-namespace'].sort((a, b) => compare(a.sortKey, b.sortKey))\n grouped['type-default'].sort((a, b) => compare(a.sortKey, b.sortKey))\n grouped['type-named'].sort((a, b) => compare(a.sortKey, b.sortKey))\n}\n","import {buildSortedImportCode} from './buildSortedImportCode'\nimport {categorizeImports} from '../categorizeImports'\nimport {groupImportsByType} from './groupImportsByType'\nimport {sortImportGroups} from './sortImportGroups'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function createFixForGroup(\n fixer: TSESLint.RuleFixer,\n importDeclarations: TSESTree.ImportDeclaration[],\n sourceCode: TSESLint.SourceCode,\n): null | TSESLint.RuleFix {\n if (importDeclarations.length === 0)\n return null\n\n const categorized = categorizeImports(importDeclarations)\n const grouped = groupImportsByType(categorized)\n\n sortImportGroups(grouped)\n\n const sortedCode = buildSortedImportCode(grouped, sourceCode)\n .join('\\n')\n\n const firstImport = importDeclarations[0]\n const lastImport = importDeclarations[importDeclarations.length - 1]\n\n return fixer.replaceTextRange(\n [firstImport.range![0], lastImport.range![1]],\n sortedCode,\n )\n}\n","import {createFixForGroup} from './createFixForGroup'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function createImportFix(\n fixer: TSESLint.RuleFixer,\n importGroups: TSESTree.ImportDeclaration[][],\n sourceCode: TSESLint.SourceCode,\n): TSESLint.RuleFix[] {\n const fixes: TSESLint.RuleFix[] = []\n\n for (const group of importGroups) {\n const fix = createFixForGroup(fixer, group, sourceCode)\n if (fix)\n fixes.push(fix)\n }\n\n return fixes\n}\n","import type {TSESTree} from '@typescript-eslint/types'\n\nexport function getImportGroups(\n programBody: TSESTree.ProgramStatement[],\n): TSESTree.ImportDeclaration[][] {\n const groups: TSESTree.ImportDeclaration[][] = []\n let currentImportGroup: TSESTree.ImportDeclaration[] = []\n\n for (const statement of programBody) {\n if (statement.type === 'ImportDeclaration') {\n currentImportGroup.push(statement)\n continue\n }\n\n if (currentImportGroup.length > 0) {\n groups.push(currentImportGroup)\n currentImportGroup = []\n }\n }\n\n if (currentImportGroup.length > 0)\n groups.push(currentImportGroup)\n\n return groups\n}\n","import {categorizeImports} from './categorizeImports'\nimport {checkAlphabeticalSorting} from './checkAlphabeticalSorting'\nimport {checkGroupOrdering} from './checkGroupOrdering'\nimport {checkSpecifiersSorting} from './checkSpecifiersSorting'\nimport {createImportFix} from './createFix'\nimport {getImportGroups} from './getImportGroups'\nimport type {ImportValidationError} from './ImportValidationError'\nimport type {MessageIds} from './MessageIds'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport const sortedImports: TSESLint.RuleModule<MessageIds, []> = {\n create(context) {\n return {\n Program(node: TSESTree.Program): void {\n const programBody = node.body\n const importGroups = getImportGroups(programBody)\n if (importGroups.length === 0)\n return\n\n const allImportErrors: ImportValidationError[] = []\n\n // Check each import group independently\n for (const group of importGroups) {\n const categorized = categorizeImports(group)\n const errors: ImportValidationError[] = [\n ...checkGroupOrdering(categorized),\n ...checkAlphabeticalSorting(categorized),\n ...checkSpecifiersSorting(categorized),\n ]\n allImportErrors.push(...errors)\n }\n\n for (const error of allImportErrors) {\n context.report({\n fix(fixer) {\n const sourceCode = context.sourceCode\n return createImportFix(fixer, importGroups, sourceCode)\n },\n messageId: error.messageId,\n node: error.node,\n })\n }\n },\n }\n },\n meta: {\n docs: {\n description: 'Enforce sorted imports alphabetically.',\n },\n fixable: 'code',\n messages: {\n sortedImports: 'Imports should be sorted alphabetically',\n sortedNames: 'Named imports should be sorted alphabetically',\n wrongGroup: 'Import is in wrong group',\n },\n schema: [],\n type: 'suggestion',\n },\n}\n","import type {ReExportDeclaration} from '@lib/ReExportDeclaration'\nimport type {ReExportGroup} from './ReExportGroup'\n\nexport function categorizeReExport(\n declaration: ReExportDeclaration,\n): ReExportGroup {\n // Example: export * from 'module' or export * as ns from 'module'\n if (declaration.type === 'ExportAllDeclaration') {\n // Example: export type * from 'module'\n if (declaration.exportKind === 'type') {\n // Example: export type * as ns from 'module'\n if (declaration.exported)\n return 'type-namespace'\n // Example: export type * from 'module'\n return 'type-all'\n }\n // Example: export * as ns from 'module'\n if (declaration.exported)\n return 're-export-namespace'\n // Example: export * from 'module'\n return 're-export-all'\n }\n\n // Example: export type {Type} from 'module'\n if (declaration.exportKind === 'type')\n return 'type-named'\n\n // Example: export { type Type } from 'module' (inline type modifier)\n if (declaration.specifiers?.some(s => s.exportKind === 'type'))\n return 'type-named'\n\n // Example: export {value} from 'module'\n return 're-export-named'\n}\n","import {categorizeReExport} from './categorizeReExport'\nimport type {ReExportDeclaration} from '@lib/ReExportDeclaration'\n\nexport function getReExportSortKey(declaration: ReExportDeclaration): string {\n const group = categorizeReExport(declaration)\n\n if (declaration.type === 'ExportAllDeclaration') {\n if (group === 're-export-namespace') {\n if (declaration.exported?.type === 'Identifier')\n return `*${declaration.exported.name}`\n }\n return declaration.source.value\n }\n\n const specifier = declaration.specifiers[0]\n if (!specifier)\n return ''\n\n return specifier.local.type === 'Identifier'\n ? specifier.local.name\n : specifier.local.value\n}\n","import {categorizeReExport} from './categorizeReExport'\nimport {getReExportSortKey} from './getReExportSortKey'\nimport type {CategorizedReExport} from './CategorizedReExport'\nimport type {ReExportDeclaration} from '@lib/ReExportDeclaration'\n\nexport function categorizeReExports(\n declarations: ReExportDeclaration[],\n): CategorizedReExport[] {\n return declarations.map(declaration => {\n return {\n declaration,\n group: categorizeReExport(declaration),\n sortKey: getReExportSortKey(declaration),\n } as CategorizedReExport\n })\n}\n","import type {ReExportGroup} from './ReExportGroup'\n\nexport const reExportGroupOrder: ReExportGroup[] = [\n 're-export-all',\n 're-export-namespace',\n 're-export-named',\n 'type-all',\n 'type-namespace',\n 'type-named',\n]\n","import {compare} from '@lib/compare'\nimport {reExportGroupOrder} from './reExportGroupOrder'\nimport type {CategorizedReExport} from './CategorizedReExport'\nimport type {ReExportValidationError} from './ReExportValidationError'\n\nexport function checkAlphabeticalSorting(\n categorized: CategorizedReExport[],\n): ReExportValidationError[] {\n const errors: ReExportValidationError[] = []\n\n for (const group of reExportGroupOrder) {\n const groupReExports = categorized.filter(c => c.group === group)\n const sorted = [...groupReExports].sort((a, b) =>\n compare(a.sortKey, b.sortKey),\n )\n for (let i = 0; i < groupReExports.length; i++) {\n if (groupReExports[i] !== sorted[i]) {\n errors.push({\n messageId: 'sortedReExports',\n node: groupReExports[i].declaration,\n })\n }\n }\n }\n\n return errors\n}\n","import {reExportGroupOrder} from './reExportGroupOrder'\nimport type {CategorizedReExport} from './CategorizedReExport'\nimport type {ReExportValidationError} from './ReExportValidationError'\n\nexport function checkGroupOrdering(\n categorized: CategorizedReExport[],\n): ReExportValidationError[] {\n const errors: ReExportValidationError[] = []\n\n let currentGroupIndex = -1\n for (const {declaration, group} of categorized) {\n const groupIndex = reExportGroupOrder.indexOf(group)\n if (groupIndex < currentGroupIndex) {\n errors.push({\n messageId: 'wrongGroup',\n node: declaration,\n })\n } else\n currentGroupIndex = groupIndex\n }\n\n return errors\n}\n","import type {TSESTree} from '@typescript-eslint/types'\n\nexport function getSpecifierName(specifier: TSESTree.ExportSpecifier): string {\n return specifier.local.type === 'Identifier'\n ? specifier.local.name\n : String(specifier.local.value)\n}\n","import {compare} from '@lib/compare'\nimport {getSpecifierName} from './getSpecifierName'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function areSpecifiersSorted(\n specifiers: TSESTree.ExportSpecifier[],\n): boolean {\n const names = specifiers.map(s => getSpecifierName(s))\n const sorted = [...names].sort((a, b) => compare(a, b))\n return names.every((name, i) => name === sorted[i])\n}\n","import type {TSESTree} from '@typescript-eslint/types'\n\nexport function getReExportNamedSpecifiers(\n declaration: TSESTree.ExportNamedDeclaration,\n): TSESTree.ExportSpecifier[] {\n return declaration.specifiers.filter(\n s => s.type === 'ExportSpecifier' && s.local.type === 'Identifier',\n )\n}\n","import type {CategorizedNamedReExport} from './CategorizedNamedReExport'\nimport type {CategorizedReExport} from './CategorizedReExport'\n\nexport function isNamedReExport(\n x: CategorizedReExport,\n): x is CategorizedNamedReExport {\n return x.group !== 're-export-all' && x.group !== 're-export-namespace'\n}\n","import {areSpecifiersSorted} from './areSpecifiersSorted'\nimport {getReExportNamedSpecifiers} from './getReExportNamedSpecifiers'\nimport {isNamedReExport} from './isNamedReExport'\nimport type {CategorizedReExport} from './CategorizedReExport'\nimport type {ReExportValidationError} from './ReExportValidationError'\n\nexport function checkSpecifiersSorting(\n categorized: CategorizedReExport[],\n): ReExportValidationError[] {\n const errors: ReExportValidationError[] = []\n const namedReExports = categorized.filter(isNamedReExport)\n\n for (const {declaration} of namedReExports) {\n const specifiers = getReExportNamedSpecifiers(declaration)\n const isSorted = areSpecifiersSorted(specifiers)\n if (specifiers.length > 1 && !isSorted) {\n errors.push({\n messageId: 'sortedNames',\n node: declaration,\n })\n }\n }\n\n return errors\n}\n","import {compare} from '@lib/compare'\nimport {getSpecifierName} from './getSpecifierName'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function sortSpecifiersText(\n specifiers: TSESTree.ExportSpecifier[],\n sourceCode: TSESLint.SourceCode,\n): string {\n const sorted = [...specifiers].sort((a, b) => {\n const nameA = getSpecifierName(a)\n const nameB = getSpecifierName(b)\n return compare(nameA, nameB)\n })\n return sorted.map(s => sourceCode.getText(s)).join(', ')\n}\n","import {areSpecifiersSorted} from '../areSpecifiersSorted'\nimport {getReExportNamedSpecifiers} from '../getReExportNamedSpecifiers'\nimport {sortSpecifiersText} from '../sortSpecifiersText'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function formatNamedReExportSpecifiers(\n declaration: TSESTree.ExportNamedDeclaration,\n sourceCode: TSESLint.SourceCode,\n): string {\n const specifiers = getReExportNamedSpecifiers(declaration)\n\n if (specifiers.length > 1 && !areSpecifiersSorted(specifiers)) {\n const sortedSpecifiers = sortSpecifiersText(specifiers, sourceCode)\n const source = declaration.source!.value\n const prefix = declaration.exportKind === 'type' ? 'export type ' : 'export '\n return `${prefix}{${sortedSpecifiers}} from '${source}'`\n }\n\n return sourceCode.getText(declaration)\n}\n","import {formatNamedReExportSpecifiers} from './formatNamedReExportSpecifiers'\nimport {isNamedReExport} from '../isNamedReExport'\nimport {reExportGroupOrder} from '../reExportGroupOrder'\nimport type {CategorizedReExport} from '../CategorizedReExport'\nimport type {ReExportGroup} from '../ReExportGroup'\nimport type {TSESLint} from '@typescript-eslint/utils'\n\nexport function buildSortedReExportCode(\n grouped: Record<ReExportGroup, CategorizedReExport[]>,\n sourceCode: TSESLint.SourceCode,\n): string[] {\n const sortedCode: string[] = []\n\n for (const group of reExportGroupOrder) {\n for (const item of grouped[group]) {\n if (isNamedReExport(item)) {\n sortedCode.push(\n formatNamedReExportSpecifiers(\n item.declaration,\n sourceCode,\n ),\n )\n } else\n sortedCode.push(sourceCode.getText(item.declaration))\n }\n }\n\n return sortedCode\n}\n","import type {CategorizedReExport} from '../CategorizedReExport'\nimport type {ReExportGroup} from '../ReExportGroup'\n\nexport function groupReExportsByType(\n categorized: CategorizedReExport[],\n): Record<ReExportGroup, CategorizedReExport[]> {\n const grouped: Record<ReExportGroup, CategorizedReExport[]> = {\n 're-export-all': [],\n 're-export-named': [],\n 're-export-namespace': [],\n 'type-all': [],\n 'type-named': [],\n 'type-namespace': [],\n }\n\n for (const item of categorized)\n grouped[item.group].push(item)\n\n return grouped\n}\n","import {compare} from '@lib/compare'\nimport type {CategorizedReExport} from '../CategorizedReExport'\nimport type {ReExportGroup} from '../ReExportGroup'\n\nexport function sortExportGroups(\n grouped: Record<ReExportGroup, CategorizedReExport[]>,\n): void {\n grouped['re-export-all'].sort((a, b) => compare(a.sortKey, b.sortKey))\n grouped['re-export-namespace'].sort((a, b) => compare(a.sortKey, b.sortKey))\n grouped['re-export-named'].sort((a, b) => compare(a.sortKey, b.sortKey))\n grouped['type-all'].sort((a, b) => compare(a.sortKey, b.sortKey))\n grouped['type-namespace'].sort((a, b) => compare(a.sortKey, b.sortKey))\n grouped['type-named'].sort((a, b) => compare(a.sortKey, b.sortKey))\n}\n","import {buildSortedReExportCode} from './buildSortedReExportCode'\nimport {categorizeReExports} from '../categorizeReExports'\nimport {groupReExportsByType} from './groupReExportsByType'\nimport {sortExportGroups} from './sortExportGroups'\nimport type {ReExportDeclaration} from '@lib/ReExportDeclaration'\nimport type {TSESLint} from '@typescript-eslint/utils'\n\nexport function createFixForGroup(\n fixer: TSESLint.RuleFixer,\n reExportDeclarations: ReExportDeclaration[],\n sourceCode: TSESLint.SourceCode,\n): null | TSESLint.RuleFix {\n if (reExportDeclarations.length === 0)\n return null\n\n const categorized = categorizeReExports(reExportDeclarations)\n const grouped = groupReExportsByType(categorized)\n\n sortExportGroups(grouped)\n\n const sortedCode = buildSortedReExportCode(grouped, sourceCode)\n .join('\\n')\n\n const firstReExport = reExportDeclarations[0]\n const lastReExport = reExportDeclarations[reExportDeclarations.length - 1]\n\n return fixer.replaceTextRange(\n [firstReExport.range![0], lastReExport.range![1]],\n sortedCode,\n )\n}\n","import {createFixForGroup} from './createFixForGroup'\nimport type {ReExportDeclaration} from '@lib/ReExportDeclaration'\nimport type {TSESLint} from '@typescript-eslint/utils'\n\nexport function createReExportFix(\n fixer: TSESLint.RuleFixer,\n reExportGroups: ReExportDeclaration[][],\n sourceCode: TSESLint.SourceCode,\n): TSESLint.RuleFix[] {\n const fixes: TSESLint.RuleFix[] = []\n\n for (const group of reExportGroups) {\n const fix = createFixForGroup(fixer, group, sourceCode)\n if (fix)\n fixes.push(fix)\n }\n\n return fixes\n}\n","import type {ReExportDeclaration} from '@lib/ReExportDeclaration'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function isReExportDeclaration(\n statement: TSESTree.ProgramStatement,\n): statement is ReExportDeclaration {\n return (statement.type === 'ExportNamedDeclaration' && statement.source !== null)\n || statement.type === 'ExportAllDeclaration'\n}\n","import {isReExportDeclaration} from './isReExportDeclaration'\nimport type {ReExportDeclaration} from '@lib/ReExportDeclaration'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function getReExportGroups(\n programBody: TSESTree.ProgramStatement[],\n): ReExportDeclaration[][] {\n const groups: ReExportDeclaration[][] = []\n let currentGroup: ReExportDeclaration[] = []\n\n for (const statement of programBody) {\n if (isReExportDeclaration(statement)) {\n currentGroup.push(statement)\n continue\n }\n\n if (currentGroup.length > 0) {\n groups.push(currentGroup)\n currentGroup = []\n }\n }\n\n if (currentGroup.length > 0)\n groups.push(currentGroup)\n\n return groups\n}\n","import {categorizeReExports} from './categorizeReExports'\nimport {checkAlphabeticalSorting} from './checkAlphabeticalSorting'\nimport {checkGroupOrdering} from './checkGroupOrdering'\nimport {checkSpecifiersSorting} from './checkSpecifiersSorting'\nimport {createReExportFix} from './createFix'\nimport {getReExportGroups} from './getReExportGroups'\nimport type {MessageIds} from './MessageIds'\nimport type {ReExportValidationError} from './ReExportValidationError'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport const sortedReExports: TSESLint.RuleModule<MessageIds, []> = {\n create(context) {\n return {\n Program(node: TSESTree.Program): void {\n const programBody = node.body\n const reExportGroups = getReExportGroups(programBody)\n if (reExportGroups.length === 0)\n return\n\n const allReExportErrors: ReExportValidationError[] = []\n\n // Check each re-export group independently\n for (const group of reExportGroups) {\n const categorizedReExports = categorizeReExports(group)\n const groupErrors: ReExportValidationError[] = [\n ...checkGroupOrdering(categorizedReExports),\n ...checkAlphabeticalSorting(categorizedReExports),\n ...checkSpecifiersSorting(categorizedReExports),\n ]\n allReExportErrors.push(...groupErrors)\n }\n\n for (const error of allReExportErrors) {\n context.report({\n fix(fixer) {\n const sourceCode = context.sourceCode\n return createReExportFix(fixer, reExportGroups, sourceCode)\n },\n messageId: error.messageId,\n node: error.node,\n })\n }\n },\n }\n },\n meta: {\n docs: {\n description: 'Enforce sorted exports alphabetically.',\n },\n fixable: 'code',\n messages: {\n sortedNames: 'Named exports should be sorted alphabetically',\n sortedReExports: 'Exports should be sorted alphabetically',\n wrongGroup: 'Export is in wrong group',\n },\n schema: [],\n type: 'suggestion',\n },\n}\n","import {arrayItemsLineBreak} from '../rules/arrayItemsLineBreak'\nimport {braceStyleControlStatements} from '../rules/braceStyleControlStatements'\nimport {braceStyleObjectLiteral} from '../rules/braceStyleObjectLiteral'\nimport {compactArrayItems} from '../rules/compactArrayItems'\nimport {exportFilenameMatch} from '../rules/exportFilenameMatch'\nimport {functionCallArgumentLineBreak} from '../rules/functionCallArgumentLineBreak'\nimport {functionCognitiveComplexity} from '../rules/functionCognitiveComplexity'\nimport {functionParameterLineBreak} from '../rules/functionParameterLineBreak'\nimport {importsAndReExportsAtTop} from '../rules/importsAndReExportsAtTop'\nimport {individualImports} from '../rules/individualImports'\nimport {individualReExports} from '../rules/individualReExports'\nimport {interfacePropertyLineBreak} from '../rules/interfacePropertyLineBreak'\nimport {maxDeclarationsPerFile} from '../rules/maxDeclarationsPerFile'\nimport {multilineUnionTypeAliases} from '../rules/multilineUnionTypeAliases'\nimport {noInlineObjectTypes} from '../rules/noInlineObjectTypes'\nimport {noUnnecessaryBraces} from '../rules/noUnnecessaryBraces'\nimport {objectPropertyLineBreak} from '../rules/objectPropertyLineBreak'\nimport {oneExportPerFile} from '../rules/oneExportPerFile'\nimport {preferInlineExport} from '../rules/preferInlineExport'\nimport {singleLineArrowFunctionParameters} from '../rules/singleLineArrowFunctionParameters'\nimport {singleLineFunctionParameters} from '../rules/singleLineFunctionParameters'\nimport {singleLineImports} from '../rules/singleLineImports'\nimport {singleLineReExports} from '../rules/singleLineReExports'\nimport {sortedImports} from '../rules/sortedImports'\nimport {sortedReExports} from '../rules/sortedReExports'\nimport type {TSESLint} from '@typescript-eslint/utils'\n\nexport const customRules: TSESLint.FlatConfig.Config = {\n plugins: {\n '@borela-tech': {\n rules: {\n 'array-items-line-break': arrayItemsLineBreak,\n 'brace-style-control-statements': braceStyleControlStatements,\n 'brace-style-object-literal': braceStyleObjectLiteral,\n 'compact-array-items': compactArrayItems,\n 'export-filename-match': exportFilenameMatch,\n 'function-call-argument-line-break': functionCallArgumentLineBreak,\n 'function-cognitive-complexity': functionCognitiveComplexity,\n 'function-parameter-line-break': functionParameterLineBreak,\n 'imports-and-re-exports-at-top': importsAndReExportsAtTop,\n 'individual-imports': individualImports,\n 'individual-re-exports': individualReExports,\n 'interface-property-line-break': interfacePropertyLineBreak,\n 'max-declarations-per-file': maxDeclarationsPerFile,\n 'multiline-union-type-aliases': multilineUnionTypeAliases,\n 'no-inline-object-types': noInlineObjectTypes,\n 'no-unnecessary-braces': noUnnecessaryBraces,\n 'object-property-line-break': objectPropertyLineBreak,\n 'one-export-per-file': oneExportPerFile,\n 'prefer-inline-export': preferInlineExport,\n 'single-line-arrow-function-parameters': singleLineArrowFunctionParameters,\n 'single-line-function-parameters': singleLineFunctionParameters,\n 'single-line-imports': singleLineImports,\n 'single-line-re-exports': singleLineReExports,\n 'sorted-imports': sortedImports,\n 'sorted-re-exports': sortedReExports,\n },\n },\n },\n rules: {\n '@borela-tech/array-items-line-break': [\n 'error',\n {maxLength: 80},\n ],\n '@borela-tech/brace-style-control-statements': 'error',\n '@borela-tech/brace-style-object-literal': 'error',\n '@borela-tech/compact-array-items': 'error',\n '@borela-tech/export-filename-match': 'error',\n '@borela-tech/function-call-argument-line-break': [\n 'error',\n {maxLength: 80},\n ],\n '@borela-tech/function-cognitive-complexity': [\n 'error',\n {maxCognitiveComplexity: 15},\n ],\n '@borela-tech/function-parameter-line-break': [\n 'error',\n {maxLength: 80},\n ],\n '@borela-tech/imports-and-re-exports-at-top': 'error',\n '@borela-tech/individual-imports': 'error',\n '@borela-tech/individual-re-exports': 'error',\n '@borela-tech/interface-property-line-break': [\n 'error',\n {maxLength: 80},\n ],\n '@borela-tech/max-declarations-per-file': 'error',\n '@borela-tech/multiline-union-type-aliases': 'error',\n '@borela-tech/no-inline-object-types': 'error',\n '@borela-tech/no-unnecessary-braces': 'error',\n '@borela-tech/object-property-line-break': 'error',\n '@borela-tech/one-export-per-file': 'error',\n '@borela-tech/prefer-inline-export': 'error',\n '@borela-tech/single-line-arrow-function-parameters': [\n 'error',\n {maxLength: 80},\n ],\n '@borela-tech/single-line-function-parameters': [\n 'error',\n {maxLength: 80},\n ],\n '@borela-tech/single-line-imports': 'error',\n '@borela-tech/single-line-re-exports': 'error',\n '@borela-tech/sorted-imports': 'error',\n '@borela-tech/sorted-re-exports': 'error',\n },\n}\n","import type {TSESLint} from '@typescript-eslint/utils'\n\nexport const generalRules: TSESLint.FlatConfig.Config = {\n rules: {\n 'capitalized-comments': [\n 'error',\n 'always',\n {ignoreConsecutiveComments: true},\n ],\n complexity: ['error', 10],\n 'no-restricted-exports': ['error', {\n restrictDefaultExports: {\n direct: true,\n },\n }],\n 'react/react-in-jsx-scope': 'off',\n },\n}\n","import type {TSESLint} from '@typescript-eslint/utils'\n\nexport const ignores: TSESLint.FlatConfig.Config = {\n ignores: [\n 'src/graphql/sdk.ts',\n '**/node_modules/**',\n '**/dist/**',\n ],\n}\n","import type {TSESLint} from '@typescript-eslint/utils'\n\nexport const languageOptions: TSESLint.FlatConfig.Config = {\n languageOptions: {\n parserOptions: {\n projectService: true,\n },\n },\n settings: {\n react: {\n version: '19',\n },\n },\n}\n","import perfectionist from 'eslint-plugin-perfectionist'\nimport type {TSESLint} from '@typescript-eslint/utils'\n\nexport const perfectionistRules: TSESLint.FlatConfig.Config = {\n plugins: {perfectionist},\n rules: {\n 'perfectionist/sort-array-includes': ['error', {\n order: 'asc',\n type: 'natural',\n }],\n 'perfectionist/sort-decorators': ['error', {\n order: 'asc',\n type: 'natural',\n }],\n 'perfectionist/sort-enums': ['error', {\n order: 'asc',\n type: 'natural',\n }],\n 'perfectionist/sort-heritage-clauses': ['error', {\n order: 'asc',\n type: 'natural',\n }],\n 'perfectionist/sort-interfaces': ['error', {\n order: 'asc',\n type: 'natural',\n }],\n 'perfectionist/sort-intersection-types': ['error', {\n order: 'asc',\n type: 'natural',\n }],\n 'perfectionist/sort-jsx-props': ['error', {\n order: 'asc',\n type: 'natural',\n }],\n 'perfectionist/sort-maps': ['error', {\n order: 'asc',\n type: 'natural',\n }],\n 'perfectionist/sort-object-types': ['error', {\n order: 'asc',\n type: 'natural',\n }],\n 'perfectionist/sort-objects': ['error', {\n order: 'asc',\n type: 'natural',\n }],\n 'perfectionist/sort-sets': ['error', {\n order: 'asc',\n type: 'natural',\n }],\n 'perfectionist/sort-switch-case': ['error', {\n order: 'asc',\n type: 'natural',\n }],\n 'perfectionist/sort-union-types': ['error', {\n order: 'asc',\n type: 'natural',\n }],\n },\n}\n","import rule from 'eslint-plugin-react-hooks'\nimport type {TSESLint} from '@typescript-eslint/utils'\n\nexport const reactHooks: TSESLint.FlatConfig.Config = {\n plugins: {\n 'react-hooks': rule,\n },\n rules: rule.configs.recommended.rules,\n}\n","import type {TSESLint} from '@typescript-eslint/utils'\n\nexport const stylisticRules: TSESLint.FlatConfig.Config = {\n rules: {\n '@stylistic/array-bracket-spacing': [\n 'error',\n 'never',\n ],\n '@stylistic/arrow-parens': [\n 'error',\n 'as-needed',\n ],\n '@stylistic/block-spacing': 'off',\n '@stylistic/brace-style': [\n 'error',\n '1tbs',\n {allowSingleLine: true},\n ],\n '@stylistic/indent': [\n 'error',\n 2,\n {ignoredNodes: ['TSMappedType > *']},\n ],\n '@stylistic/jsx-tag-spacing': ['error', {\n afterOpening: 'never',\n beforeClosing: 'never',\n beforeSelfClosing: 'never',\n closingSlash: 'never',\n }],\n '@stylistic/jsx-wrap-multilines': 'off',\n '@stylistic/lines-between-class-members': 'off',\n '@stylistic/object-curly-newline': 'off',\n '@stylistic/object-curly-spacing': [\n 'error',\n 'never',\n ],\n '@stylistic/operator-linebreak': [\n 'error',\n 'before',\n {overrides: {'=': 'after'}},\n ],\n '@stylistic/quote-props': [\n 'error',\n 'as-needed',\n ],\n '@stylistic/quotes': [\n 'error',\n 'single',\n {avoidEscape: true},\n ],\n '@stylistic/semi': [\n 'error',\n 'never',\n {beforeStatementContinuationChars: 'always'},\n ],\n },\n}\n","import type {TSESLint} from '@typescript-eslint/utils'\n\nexport const typescriptRules: TSESLint.FlatConfig.Config = {\n rules: {\n '@typescript-eslint/consistent-indexed-object-style': 'off',\n '@typescript-eslint/consistent-type-imports': [\n 'error',\n {fixStyle: 'separate-type-imports'},\n ],\n '@typescript-eslint/explicit-function-return-type': 'error',\n '@typescript-eslint/naming-convention': ['error', {\n format: ['camelCase'],\n leadingUnderscore: 'allow',\n selector: 'default',\n trailingUnderscore: 'allow',\n }, {\n format: ['camelCase', 'PascalCase'],\n selector: 'import',\n }, {\n format: ['camelCase', 'UPPER_CASE'],\n leadingUnderscore: 'allow',\n selector: 'variable',\n trailingUnderscore: 'allow',\n }, {\n format: ['PascalCase'],\n selector: 'typeLike',\n }, {\n format: null,\n selector: 'property',\n }, {\n format: null,\n selector: 'objectLiteralProperty',\n }, {\n format: null,\n selector: 'objectLiteralMethod',\n }],\n '@typescript-eslint/no-empty-function': 'off',\n '@typescript-eslint/no-unused-vars': ['error', {\n argsIgnorePattern: '^_',\n caughtErrorsIgnorePattern: '^_',\n varsIgnorePattern: '^_',\n }],\n },\n}\n","'use strict';\nmodule.exports = require('./globals.json');\n","import eslintPluginUnicorn from 'eslint-plugin-unicorn'\nimport globals from 'globals'\nimport type {TSESLint} from '@typescript-eslint/utils'\n\nexport const unicornRules: TSESLint.FlatConfig.Config = {\n languageOptions: {\n globals: {\n ...globals.builtin,\n },\n },\n plugins: {\n unicorn: eslintPluginUnicorn,\n },\n rules: {\n 'unicorn/better-regex': 'error',\n 'unicorn/catch-error-name': 'error',\n 'unicorn/consistent-date-clone': 'error',\n 'unicorn/consistent-destructuring': 'error',\n 'unicorn/escape-case': 'error',\n 'unicorn/no-array-for-each': 'error',\n 'unicorn/no-array-reduce': 'error',\n 'unicorn/no-await-in-promise-methods': 'error',\n 'unicorn/no-invalid-remove-event-listener': 'error',\n 'unicorn/no-new-array': 'error',\n 'unicorn/no-new-buffer': 'error',\n 'unicorn/no-object-as-default-parameter': 'error',\n 'unicorn/no-single-promise-in-promise-methods': 'error',\n 'unicorn/no-unnecessary-await': 'error',\n 'unicorn/no-unreadable-iife': 'error',\n 'unicorn/no-useless-collection-argument': 'error',\n 'unicorn/no-useless-error-capture-stack-trace': 'error',\n 'unicorn/no-useless-fallback-in-spread': 'error',\n 'unicorn/no-useless-promise-resolve-reject': 'error',\n 'unicorn/no-useless-spread': 'error',\n 'unicorn/no-useless-switch-case': 'error',\n 'unicorn/no-useless-undefined': 'error',\n 'unicorn/number-literal-case': 'error',\n 'unicorn/numeric-separators-style': 'error',\n 'unicorn/prefer-array-find': 'error',\n 'unicorn/prefer-array-flat': 'error',\n 'unicorn/prefer-array-flat-map': 'error',\n 'unicorn/prefer-array-index-of': 'error',\n 'unicorn/prefer-array-some': 'error',\n 'unicorn/prefer-bigint-literals': 'error',\n 'unicorn/prefer-blob-reading-methods': 'error',\n 'unicorn/prefer-date-now': 'error',\n 'unicorn/prefer-import-meta-properties': 'error',\n 'unicorn/prefer-includes': 'error',\n 'unicorn/prefer-logical-operator-over-ternary': 'error',\n 'unicorn/prefer-number-properties': 'error',\n 'unicorn/prefer-object-from-entries': 'error',\n 'unicorn/prefer-optional-catch-binding': 'error',\n 'unicorn/prefer-prototype-methods': 'error',\n 'unicorn/prefer-response-static-json': 'error',\n 'unicorn/prefer-set-has': 'error',\n 'unicorn/prefer-set-size': 'error',\n 'unicorn/prefer-string-raw': 'error',\n 'unicorn/prefer-string-replace-all': 'error',\n 'unicorn/prefer-string-starts-ends-with': 'error',\n 'unicorn/prefer-string-trim-start-end': 'error',\n 'unicorn/prefer-structured-clone': 'error',\n 'unicorn/prefer-switch': 'error',\n 'unicorn/require-module-attributes': 'error',\n 'unicorn/require-module-specifiers': 'error',\n 'unicorn/template-indent': 'error',\n },\n}\n","import eslint from '@eslint/js'\nimport react from 'eslint-plugin-react'\nimport stylistic from '@stylistic/eslint-plugin'\nimport typescript from 'typescript-eslint'\nimport {customRules} from './main/customRules'\nimport {generalRules} from './main/generalRules'\nimport {ignores} from './main/ignores'\nimport {languageOptions} from './main/languageOptions'\nimport {perfectionistRules} from './main/perfectionistRules'\nimport {reactHooks} from './main/reactHooks'\nimport {stylisticRules} from './main/stylisticRules'\nimport {typescriptRules} from './main/typescriptRules'\nimport {unicornRules} from './main/unicornRules'\nimport type {TSESLint} from '@typescript-eslint/utils'\n\nexport const config: TSESLint.FlatConfig.ConfigArray = [\n ignores,\n languageOptions,\n //////////////////////////////////////////////////////////////////////////////\n eslint.configs.recommended,\n react.configs.flat.recommended,\n stylistic.configs.recommended,\n ...typescript.configs.recommended,\n ...typescript.configs.stylistic,\n //////////////////////////////////////////////////////////////////////////////\n customRules,\n generalRules,\n perfectionistRules,\n reactHooks,\n stylisticRules,\n typescriptRules,\n unicornRules,\n]\n"],"names":["getLineIndent","buildMultilineFix","defaultOptions","node","messageIds","isSingleLineStatement","checkObjectExpression","isExempt","getParens","checkFunction","getBraces","createImportFix","result","createReExportFix","attributes","checkAlphabeticalSorting","checkGroupOrdering","areSpecifiersSorted","checkSpecifiersSorting","createFixForGroup","globals"],"mappings":";;;;;;;;AAEO,SAASA,gBACd,YACA,MACQ;AACR,QAAM,OAAO,WAAW,QAAA;AACxB,QAAM,QAAQ,KAAK,MAAM,IAAI;AAC7B,QAAM,WAAW,MAAM,OAAO,CAAC,KAAK;AACpC,QAAM,QAAQ,SAAS,MAAM,QAAQ;AACrC,SAAO,QAAQ,CAAC,KAAK;AACvB;ACNO,SAASC,oBACd,OACA,UACA,UACA,YACkB;AAClB,QAAM,cAAc,SAAS,eAAe,IAAI,MAAM;AACtD,QAAM,aAAaD,gBAAc,YAAY,WAAW;AACxD,QAAM,aAAa,aAAa;AAEhC,QAAM,kBAAkB,SACrB,OAAO,CAAC,OAA4B,OAAO,IAAI;AAElD,QAAM,iBAAiB,gBACpB,IAAI,CAAA,YAAW;AACd,UAAM,OAAO,WAAW,QAAQ,OAAO;AACvC,WAAO,GAAG,UAAU,GAAG,IAAI;AAAA,EAC7B,CAAC,EACA,KAAK,KAAK;AAEb,QAAM,UAAU;AAAA,EAAK,cAAc;AAAA,EAAM,UAAU;AAEnD,SAAO,MAAM;AAAA,IACX,CAAC,SAAS,eAAe,MAAM,CAAC,GAAG,SAAS,eAAe,MAAM,CAAC,CAAC;AAAA,IACnE;AAAA,EAAA;AAEJ;AC7BO,MAAME,mBAA0B;AAAA,EACrC,WAAW;AACb;ACAO,SAAS,YACd,YACAC,OACiB;AACjB,QAAM,WAAWA,MAAK;AACtB,MAAI,SAAS,WAAW;AACtB,WAAO;AAGT,QAAM,eAAe,SAAS,KAAK,CAAA,OAAM,OAAO,IAAI;AACpD,MAAI,CAAC;AACH,WAAO;AAGT,QAAM,cAAc,CAAC,GAAG,QAAQ,EAAE,UAAU,KAAK,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,gDAAgD;AAAA,IAChD,gCAAgC;AAAA,IAChC,8BAA8B;AAAA,IAC9B,0CAA0C;AAAA,IAC1C,gDAAgD;AAAA,IAChD,yCAAyC;AAAA,IACzC,6CAA6C;AAAA,IAC7C,6BAA6B;AAAA,IAC7B,kCAAkC;AAAA,IAClC,gCAAgC;AAAA,IAChC,+BAA+B;AAAA,IAC/B,oCAAoC;AAAA,IACpC,6BAA6B;AAAA,IAC7B,6BAA6B;AAAA,IAC7B,iCAAiC;AAAA,IACjC,iCAAiC;AAAA,IACjC,6BAA6B;AAAA,IAC7B,kCAAkC;AAAA,IAClC,uCAAuC;AAAA,IACvC,2BAA2B;AAAA,IAC3B,yCAAyC;AAAA,IACzC,2BAA2B;AAAA,IAC3B,gDAAgD;AAAA,IAChD,oCAAoC;AAAA,IACpC,sCAAsC;AAAA,IACtC,yCAAyC;AAAA,IACzC,oCAAoC;AAAA,IACpC,uCAAuC;AAAA,IACvC,0BAA0B;AAAA,IAC1B,2BAA2B;AAAA,IAC3B,6BAA6B;AAAA,IAC7B,qCAAqC;AAAA,IACrC,0CAA0C;AAAA,IAC1C,wCAAwC;AAAA,IACxC,mCAAmC;AAAA,IACnC,yBAAyB;AAAA,IACzB,qCAAqC;AAAA,IACrC,qCAAqC;AAAA,IACrC,2BAA2B;AAAA,EAAA;AAE/B;ACnDO,MAAM,SAA0C;AAAA,EACrD;AAAA,EACA;AAAA;AAAA,EAEA,OAAO,QAAQ;AAAA,EACf,MAAM,QAAQ,KAAK;AAAA,EACnB,UAAU,QAAQ;AAAA,EAClB,GAAG,WAAW,QAAQ;AAAA,EACtB,GAAG,WAAW,QAAQ;AAAA;AAAA,EAEtB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;","x_google_ignoreList":[231]}
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../src/rules/shared/getLineIndent.ts","../src/rules/arrayItemsLineBreak/buildMultilineFix.ts","../src/rules/arrayItemsLineBreak/defaultOptions.ts","../src/rules/arrayItemsLineBreak/getBrackets.ts","../src/rules/shared/getLineLength.ts","../src/rules/arrayItemsLineBreak/checkArray.ts","../src/rules/arrayItemsLineBreak/messageIds.ts","../src/rules/arrayItemsLineBreak/index.ts","../src/rules/braceStyleControlStatements/getIndentation.ts","../src/rules/braceStyleControlStatements/createBraceStyleFix.ts","../src/rules/braceStyleControlStatements/isOnSameLineAsCondition.ts","../src/rules/braceStyleControlStatements/isSingleLineStatement.ts","../src/rules/braceStyleControlStatements/reportBodyOnSameLineAsCondition.ts","../src/rules/braceStyleControlStatements/checkDoWhileStatementBraceStyle.ts","../src/rules/braceStyleControlStatements/checkForStatementBraceStyle.ts","../src/rules/braceStyleControlStatements/checkIfStatementBraceStyle.ts","../src/rules/braceStyleControlStatements/checkWhileStatementBraceStyle.ts","../src/rules/braceStyleControlStatements/index.ts","../src/rules/braceStyleObjectLiteral/checkClosingBrace.ts","../src/rules/braceStyleObjectLiteral/checkNestedObjects.ts","../src/rules/braceStyleObjectLiteral/checkOpeningBrace.ts","../src/rules/braceStyleObjectLiteral/checkPropertyOnOwnLine.ts","../src/rules/braceStyleObjectLiteral/checkObjectExpression.ts","../src/rules/braceStyleObjectLiteral/messageIds.ts","../src/rules/braceStyleObjectLiteral/index.ts","../src/rules/compactArrayItems/buildCompactFix.ts","../src/rules/compactArrayItems/findBracketByRange.ts","../src/rules/compactArrayItems/findClosingBracketByRange.ts","../src/rules/compactArrayItems/hasElements.ts","../src/rules/compactArrayItems/hasMultilineItems.ts","../src/rules/compactArrayItems/isBracketOnOwnLine.ts","../src/rules/compactArrayItems/messageIds.ts","../src/rules/compactArrayItems/index.ts","../src/rules/exportFilenameMatch/getNameFromDeclaration.ts","../src/rules/exportFilenameMatch/getNamesFromSpecifiers.ts","../src/rules/exportFilenameMatch/getExportedNames.ts","../src/rules/shared/stripExtension.ts","../src/rules/shared/isExempt.ts","../src/rules/exportFilenameMatch/messageIds.ts","../src/rules/exportFilenameMatch/index.ts","../src/rules/shared/findLinesWithMultipleNodes.ts","../src/rules/functionCallArgumentLineBreak/formatArgs.ts","../src/rules/shared/getLineStartIndex.ts","../src/rules/functionCallArgumentLineBreak/checkMultilineArgs.ts","../src/rules/functionCallArgumentLineBreak/checkSingleLineArgs.ts","../src/rules/functionCallArgumentLineBreak/defaultOptions.ts","../src/rules/shared/getParens.ts","../src/rules/shared/isValidParens.ts","../src/rules/functionCallArgumentLineBreak/checkCall.ts","../src/rules/functionCallArgumentLineBreak/messageIds.ts","../src/rules/functionCallArgumentLineBreak/index.ts","../src/rules/functionCognitiveComplexity/isNodeWithType.ts","../src/rules/functionCognitiveComplexity/getChildNodes.ts","../src/rules/functionCognitiveComplexity/isIncrementableControlFlow.ts","../src/rules/functionCognitiveComplexity/traverse.ts","../src/rules/functionCognitiveComplexity/calculateCognitiveComplexity.ts","../src/rules/functionCognitiveComplexity/getNameFromCallExpression.ts","../src/rules/functionCognitiveComplexity/getNameFromProperty.ts","../src/rules/functionCognitiveComplexity/getNameFromVariableDeclarator.ts","../src/rules/functionCognitiveComplexity/getArrowFunctionExpressionName.ts","../src/rules/functionCognitiveComplexity/getNameFromMethodDefinition.ts","../src/rules/functionCognitiveComplexity/getFunctionExpressionName.ts","../src/rules/functionCognitiveComplexity/getFunctionName.ts","../src/rules/functionCognitiveComplexity/messageIds.ts","../src/rules/functionCognitiveComplexity/index.ts","../src/rules/functionParameterLineBreak/formatParams.ts","../src/rules/functionParameterLineBreak/checkMultilineParams.ts","../src/rules/functionParameterLineBreak/checkSingleLineParams.ts","../src/rules/functionParameterLineBreak/defaultOptions.ts","../src/rules/functionParameterLineBreak/checkFunction.ts","../src/rules/functionParameterLineBreak/messageIds.ts","../src/rules/functionParameterLineBreak/index.ts","../src/rules/importsAndReExportsAtTop/getStatementType.ts","../src/rules/importsAndReExportsAtTop/isImportDeclaration.ts","../src/rules/importsAndReExportsAtTop/isReExport.ts","../src/rules/importsAndReExportsAtTop/categorizeStatements.ts","../src/rules/importsAndReExportsAtTop/findStatementIndices.ts","../src/rules/importsAndReExportsAtTop/generateSortedText.ts","../src/rules/importsAndReExportsAtTop/hasImportOrderViolation.ts","../src/rules/importsAndReExportsAtTop/index.ts","../src/rules/individualImports/index.ts","../src/rules/individualReExports/index.ts","../src/rules/interfacePropertyLineBreak/formatTypeLiteral.ts","../src/rules/interfacePropertyLineBreak/checkMultilineMembers.ts","../src/rules/interfacePropertyLineBreak/checkSingleLineMembers.ts","../src/rules/interfacePropertyLineBreak/defaultOptions.ts","../src/rules/interfacePropertyLineBreak/getBraces.ts","../src/rules/interfacePropertyLineBreak/checkInterface.ts","../src/rules/interfacePropertyLineBreak/messageIds.ts","../src/rules/interfacePropertyLineBreak/index.ts","../src/rules/maxDeclarationsPerFile/collectVariableDeclarators.ts","../src/rules/maxDeclarationsPerFile/isTopLevel.ts","../src/rules/maxDeclarationsPerFile/handleClassDeclaration.ts","../src/rules/maxDeclarationsPerFile/handleFunctionDeclaration.ts","../src/rules/maxDeclarationsPerFile/handleTSDeclareFunction.ts","../src/rules/maxDeclarationsPerFile/handleTSEnumDeclaration.ts","../src/rules/maxDeclarationsPerFile/handleTSInterfaceDeclaration.ts","../src/rules/maxDeclarationsPerFile/handleTSTypeAliasDeclaration.ts","../src/rules/maxDeclarationsPerFile/isExempt.ts","../src/rules/maxDeclarationsPerFile/isExportedDeclaration.ts","../src/rules/maxDeclarationsPerFile/messageIds.ts","../src/rules/maxDeclarationsPerFile/index.ts","../src/rules/multilineUnionTypeAliases/createFix.ts","../src/rules/multilineUnionTypeAliases/isMultiline.ts","../src/rules/multilineUnionTypeAliases/index.ts","../src/rules/namingConvention/isExempt.ts","../src/rules/namingConvention/isPascalCase.ts","../src/rules/namingConvention/isSeparator.ts","../src/rules/namingConvention/isWordBoundary.ts","../src/rules/namingConvention/capitalize.ts","../src/rules/namingConvention/wordsToCamelCase.ts","../src/rules/namingConvention/toCamelCase.ts","../src/rules/namingConvention/toPascalCase.ts","../src/rules/namingConvention/checkClass.ts","../src/rules/namingConvention/checkNamedEntity.ts","../src/rules/namingConvention/isCamelCase.ts","../src/rules/namingConvention/isUpperCase.ts","../src/rules/namingConvention/checkConstant.ts","../src/rules/namingConvention/checkVariable.ts","../src/rules/namingConvention/isFunction.ts","../src/rules/namingConvention/checkVariableDeclarator.ts","../src/rules/namingConvention/getFunctionName.ts","../src/rules/namingConvention/getReturnTypeText.ts","../src/rules/namingConvention/isReactComponent.ts","../src/rules/namingConvention/messageIds.ts","../src/rules/namingConvention/getFunctionIdentifierNodeForFixer.ts","../src/rules/namingConvention/getFunctionNameForFixer.ts","../src/rules/namingConvention/createFunctionFixer.ts","../src/rules/namingConvention/getFunctionReportNode.ts","../src/rules/namingConvention/reportComponentViolation.ts","../src/rules/namingConvention/reportFunctionViolation.ts","../src/rules/namingConvention/index.ts","../src/rules/noInlineObjectTypes/checkTypeParameters.ts","../src/rules/noInlineObjectTypes/checkUnionOrIntersectionTypes.ts","../src/rules/noInlineObjectTypes/isInlineObjectType.ts","../src/rules/noInlineObjectTypes/containsInlineObjectType.ts","../src/rules/noInlineObjectTypes/toPascalCase.ts","../src/rules/noInlineObjectTypes/getInlineTypeName.ts","../src/rules/noInlineObjectTypes/getParameterNameFromFunction.ts","../src/rules/noInlineObjectTypes/getParameterNameFromIdentifier.ts","../src/rules/noInlineObjectTypes/getParameterNameFromObjectPattern.ts","../src/rules/noInlineObjectTypes/getTopLevelDeclaration.ts","../src/rules/noInlineObjectTypes/handleInlineType.ts","../src/rules/noInlineObjectTypes/isIdentifierInFunction.ts","../src/rules/noInlineObjectTypes/isPropertySignatureInTypeLiteral.ts","../src/rules/noInlineObjectTypes/traverseUpForTypeLiteral.ts","../src/rules/noInlineObjectTypes/isNestedTypeAnnotation.ts","../src/rules/noInlineObjectTypes/prepareFix.ts","../src/rules/noInlineObjectTypes/index.ts","../src/rules/noUnnecessaryBraces/getLineIndent.ts","../src/rules/noUnnecessaryBraces/getReplacementText.ts","../src/rules/noUnnecessaryBraces/isSingleLineStatement.ts","../src/rules/noUnnecessaryBraces/checkBlockStatement.ts","../src/rules/shared/detectIndentStep.ts","../src/rules/shared/reindentText.ts","../src/rules/noUnnecessaryBraces/checkNonBlockStatement.ts","../src/rules/noUnnecessaryBraces/checkDoWhileStatement.ts","../src/rules/noUnnecessaryBraces/checkForInStatement.ts","../src/rules/noUnnecessaryBraces/checkForOfStatement.ts","../src/rules/noUnnecessaryBraces/checkForStatement.ts","../src/rules/noUnnecessaryBraces/checkIfStatement.ts","../src/rules/noUnnecessaryBraces/checkWhileStatement.ts","../src/rules/noUnnecessaryBraces/index.ts","../src/rules/objectPropertyLineBreak/isShorthandProperty.ts","../src/rules/objectPropertyLineBreak/areAllShorthand.ts","../src/rules/objectPropertyLineBreak/getPropertyText.ts","../src/rules/objectPropertyLineBreak/getInlineObjectLength.ts","../src/rules/objectPropertyLineBreak/checkMultiline.ts","../src/rules/objectPropertyLineBreak/buildMultilineFix.ts","../src/rules/objectPropertyLineBreak/getPropertyName.ts","../src/rules/objectPropertyLineBreak/buildShorthandFix.ts","../src/rules/objectPropertyLineBreak/canConvertToShorthand.ts","../src/rules/objectPropertyLineBreak/shouldCollapseToShorthand.ts","../src/rules/objectPropertyLineBreak/checkSingleLine.ts","../src/rules/objectPropertyLineBreak/defaultOptions.ts","../src/rules/objectPropertyLineBreak/getBraces.ts","../src/rules/objectPropertyLineBreak/checkObject.ts","../src/rules/objectPropertyLineBreak/messageIds.ts","../src/rules/objectPropertyLineBreak/index.ts","../src/rules/oneExportPerFile/messageIds.ts","../src/rules/oneExportPerFile/index.ts","../src/rules/preferInlineExport/isValidExportSpecifier.ts","../src/rules/preferInlineExport/canInlineSpecifiers.ts","../src/rules/preferInlineExport/getDeclarationName.ts","../src/rules/preferInlineExport/isExportableDeclaration.ts","../src/rules/preferInlineExport/index.ts","../src/rules/singleLineArrowFunctionParameters/buildCollapsedParams.ts","../src/rules/singleLineArrowFunctionParameters/calculateCollapsedLength.ts","../src/rules/singleLineArrowFunctionParameters/defaultOptions.ts","../src/rules/singleLineArrowFunctionParameters/getArrowFunctionParens.ts","../src/rules/singleLineArrowFunctionParameters/isShorthand.ts","../src/rules/singleLineArrowFunctionParameters/reportViolation.ts","../src/rules/singleLineArrowFunctionParameters/checkArrowFunction.ts","../src/rules/singleLineArrowFunctionParameters/messageIds.ts","../src/rules/singleLineArrowFunctionParameters/index.ts","../src/rules/singleLineFunctionParameters/defaultOptions.ts","../src/rules/singleLineFunctionParameters/getParens.ts","../src/rules/singleLineFunctionParameters/checkFunction.ts","../src/rules/singleLineFunctionParameters/messageIds.ts","../src/rules/singleLineFunctionParameters/index.ts","../src/rules/singleLineImports/formatAttributes.ts","../src/rules/singleLineImports/formatNamed.ts","../src/rules/singleLineImports/formatSpecifiers.ts","../src/rules/singleLineImports/createImportFix.ts","../src/rules/singleLineImports/isMultilineImport.ts","../src/rules/singleLineImports/index.ts","../src/rules/singleLineReExports/createReExportFix.ts","../src/rules/singleLineReExports/isMultilineReExport.ts","../src/rules/singleLineReExports/index.ts","../src/rules/sortedImports/categorizeImport.ts","../src/rules/sortedImports/getImportSortKey.ts","../src/rules/sortedImports/categorizeImports.ts","../src/lib/compare.ts","../src/rules/sortedImports/importGroupOrder.ts","../src/rules/sortedImports/checkAlphabeticalSorting.ts","../src/rules/sortedImports/checkGroupOrdering.ts","../src/rules/sortedImports/getImportSpecifierName.ts","../src/rules/sortedImports/areSpecifiersSorted.ts","../src/rules/sortedImports/getImportNamedSpecifiers.ts","../src/rules/sortedImports/checkSpecifiersSorting.ts","../src/rules/sortedImports/sortImportSpecifiersText.ts","../src/rules/sortedImports/createFix/formatNamedImportSpecifiers.ts","../src/rules/sortedImports/createFix/buildSortedImportCode.ts","../src/rules/sortedImports/createFix/groupImportsByType.ts","../src/rules/sortedImports/createFix/sortImportGroups.ts","../src/rules/sortedImports/createFix/createFixForGroup.ts","../src/rules/sortedImports/createFix/index.ts","../src/rules/sortedImports/getImportGroups.ts","../src/rules/sortedImports/index.ts","../src/rules/sortedReExports/categorizeReExport.ts","../src/rules/sortedReExports/getReExportSortKey.ts","../src/rules/sortedReExports/categorizeReExports.ts","../src/rules/sortedReExports/reExportGroupOrder.ts","../src/rules/sortedReExports/checkAlphabeticalSorting.ts","../src/rules/sortedReExports/checkGroupOrdering.ts","../src/rules/sortedReExports/getSpecifierName.ts","../src/rules/sortedReExports/areSpecifiersSorted.ts","../src/rules/sortedReExports/getReExportNamedSpecifiers.ts","../src/rules/sortedReExports/isNamedReExport.ts","../src/rules/sortedReExports/checkSpecifiersSorting.ts","../src/rules/sortedReExports/sortSpecifiersText.ts","../src/rules/sortedReExports/createFix/formatNamedReExportSpecifiers.ts","../src/rules/sortedReExports/createFix/buildSortedReExportCode.ts","../src/rules/sortedReExports/createFix/groupReExportsByType.ts","../src/rules/sortedReExports/createFix/sortExportGroups.ts","../src/rules/sortedReExports/createFix/createFixForGroup.ts","../src/rules/sortedReExports/createFix/index.ts","../src/rules/sortedReExports/isReExportDeclaration.ts","../src/rules/sortedReExports/getReExportGroups.ts","../src/rules/sortedReExports/index.ts","../src/main/customRules.ts","../src/main/generalRules.ts","../src/main/ignores.ts","../src/main/languageOptions.ts","../src/main/perfectionistRules.ts","../src/main/reactHooks.ts","../src/main/stylisticRules.ts","../src/main/typescriptRules.ts","../node_modules/globals/index.js","../src/main/unicornRules.ts","../src/index.ts"],"sourcesContent":["import type {TSESLint} from '@typescript-eslint/utils'\n\nexport function getLineIndent(\n sourceCode: TSESLint.SourceCode,\n line: number,\n): string {\n const text = sourceCode.getText()\n const lines = text.split('\\n')\n const lineText = lines[line - 1] ?? ''\n const match = lineText.match(/^(\\s*)/)\n return match?.[1] ?? ''\n}\n","import {getLineIndent} from '../shared/getLineIndent'\nimport type {Brackets} from './Brackets'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function buildMultilineFix(\n fixer: TSESLint.RuleFixer,\n brackets: Brackets,\n elements: (null | TSESTree.Node)[],\n sourceCode: TSESLint.SourceCode,\n): TSESLint.RuleFix {\n const openingLine = brackets.openingBracket.loc.start.line\n const baseIndent = getLineIndent(sourceCode, openingLine)\n const itemIndent = baseIndent + ' '\n\n const nonNullElements = elements\n .filter((el): el is TSESTree.Node => el !== null)\n\n const formattedItems = nonNullElements\n .map(element => {\n const text = sourceCode.getText(element)\n return `${itemIndent}${text}`\n })\n .join(',\\n')\n\n const newText = `\\n${formattedItems},\\n${baseIndent}`\n\n return fixer.replaceTextRange(\n [brackets.openingBracket.range[1], brackets.closingBracket.range[0]],\n newText,\n )\n}\n","import type {Options} from './Options'\n\nexport const defaultOptions: Options = {\n maxLength: 80,\n}\n","import type {Brackets} from './Brackets'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function getBrackets(\n sourceCode: TSESLint.SourceCode,\n node: TSESTree.ArrayExpression,\n): Brackets | null {\n const elements = node.elements\n if (elements.length === 0)\n return null\n\n // Find the first non-null element\n const firstElement = elements.find(el => el !== null)\n if (!firstElement)\n return null\n\n // Find the last non-null element\n const lastElement = [...elements].reverse().find(el => el !== null)\n if (!lastElement)\n return null\n\n const openingBracket = sourceCode.getTokenBefore(firstElement)\n const closingBracket = sourceCode.getTokenAfter(lastElement)\n\n if (!openingBracket || !closingBracket)\n return null\n\n if (openingBracket.value !== '[' || closingBracket.value !== ']')\n return null\n\n return {closingBracket, openingBracket}\n}\n","import type {TSESLint} from '@typescript-eslint/utils'\n\nexport function getLineLength(\n sourceCode: TSESLint.SourceCode,\n lineNumber: number,\n): number {\n const line = sourceCode.getLines()[lineNumber - 1]\n return line?.length ?? 0\n}\n","import {buildMultilineFix} from './buildMultilineFix'\nimport {defaultOptions} from './defaultOptions'\nimport {getBrackets} from './getBrackets'\nimport {getLineLength} from '../shared/getLineLength'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function checkArray(\n sourceCode: TSESLint.SourceCode,\n context: TSESLint.RuleContext<MessageId, [Options]>,\n node: TSESTree.ArrayExpression,\n): void {\n const options = context.options[0] as Options ?? {}\n const maxLength = options.maxLength ?? defaultOptions.maxLength!\n\n const elements = node.elements\n\n // Ignore empty arrays and single-element arrays\n if (elements.length <= 1)\n return\n\n const brackets = getBrackets(sourceCode, node)\n if (!brackets)\n return\n\n const firstLine = brackets.openingBracket.loc.start.line\n const lastLine = brackets.closingBracket.loc.end.line\n\n // Only check single-line arrays\n if (firstLine !== lastLine)\n return\n\n // Check if line length exceeds maxLength\n const lineLength = getLineLength(sourceCode, firstLine)\n if (lineLength <= maxLength)\n return\n\n // Report and fix\n context.report({\n fix: fixer => buildMultilineFix(\n fixer,\n brackets,\n elements,\n sourceCode,\n ),\n messageId: 'arrayItemsOnNewLine',\n node: elements[0]!,\n })\n}\n","export const messageIds = {\n arrayItemsOnNewLine: 'arrayItemsOnNewLine',\n} as const\n","import {checkArray} from './checkArray'\nimport {messageIds} from './messageIds'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {TSESLint} from '@typescript-eslint/utils'\n\nexport const arrayItemsLineBreak: TSESLint.RuleModule<MessageId, [Options]> = {\n create(context) {\n const sourceCode = context.sourceCode ?? context.getSourceCode()\n\n return {\n ArrayExpression(node): void {\n checkArray(sourceCode, context, node)\n },\n }\n },\n\n meta: {\n docs: {\n description: 'Enforce each array item to be on its own line when the array expression exceeds a configurable maximum line length.',\n },\n fixable: 'code',\n messages: messageIds,\n schema: [{\n additionalProperties: false,\n properties: {\n maxLength: {\n type: 'number',\n },\n },\n type: 'object',\n }],\n type: 'layout',\n },\n}\n","import type {SourceCode} from './SourceCode'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function getIndentation(\n node: TSESTree.Statement,\n sourceCode: SourceCode,\n): string {\n const tokenBeforeBody = sourceCode.getTokenBefore(node)\n if (!tokenBeforeBody)\n return ''\n\n const line = sourceCode\n .getText()\n .split('\\n')[tokenBeforeBody.loc.start.line - 1]\n\n if (!line)\n return ''\n\n const match = line.match(/^(\\s*)/)\n return match?.[1] ?? ''\n}\n","import {getIndentation} from './getIndentation'\nimport type {SourceCode} from './SourceCode'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function createBraceStyleFix(\n fixer: TSESLint.RuleFixer,\n body: TSESTree.Statement,\n sourceCode: SourceCode,\n): null | TSESLint.RuleFix {\n if (body.type === 'BlockStatement') {\n const firstToken = sourceCode.getFirstToken(body)\n if (!firstToken)\n return null\n\n return fixer.insertTextBefore(firstToken, '\\n')\n }\n\n const bodyText = sourceCode.getText(body)\n const indentation = getIndentation(body, sourceCode)\n const fixedText = `{\\n${indentation} ${bodyText}\\n${indentation}}`\n\n return fixer.replaceText(body, fixedText)\n}\n","import type {SourceCode} from './SourceCode'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function isOnSameLineAsCondition(\n node: TSESTree.Statement,\n sourceCode: SourceCode,\n): boolean {\n const tokenBeforeBody = sourceCode.getTokenBefore(node)\n if (!tokenBeforeBody)\n return false\n\n const firstToken = sourceCode.getFirstToken(node)\n if (!firstToken)\n return false\n\n return tokenBeforeBody.loc.end.line === firstToken.loc.start.line\n}\n","import type {SourceCode} from './SourceCode'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function isSingleLineStatement(\n node: TSESTree.Statement,\n sourceCode: SourceCode,\n): boolean {\n const firstToken = sourceCode.getFirstToken(node)\n if (!firstToken)\n return false\n\n const lastToken = sourceCode.getLastToken(node)\n if (!lastToken)\n return false\n\n return firstToken.loc.start.line === lastToken.loc.end.line\n}\n","import {createBraceStyleFix} from './createBraceStyleFix'\nimport {isOnSameLineAsCondition} from './isOnSameLineAsCondition'\nimport {isSingleLineStatement} from './isSingleLineStatement'\nimport type {RuleContext} from './RuleContext'\nimport type {SourceCode} from './SourceCode'\nimport type {StatementBody} from './StatementBody'\n\nexport function reportBodyOnSameLineAsCondition(\n context: RuleContext,\n body: StatementBody,\n): void {\n const sourceCode = context.sourceCode as SourceCode\n\n if (body.type !== 'BlockStatement') {\n if (isOnSameLineAsCondition(body, sourceCode)) {\n context.report({\n fix: fixer => createBraceStyleFix(fixer, body, sourceCode),\n messageId: 'singleLine',\n node: body,\n })\n }\n } else {\n const isOnSameLine = isOnSameLineAsCondition(body, sourceCode)\n const isSingleLine = isSingleLineStatement(body, sourceCode)\n\n if (isOnSameLine && isSingleLine) {\n context.report({\n fix: fixer => createBraceStyleFix(fixer, body, sourceCode),\n messageId: 'singleLine',\n node: body,\n })\n }\n }\n}\n","import {reportBodyOnSameLineAsCondition} from './reportBodyOnSameLineAsCondition'\nimport type {RuleContext} from './RuleContext'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function checkDoWhileStatementBraceStyle(\n node: TSESTree.DoWhileStatement,\n context: RuleContext,\n): void {\n reportBodyOnSameLineAsCondition(context, node.body)\n}\n","import {reportBodyOnSameLineAsCondition} from './reportBodyOnSameLineAsCondition'\nimport type {RuleContext} from './RuleContext'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function checkForStatementBraceStyle(\n node: TSESTree.ForStatement,\n context: RuleContext,\n): void {\n reportBodyOnSameLineAsCondition(context, node.body)\n}\n","import {createBraceStyleFix} from './createBraceStyleFix'\nimport {isOnSameLineAsCondition} from './isOnSameLineAsCondition'\nimport {reportBodyOnSameLineAsCondition} from './reportBodyOnSameLineAsCondition'\nimport type {RuleContext} from './RuleContext'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function checkIfStatementBraceStyle(\n node: TSESTree.IfStatement,\n context: RuleContext,\n): void {\n const sourceCode = context.sourceCode\n reportBodyOnSameLineAsCondition(context, node.consequent)\n\n if (!node.alternate)\n return\n\n if (node.alternate.type === 'BlockStatement') {\n reportBodyOnSameLineAsCondition(context, node.alternate)\n return\n }\n\n if (node.alternate.type !== 'IfStatement') {\n const alternate = node.alternate\n if (isOnSameLineAsCondition(alternate, sourceCode)) {\n context.report({\n fix: fixer => createBraceStyleFix(fixer, alternate, sourceCode),\n messageId: 'singleLine',\n node: alternate,\n })\n }\n }\n}\n","import {reportBodyOnSameLineAsCondition} from './reportBodyOnSameLineAsCondition'\nimport type {RuleContext} from './RuleContext'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function checkWhileStatementBraceStyle(\n node: TSESTree.WhileStatement,\n context: RuleContext,\n): void {\n reportBodyOnSameLineAsCondition(context, node.body)\n}\n","import {checkDoWhileStatementBraceStyle} from './checkDoWhileStatementBraceStyle'\nimport {checkForStatementBraceStyle} from './checkForStatementBraceStyle'\nimport {checkIfStatementBraceStyle} from './checkIfStatementBraceStyle'\nimport {checkWhileStatementBraceStyle} from './checkWhileStatementBraceStyle'\nimport type {MessageIds} from './MessageIds'\nimport type {TSESLint} from '@typescript-eslint/utils'\n\nexport const braceStyleControlStatements: TSESLint.RuleModule<MessageIds, []> = {\n create(context) {\n return {\n DoWhileStatement: node => checkDoWhileStatementBraceStyle(node, context),\n ForStatement: node => checkForStatementBraceStyle(node, context),\n IfStatement: node => checkIfStatementBraceStyle(node, context),\n WhileStatement: node => checkWhileStatementBraceStyle(node, context),\n }\n },\n meta: {\n docs: {\n description: 'Enforce control statements to have multi-line body.',\n },\n fixable: 'code',\n messages: {\n singleLine: 'Control statement body must be on a separate line',\n },\n schema: [],\n type: 'layout',\n },\n}\n","import {getLineIndent} from '../shared/getLineIndent'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function checkClosingBrace(\n sourceCode: TSESLint.SourceCode,\n context: TSESLint.RuleContext<MessageId, [Options]>,\n node: TSESTree.ObjectExpression,\n closingBrace: TSESTree.Token,\n): void {\n const lastProperty = node.properties[node.properties.length - 1]\n const closingLine = closingBrace.loc.end.line\n const closingBraceOnOwnLine = lastProperty.loc.end.line < closingLine\n\n if (!closingBraceOnOwnLine) {\n context.report({\n fix(fixer) {\n return fixer.replaceTextRange(\n [lastProperty.range[1], closingBrace.range[0]],\n ',\\n' + getLineIndent(sourceCode, lastProperty.loc.end.line),\n )\n },\n loc: closingBrace.loc,\n messageId: 'braceOnPropertyLine',\n })\n }\n}\n","import type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function checkNestedObjects(\n sourceCode: TSESLint.SourceCode,\n context: TSESLint.RuleContext<MessageId, [Options]>,\n node: TSESTree.ObjectExpression,\n checkObjectExpression: (\n sourceCode: TSESLint.SourceCode,\n context: TSESLint.RuleContext<MessageId, [Options]>,\n node: TSESTree.ObjectExpression,\n ) => void,\n): void {\n for (const property of node.properties) {\n if (property.type === 'Property' && property.value.type === 'ObjectExpression')\n checkObjectExpression(sourceCode, context, property.value)\n else if (property.type === 'SpreadElement' && property.argument.type === 'ObjectExpression')\n checkObjectExpression(sourceCode, context, property.argument)\n }\n}\n","import {getLineIndent} from '../shared/getLineIndent'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function checkOpeningBrace(\n sourceCode: TSESLint.SourceCode,\n context: TSESLint.RuleContext<MessageId, [Options]>,\n node: TSESTree.ObjectExpression,\n openingBrace: TSESTree.Token,\n): void {\n const firstProperty = node.properties[0]\n const openingLine = openingBrace.loc.start.line\n const openingBraceOnOwnLine = firstProperty.loc.start.line > openingLine\n\n if (!openingBraceOnOwnLine) {\n context.report({\n fix(fixer) {\n return fixer.replaceTextRange(\n [openingBrace.range[1], firstProperty.range[0]],\n '\\n' + getLineIndent(sourceCode, firstProperty.loc.start.line),\n )\n },\n loc: openingBrace.loc,\n messageId: 'braceOnPropertyLine',\n })\n }\n}\n","import {getLineIndent} from '../shared/getLineIndent'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function checkPropertyOnOwnLine(\n sourceCode: TSESLint.SourceCode,\n context: TSESLint.RuleContext<MessageId, [Options]>,\n prevPropertyEndLine: number,\n property: TSESTree.ObjectLiteralElement,\n): void {\n const propStartLine = property.loc.start.line\n if (propStartLine === prevPropertyEndLine) {\n context.report({\n fix(fixer) {\n const lastNewLineIndex = sourceCode\n .getText()\n .lastIndexOf('\\n', property.range[0] - 1)\n\n return fixer.replaceTextRange(\n [lastNewLineIndex, property.range[0]],\n '\\n' + getLineIndent(sourceCode, property.loc.start.line),\n )\n },\n loc: property.loc,\n messageId: 'propertiesOnSameLine',\n })\n }\n}\n","import {checkClosingBrace} from './checkClosingBrace'\nimport {checkNestedObjects} from './checkNestedObjects'\nimport {checkOpeningBrace} from './checkOpeningBrace'\nimport {checkPropertyOnOwnLine} from './checkPropertyOnOwnLine'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function checkObjectExpression(\n sourceCode: TSESLint.SourceCode,\n context: TSESLint.RuleContext<MessageId, [Options]>,\n node: TSESTree.ObjectExpression,\n): void {\n if (node.properties.length === 0)\n return\n\n const openingBrace = sourceCode.getFirstToken(node)\n const closingBrace = sourceCode.getLastToken(node)\n\n if (!openingBrace || !closingBrace)\n return\n\n const openingLine = openingBrace.loc.start.line\n const closingLine = closingBrace.loc.end.line\n\n if (openingLine === closingLine)\n return\n\n checkOpeningBrace(sourceCode, context, node, openingBrace)\n\n let prevPropertyEndLine = node.properties[0].loc.start.line\n for (const property of node.properties) {\n if (property !== node.properties[0])\n checkPropertyOnOwnLine(sourceCode, context, prevPropertyEndLine, property)\n\n prevPropertyEndLine = property.loc.end.line\n }\n\n checkClosingBrace(sourceCode, context, node, closingBrace)\n checkNestedObjects(sourceCode, context, node, checkObjectExpression)\n}\n","export const messageIds = {\n braceOnPropertyLine: 'Opening brace should be on its own line',\n propertiesOnSameLine: 'Multi-line objects must have each property on its own line',\n} as const\n","import {checkObjectExpression} from './checkObjectExpression'\nimport {messageIds} from './messageIds'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport const braceStyleObjectLiteral: TSESLint.RuleModule<MessageId, [Options]> = {\n create(context) {\n const sourceCode = context.sourceCode ?? context.getSourceCode()\n\n return {\n ObjectExpression(node: TSESTree.ObjectExpression): void {\n checkObjectExpression(sourceCode, context, node)\n },\n }\n },\n\n meta: {\n docs: {\n description: 'Enforce consistent brace positioning for object literals.',\n },\n fixable: 'code',\n messages: messageIds,\n schema: [{\n additionalProperties: false,\n properties: {},\n type: 'object',\n }],\n type: 'layout',\n },\n}\n","import type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function buildCompactFix(\n fixer: TSESLint.RuleFixer,\n openingBracket: TSESLint.AST.Token,\n closingBracket: TSESLint.AST.Token,\n elements: (null | TSESTree.Node)[],\n sourceCode: TSESLint.SourceCode,\n): TSESLint.RuleFix {\n const nonNullElements = elements.filter(\n (el): el is NonNullable<typeof el> => el !== null,\n )\n\n const formattedItems = nonNullElements\n .map(element => sourceCode.getText(element))\n .join(', ')\n\n const newText = `[${formattedItems}]`\n\n return fixer.replaceTextRange(\n [openingBracket.range[0], closingBracket.range[1]],\n newText,\n )\n}\n","import type {TSESLint} from '@typescript-eslint/utils'\n\nexport function findBracketByRange(\n tokens: readonly TSESLint.AST.Token[] | undefined,\n range: readonly [number, number],\n value: string,\n): TSESLint.AST.Token | undefined {\n return tokens?.find(\n t => t.range[0] === range[0] && t.value === value,\n )\n}\n","import type {TSESLint} from '@typescript-eslint/utils'\n\nexport function findClosingBracketByRange(\n tokens: readonly TSESLint.AST.Token[] | undefined,\n range: readonly [number, number],\n): TSESLint.AST.Token | undefined {\n return tokens?.find(\n t => t.range[1] === range[1] && t.value === ']',\n )\n}\n","import type {TSESTree} from '@typescript-eslint/types'\n\nexport function hasElements(elements: (null | TSESTree.Node)[]): boolean {\n const nonNull = elements.filter(\n (el): el is NonNullable<typeof el> => el !== null,\n )\n return nonNull.length >= 1\n}\n","import type {TSESTree} from '@typescript-eslint/types'\n\nexport function hasMultilineItems(nonNullElements: TSESTree.Node[]): boolean {\n return nonNullElements.some(\n el => el.loc.start.line !== el.loc.end.line,\n )\n}\n","import type {TSESLint} from '@typescript-eslint/utils'\n\nexport function isBracketOnOwnLine(\n sourceCode: TSESLint.SourceCode,\n openingBracket: TSESLint.AST.Token,\n): boolean {\n const nextToken = sourceCode.getTokenAfter(openingBracket, {\n includeComments: false,\n })\n\n if (!nextToken)\n return false\n\n const text = sourceCode.getText()\n const openingBracketEndIndex = openingBracket.range[1]\n const textBetween = text.slice(\n openingBracketEndIndex,\n nextToken.range[0],\n )\n\n return textBetween.includes('\\n')\n}\n","import type {MessageId} from './MessageId'\n\nexport const messageIds: Record<MessageId, string> = {\n compactItems: 'Array items should be compact when the array spans multiple lines.',\n}\n","import {buildCompactFix} from './buildCompactFix'\nimport {findBracketByRange} from './findBracketByRange'\nimport {findClosingBracketByRange} from './findClosingBracketByRange'\nimport {hasElements} from './hasElements'\nimport {hasMultilineItems} from './hasMultilineItems'\nimport {isBracketOnOwnLine} from './isBracketOnOwnLine'\nimport {messageIds} from './messageIds'\nimport type {MessageId} from './MessageId'\nimport type {TSESLint} from '@typescript-eslint/utils'\n\nexport const compactArrayItems: TSESLint.RuleModule<MessageId, []> = {\n create(context) {\n const sourceCode = context.sourceCode ?? context.getSourceCode()\n\n return {\n ArrayExpression(node): void {\n if (!hasElements(node.elements))\n return\n\n const tokens = sourceCode.ast.tokens\n const openingBracket = findBracketByRange(tokens, node.range, '[')\n const closingBracket = findClosingBracketByRange(\n tokens,\n node.range,\n )\n\n if (!openingBracket || !closingBracket)\n return\n\n if (!isBracketOnOwnLine(sourceCode, openingBracket))\n return\n\n const nonNullElements = node.elements.filter(\n (el): el is NonNullable<typeof el> => el !== null,\n )\n\n if (!hasMultilineItems(nonNullElements))\n return\n\n context.report({\n fix: fixer => buildCompactFix(\n fixer,\n openingBracket,\n closingBracket,\n node.elements,\n sourceCode,\n ),\n messageId: 'compactItems',\n node,\n })\n },\n }\n },\n\n meta: {\n docs: {\n description:\n 'Enforce arrays with multiline items to have a compact, inline bracket style.',\n },\n fixable: 'code',\n messages: messageIds,\n schema: [],\n type: 'layout',\n },\n}\n","import type {TSESTree} from '@typescript-eslint/utils'\n\nexport function getNameFromDeclaration(node: TSESTree.Node): string[] {\n const names: string[] = []\n\n switch (node.type) {\n case 'ClassDeclaration':\n if (node.id)\n names.push(node.id.name)\n break\n case 'FunctionDeclaration':\n if (node.id)\n names.push(node.id.name)\n break\n case 'TSInterfaceDeclaration':\n names.push(node.id.name)\n break\n case 'TSTypeAliasDeclaration':\n names.push(node.id.name)\n break\n case 'VariableDeclaration':\n for (const d of node.declarations) {\n if (d.id.type === 'Identifier')\n names.push(d.id.name)\n }\n break\n }\n\n return names\n}\n","import type {TSESTree} from '@typescript-eslint/utils'\n\nexport function getNamesFromSpecifiers(\n node: TSESTree.ExportNamedDeclaration,\n): string[] {\n if (!node.specifiers?.length)\n return []\n\n const names: string[] = []\n for (const specifier of node.specifiers) {\n if (specifier.exported.type === 'Identifier')\n names.push(specifier.exported.name)\n }\n return names\n}\n","import {getNameFromDeclaration} from './getNameFromDeclaration'\nimport {getNamesFromSpecifiers} from './getNamesFromSpecifiers'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function getExportedNames(\n node: TSESTree.ExportNamedDeclaration,\n): string[] {\n const specifierNames = getNamesFromSpecifiers(node)\n\n if (!node.declaration)\n return specifierNames\n\n const declarationNames = getNameFromDeclaration(node.declaration)\n\n return [...specifierNames, ...declarationNames]\n}\n","import * as path from 'path'\n\nexport function stripExtension(filename: string): string {\n return path.basename(filename, path.extname(filename))\n}\n","import {stripExtension} from './stripExtension'\n\nexport function isExempt(filename: string): boolean {\n const name = stripExtension(filename)\n\n return (\n name === 'index'\n || name.endsWith('.test')\n || name.endsWith('.spec')\n || name.endsWith('.config')\n )\n}\n","export const messageIds = {\n filenameMismatch:\n \"File name must be '{{expectedName}}' instead of '{{currentName}}'.\",\n} as const\n","import * as path from 'path'\nimport {getExportedNames} from './getExportedNames'\nimport {isExempt} from '../shared/isExempt'\nimport {messageIds} from './messageIds'\nimport type {MessageId} from './MessageId'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport const exportFilenameMatch: TSESLint.RuleModule<MessageId, []> = {\n create(context) {\n const fileName = context.filename\n const baseName = path.basename(fileName)\n const ext = path.extname(baseName)\n const fileNameWithoutExt = baseName.slice(0, -ext.length)\n\n if (isExempt(fileName))\n return {}\n\n const exportNames: string[] = []\n\n return {\n ExportNamedDeclaration(node: TSESTree.ExportNamedDeclaration): void {\n const names = getExportedNames(node)\n exportNames.push(...names)\n },\n\n 'Program:exit'(programNode: TSESTree.Program): void {\n if (exportNames.length === 1) {\n const [exportName] = exportNames\n\n if (exportName !== fileNameWithoutExt) {\n context.report({\n data: {\n currentName: `${fileNameWithoutExt}${ext}`,\n expectedName: `${exportName}${ext}`,\n },\n messageId: 'filenameMismatch',\n node: programNode,\n })\n }\n }\n },\n }\n },\n\n meta: {\n docs: {\n description: 'Enforce filename matches the single named export.',\n },\n messages: messageIds,\n schema: [],\n type: 'suggestion',\n },\n}\n","import type {Nodes} from './Nodes'\n\nexport function findLinesWithMultipleNodes(nodes: Nodes[]): number[] {\n const lines: number[] = []\n\n for (let i = 0; i < nodes.length; i++) {\n const node = nodes[i]\n const nodeLine = node.loc.start.line\n\n if (i < nodes.length - 1) {\n const nextNode = nodes[i + 1]\n if (nextNode.loc.start.line === nodeLine)\n lines.push(nodeLine)\n }\n }\n\n return lines\n}\n","import type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function formatArgs(\n sourceCode: TSESLint.SourceCode,\n nodes: TSESTree.Node[],\n indent: string,\n): string {\n return nodes\n .map((arg, index) => {\n const argText = sourceCode.getText(arg)\n const isLast = index === nodes.length - 1\n if (isLast)\n return argText\n const comma = sourceCode.getTokenAfter(arg, token => token.value === ',')\n if (comma && comma.loc.end.line === arg.loc.end.line)\n return argText + ','\n return argText\n })\n .map((text, index) =>\n index === 0 ? `${indent}${text}` : `\\n${indent}${text}`,\n )\n .join('')\n}\n","import type {TSESLint} from '@typescript-eslint/utils'\n\nexport function getLineStartIndex(\n sourceCode: TSESLint.SourceCode,\n line: number,\n): number {\n const lines = sourceCode.getLines()\n return lines.slice(0, line - 1).reduce(\n (acc, l) => acc + l.length + 1,\n 0,\n )\n}\n","import {findLinesWithMultipleNodes} from '../shared/findLinesWithMultipleNodes'\nimport {formatArgs} from './formatArgs'\nimport {getLineLength} from '../shared/getLineLength'\nimport {getLineStartIndex} from '../shared/getLineStartIndex'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function checkMultilineArgs(\n sourceCode: TSESLint.SourceCode,\n context: TSESLint.RuleContext<MessageId, [Options]>,\n args: TSESTree.Node[],\n maxLength: number,\n): void {\n const linesWithMultipleArgs = findLinesWithMultipleNodes(args)\n\n for (const line of linesWithMultipleArgs) {\n const lineLength = getLineLength(sourceCode, line)\n\n if (lineLength > maxLength) {\n context.report({\n data: {maxLength},\n fix: (fixer): TSESLint.RuleFix => {\n const nodesOnLine = args.filter(\n arg =>\n arg.loc.start.line <= line && arg.loc.end.line >= line,\n )\n const lastNode = nodesOnLine[nodesOnLine.length - 1]\n const lineStartIndex = getLineStartIndex(sourceCode, line)\n const baseIndent = sourceCode.getText().match(/^[\\t ]*/)?.[0] ?? ''\n const indent = baseIndent + ' '\n const fixed = formatArgs(sourceCode, nodesOnLine, indent)\n return fixer.replaceTextRange(\n [lineStartIndex, lastNode.range[1]],\n fixed,\n )\n },\n loc: {\n end: {\n column: lineLength,\n line,\n },\n start: {\n column: 0,\n line,\n },\n },\n messageId: 'multipleOnSameLine',\n })\n }\n }\n}\n","import {getLineLength} from '../shared/getLineLength'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {Parens} from './Parens'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function checkSingleLineArgs(\n sourceCode: TSESLint.SourceCode,\n context: TSESLint.RuleContext<MessageId, [Options]>,\n args: TSESTree.Node[],\n parens: Parens,\n maxLength: number,\n): void {\n const {closingParen, openingParen} = parens\n const lineLength = getLineLength(sourceCode, openingParen.loc.start.line)\n\n if (lineLength <= maxLength)\n return\n\n if (args.length === 1) {\n context.report({\n data: {maxLength},\n loc: {\n end: {\n column: lineLength,\n line: closingParen.loc.end.line,\n },\n start: {\n column: 0,\n line: openingParen.loc.start.line,\n },\n },\n messageId: 'exceedsMaxLength',\n })\n return\n }\n\n context.report({\n data: {maxLength},\n fix: (fixer): TSESLint.RuleFix => {\n const indent = sourceCode.getText().match(/^[\\t ]*/)?.[0] ?? ''\n\n const argTexts = args.map(arg => {\n const argText = sourceCode.getText(arg)\n const comma = sourceCode.getTokenAfter(\n arg,\n token => token.value === ',',\n )\n if (comma && comma.loc.end.line === arg.loc.end.line)\n return argText + ','\n return argText\n })\n\n const fixed = [\n '(\\n',\n `${indent} ${argTexts.join(`\\n${indent} `)}\\n`,\n `${indent})`,\n ].join('')\n\n return fixer.replaceTextRange(\n [openingParen.range[0], closingParen.range[1]],\n fixed,\n )\n },\n loc: {\n end: {\n column: lineLength,\n line: closingParen.loc.end.line,\n },\n start: {\n column: 0,\n line: openingParen.loc.start.line,\n },\n },\n messageId: 'multipleOnSameLine',\n })\n}\n","import type {Options} from './Options'\n\nexport const defaultOptions = {\n maxLength: 80,\n} as const satisfies Options\n","import type {Parens} from './Parens'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function getParens(\n sourceCode: TSESLint.SourceCode,\n nodes: TSESTree.Node[],\n): null | Parens {\n if (nodes.length === 0)\n return null\n\n const firstNode = nodes[0]\n const lastNode = nodes[nodes.length - 1]\n\n const openingParen = sourceCode.getTokenBefore(firstNode)\n const closingParen = sourceCode.getTokenAfter(lastNode)\n\n if (!openingParen || !closingParen)\n return null\n\n return {closingParen, openingParen}\n}\n","import type {Parens} from './Parens'\n\nexport function isValidParens(parens: null | Parens): parens is Parens {\n if (!parens)\n return false\n return parens.openingParen.value === '(' && parens.closingParen.value === ')'\n}\n","import {checkMultilineArgs} from './checkMultilineArgs'\nimport {checkSingleLineArgs} from './checkSingleLineArgs'\nimport {defaultOptions} from './defaultOptions'\nimport {getParens} from '../shared/getParens'\nimport {isValidParens} from '../shared/isValidParens'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function checkCall(\n sourceCode: TSESLint.SourceCode,\n context: TSESLint.RuleContext<MessageId, [Options]>,\n node: TSESTree.CallExpression,\n): void {\n const options = context.options[0] as Options ?? {}\n const maxLength = options.maxLength ?? defaultOptions.maxLength\n\n const args = node.arguments as TSESTree.Node[]\n const parens = getParens(sourceCode, args)\n\n if (!isValidParens(parens))\n return\n\n const firstLine = parens.openingParen.loc.start.line\n const lastLine = parens.closingParen.loc.end.line\n\n if (firstLine === lastLine)\n checkSingleLineArgs(sourceCode, context, args, parens, maxLength)\n else\n checkMultilineArgs(sourceCode, context, args, maxLength)\n}\n","export const messageIds = {\n exceedsMaxLength: 'Refactor this function call as it exceeds {{maxLength}} characters',\n multipleOnSameLine: 'Each argument must be on its own line',\n} as const\n","import {checkCall} from './checkCall'\nimport {messageIds} from './messageIds'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport const functionCallArgumentLineBreak: TSESLint.RuleModule<MessageId, [Options]> = {\n create(context) {\n const sourceCode = context.sourceCode ?? context.getSourceCode()\n\n return {\n CallExpression(node): void {\n checkCall(sourceCode, context, node)\n },\n\n OptionalCallExpression(node): void {\n checkCall(sourceCode, context, node as TSESTree.CallExpression)\n },\n }\n },\n\n meta: {\n docs: {\n description: 'Enforce each function call argument to be on its own line when line exceeds max length.',\n },\n fixable: 'code',\n messages: messageIds,\n schema: [{\n additionalProperties: false,\n properties: {\n maxLength: {\n type: 'number',\n },\n },\n type: 'object',\n }],\n type: 'layout',\n },\n}\n","import type {TSESTree} from '@typescript-eslint/utils'\n\nexport function isNodeWithType(value: unknown): value is TSESTree.Node {\n return value !== null && typeof value === 'object' && 'type' in value\n}\n","import {isNodeWithType} from './isNodeWithType'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nconst SKIP_KEYS = new Set(['loc', 'parent', 'range'])\n\nexport function getChildNodes(node: TSESTree.Node): TSESTree.Node[] {\n const children: TSESTree.Node[] = []\n\n for (const key of Object.keys(node)) {\n if (SKIP_KEYS.has(key))\n continue\n\n const value = (node as unknown as Record<string, unknown>)[key]\n\n if (Array.isArray(value)) {\n for (const item of value) {\n if (isNodeWithType(item))\n children.push(item)\n }\n } else if (isNodeWithType(value))\n children.push(value)\n }\n\n return children\n}\n","import type {TSESTree} from '@typescript-eslint/utils'\n\nconst INCREMENTABLE_TYPES = new Set([\n 'ConditionalExpression',\n 'DoWhileStatement',\n 'ForInStatement',\n 'ForOfStatement',\n 'ForStatement',\n 'IfStatement',\n 'LogicalExpression',\n 'SwitchStatement',\n 'TryStatement',\n 'WhileStatement',\n])\n\nexport function isIncrementableControlFlow(node: TSESTree.Node): boolean {\n return INCREMENTABLE_TYPES.has(node.type)\n}\n","import {getChildNodes} from './getChildNodes'\nimport {isIncrementableControlFlow} from './isIncrementableControlFlow'\nimport type {ComplexityState} from './ComplexityState'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function traverse(\n node: TSESTree.Node,\n nestingLevel: number,\n state: ComplexityState,\n): void {\n if (isIncrementableControlFlow(node)) {\n state.complexity += 1 + nestingLevel\n nestingLevel++\n }\n\n const children = getChildNodes(node)\n\n for (const child of children)\n traverse(child, nestingLevel, state)\n}\n","import {getChildNodes} from './getChildNodes'\nimport {traverse} from './traverse'\nimport type {ComplexityState} from './ComplexityState'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function calculateCognitiveComplexity(node: TSESTree.Node): number {\n const state: ComplexityState = {\n complexity: 0,\n nestingLevel: 0,\n }\n\n const children = getChildNodes(node)\n\n for (const child of children)\n traverse(child, 0, state)\n\n return state.complexity\n}\n","import type {TSESTree} from '@typescript-eslint/utils'\n\nexport function getNameFromCallExpression(\n node: TSESTree.Node | undefined,\n): null | string {\n if (node?.type === 'CallExpression' && node.callee?.type === 'Identifier')\n return `${node.callee.name} callback`\n\n return null\n}\n","import type {TSESTree} from '@typescript-eslint/utils'\n\nexport function getNameFromProperty(\n node: TSESTree.Node | undefined,\n): null | string {\n if (node?.type === 'Property' && node.key?.type === 'Identifier')\n return node.key.name\n\n return null\n}\n","import type {TSESTree} from '@typescript-eslint/utils'\n\nexport function getNameFromVariableDeclarator(\n node: TSESTree.Node | undefined,\n): null | string {\n if (node?.type === 'VariableDeclarator' && node.id?.type === 'Identifier')\n return node.id.name\n\n return null\n}\n","import {getNameFromCallExpression} from './getNameFromCallExpression'\nimport {getNameFromProperty} from './getNameFromProperty'\nimport {getNameFromVariableDeclarator} from './getNameFromVariableDeclarator'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function getArrowFunctionExpressionName(\n node: TSESTree.ArrowFunctionExpression,\n): null | string {\n const parent = node.parent\n\n const nameFromVar = getNameFromVariableDeclarator(parent)\n if (nameFromVar)\n return nameFromVar\n\n const nameFromProp = getNameFromProperty(parent)\n if (nameFromProp)\n return nameFromProp\n\n const nameFromCall = getNameFromCallExpression(parent)\n if (nameFromCall)\n return nameFromCall\n\n return null\n}\n","import type {TSESTree} from '@typescript-eslint/utils'\n\nexport function getNameFromMethodDefinition(\n node: TSESTree.Node | undefined,\n): null | string {\n if (node?.type === 'MethodDefinition' && node.key?.type === 'Identifier')\n return node.key.name\n\n return null\n}\n","import {getNameFromMethodDefinition} from './getNameFromMethodDefinition'\nimport {getNameFromProperty} from './getNameFromProperty'\nimport {getNameFromVariableDeclarator} from './getNameFromVariableDeclarator'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function getFunctionExpressionName(\n node: TSESTree.FunctionExpression,\n): null | string {\n const parent = node.parent\n\n const nameFromVar = getNameFromVariableDeclarator(parent)\n if (nameFromVar)\n return nameFromVar\n\n const nameFromProp = getNameFromProperty(parent)\n if (nameFromProp)\n return nameFromProp\n\n const nameFromMethod = getNameFromMethodDefinition(parent)\n if (nameFromMethod)\n return nameFromMethod\n\n return null\n}\n","import {getArrowFunctionExpressionName} from './getArrowFunctionExpressionName'\nimport {getFunctionExpressionName} from './getFunctionExpressionName'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function getFunctionName(\n node:\n | TSESTree.ArrowFunctionExpression\n | TSESTree.FunctionDeclaration\n | TSESTree.FunctionExpression,\n): null | string {\n if (node.type === 'FunctionDeclaration' && node.id?.name)\n return node.id.name\n\n if (node.type === 'FunctionExpression')\n return getFunctionExpressionName(node)\n\n if (node.type === 'ArrowFunctionExpression')\n return getArrowFunctionExpressionName(node)\n\n return null\n}\n","export const messageIds = {\n tooHighCognitiveComplexity:\n 'Function \\'{{name}}\\' has cognitive complexity of {{actual}} (max: {{max}}). Consider extracting sub-functions.',\n tooHighCognitiveComplexityAnonymous:\n 'Anonymous function has cognitive complexity of {{actual}} (max: {{max}}). Consider extracting sub-functions.',\n}\n","import {calculateCognitiveComplexity} from './calculateCognitiveComplexity'\nimport {getFunctionName} from './getFunctionName'\nimport {messageIds} from './messageIds'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nconst DEFAULT_MAX_COGNITIVE_COMPLEXITY = 15\n\nexport const functionCognitiveComplexity: TSESLint.RuleModule<MessageId, [Options]> = {\n create(context) {\n const options = context.options[0] ?? {}\n const maxCognitiveComplexity = options.maxCognitiveComplexity ?? DEFAULT_MAX_COGNITIVE_COMPLEXITY\n\n function checkFunction(\n node:\n | TSESTree.ArrowFunctionExpression\n | TSESTree.FunctionDeclaration\n | TSESTree.FunctionExpression,\n ): void {\n const complexity = calculateCognitiveComplexity(node)\n\n if (complexity > maxCognitiveComplexity) {\n const name = getFunctionName(node)\n\n if (name) {\n context.report({\n data: {\n actual: complexity,\n max: maxCognitiveComplexity,\n name,\n },\n messageId: 'tooHighCognitiveComplexity',\n node,\n })\n } else {\n context.report({\n data: {\n actual: complexity,\n max: maxCognitiveComplexity,\n },\n messageId: 'tooHighCognitiveComplexityAnonymous',\n node,\n })\n }\n }\n }\n\n return {\n ArrowFunctionExpression(node: TSESTree.ArrowFunctionExpression): void {\n checkFunction(node)\n },\n\n FunctionDeclaration(node: TSESTree.FunctionDeclaration): void {\n checkFunction(node)\n },\n\n FunctionExpression(node: TSESTree.FunctionExpression): void {\n checkFunction(node)\n },\n }\n },\n\n meta: {\n docs: {\n description: 'Enforce cognitive complexity threshold for functions.',\n },\n messages: messageIds,\n schema: [{\n additionalProperties: false,\n properties: {\n maxCognitiveComplexity: {\n type: 'number',\n },\n },\n type: 'object',\n }],\n type: 'suggestion',\n },\n}\n","import type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function formatParams(\n sourceCode: TSESLint.SourceCode,\n nodes: TSESTree.Parameter[],\n indent: string,\n): string {\n return nodes\n .map((param, index) => {\n const paramText = sourceCode.getText(param)\n const isLast = index === nodes.length - 1\n if (isLast)\n return paramText\n const comma = sourceCode.getTokenAfter(\n param,\n token => token.value === ',',\n )\n if (comma && comma.loc.end.line === param.loc.end.line)\n return paramText + ','\n return paramText\n })\n .map((text, index) =>\n index === 0 ? `${indent}${text}` : `\\n${indent}${text}`,\n )\n .join('')\n}\n","import {findLinesWithMultipleNodes} from '../shared/findLinesWithMultipleNodes'\nimport {formatParams} from './formatParams'\nimport {getLineLength} from '../shared/getLineLength'\nimport {getLineStartIndex} from '../shared/getLineStartIndex'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {Parens} from './Parens'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function checkMultilineParams(\n sourceCode: TSESLint.SourceCode,\n context: TSESLint.RuleContext<MessageId, [Options]>,\n params: TSESTree.Parameter[],\n parens: Parens,\n maxLength: number,\n): void {\n const linesWithMultipleParams = findLinesWithMultipleNodes(params)\n\n for (const line of linesWithMultipleParams) {\n const lineLength = getLineLength(sourceCode, line)\n\n if (lineLength > maxLength) {\n context.report({\n data: {maxLength},\n fix: (fixer): TSESLint.RuleFix => {\n const nodesOnLine = params.filter(\n param =>\n param.loc.start.line <= line && param.loc.end.line >= line,\n )\n const lastNode = nodesOnLine[nodesOnLine.length - 1]\n const lineStartIndex = getLineStartIndex(sourceCode, line)\n const baseIndent = sourceCode.getText().match(/^[\\t ]*/)?.[0] ?? ''\n const indent = baseIndent + ' '\n const fixed = formatParams(sourceCode, nodesOnLine, indent)\n return fixer.replaceTextRange(\n [lineStartIndex, lastNode.range[1]],\n fixed,\n )\n },\n loc: {\n end: {\n column: lineLength,\n line,\n },\n start: {\n column: 0,\n line,\n },\n },\n messageId: 'multipleOnSameLine',\n })\n }\n }\n}\n","import {getLineLength} from '../shared/getLineLength'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {Parens} from './Parens'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function checkSingleLineParams(\n sourceCode: TSESLint.SourceCode,\n context: TSESLint.RuleContext<MessageId, [Options]>,\n params: TSESTree.Parameter[],\n parens: Parens,\n maxLength: number,\n): void {\n const {closingParen, openingParen} = parens\n const lineLength = getLineLength(sourceCode, openingParen.loc.start.line)\n\n if (lineLength <= maxLength)\n return\n\n if (params.length === 1) {\n context.report({\n data: {maxLength},\n loc: {\n end: {\n column: lineLength,\n line: closingParen.loc.end.line,\n },\n start: {\n column: 0,\n line: openingParen.loc.start.line,\n },\n },\n messageId: 'exceedsMaxLength',\n })\n return\n }\n\n context.report({\n data: {maxLength},\n fix: (fixer): TSESLint.RuleFix => {\n const indent = sourceCode.getText().match(/^[\\t ]*/)?.[0] ?? ''\n\n const paramTexts = params.map(param => {\n const paramText = sourceCode.getText(param)\n const comma = sourceCode.getTokenAfter(\n param,\n token => token.value === ',',\n )\n if (comma && comma.loc.end.line === param.loc.end.line)\n return paramText + ','\n return paramText\n })\n\n const fixed = [\n '(\\n',\n `${indent} ${paramTexts.join(`\\n${indent} `)}\\n`,\n `${indent})`,\n ].join('')\n\n return fixer.replaceTextRange(\n [openingParen.range[0], closingParen.range[1]],\n fixed,\n )\n },\n loc: {\n end: {\n column: lineLength,\n line: closingParen.loc.end.line,\n },\n start: {\n column: 0,\n line: openingParen.loc.start.line,\n },\n },\n messageId: 'multipleOnSameLine',\n })\n}\n","import type {Options} from './Options'\n\nexport const defaultOptions = {\n maxLength: 80,\n} as const satisfies Options\n","import {checkMultilineParams} from './checkMultilineParams'\nimport {checkSingleLineParams} from './checkSingleLineParams'\nimport {defaultOptions} from './defaultOptions'\nimport {getParens} from '../shared/getParens'\nimport {isValidParens} from '../shared/isValidParens'\nimport type {FunctionNode} from './FunctionNode'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {TSESLint} from '@typescript-eslint/utils'\n\nexport function checkFunction(\n sourceCode: TSESLint.SourceCode,\n context: TSESLint.RuleContext<MessageId, [Options]>,\n node: FunctionNode,\n): void {\n const options = context.options[0] as Options ?? {}\n const maxLength = options.maxLength ?? defaultOptions.maxLength\n\n const params = node.params\n if (params.length === 0)\n return\n\n const parens = getParens(sourceCode, params)\n\n if (!isValidParens(parens))\n return\n\n const firstLine = parens.openingParen.loc.start.line\n const lastLine = parens.closingParen.loc.end.line\n\n if (firstLine === lastLine)\n checkSingleLineParams(sourceCode, context, params, parens, maxLength)\n else\n checkMultilineParams(sourceCode, context, params, parens, maxLength)\n}\n","export const messageIds = {\n exceedsMaxLength: 'Refactor this function signature as it exceeds {{maxLength}} characters',\n multipleOnSameLine: 'Each parameter must be on its own line',\n} as const\n","import {checkFunction} from './checkFunction'\nimport {messageIds} from './messageIds'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {TSESLint} from '@typescript-eslint/utils'\n\nexport const functionParameterLineBreak: TSESLint.RuleModule<MessageId, [Options]> = {\n create(context) {\n const sourceCode = context.sourceCode ?? context.getSourceCode()\n\n return {\n ArrowFunctionExpression(node): void {\n if (node.expression)\n return\n\n checkFunction(sourceCode, context, node)\n },\n\n FunctionDeclaration(node): void {\n checkFunction(sourceCode, context, node)\n },\n\n FunctionExpression(node): void {\n checkFunction(sourceCode, context, node)\n },\n\n TSCallSignatureDeclaration(node): void {\n checkFunction(sourceCode, context, node)\n },\n\n TSFunctionType(node): void {\n checkFunction(sourceCode, context, node)\n },\n\n TSMethodSignature(node): void {\n checkFunction(sourceCode, context, node)\n },\n }\n },\n\n meta: {\n docs: {\n description: 'Enforce each function parameter to be on its own line when line exceeds max length.',\n },\n fixable: 'code',\n messages: messageIds,\n schema: [{\n additionalProperties: false,\n properties: {\n maxLength: {\n type: 'number',\n },\n },\n type: 'object',\n }],\n type: 'layout',\n },\n}\n","import type {StatementType} from './StatementType'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function getStatementType(statement: TSESTree.Statement): StatementType {\n if (statement.type === 'ImportDeclaration')\n return 'import'\n\n if (statement.type === 'ExportAllDeclaration')\n return 're-export'\n\n if (statement.type === 'ExportNamedDeclaration') {\n if (statement.source !== null)\n return 're-export'\n }\n\n return 'other'\n}\n","import type {TSESTree} from '@typescript-eslint/types'\n\nexport function isImportDeclaration(\n statement: TSESTree.ProgramStatement,\n): statement is TSESTree.ImportDeclaration {\n return statement.type === 'ImportDeclaration'\n}\n","import type {ReExportDeclaration} from '@lib/ReExportDeclaration'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function isReExport(\n statement: TSESTree.ProgramStatement,\n): statement is ReExportDeclaration {\n if (statement.type === 'ExportAllDeclaration')\n return true\n if (statement.type === 'ExportNamedDeclaration')\n return statement.source !== null\n return false\n}\n","import {getStatementType} from './getStatementType'\nimport {isImportDeclaration} from './isImportDeclaration'\nimport {isReExport} from './isReExport'\nimport type {CategorizedStatements} from './CategorizedStatements'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function categorizeStatements(\n statements: TSESTree.ProgramStatement[],\n): CategorizedStatements {\n const result: CategorizedStatements = {\n imports: [],\n other: [],\n reExports: [],\n }\n\n for (const statement of statements) {\n const type = getStatementType(statement)\n\n if (type === 'import' && isImportDeclaration(statement))\n result.imports.push(statement)\n else if (type === 're-export' && isReExport(statement))\n result.reExports.push(statement)\n else\n result.other.push(statement)\n }\n\n return result\n}\n","import {getStatementType} from './getStatementType'\nimport type {StatementIndices} from './StatementIndices'\nimport type {StatementType} from './StatementType'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function findStatementIndices(\n statements: TSESTree.Statement[],\n): StatementIndices {\n let firstRegularStatement = -1\n let lastImport = -1\n let lastReExport = -1\n\n for (let i = 0; i < statements.length; i++) {\n const type: StatementType = getStatementType(statements[i])\n\n if (type === 'import')\n lastImport = i\n else if (type === 're-export')\n lastReExport = i\n else if (type === 'other' && firstRegularStatement === -1)\n firstRegularStatement = i\n }\n\n return {firstRegularStatement, lastImport, lastReExport}\n}\n","import type {CategorizedStatements} from './CategorizedStatements'\nimport type {TSESLint} from '@typescript-eslint/utils'\n\nexport function generateSortedText(\n context: TSESLint.RuleContext<'importsAndReExportsAtTop', []>,\n categories: CategorizedStatements,\n): string {\n const allStatements = [\n ...categories.imports,\n ...categories.reExports,\n ...categories.other,\n ]\n return allStatements.map(\n node => context.sourceCode.getText(node),\n ).join('\\n')\n}\n","import type {CategorizedStatements} from './CategorizedStatements'\nimport type {StatementIndices} from './StatementIndices'\n\nexport function hasImportOrderViolation(\n indices: StatementIndices,\n categories: CategorizedStatements,\n): boolean {\n const {firstRegularStatement, lastImport, lastReExport} = indices\n\n if (categories.imports.length === 0 && categories.reExports.length === 0)\n return false\n\n const hasImportAfterRegularStatement = (\n categories.imports.length > 0\n && firstRegularStatement !== -1\n && lastImport > firstRegularStatement\n )\n const hasReExportAfterRegularStatement = (\n categories.reExports.length > 0\n && firstRegularStatement !== -1\n && lastReExport > firstRegularStatement\n )\n\n return hasImportAfterRegularStatement || hasReExportAfterRegularStatement\n}\n","import {categorizeStatements} from './categorizeStatements'\nimport {findStatementIndices} from './findStatementIndices'\nimport {generateSortedText} from './generateSortedText'\nimport {hasImportOrderViolation} from './hasImportOrderViolation'\nimport type {MessageIds} from './MessageIds'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport const importsAndReExportsAtTop: TSESLint.RuleModule<MessageIds, []> = {\n create(context) {\n return {\n Program(node: TSESTree.Program): void {\n const statements = node.body\n const categories = categorizeStatements(statements)\n const indices = findStatementIndices(statements)\n\n if (!hasImportOrderViolation(indices, categories))\n return\n\n context.report({\n fix(fixer) {\n const sortedText = generateSortedText(context, categories)\n return fixer.replaceText(node, sortedText)\n },\n messageId: 'importsAndReExportsAtTop',\n\n node,\n })\n },\n }\n },\n\n meta: {\n docs: {\n description: 'Enforce imports and re-exports at the top of the file.',\n },\n fixable: 'code',\n messages: {\n importsAndReExportsAtTop:\n 'Imports and re-exports should be at the top of the file.',\n },\n schema: [],\n type: 'suggestion',\n },\n}\n","import type {MessageIds} from './MessageIds'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport const individualImports: TSESLint.RuleModule<MessageIds, []> = {\n create(context) {\n return {\n ImportDeclaration(node: TSESTree.ImportDeclaration): void {\n if (node.specifiers.length <= 1)\n return\n\n context.report({\n fix(fixer) {\n const source = node.source.raw\n const specifiers = node.specifiers\n .filter(s => s.type === 'ImportSpecifier')\n .map(s => `import {${s.local.name}} from ${source}`)\n .join('\\n')\n return fixer.replaceText(node, specifiers)\n },\n messageId: 'individualImports',\n node,\n })\n },\n }\n },\n meta: {\n docs: {\n description: 'Enforce individual imports instead of grouped imports.',\n },\n fixable: 'code',\n messages: {\n individualImports: 'Use individual imports instead of grouped imports.',\n },\n schema: [],\n type: 'suggestion',\n },\n}\n","import type {MessageIds} from './MessageIds'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport const individualReExports: TSESLint.RuleModule<MessageIds, []> = {\n create(context) {\n return {\n ExportNamedDeclaration(node: TSESTree.ExportNamedDeclaration): void {\n if (!node.source || node.specifiers.length <= 1)\n return\n\n context.report({\n fix(fixer) {\n const source = node.source.value\n const typeKeyword = node.exportKind === 'type'\n ? 'type '\n : ''\n const specifiers = node.specifiers\n .map(s => {\n const localName = s.local.type === 'Identifier'\n ? s.local.name\n : s.local.value\n const exportedName = s.exported.type === 'Identifier'\n ? s.exported.name\n : s.exported.value\n const name = localName === exportedName\n ? localName\n : `${localName} as ${exportedName}`\n return `export ${typeKeyword}{${name}} from '${source}'`\n })\n .join('\\n')\n return fixer.replaceText(node, specifiers)\n },\n messageId: 'individualReExports',\n node,\n })\n },\n }\n },\n meta: {\n docs: {\n description: 'Enforce individual exports instead of grouped exports.',\n },\n fixable: 'code',\n messages: {\n individualReExports: 'Use individual exports instead of grouped exports.',\n },\n schema: [],\n type: 'suggestion',\n },\n}\n","import type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function formatTypeLiteral(\n sourceCode: TSESLint.SourceCode,\n typeLiteral: TSESTree.TSTypeLiteral,\n baseIndent: string,\n): string {\n const members = typeLiteral.members\n if (members.length === 0)\n return '{}'\n\n const memberTexts = members.map(member => {\n if (member.type === 'TSPropertySignature') {\n const memberText = sourceCode.getText(member)\n return memberText.replace(/,\\s*$/, '')\n }\n return sourceCode.getText(member).replace(/,\\s*$/, '')\n })\n\n const innerIndent = baseIndent + ' '\n const lines = [\n '{',\n innerIndent + memberTexts.join(`\\n${innerIndent}`),\n `${baseIndent}}`,\n ]\n return lines.join('\\n')\n}\n","import {formatTypeLiteral} from './formatTypeLiteral'\nimport {getLineIndent} from '../shared/getLineIndent'\nimport {getLineLength} from '../shared/getLineLength'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function checkMultilineMembers(\n sourceCode: TSESLint.SourceCode,\n context: TSESLint.RuleContext<MessageId, [Options]>,\n members: TSESTree.TSInterfaceBody['body'],\n maxLength: number,\n): void {\n for (const member of members) {\n const memberLine = member.loc.start.line\n const lineLength = getLineLength(sourceCode, memberLine)\n\n if (lineLength > maxLength) {\n let fix: ((fixer: TSESLint.RuleFixer) => TSESLint.RuleFix) | undefined\n\n if (\n member.type === 'TSPropertySignature'\n && member.typeAnnotation\n && member.typeAnnotation.typeAnnotation.type === 'TSTypeLiteral'\n ) {\n const typeLiteral = member.typeAnnotation.typeAnnotation as TSESTree.TSTypeLiteral\n\n fix = (fixer): TSESLint.RuleFix => {\n const baseIndent = getLineIndent(sourceCode, memberLine)\n const formatted = formatTypeLiteral(\n sourceCode,\n typeLiteral,\n baseIndent,\n )\n return fixer.replaceText(typeLiteral, formatted)\n }\n }\n\n context.report({\n data: {maxLength},\n fix,\n loc: {\n end: {\n column: lineLength,\n line: memberLine,\n },\n start: {\n column: 0,\n line: memberLine,\n },\n },\n messageId: 'exceedsMaxLength',\n })\n }\n }\n}\n","import {getLineLength} from '../shared/getLineLength'\nimport type {Braces} from './Braces'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function checkSingleLineMembers(\n sourceCode: TSESLint.SourceCode,\n context: TSESLint.RuleContext<MessageId, [Options]>,\n members: TSESTree.TSInterfaceBody['body'],\n parens: Braces,\n maxLength: number,\n): void {\n const {closingBrace, openingBrace} = parens\n const lineLength = getLineLength(sourceCode, openingBrace.loc.start.line)\n\n if (lineLength <= maxLength)\n return\n\n if (members.length === 1) {\n context.report({\n data: {maxLength},\n loc: {\n end: {\n column: lineLength,\n line: closingBrace.loc.end.line,\n },\n start: {\n column: 0,\n line: openingBrace.loc.start.line,\n },\n },\n messageId: 'exceedsMaxLength',\n })\n return\n }\n\n context.report({\n data: {maxLength},\n fix: (fixer): TSESLint.RuleFix => {\n const indent = sourceCode.getText().match(/^[\\t ]*/)?.[0] ?? ''\n\n const memberTexts = members.map((member, index) => {\n const memberText = sourceCode.getText(member).replace(/,\\s*$/, '')\n const isLast = index === members.length - 1\n if (!isLast)\n return memberText + ','\n return memberText\n })\n\n const fixed = [\n '{\\n',\n `${indent} ${memberTexts.join(`\\n${indent} `)}\\n`,\n `${indent}}`,\n ].join('')\n\n return fixer.replaceTextRange(\n [openingBrace.range[0], closingBrace.range[1]],\n fixed,\n )\n },\n loc: {\n end: {\n column: lineLength,\n line: closingBrace.loc.end.line,\n },\n start: {\n column: 0,\n line: openingBrace.loc.start.line,\n },\n },\n messageId: 'multipleOnSameLine',\n })\n}\n","import type {Options} from './Options'\n\nexport const defaultOptions = {\n maxLength: 80,\n} as const satisfies Options\n","import type {Braces} from './Braces'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function getBraces(\n sourceCode: TSESLint.SourceCode,\n body: TSESTree.TSInterfaceBody,\n): Braces | null {\n const openingBrace = sourceCode.getTokenBefore(body.body[0])\n const closingBrace = sourceCode.getTokenAfter(body.body[body.body.length - 1])\n\n if (!openingBrace || !closingBrace)\n return null\n\n return {closingBrace, openingBrace}\n}\n","import {checkMultilineMembers} from './checkMultilineMembers'\nimport {checkSingleLineMembers} from './checkSingleLineMembers'\nimport {defaultOptions} from './defaultOptions'\nimport {getBraces} from './getBraces'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function checkInterface(\n sourceCode: TSESLint.SourceCode,\n context: TSESLint.RuleContext<MessageId, [Options]>,\n node: TSESTree.TSInterfaceDeclaration,\n): void {\n const options = context.options[0] as Options ?? {}\n const maxLength = options.maxLength ?? defaultOptions.maxLength\n\n const body = node.body\n if (!body || body.body.length === 0)\n return\n\n const braces = getBraces(sourceCode, body)\n\n if (!braces)\n return\n\n const firstLine = braces.openingBrace.loc.start.line\n const lastLine = braces.closingBrace.loc.end.line\n\n if (firstLine === lastLine)\n checkSingleLineMembers(sourceCode, context, body.body, braces, maxLength)\n else\n checkMultilineMembers(sourceCode, context, body.body, maxLength)\n}\n","import type {MessageId} from './MessageId'\n\nexport const messageIds: Record<MessageId, string> = {\n exceedsMaxLength: 'Interface line exceeds {{maxLength}} characters',\n multipleOnSameLine: 'Interface members should each be on their own line when line exceeds {{maxLength}} characters',\n}\n","import {checkInterface} from './checkInterface'\nimport {messageIds} from './messageIds'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {TSESLint} from '@typescript-eslint/utils'\n\nexport const interfacePropertyLineBreak: TSESLint.RuleModule<MessageId, [Options]> = {\n create(context) {\n const sourceCode = context.sourceCode ?? context.getSourceCode()\n\n return {\n TSInterfaceDeclaration(node): void {\n checkInterface(sourceCode, context, node)\n },\n }\n },\n\n meta: {\n docs: {\n description: 'Enforce each interface member to be on its own line when line exceeds max length.',\n },\n fixable: 'code',\n messages: messageIds,\n schema: [{\n additionalProperties: false,\n properties: {\n maxLength: {\n type: 'number',\n },\n },\n type: 'object',\n }],\n type: 'layout',\n },\n}\n","import type {TSESTree} from '@typescript-eslint/utils'\n\nexport function collectVariableDeclarators(\n node: TSESTree.VariableDeclaration,\n types: Set<string>,\n): void {\n for (const declarator of node.declarations) {\n if (declarator.id.type === 'Identifier' && declarator.id.name)\n types.add(declarator.id.name)\n }\n}\n","import type {TSESTree} from '@typescript-eslint/utils'\n\nexport function isTopLevel(node: TSESTree.Node): boolean {\n if (node.parent?.type === 'Program')\n return true\n if (\n node.parent?.type === 'ExportNamedDeclaration'\n && node.parent.parent?.type === 'Program'\n )\n return true\n return false\n}\n","import {isTopLevel} from './isTopLevel'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function handleClassDeclaration(\n node: TSESTree.ClassDeclaration,\n functions: Set<string>,\n): void {\n if (isTopLevel(node) && node.id?.name)\n functions.add(node.id.name)\n}\n","import {isTopLevel} from './isTopLevel'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function handleFunctionDeclaration(\n node: TSESTree.FunctionDeclaration,\n functions: Set<string>,\n): void {\n if (isTopLevel(node) && node.id?.name)\n functions.add(node.id.name)\n}\n","import {isTopLevel} from './isTopLevel'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function handleTSDeclareFunction(\n node: TSESTree.TSDeclareFunction,\n functions: Set<string>,\n): void {\n if (isTopLevel(node) && node.id?.name)\n functions.add(node.id.name)\n}\n","import {isTopLevel} from './isTopLevel'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function handleTSEnumDeclaration(\n node: TSESTree.TSEnumDeclaration,\n types: Set<string>,\n): void {\n if (isTopLevel(node) && node.id?.name)\n types.add(node.id.name)\n}\n","import {isTopLevel} from './isTopLevel'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function handleTSInterfaceDeclaration(\n node: TSESTree.TSInterfaceDeclaration,\n types: Set<string>,\n): void {\n if (isTopLevel(node) && node.id?.name)\n types.add(node.id.name)\n}\n","import {isTopLevel} from './isTopLevel'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function handleTSTypeAliasDeclaration(\n node: TSESTree.TSTypeAliasDeclaration,\n types: Set<string>,\n): void {\n if (isTopLevel(node) && node.id?.name)\n types.add(node.id.name)\n}\n","import * as path from 'path'\n\nexport function isExempt(filename: string): boolean {\n const name = path.basename(filename, path.extname(filename))\n const isTest = name.endsWith('.test')\n const isSpec = name.endsWith('.spec')\n const isConfig = name.endsWith('.config')\n return isTest || isSpec || isConfig\n}\n","import type {TSESTree} from '@typescript-eslint/utils'\n\nexport function isExportedDeclaration(\n parent: TSESTree.Node | undefined,\n): boolean {\n return parent?.type === 'ExportNamedDeclaration'\n}\n","export const messageIds = {\n tooManyDeclarations:\n 'File has {{count}} declarations. Put each function/class/const/type declaration in its own file.',\n}\n","import {collectVariableDeclarators} from './collectVariableDeclarators'\nimport {handleClassDeclaration} from './handleClassDeclaration'\nimport {handleFunctionDeclaration} from './handleFunctionDeclaration'\nimport {handleTSDeclareFunction} from './handleTSDeclareFunction'\nimport {handleTSEnumDeclaration} from './handleTSEnumDeclaration'\nimport {handleTSInterfaceDeclaration} from './handleTSInterfaceDeclaration'\nimport {handleTSTypeAliasDeclaration} from './handleTSTypeAliasDeclaration'\nimport {isExempt} from './isExempt'\nimport {isExportedDeclaration} from './isExportedDeclaration'\nimport {isTopLevel} from './isTopLevel'\nimport {messageIds} from './messageIds'\nimport type {MessageId} from './MessageId'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport const maxDeclarationsPerFile: TSESLint.RuleModule<MessageId, []> = {\n create(context) {\n const filename = context.filename\n\n if (isExempt(filename))\n return {}\n\n const functions = new Set<string>()\n const types = new Set<string>()\n\n return {\n ClassDeclaration(node: TSESTree.ClassDeclaration): void {\n handleClassDeclaration(node, functions)\n },\n\n FunctionDeclaration(node: TSESTree.FunctionDeclaration): void {\n handleFunctionDeclaration(node, functions)\n },\n\n 'Program:exit'(_programNode: TSESTree.Program): void {\n const totalDeclarations = functions.size + types.size\n\n if (totalDeclarations > 1) {\n context.report({\n data: {\n count: totalDeclarations,\n functions: functions.size,\n types: types.size,\n },\n messageId: 'tooManyDeclarations',\n node: _programNode,\n })\n }\n },\n\n TSDeclareFunction(node: TSESTree.TSDeclareFunction): void {\n handleTSDeclareFunction(node, functions)\n },\n\n TSEnumDeclaration(node: TSESTree.TSEnumDeclaration): void {\n handleTSEnumDeclaration(node, types)\n },\n\n TSInterfaceDeclaration(node: TSESTree.TSInterfaceDeclaration): void {\n handleTSInterfaceDeclaration(node, types)\n },\n\n TSTypeAliasDeclaration(node: TSESTree.TSTypeAliasDeclaration): void {\n handleTSTypeAliasDeclaration(node, types)\n },\n\n VariableDeclaration(node: TSESTree.VariableDeclaration): void {\n if (!isTopLevel(node))\n return\n\n const parent = node.parent\n\n if (!isExportedDeclaration(parent) && !node.declare)\n return\n\n collectVariableDeclarators(node, types)\n },\n\n 'VariableDeclaration > VariableDeclarator > ArrowFunctionExpression'(\n _node: TSESTree.Node,\n ): void {\n if (!isTopLevel(_node.parent?.parent as TSESTree.Node))\n return\n const declarator = _node.parent as TSESTree.VariableDeclarator\n if (declarator.id.type === 'Identifier' && declarator.id.name)\n functions.add(declarator.id.name)\n },\n }\n },\n\n meta: {\n docs: {\n description: 'Enforce single top-level declaration per file.',\n },\n messages: messageIds,\n schema: [],\n type: 'suggestion',\n },\n}\n","import type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function createFix(\n fixer: TSESLint.RuleFixer,\n node: TSESTree.TSUnionType,\n sourceCode: TSESLint.SourceCode,\n): TSESLint.RuleFix {\n const types = node.types.map(t => sourceCode.getText(t))\n const formattedTypes = types.map(t => ` | ${t}`).join('\\n')\n const result = `\\n${formattedTypes}`\n return fixer.replaceText(node, result)\n}\n","import type {TSESTree} from '@typescript-eslint/types'\n\nexport function isMultiline(unionType: TSESTree.TSUnionType): boolean {\n const {end, start} = unionType.loc ?? {}\n return start?.line !== end?.line\n}\n","import {createFix} from './createFix'\nimport {isMultiline} from './isMultiline'\nimport type {MessageIds} from './MessageIds'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport const multilineUnionTypeAliases: TSESLint.RuleModule<MessageIds, []> = {\n create(context) {\n return {\n TSUnionType(node: TSESTree.TSUnionType): void {\n if (node.types.length < 2)\n return\n\n const parent = node.parent\n if (!parent || parent.type !== 'TSTypeAliasDeclaration')\n return\n\n const sourceCode = context.sourceCode\n const text = sourceCode.getText(node)\n\n if (text.trim().startsWith('|'))\n return\n\n if (!isMultiline(node)) {\n context.report({\n fix: fixer => createFix(fixer, node, sourceCode),\n messageId: 'singleLine',\n node,\n })\n return\n }\n\n context.report({\n fix: fixer => createFix(fixer, node, sourceCode),\n messageId: 'missingPipes',\n node,\n })\n },\n }\n },\n\n meta: {\n docs: {\n description: 'Enforce union type aliases with multiple members to be on multiple lines.',\n },\n fixable: 'code',\n messages: {\n missingPipes: 'Multiline union type aliases should have leading pipes on each member',\n singleLine: 'Union type aliases with multiple members should be on multiple lines',\n },\n schema: [],\n type: 'layout',\n },\n}\n","export function isExempt(name: string): boolean {\n return name.startsWith('_')\n}\n","export function isPascalCase(name: string): boolean {\n if (!/^[A-Z]/.test(name))\n return false\n return /^[A-Z][\\dA-Za-z]*$/.test(name)\n}\n","export function isSeparator(char: string): boolean {\n return char === '_' || char === '-' || char === ' '\n}\n","export function isWordBoundary(\n char: string,\n currentWord: string,\n prevChar: string,\n nextChar: string,\n): boolean {\n if (!currentWord)\n return false\n\n const isUpper = /[A-Z]/.test(char)\n const prevIsUpper = /[A-Z]/.test(prevChar)\n const nextIsLower = /[a-z]/.test(nextChar)\n\n // Split at uppercase letters\n // Handle acronyms: XMLHttpRequest -> XML, Http, Request\n if (isUpper) {\n const isStartOfNewWord = !prevIsUpper || (prevIsUpper && nextIsLower)\n return isStartOfNewWord\n }\n\n return false\n}\n","export function capitalize(word: string): string {\n return word.charAt(0).toUpperCase() + word.slice(1)\n}\n","import {capitalize} from './capitalize'\n\nexport function wordsToCamelCase(words: string[]): string {\n if (words.length === 0)\n return ''\n\n if (words.length === 1)\n return words[0].toLowerCase()\n\n const firstWord = words[0].toLowerCase()\n const restWords = words.slice(1).map(capitalize)\n\n return firstWord + restWords.join('')\n}\n","import {isSeparator} from './isSeparator'\nimport {isWordBoundary} from './isWordBoundary'\nimport {wordsToCamelCase} from './wordsToCamelCase'\n\nexport function toCamelCase(name: string): string {\n const words: string[] = []\n let currentWord = ''\n\n for (let i = 0; i < name.length; i++) {\n const char = name[i]\n const prevChar = i > 0 ? name[i - 1] : ''\n const nextChar = i < name.length - 1 ? name[i + 1] : ''\n\n if (isSeparator(char)) {\n if (currentWord) {\n words.push(currentWord.toLowerCase())\n currentWord = ''\n }\n continue\n }\n\n if (isWordBoundary(char, currentWord, prevChar, nextChar)) {\n words.push(currentWord.toLowerCase())\n currentWord = char\n continue\n }\n\n currentWord += char\n }\n\n if (currentWord)\n words.push(currentWord.toLowerCase())\n\n return wordsToCamelCase(words)\n}\n","import {toCamelCase} from './toCamelCase'\n\nexport function toPascalCase(name: string): string {\n const camelCase = toCamelCase(name)\n return camelCase.charAt(0).toUpperCase() + camelCase.slice(1)\n}\n","import {isExempt} from './isExempt'\nimport {isPascalCase} from './isPascalCase'\nimport {toPascalCase} from './toPascalCase'\nimport type {MessageId} from './MessageId'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function checkClass(\n id: null | TSESTree.Identifier | undefined,\n context: TSESLint.RuleContext<MessageId, []>,\n): void {\n if (!id)\n return\n\n const name = id.name\n\n if (isExempt(name))\n return\n\n if (!isPascalCase(name)) {\n context.report({\n data: {\n name,\n type: 'Class',\n },\n fix(fixer) {\n return fixer.replaceText(id, toPascalCase(name))\n },\n messageId: 'notPascalCase',\n node: id,\n })\n }\n}\n","import {isExempt} from './isExempt'\nimport {isPascalCase} from './isPascalCase'\nimport {toPascalCase} from './toPascalCase'\nimport type {MessageId} from './MessageId'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function checkNamedEntity(\n name: string,\n node: TSESTree.Identifier,\n type: string,\n context: TSESLint.RuleContext<MessageId, []>,\n): void {\n if (isExempt(name))\n return\n\n if (!isPascalCase(name)) {\n context.report({\n data: {name, type},\n fix(fixer) {\n return fixer.replaceText(node, toPascalCase(name))\n },\n messageId: 'notPascalCase',\n node,\n })\n }\n}\n","export function isCamelCase(name: string): boolean {\n if (!/^[a-z]/.test(name))\n return false\n return /^[a-z][\\dA-Za-z]*$/.test(name)\n}\n","export function isUpperCase(name: string): boolean {\n return /^[A-Z][\\dA-Z_]*$/.test(name)\n}\n","import {isCamelCase} from './isCamelCase'\nimport {isUpperCase} from './isUpperCase'\nimport type {MessageId} from './MessageId'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function checkConstant(\n name: string,\n node: TSESTree.Identifier,\n context: TSESLint.RuleContext<MessageId, []>,\n): void {\n if (!isCamelCase(name) && !isUpperCase(name)) {\n context.report({\n data: {name},\n messageId: 'notUpperCase',\n node,\n })\n }\n}\n","import {isCamelCase} from './isCamelCase'\nimport {toCamelCase} from './toCamelCase'\nimport type {MessageId} from './MessageId'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function checkVariable(\n name: string,\n node: TSESTree.Identifier,\n context: TSESLint.RuleContext<MessageId, []>,\n): void {\n if (!isCamelCase(name)) {\n context.report({\n data: {name},\n fix(fixer) {\n return fixer.replaceText(node, toCamelCase(name))\n },\n messageId: 'notCamelCase',\n node,\n })\n }\n}\n","import type {TSESTree} from '@typescript-eslint/types'\n\nexport function isFunction(init: null | TSESTree.Expression): boolean {\n if (!init)\n return false\n return init.type === 'FunctionExpression'\n || init.type === 'ArrowFunctionExpression'\n}\n","import {checkConstant} from './checkConstant'\nimport {checkVariable} from './checkVariable'\nimport {isExempt} from './isExempt'\nimport {isFunction} from './isFunction'\nimport type {MessageId} from './MessageId'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function checkVariableDeclarator(\n node: TSESTree.VariableDeclarator,\n context: TSESLint.RuleContext<MessageId, []>,\n): void {\n const id = node.id as TSESTree.Identifier\n const name = id.name\n\n if (isExempt(name))\n return\n\n // If this is a function, it will be handled by the function handlers.\n if (isFunction(node.init))\n return\n\n // Get the kind: const, let, var.\n const parent = node.parent\n if (parent?.type !== 'VariableDeclaration')\n return\n\n const kind = parent.kind\n if (kind === 'const')\n checkConstant(name, id, context)\n else\n checkVariable(name, id, context)\n}\n","import type {FunctionNode} from './FunctionNode'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function getFunctionName(\n node: FunctionNode,\n parent: TSESTree.Node | undefined,\n): null | string {\n if (node.type === 'FunctionDeclaration' && node.id)\n return node.id.name\n\n if (\n (node.type === 'FunctionExpression'\n || node.type === 'ArrowFunctionExpression')\n && parent?.type === 'VariableDeclarator'\n && parent.id.type === 'Identifier'\n )\n return parent.id.name\n\n return null\n}\n","import type {FunctionNode} from './FunctionNode'\nimport type {TSESLint} from '@typescript-eslint/utils'\n\nexport function getReturnTypeText(\n sourceCode: TSESLint.SourceCode,\n node: FunctionNode,\n): string | undefined {\n if (!node.returnType)\n return undefined\n return sourceCode.getText(node.returnType.typeAnnotation)\n}\n","export function isReactComponent(returnTypeText: string | undefined): boolean {\n if (!returnTypeText)\n return false\n\n const patterns = [\n 'JSX.Element',\n 'React.JSX.Element',\n 'ReactElement',\n 'ReactNode',\n ]\n\n return patterns.some(pattern => returnTypeText.includes(pattern))\n}\n","export const messageIds = {\n notCamelCase: 'Function \"{{name}}\" should use camelCase',\n notPascalCase: '{{type}} \"{{name}}\" should use PascalCase',\n notUpperCase: 'Constant \"{{name}}\" should use UPPER_CASE',\n}\n","import type {FunctionNode} from './FunctionNode'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function getFunctionIdentifierNodeForFixer(\n node: FunctionNode,\n parent: TSESTree.Node | undefined,\n): null | TSESTree.Node {\n if (node.type === 'FunctionDeclaration')\n return node.id\n\n if (parent?.type === 'VariableDeclarator')\n return parent.id\n\n return null\n}\n","import type {FunctionNode} from './FunctionNode'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function getFunctionNameForFixer(\n node: FunctionNode,\n parent: TSESTree.Node | undefined,\n): string {\n if (node.type === 'FunctionDeclaration' && node.id)\n return node.id.name\n\n if (parent?.type === 'VariableDeclarator' && parent.id.type === 'Identifier')\n return parent.id.name\n\n return ''\n}\n","import {getFunctionIdentifierNodeForFixer} from './getFunctionIdentifierNodeForFixer'\nimport {getFunctionNameForFixer} from './getFunctionNameForFixer'\nimport type {FunctionNode} from './FunctionNode'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function createFunctionFixer(\n node: FunctionNode,\n parent: TSESTree.Node | undefined,\n convert: (name: string) => string,\n): TSESLint.ReportFixFunction {\n return fixer => {\n const fixedName = convert(getFunctionNameForFixer(node, parent))\n const identifierNode = getFunctionIdentifierNodeForFixer(node, parent)\n\n if (identifierNode)\n return fixer.replaceText(identifierNode, fixedName)\n\n return null\n }\n}\n","import type {FunctionNode} from './FunctionNode'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function getFunctionReportNode(\n node: FunctionNode,\n parent: TSESTree.Node | undefined,\n): TSESTree.Node {\n if (node.type === 'FunctionDeclaration')\n return node\n return parent ?? node\n}\n","import {createFunctionFixer} from './createFunctionFixer'\nimport {getFunctionReportNode} from './getFunctionReportNode'\nimport {isPascalCase} from './isPascalCase'\nimport {toPascalCase} from './toPascalCase'\nimport type {FunctionNode} from './FunctionNode'\nimport type {MessageId} from './MessageId'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function reportComponentViolation(\n node: FunctionNode,\n parent: TSESTree.Node | undefined,\n name: string,\n context: TSESLint.RuleContext<MessageId, []>,\n): void {\n if (isPascalCase(name))\n return\n\n context.report({\n data: {\n name,\n type: 'React component',\n },\n fix: createFunctionFixer(node, parent, toPascalCase),\n messageId: 'notPascalCase',\n node: getFunctionReportNode(node, parent),\n })\n}\n","import {createFunctionFixer} from './createFunctionFixer'\nimport {getFunctionReportNode} from './getFunctionReportNode'\nimport {isCamelCase} from './isCamelCase'\nimport {toCamelCase} from './toCamelCase'\nimport type {FunctionNode} from './FunctionNode'\nimport type {MessageId} from './MessageId'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function reportFunctionViolation(\n node: FunctionNode,\n parent: TSESTree.Node | undefined,\n name: string,\n context: TSESLint.RuleContext<MessageId, []>,\n): void {\n if (isCamelCase(name))\n return\n\n context.report({\n data: {name},\n fix: createFunctionFixer(node, parent, toCamelCase),\n messageId: 'notCamelCase',\n node: getFunctionReportNode(node, parent),\n })\n}\n","import {checkClass} from './checkClass'\nimport {checkNamedEntity} from './checkNamedEntity'\nimport {checkVariableDeclarator} from './checkVariableDeclarator'\nimport {getFunctionName} from './getFunctionName'\nimport {getReturnTypeText} from './getReturnTypeText'\nimport {isExempt} from './isExempt'\nimport {isReactComponent} from './isReactComponent'\nimport {messageIds} from './messageIds'\nimport {reportComponentViolation} from './reportComponentViolation'\nimport {reportFunctionViolation} from './reportFunctionViolation'\nimport type {MessageId} from './MessageId'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport const namingConvention: TSESLint.RuleModule<MessageId, []> = {\n create(context) {\n const sourceCode = context.sourceCode ?? context.getSourceCode()\n return {\n ArrowFunctionExpression(node: TSESTree.ArrowFunctionExpression): void {\n checkFunction(node, node.parent)\n },\n\n ClassDeclaration(node: TSESTree.ClassDeclaration): void {\n checkClass(node.id, context)\n },\n\n ClassExpression(node: TSESTree.ClassExpression): void {\n checkClass(node.id, context)\n },\n\n FunctionDeclaration(node: TSESTree.FunctionDeclaration): void {\n checkFunction(node)\n },\n\n FunctionExpression(node: TSESTree.FunctionExpression): void {\n checkFunction(node, node.parent)\n },\n\n TSEnumDeclaration(node: TSESTree.TSEnumDeclaration): void {\n checkNamedEntity(\n node.id.name,\n node.id,\n 'Enum',\n context,\n )\n },\n\n TSInterfaceDeclaration(node: TSESTree.TSInterfaceDeclaration): void {\n checkNamedEntity(\n node.id.name,\n node.id,\n 'Interface',\n context,\n )\n },\n\n TSTypeAliasDeclaration(node: TSESTree.TSTypeAliasDeclaration): void {\n if (node.id.type !== 'Identifier')\n return\n\n checkNamedEntity(\n node.id.name,\n node.id,\n 'Type',\n context,\n )\n },\n\n VariableDeclarator(node: TSESTree.VariableDeclarator): void {\n if (node.id.type !== 'Identifier')\n return\n\n checkVariableDeclarator(node, context)\n },\n }\n\n function checkFunction(\n node: TSESTree.FunctionDeclaration,\n parent?: TSESTree.Node,\n ): void\n function checkFunction(\n node: TSESTree.ArrowFunctionExpression | TSESTree.FunctionExpression,\n parent: TSESTree.Node | undefined,\n ): void\n function checkFunction(\n node:\n | TSESTree.ArrowFunctionExpression\n | TSESTree.FunctionDeclaration\n | TSESTree.FunctionExpression,\n parent?: TSESTree.Node,\n ): void {\n const name = getFunctionName(node, parent)\n\n if (!name || isExempt(name))\n return\n\n const returnTypeText = getReturnTypeText(sourceCode, node)\n const isComponent = isReactComponent(returnTypeText)\n\n if (isComponent)\n reportComponentViolation(node, parent, name, context)\n else\n reportFunctionViolation(node, parent, name, context)\n }\n },\n meta: {\n docs: {\n description: 'Enforce consistent naming conventions.',\n },\n fixable: 'code',\n messages: messageIds,\n schema: [],\n type: 'suggestion',\n },\n}\n","import type {TSESTree} from '@typescript-eslint/utils'\n\nexport function checkTypeParameters(\n node: TSESTree.Node,\n containsInline: (node: TSESTree.Node) => null | TSESTree.TSTypeLiteral,\n): null | TSESTree.TSTypeLiteral {\n if (!('typeParameters' in node) || !node.typeParameters)\n return null\n\n for (const param of node.typeParameters.params) {\n const result = containsInline(param as TSESTree.Node)\n if (result)\n return result\n }\n return null\n}\n","import type {TSESTree} from '@typescript-eslint/utils'\n\nexport function checkUnionOrIntersectionTypes(\n node: TSESTree.TSIntersectionType | TSESTree.TSUnionType,\n containsInline: (node: TSESTree.Node) => null | TSESTree.TSTypeLiteral,\n): null | TSESTree.TSTypeLiteral {\n for (const type of node.types) {\n const result = containsInline(type)\n if (result)\n return result\n }\n return null\n}\n","import type {TSESTree} from '@typescript-eslint/utils'\n\nexport function isInlineObjectType(\n node: TSESTree.Node,\n): node is TSESTree.TSTypeLiteral {\n return node.type === 'TSTypeLiteral'\n}\n","import {checkTypeParameters} from './checkTypeParameters'\nimport {checkUnionOrIntersectionTypes} from './checkUnionOrIntersectionTypes'\nimport {isInlineObjectType} from './isInlineObjectType'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function containsInlineObjectType(\n node: TSESTree.Node,\n): null | TSESTree.TSTypeLiteral {\n if (isInlineObjectType(node))\n return node\n\n if (node.type === 'TSIntersectionType' || node.type === 'TSUnionType') {\n const result = checkUnionOrIntersectionTypes(\n node as TSESTree.TSIntersectionType | TSESTree.TSUnionType,\n containsInlineObjectType,\n )\n if (result)\n return result\n }\n\n if (node.type === 'TSArrayType')\n return containsInlineObjectType(node.elementType)\n\n const typeParamResult = checkTypeParameters(node, containsInlineObjectType)\n if (typeParamResult)\n return typeParamResult\n\n if (node.type === 'TSTypeAnnotation')\n return containsInlineObjectType(node.typeAnnotation)\n\n return null\n}\n","export function toPascalCase(str: string): string {\n return str.charAt(0).toUpperCase() + str.slice(1)\n}\n","import {toPascalCase} from './toPascalCase'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function getInlineTypeName(\n usedNames: Set<string>,\n _existingInterfaces: TSESTree.TSInterfaceDeclaration[],\n parameterName?: string,\n): string {\n const baseName = parameterName\n ? toPascalCase(parameterName)\n : 'InlineType'\n\n if (!usedNames.has(baseName)) {\n usedNames.add(baseName)\n return baseName\n }\n\n let counter = 2\n while (usedNames.has(`${baseName}${counter}`))\n counter++\n\n const name = `${baseName}${counter}`\n usedNames.add(name)\n return name\n}\n","import type {TSESTree} from '@typescript-eslint/utils'\n\nexport function getParameterNameFromFunction(\n parent: TSESTree.Node,\n): string | undefined {\n if (\n parent.type === 'ArrowFunctionExpression'\n || parent.type === 'FunctionDeclaration'\n || parent.type === 'FunctionExpression'\n ) {\n const funcNode = parent as\n | TSESTree.ArrowFunctionExpression\n | TSESTree.FunctionDeclaration\n | TSESTree.FunctionExpression\n return funcNode.id?.name\n }\n\n return undefined\n}\n","import type {TSESTree} from '@typescript-eslint/utils'\n\nexport function getParameterNameFromIdentifier(\n parent: TSESTree.Node,\n): string | undefined {\n const grandParent = parent.parent\n if (\n grandParent?.type === 'ArrowFunctionExpression'\n || grandParent?.type === 'FunctionDeclaration'\n || grandParent?.type === 'FunctionExpression'\n )\n return (parent as TSESTree.Identifier).name\n\n return undefined\n}\n","import type {TSESTree} from '@typescript-eslint/utils'\n\nexport function getParameterNameFromObjectPattern(\n parent: TSESTree.Node,\n): string | undefined {\n const grandParent = parent.parent\n if (\n grandParent?.type === 'ArrowFunctionExpression'\n || grandParent?.type === 'FunctionDeclaration'\n || grandParent?.type === 'FunctionExpression'\n )\n return 'Options'\n\n return undefined\n}\n","import type {TopLevelDeclaration} from './TopLevelDeclaration'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function getTopLevelDeclaration(\n node: TSESTree.Node,\n): TopLevelDeclaration | undefined {\n let current: TSESTree.Node | undefined = node\n const topLevelTypes = new Set([\n 'ArrowFunctionExpression',\n 'FunctionDeclaration',\n 'FunctionExpression',\n 'TSInterfaceDeclaration',\n 'TSTypeAliasDeclaration',\n 'VariableDeclaration',\n ])\n\n while (current) {\n if (topLevelTypes.has(current.type)) {\n const parent = current.parent\n const exported = parent?.type === 'ExportNamedDeclaration'\n\n if (exported && parent) {\n return {\n insertLocation: parent,\n isExported: true,\n node: current,\n }\n }\n\n return {\n insertLocation: current,\n isExported: false,\n node: current,\n }\n }\n current = current.parent as TSESTree.Node | undefined\n }\n\n return undefined\n}\n","import {getParameterNameFromFunction} from './getParameterNameFromFunction'\nimport {getParameterNameFromIdentifier} from './getParameterNameFromIdentifier'\nimport {getParameterNameFromObjectPattern} from './getParameterNameFromObjectPattern'\nimport {getTopLevelDeclaration} from './getTopLevelDeclaration'\nimport type {InlineTypeEntry} from './InlineTypeEntry'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function handleInlineType(\n node: TSESTree.TSTypeAnnotation,\n typeLiteral: TSESTree.TSTypeLiteral,\n inlineTypes: InlineTypeEntry[],\n): void {\n const result = getTopLevelDeclaration(node)\n if (!result)\n return\n\n let parameterName: string | undefined\n const parent = node.parent\n\n if (parent?.type === 'Identifier')\n parameterName = getParameterNameFromIdentifier(parent)\n else if (parent?.type === 'ObjectPattern')\n parameterName = getParameterNameFromObjectPattern(parent)\n else\n parameterName = getParameterNameFromFunction(parent)\n\n inlineTypes.push({\n annotationNode: node,\n insertLocation: result.insertLocation,\n isExported: result.isExported,\n location: result.node,\n parameterName,\n typeLiteral,\n })\n}\n","import type {TSESTree} from '@typescript-eslint/utils'\n\nexport function isIdentifierInFunction(\n parent: TSESTree.Node | undefined,\n): boolean {\n return parent?.type === 'Identifier'\n && (\n parent.parent?.type === 'FunctionDeclaration'\n || parent.parent?.type === 'FunctionExpression'\n || parent.parent?.type === 'ArrowFunctionExpression'\n )\n}\n","import type {TSESTree} from '@typescript-eslint/utils'\n\nexport function isPropertySignatureInTypeLiteral(\n parent: TSESTree.Node | undefined,\n): boolean {\n return parent?.type === 'TSPropertySignature'\n && (\n parent.parent?.type === 'TSTypeLiteral'\n || parent.parent?.type === 'TSInterfaceBody'\n )\n}\n","import type {TSESTree} from '@typescript-eslint/utils'\n\nexport function traverseUpForTypeLiteral(\n current: TSESTree.Node | undefined,\n): boolean {\n const skipTypes = new Set([\n 'TSArrayType',\n 'TSIntersectionType',\n 'TSPropertySignature',\n 'TSTypeReference',\n 'TSUnionType',\n ])\n\n while (current) {\n if (current.type === 'TSTypeLiteral')\n return true\n if (skipTypes.has(current.type)) {\n current = current.parent\n continue\n }\n break\n }\n return false\n}\n","import {isIdentifierInFunction} from './isIdentifierInFunction'\nimport {isPropertySignatureInTypeLiteral} from './isPropertySignatureInTypeLiteral'\nimport {traverseUpForTypeLiteral} from './traverseUpForTypeLiteral'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function isNestedTypeAnnotation(\n node: TSESTree.TSTypeAnnotation,\n): boolean | undefined {\n const parent = node.parent\n\n if (isPropertySignatureInTypeLiteral(parent))\n return true\n\n if (isIdentifierInFunction(parent))\n return false\n\n if (\n parent?.type === 'ArrowFunctionExpression'\n || parent?.type === 'FunctionDeclaration'\n || parent?.type === 'FunctionExpression'\n )\n return false\n\n const foundTypeLiteral = traverseUpForTypeLiteral(parent)\n return foundTypeLiteral\n}\n","import type {FixResult} from './FixResult'\nimport type {InlineTypeInfo} from './InlineTypeInfo'\nimport type {TSESLint} from '@typescript-eslint/utils'\n\nexport function prepareFix(\n sourceCode: TSESLint.SourceCode,\n inlineTypes: InlineTypeInfo[],\n): FixResult {\n const interfaceDeclarations = inlineTypes.map(({name, typeLiteral}) => {\n const typeText = sourceCode.getText(typeLiteral)\n return `interface ${name} ${typeText}`\n })\n\n const interfaceBlock = interfaceDeclarations.join('\\n')\n\n const replacements = inlineTypes.map(\n ({name, typeLiteral}) => ({name, typeLiteral}),\n )\n\n return {\n firstUsageLocation: inlineTypes[0].typeLiteral,\n interfaceBlock,\n replacements,\n }\n}\n","import {containsInlineObjectType} from './containsInlineObjectType'\nimport {getInlineTypeName} from './getInlineTypeName'\nimport {handleInlineType} from './handleInlineType'\nimport {isNestedTypeAnnotation} from './isNestedTypeAnnotation'\nimport {prepareFix} from './prepareFix'\nimport type {InlineTypeEntry} from './InlineTypeEntry'\nimport type {InlineTypeInfo} from './InlineTypeInfo'\nimport type {MessageIds} from './MessageIds'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport const noInlineObjectTypes: TSESLint.RuleModule<\n MessageIds,\n []\n> = {\n create(context) {\n const sourceCode = context.sourceCode\n const inlineTypes: InlineTypeEntry[] = []\n\n const listener = {\n TSTypeAnnotation(node: TSESTree.TSTypeAnnotation): void {\n if (isNestedTypeAnnotation(node))\n return\n\n const typeLiteral = containsInlineObjectType(node)\n if (!typeLiteral)\n return\n\n handleInlineType(node, typeLiteral, inlineTypes)\n },\n }\n\n return {\n ...listener,\n 'Program:exit'(): void {\n if (inlineTypes.length === 0)\n return\n\n const usedNames = new Set<string>()\n\n const locations = [...new Set(inlineTypes.map(t => t.insertLocation))]\n for (const loc of locations) {\n const typesAtLocation = inlineTypes.filter(\n t => t.insertLocation === loc,\n )\n\n const typesForLocation: InlineTypeInfo[] = typesAtLocation.map(entry => {\n const name = getInlineTypeName(usedNames, [], entry.parameterName)\n return {\n name,\n parameterName: entry.parameterName,\n typeLiteral: entry.typeLiteral,\n }\n })\n\n const fixResult = prepareFix(\n sourceCode,\n typesForLocation,\n )\n\n context.report({\n fix(fixer) {\n const fixes: TSESLint.RuleFix[] = []\n\n for (const replacement of fixResult.replacements) {\n fixes.push(\n fixer.replaceText(\n replacement.typeLiteral,\n replacement.name,\n ),\n )\n }\n\n const isExported = typesAtLocation[0].isExported\n if (isExported && typesAtLocation[0].insertLocation.type === 'ExportNamedDeclaration') {\n fixes.push(\n fixer.insertTextAfter(\n typesAtLocation[0].insertLocation,\n `\\n${fixResult.interfaceBlock}`,\n ),\n )\n } else {\n fixes.push(\n fixer.insertTextBefore(\n loc,\n `${fixResult.interfaceBlock}\\n`,\n ),\n )\n }\n\n return fixes\n },\n messageId: 'inlineObjectType',\n node: typesAtLocation[0].annotationNode,\n })\n }\n },\n }\n },\n\n meta: {\n docs: {\n description: 'Disallow inline object type literals in type annotations.',\n },\n fixable: 'code',\n messages: {\n inlineObjectType:\n 'Inline object types are not allowed. Use a named interface or type instead.',\n },\n schema: [],\n type: 'suggestion',\n },\n}\n","import type {TSESLint} from '@typescript-eslint/utils'\n\nexport function getLineIndent(\n sourceCode: TSESLint.SourceCode,\n line: number,\n): string {\n const text = sourceCode.getText()\n const lines = text.split('\\n')\n const lineText = lines[line - 1] ?? ''\n const match = lineText.match(/^(\\s*)/)\n return match?.[1] ?? ''\n}\n","export function getReplacementText(\n statementText: string,\n baseIndent: string,\n hasElseAfter: boolean | null,\n): string {\n const statementIndent = `${baseIndent} `\n\n if (hasElseAfter)\n return `\\n${statementIndent}${statementText}\\n${baseIndent}`\n\n return `\\n${statementIndent}${statementText}`\n}\n","import type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function isSingleLineStatement(\n node: TSESTree.Statement,\n sourceCode: TSESLint.SourceCode,\n): boolean {\n const firstToken = sourceCode.getFirstToken(node)\n const lastToken = sourceCode.getLastToken(node)\n\n if (!firstToken || !lastToken)\n return false\n\n return firstToken.loc.start.line === lastToken.loc.end.line\n}\n","import {getLineIndent} from './getLineIndent'\nimport {getReplacementText} from './getReplacementText'\nimport {isSingleLineStatement} from './isSingleLineStatement'\nimport type {MessageIds} from './MessageIds'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function checkBlockStatement(\n node: TSESTree.BlockStatement,\n context: TSESLint.RuleContext<MessageIds, []>,\n): void {\n if (node.body.length !== 1)\n return\n\n const statement = node.body[0]\n const sourceCode = context.getSourceCode()\n\n if (isSingleLineStatement(statement, sourceCode)) {\n context.report({\n fix(fixer) {\n const statementText = sourceCode.getText(statement)\n const tokenBefore = sourceCode.getTokenBefore(node)\n const tokenBeforeLine = tokenBefore?.loc?.start?.line ?? node.loc?.start?.line ?? 1\n const baseIndent = getLineIndent(sourceCode, tokenBeforeLine)\n\n const rangeStart = tokenBefore ? tokenBefore.range[1] : node.range[0]\n const range: Readonly<[number, number]> = [rangeStart, node.range[1]]\n\n const tokenAfter = sourceCode.getTokenAfter(node)\n const hasElseAfter = tokenAfter && tokenAfter.value === 'else'\n\n const replacementText = getReplacementText(\n statementText,\n baseIndent,\n hasElseAfter,\n )\n\n return fixer.replaceTextRange(range, replacementText)\n },\n messageId: 'unnecessaryBraces',\n node,\n })\n }\n}\n","import type {TSESLint} from '@typescript-eslint/utils'\n\nexport function detectIndentStep(sourceCode: TSESLint.SourceCode): number {\n const text = sourceCode.getText()\n const lines = text.split('\\n')\n const indentCounts = new Map<number, number>()\n\n for (const line of lines) {\n const match = line.match(/^( *)/)\n if (match) {\n const spaces = match[1].length\n if (spaces > 0)\n indentCounts.set(spaces, (indentCounts.get(spaces) ?? 0) + 1)\n }\n }\n\n const sortedIndents = Array.from(indentCounts.entries())\n .filter(([spaces]) => spaces > 0)\n .sort((a, b) => a[0] - b[0])\n\n if (sortedIndents.length === 0)\n return 2\n\n const minIndent = sortedIndents[0][0]\n\n for (const step of [2, 4]) {\n const isMultipleOfStep = sortedIndents.every(([n]) => n % step === 0)\n if (isMultipleOfStep)\n return step\n }\n\n return minIndent\n}\n","export function reindentText(\n text: string,\n newBaseIndent: string,\n indentStep: string,\n): string {\n const lines = text.split('\\n')\n\n let minIndent = Infinity\n for (let i = 1; i < lines.length; i++) {\n const line = lines[i]\n if (line.trim() === '')\n continue\n const match = line.match(/^( *)/)\n if (match)\n minIndent = Math.min(minIndent, match[1].length)\n }\n\n if (minIndent === Infinity) {\n return lines\n .map(line => {\n if (line.trim() === '')\n return ''\n return newBaseIndent + indentStep + line.trimStart()\n })\n .join('\\n')\n }\n\n return lines\n .map((line, index) => {\n if (line.trim() === '')\n return ''\n\n if (index === 0)\n return newBaseIndent + indentStep + line.trimStart()\n\n const relativeIndent = line.slice(minIndent)\n return newBaseIndent + indentStep + relativeIndent\n })\n .join('\\n')\n}\n","import {detectIndentStep} from '../shared/detectIndentStep'\nimport {getLineIndent} from '../shared/getLineIndent'\nimport {isSingleLineStatement} from './isSingleLineStatement'\nimport {reindentText} from '../shared/reindentText'\nimport type {MessageIds} from './MessageIds'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function checkNonBlockStatement(\n node: TSESTree.Statement,\n context: TSESLint.RuleContext<MessageIds, []>,\n): void {\n // Skip if it's already a block statement\n if (node.type === 'BlockStatement')\n return\n\n const sourceCode = context.getSourceCode()\n\n // If the statement spans multiple lines, it needs braces\n if (!isSingleLineStatement(node, sourceCode)) {\n context.report({\n fix(fixer) {\n const statementText = sourceCode.getText(node)\n const parent = node.parent\n\n // Get the base indentation from the parent control statement's line\n const parentLine = parent?.loc?.start?.line ?? node.loc?.start?.line ?? 1\n const baseIndent = getLineIndent(sourceCode, parentLine)\n\n // Detect indentation step size\n const indentStepSize = detectIndentStep(sourceCode)\n const indentStep = ' '.repeat(indentStepSize)\n\n // Re-indent the statement\n const reindentedText = reindentText(\n statementText,\n baseIndent,\n indentStep,\n )\n\n // Format with opening brace on same line, properly indented body, and closing brace\n const fixed = `{\\n${reindentedText}\\n${baseIndent}}`\n\n return [fixer.replaceText(node, fixed)]\n },\n messageId: 'missingBraces',\n node,\n })\n }\n}\n","import {checkBlockStatement} from './checkBlockStatement'\nimport {checkNonBlockStatement} from './checkNonBlockStatement'\nimport type {RuleContext} from './RuleContext'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function checkDoWhileStatement(\n node: TSESTree.DoWhileStatement,\n context: RuleContext,\n): void {\n if (node.body.type === 'BlockStatement')\n checkBlockStatement(node.body, context)\n else\n checkNonBlockStatement(node.body, context)\n}\n","import {checkBlockStatement} from './checkBlockStatement'\nimport {checkNonBlockStatement} from './checkNonBlockStatement'\nimport type {RuleContext} from './RuleContext'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function checkForInStatement(\n node: TSESTree.ForInStatement,\n context: RuleContext,\n): void {\n if (node.body.type === 'BlockStatement')\n checkBlockStatement(node.body, context)\n else\n checkNonBlockStatement(node.body, context)\n}\n","import {checkBlockStatement} from './checkBlockStatement'\nimport {checkNonBlockStatement} from './checkNonBlockStatement'\nimport type {RuleContext} from './RuleContext'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function checkForOfStatement(\n node: TSESTree.ForOfStatement,\n context: RuleContext,\n): void {\n if (node.body.type === 'BlockStatement')\n checkBlockStatement(node.body, context)\n else\n checkNonBlockStatement(node.body, context)\n}\n","import {checkBlockStatement} from './checkBlockStatement'\nimport {checkNonBlockStatement} from './checkNonBlockStatement'\nimport type {RuleContext} from './RuleContext'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function checkForStatement(\n node: TSESTree.ForStatement,\n context: RuleContext,\n): void {\n if (node.body.type === 'BlockStatement')\n checkBlockStatement(node.body, context)\n else\n checkNonBlockStatement(node.body, context)\n}\n","import {checkBlockStatement} from './checkBlockStatement'\nimport {checkNonBlockStatement} from './checkNonBlockStatement'\nimport type {RuleContext} from './RuleContext'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function checkIfStatement(\n node: TSESTree.IfStatement,\n context: RuleContext,\n): void {\n // Check consequent (the main if body)\n if (node.consequent.type === 'BlockStatement')\n checkBlockStatement(node.consequent, context)\n else\n checkNonBlockStatement(node.consequent, context)\n\n // Check alternate (the else body)\n if (!node.alternate)\n return\n\n // Don't check else-if - let the nested IfStatement handle it\n if (node.alternate.type === 'IfStatement')\n return\n\n if (node.alternate.type === 'BlockStatement')\n checkBlockStatement(node.alternate, context)\n else\n checkNonBlockStatement(node.alternate, context)\n}\n","import {checkBlockStatement} from './checkBlockStatement'\nimport {checkNonBlockStatement} from './checkNonBlockStatement'\nimport type {RuleContext} from './RuleContext'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function checkWhileStatement(\n node: TSESTree.WhileStatement,\n context: RuleContext,\n): void {\n if (node.body.type === 'BlockStatement')\n checkBlockStatement(node.body, context)\n else\n checkNonBlockStatement(node.body, context)\n}\n","import {checkDoWhileStatement} from './checkDoWhileStatement'\nimport {checkForInStatement} from './checkForInStatement'\nimport {checkForOfStatement} from './checkForOfStatement'\nimport {checkForStatement} from './checkForStatement'\nimport {checkIfStatement} from './checkIfStatement'\nimport {checkWhileStatement} from './checkWhileStatement'\nimport type {MessageIds} from './MessageIds'\nimport type {TSESLint} from '@typescript-eslint/utils'\n\nexport const noUnnecessaryBraces: TSESLint.RuleModule<MessageIds, []> = {\n create(context) {\n return {\n DoWhileStatement: node => checkDoWhileStatement(node, context),\n ForInStatement: node => checkForInStatement(node, context),\n ForOfStatement: node => checkForOfStatement(node, context),\n ForStatement: node => checkForStatement(node, context),\n IfStatement: node => checkIfStatement(node, context),\n WhileStatement: node => checkWhileStatement(node, context),\n }\n },\n\n meta: {\n docs: {\n description:\n 'Enforce consistent brace usage for single-statement control bodies.',\n },\n fixable: 'code',\n messages: {\n missingBraces: 'Multi-line statement must be wrapped in braces',\n unnecessaryBraces: 'Unnecessary braces around single-line statement',\n },\n schema: [],\n type: 'suggestion',\n },\n}\n","import type {TSESTree} from '@typescript-eslint/types'\n\nexport function isShorthandProperty(property: TSESTree.Property): boolean {\n return property.shorthand\n}\n","import {isShorthandProperty} from './isShorthandProperty'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function areAllShorthand(properties: TSESTree.Property[]): boolean {\n return properties.every(isShorthandProperty)\n}\n","import type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function getPropertyText(\n sourceCode: TSESLint.SourceCode,\n property: TSESTree.Property,\n): string {\n return sourceCode.getText(property)\n}\n","import {getPropertyText} from './getPropertyText'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function getInlineObjectLength(\n sourceCode: TSESLint.SourceCode,\n properties: TSESTree.Property[],\n): number {\n if (properties.length === 0)\n return 2\n\n const propLengths = properties.map(p => getPropertyText(sourceCode, p).length)\n const propsTotal = propLengths.reduce((a, b) => a + b, 0)\n const commas = Math.max(0, properties.length - 1)\n\n return 2 + propsTotal + commas\n}\n","import {areAllShorthand} from './areAllShorthand'\nimport {getInlineObjectLength} from './getInlineObjectLength'\nimport type {Braces} from './Braces'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function checkMultiline(\n sourceCode: TSESLint.SourceCode,\n context: TSESLint.RuleContext<MessageId, [Options]>,\n node: TSESTree.ObjectExpression,\n braces: Braces,\n maxLength: number,\n): void {\n const properties = node.properties as TSESTree.Property[]\n const allShorthand = areAllShorthand(properties)\n\n if (!allShorthand)\n return\n\n const inlineLength = getInlineObjectLength(sourceCode, properties)\n\n if (inlineLength > maxLength)\n return\n\n context.report({\n fix(fixer) {\n const names: string[] = []\n for (const prop of properties) {\n if (prop.key.type === 'Identifier')\n names.push(prop.key.name)\n else\n names.push(sourceCode.getText(prop))\n }\n\n return fixer.replaceText(node, `{${names.join(', ')}}`)\n },\n messageId: 'multilineCanBeSingleLine',\n node: properties[0],\n })\n}\n","import {detectIndentStep} from '../shared/detectIndentStep'\nimport type {Braces} from './Braces'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function buildMultilineFix(\n fixer: TSESLint.RuleFixer,\n braces: Braces,\n properties: TSESTree.Property[],\n sourceCode: TSESLint.SourceCode,\n): TSESLint.RuleFix {\n const indentStep = detectIndentStep(sourceCode)\n const lineIndent = sourceCode\n .getLines()[braces.openingBrace.loc.start.line - 1]\n .match(/^\\s*/)?.[0] ?? ''\n const indent = lineIndent + ' '.repeat(indentStep)\n\n const lines: string[] = ['{']\n for (const prop of properties) {\n const propText = sourceCode.getText(prop)\n lines.push(`${indent}${propText},`)\n }\n lines.push(`${lineIndent}}`)\n\n return fixer.replaceTextRange(\n [braces.openingBrace.range[0], braces.closingBrace.range[1]],\n lines.join('\\n'),\n )\n}\n","import type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function getPropertyName(\n sourceCode: TSESLint.SourceCode,\n prop: TSESTree.Property,\n): string {\n if (prop.key.type === 'Identifier')\n return prop.key.name\n return sourceCode.getText(prop)\n}\n","import {getPropertyName} from './getPropertyName'\nimport type {Braces} from './Braces'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function buildShorthandFix(\n fixer: TSESLint.RuleFixer,\n braces: Braces,\n properties: TSESTree.Property[],\n sourceCode: TSESLint.SourceCode,\n): TSESLint.RuleFix {\n const names = properties.map(p => getPropertyName(sourceCode, p))\n\n return fixer.replaceTextRange(\n [braces.openingBrace.range[0], braces.closingBrace.range[1]],\n `{${names.join(', ')}}`,\n )\n}\n","import type {TSESTree} from '@typescript-eslint/types'\n\nexport function canConvertToShorthand(property: TSESTree.Property): boolean {\n if (property.shorthand)\n return true\n\n if (property.kind !== 'init')\n return false\n\n if (property.key.type !== 'Identifier')\n return false\n\n if (property.value.type !== 'Identifier')\n return false\n\n return property.key.name === property.value.name\n}\n","import {canConvertToShorthand} from './canConvertToShorthand'\nimport {getInlineObjectLength} from './getInlineObjectLength'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function shouldCollapseToShorthand(\n properties: TSESTree.Property[],\n sourceCode: TSESLint.SourceCode,\n maxLength: number,\n): boolean {\n const anyShorthand = properties.some(p => p.shorthand)\n const allCanConvert = properties.every(canConvertToShorthand)\n const shorthandLength = allCanConvert\n ? getInlineObjectLength(sourceCode, properties)\n : Infinity\n\n return !anyShorthand && allCanConvert && shorthandLength <= maxLength\n}\n","import {areAllShorthand} from './areAllShorthand'\nimport {buildMultilineFix} from './buildMultilineFix'\nimport {buildShorthandFix} from './buildShorthandFix'\nimport {getInlineObjectLength} from './getInlineObjectLength'\nimport {shouldCollapseToShorthand} from './shouldCollapseToShorthand'\nimport type {Braces} from './Braces'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function checkSingleLine(\n sourceCode: TSESLint.SourceCode,\n context: TSESLint.RuleContext<MessageId, [Options]>,\n properties: TSESTree.Property[],\n braces: Braces,\n maxLength: number,\n): void {\n if (properties.length === 1)\n return\n\n const allShorthand = areAllShorthand(properties)\n const inlineLength = getInlineObjectLength(sourceCode, properties)\n\n if (allShorthand && inlineLength <= maxLength)\n return\n\n if (!allShorthand) {\n if (shouldCollapseToShorthand(properties, sourceCode, maxLength)) {\n context.report({\n fix: fixer => buildShorthandFix(fixer, braces, properties, sourceCode),\n messageId: 'mixedPropertiesNotAllowed',\n node: properties[0],\n })\n return\n }\n\n context.report({\n fix: fixer => buildMultilineFix(fixer, braces, properties, sourceCode),\n messageId: 'mixedPropertiesNotAllowed',\n node: properties[0],\n })\n return\n }\n\n context.report({\n fix: fixer => buildMultilineFix(fixer, braces, properties, sourceCode),\n messageId: 'singleLineExceedsMaxLength',\n node: properties[0],\n })\n}\n","import type {Options} from './Options'\n\nexport const defaultOptions: Options = {\n maxLength: 80,\n}\n","import type {Braces} from './Braces'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function getBraces(\n sourceCode: TSESLint.SourceCode,\n node: TSESTree.ObjectExpression,\n): Braces | null {\n const properties = node.properties\n if (properties.length === 0)\n return null\n\n const firstProp = properties[0]\n const lastProp = properties[properties.length - 1]\n\n const openingBrace = sourceCode.getTokenBefore(firstProp)\n const closingBrace = sourceCode.getTokenAfter(lastProp)\n\n if (!openingBrace || !closingBrace)\n return null\n\n return {closingBrace, openingBrace}\n}\n","import {checkMultiline} from './checkMultiline'\nimport {checkSingleLine} from './checkSingleLine'\nimport {defaultOptions} from './defaultOptions'\nimport {getBraces} from './getBraces'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function checkObject(\n sourceCode: TSESLint.SourceCode,\n context: TSESLint.RuleContext<MessageId, [Options]>,\n node: TSESTree.ObjectExpression,\n): void {\n const options = context.options[0] as Options ?? {}\n const maxLength = options.maxLength ?? defaultOptions.maxLength!\n\n const properties = node.properties as TSESTree.Property[]\n\n if (properties.length === 0)\n return\n\n const braces = getBraces(sourceCode, node)\n if (!braces)\n return\n\n const firstLine = braces.openingBrace.loc.start.line\n const lastLine = braces.closingBrace.loc.end.line\n\n if (firstLine === lastLine)\n checkSingleLine(sourceCode, context, properties, braces, maxLength)\n else\n checkMultiline(sourceCode, context, node, braces, maxLength)\n}\n","export const messageIds = {\n mixedPropertiesNotAllowed: 'mixedPropertiesNotAllowed',\n multilineCanBeSingleLine: 'multilineCanBeSingleLine',\n singleLineExceedsMaxLength: 'singleLineExceedsMaxLength',\n} as const\n","import {checkObject} from './checkObject'\nimport {messageIds} from './messageIds'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {TSESLint} from '@typescript-eslint/utils'\n\nexport const objectPropertyLineBreak: TSESLint.RuleModule<MessageId, [Options]> = {\n create(context) {\n const sourceCode = context.sourceCode ?? context.getSourceCode()\n\n return {\n ObjectExpression(node): void {\n checkObject(sourceCode, context, node)\n },\n }\n },\n\n meta: {\n docs: {\n description: 'Enforce object literal formatting based on complexity and line length.',\n },\n fixable: 'code',\n messages: messageIds,\n schema: [{\n additionalProperties: false,\n properties: {\n maxLength: {\n type: 'number',\n },\n },\n type: 'object',\n }],\n type: 'layout',\n },\n}\n","export const messageIds = {\n tooManyExports:\n 'Only one export is allowed per file. Found {{count}} exports.',\n} as const\n","import {isExempt} from '../shared/isExempt'\nimport {messageIds} from './messageIds'\nimport type {MessageId} from './MessageId'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport const oneExportPerFile: TSESLint.RuleModule<MessageId, []> = {\n create(context) {\n const filename = context.filename\n\n if (isExempt(filename))\n return {}\n\n let exportCount = 0\n\n return {\n ExportDefaultDeclaration(_node: TSESTree.ExportDefaultDeclaration): void {\n exportCount++\n },\n\n ExportNamedDeclaration(_node: TSESTree.ExportNamedDeclaration): void {\n exportCount++\n },\n\n 'Program:exit'(programNode: TSESTree.Program): void {\n if (exportCount > 1) {\n context.report({\n data: {count: exportCount},\n messageId: 'tooManyExports',\n node: programNode,\n })\n }\n },\n }\n },\n\n meta: {\n docs: {\n description: 'Enforce single export per file.',\n },\n messages: messageIds,\n schema: [],\n type: 'suggestion',\n },\n}\n","import type {LocalDeclaration} from './LocalDeclaration'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function isValidExportSpecifier(\n specifier: TSESTree.ExportSpecifier,\n localDeclarations: Map<string, LocalDeclaration>,\n): boolean {\n if (specifier.local.type !== 'Identifier')\n return false\n\n if (specifier.exported.type !== 'Identifier')\n return false\n\n if (specifier.local.name !== specifier.exported.name)\n return false\n\n return localDeclarations.has(specifier.local.name)\n}\n","import {isValidExportSpecifier} from './isValidExportSpecifier'\nimport type {LocalDeclaration} from './LocalDeclaration'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function canInlineSpecifiers(\n specifiers: TSESTree.ExportSpecifier[],\n localDeclarations: Map<string, LocalDeclaration>,\n): boolean {\n return specifiers.every(spec =>\n isValidExportSpecifier(spec, localDeclarations),\n )\n}\n","import type {DeclarationNode} from './DeclarationNode'\n\nexport function getDeclarationName(node: DeclarationNode): null | string {\n if (node.type !== 'VariableDeclaration')\n return node.id?.name ?? null\n\n const declarations = node.declarations\n\n if (declarations.length === 1) {\n const id = declarations[0].id\n if (id.type === 'Identifier')\n return id.name\n }\n\n return null\n}\n","import type {DeclarationNode} from './DeclarationNode'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function isExportableDeclaration(\n node: TSESTree.Node,\n): node is DeclarationNode {\n const type = node.type\n return (\n type === 'TSInterfaceDeclaration'\n || type === 'TSTypeAliasDeclaration'\n || type === 'ClassDeclaration'\n || type === 'FunctionDeclaration'\n || type === 'VariableDeclaration'\n )\n}\n","import {canInlineSpecifiers} from './canInlineSpecifiers'\nimport {getDeclarationName} from './getDeclarationName'\nimport {isExportableDeclaration} from './isExportableDeclaration'\nimport type {LocalDeclaration} from './LocalDeclaration'\nimport type {MessageIds} from './MessageIds'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport const preferInlineExport: TSESLint.RuleModule<MessageIds, []> = {\n create(context) {\n const localDeclarations = new Map<string, LocalDeclaration>()\n\n function visitDeclaration(node: TSESTree.Node): void {\n if (!isExportableDeclaration(node))\n return\n\n const name = getDeclarationName(node)\n if (name)\n localDeclarations.set(name, {name, node})\n }\n\n return {\n ClassDeclaration: visitDeclaration,\n ExportNamedDeclaration(node: TSESTree.ExportNamedDeclaration): void {\n if (node.source)\n return\n\n if (!node.specifiers || node.specifiers.length === 0)\n return\n\n if (!canInlineSpecifiers(node.specifiers, localDeclarations))\n return\n\n context.report({\n fix(fixer) {\n const fixes: ReturnType<typeof fixer.insertTextBefore>[] = []\n\n for (const specifier of node.specifiers) {\n const name = (specifier.local as TSESTree.Identifier).name\n const decl = localDeclarations.get(name)\n if (decl)\n fixes.push(fixer.insertTextBefore(decl.node, 'export '))\n }\n\n fixes.push(fixer.remove(node))\n\n return fixes\n },\n messageId: 'preferInline',\n node,\n })\n },\n FunctionDeclaration: visitDeclaration,\n TSInterfaceDeclaration: visitDeclaration,\n TSTypeAliasDeclaration: visitDeclaration,\n VariableDeclaration: visitDeclaration,\n }\n },\n\n meta: {\n docs: {\n description:\n 'Enforce using inline export syntax instead of separate export statements.',\n },\n fixable: 'code',\n messages: {\n preferInline:\n 'Use inline export instead of separate export statement',\n },\n schema: [],\n type: 'suggestion',\n },\n}\n","import type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function buildCollapsedParams(\n sourceCode: TSESLint.SourceCode,\n params: TSESTree.Parameter[],\n): string {\n const paramsText = params\n .map((param, index) => {\n const text = sourceCode.getText(param)\n const isLastParam = index === params.length - 1\n return isLastParam ? text : text + ','\n })\n .join(' ')\n\n return `(${paramsText})`\n}\n","import type {ArrowFunctionParens} from './ArrowFunctionParens'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function calculateCollapsedLength(\n sourceCode: TSESLint.SourceCode,\n openingParen: ArrowFunctionParens['openingParen'],\n collapsedParams: string,\n returnType: TSESTree.TSTypeAnnotation | undefined,\n): number {\n let returnTypeText = ''\n if (returnType)\n returnTypeText = sourceCode.getText(returnType)\n\n const allLines = sourceCode.getText().split('\\n')\n const closingLine = allLines[openingParen.loc.start.line - 1]\n const textAfterClosingParen = closingLine.slice(openingParen.loc.start.column)\n\n return openingParen.loc.start.column + collapsedParams.length + returnTypeText.length + textAfterClosingParen.length\n}\n","import type {Options} from './Options'\n\nexport const defaultOptions = {\n maxLength: 80,\n} as const satisfies Options\n","import type {ArrowFunctionParens} from './ArrowFunctionParens'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function getArrowFunctionParens(\n sourceCode: TSESLint.SourceCode,\n params: TSESTree.Parameter[],\n): ArrowFunctionParens | null {\n if (params.length === 0)\n return null\n\n const firstParam = params[0]\n const lastParam = params[params.length - 1]\n\n const openingParen = sourceCode.getTokenBefore(firstParam)\n let closingParen = sourceCode.getTokenAfter(lastParam)\n\n while (closingParen && closingParen.value === ',')\n closingParen = sourceCode.getTokenAfter(closingParen)\n\n if (!openingParen || !closingParen)\n return null\n\n if (openingParen.value !== '(' || closingParen.value !== ')')\n return null\n\n return {closingParen, openingParen}\n}\n","import type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function isShorthand(\n sourceCode: TSESLint.SourceCode,\n node: TSESTree.ArrowFunctionExpression,\n): boolean {\n if (node.params.length !== 1)\n return false\n\n const firstParam = node.params[0]\n const tokenBefore = sourceCode.getTokenBefore(firstParam)\n return !tokenBefore || tokenBefore.value !== '('\n}\n","import type {ArrowFunctionParens} from './ArrowFunctionParens'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function reportViolation(\n context: TSESLint.RuleContext<MessageId, [Options]>,\n node: TSESTree.ArrowFunctionExpression,\n collapsedParams: string,\n returnTypeText: string,\n arrowToken: TSESTree.Token,\n openingParen: ArrowFunctionParens['openingParen'],\n): void {\n context.report({\n fix: fixer => fixer.replaceTextRange(\n [openingParen.range[0], arrowToken.range[1]],\n collapsedParams + returnTypeText + ' =>',\n ),\n messageId: 'singleLine',\n node,\n })\n}\n","import {buildCollapsedParams} from './buildCollapsedParams'\nimport {calculateCollapsedLength} from './calculateCollapsedLength'\nimport {defaultOptions} from './defaultOptions'\nimport {getArrowFunctionParens} from './getArrowFunctionParens'\nimport {isShorthand} from './isShorthand'\nimport {reportViolation} from './reportViolation'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function checkArrowFunction(\n sourceCode: TSESLint.SourceCode,\n context: TSESLint.RuleContext<MessageId, [Options]>,\n node: TSESTree.ArrowFunctionExpression,\n): void {\n const options = context.options[0] as Options ?? {}\n const maxLength = options.maxLength ?? defaultOptions.maxLength\n\n if (isShorthand(sourceCode, node))\n return\n\n const parens = getArrowFunctionParens(sourceCode, node.params)\n if (!parens)\n return\n\n const {closingParen, openingParen} = parens\n if (openingParen.loc.start.line === closingParen.loc.end.line)\n return\n\n const arrowToken = sourceCode.getTokenAfter(\n closingParen,\n token => token.value === '=>',\n )\n if (!arrowToken)\n return\n\n const collapsedParams = buildCollapsedParams(sourceCode, node.params)\n const collapsedLength = calculateCollapsedLength(\n sourceCode,\n openingParen,\n collapsedParams,\n node.returnType,\n )\n\n if (collapsedLength <= maxLength) {\n const returnTypeText = node.returnType\n ? sourceCode.getText(node.returnType)\n : ''\n reportViolation(\n context,\n node,\n collapsedParams,\n returnTypeText,\n arrowToken,\n openingParen,\n )\n }\n}\n","import type {MessageId} from './MessageId'\n\nexport const messageIds: Record<MessageId, string> = {\n singleLine: 'Arrow function parameters can be on a single line',\n}\n","import {checkArrowFunction} from './checkArrowFunction'\nimport {messageIds} from './messageIds'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {TSESLint} from '@typescript-eslint/utils'\n\nexport const singleLineArrowFunctionParameters: TSESLint.RuleModule<MessageId, [Options]> = {\n create(context) {\n const sourceCode = context.sourceCode ?? context.getSourceCode()\n\n return {\n ArrowFunctionExpression(node): void {\n if (node.params.length === 0)\n return\n\n checkArrowFunction(sourceCode, context, node)\n },\n }\n },\n\n meta: {\n docs: {\n description: 'Enforce arrow function parameters to be on a single line when they fit.',\n },\n fixable: 'code',\n messages: messageIds,\n schema: [{\n additionalProperties: false,\n properties: {\n maxLength: {\n type: 'number',\n },\n },\n type: 'object',\n }],\n type: 'layout',\n },\n}\n","import type {Options} from './Options'\n\nexport const defaultOptions = {\n maxLength: 80,\n} as const satisfies Options\n","import type {Parens} from './Parens'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function getParens(\n sourceCode: TSESLint.SourceCode,\n nodes: TSESTree.Node[],\n): null | Parens {\n if (nodes.length === 0)\n return null\n\n const firstNode = nodes[0]\n const lastNode = nodes[nodes.length - 1]\n\n const openingParen = sourceCode.getTokenBefore(\n firstNode,\n token => token.value === '(',\n )\n const closingParen = sourceCode.getTokenAfter(\n lastNode,\n token => token.value === ')',\n )\n\n if (!openingParen || !closingParen)\n return null\n\n return {closingParen, openingParen}\n}\n","import {defaultOptions} from './defaultOptions'\nimport {getLineLength} from '../shared/getLineLength'\nimport {getParens} from './getParens'\nimport {isValidParens} from '../shared/isValidParens'\nimport type {FunctionNode} from './FunctionNode'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {TSESLint} from '@typescript-eslint/utils'\n\nexport function checkFunction(\n sourceCode: TSESLint.SourceCode,\n context: TSESLint.RuleContext<MessageId, [Options]>,\n node: FunctionNode,\n): void {\n const options = context.options[0] as Options ?? {}\n const maxLength = options.maxLength ?? defaultOptions.maxLength\n\n const params = node.params\n if (params.length === 0)\n return\n\n const parens = getParens(sourceCode, params)\n\n if (!isValidParens(parens))\n return\n\n if (parens.openingParen.loc.start.line === parens.closingParen.loc.end.line)\n return\n\n const paramsText = params\n .map((param, index) => {\n const text = sourceCode.getText(param)\n const isLastParam = index === params.length - 1\n if (isLastParam)\n return text\n const comma = sourceCode.getTokenAfter(\n param,\n token => token.value === ',',\n )\n if (comma && comma.loc.end.line === param.loc.end.line)\n return text + ','\n return text\n })\n .join(' ')\n\n const closingLine = parens.closingParen.loc.end.line\n const closingCol = parens.closingParen.loc.end.column\n const closingLineText = getLineLength(sourceCode, closingLine) > closingCol\n ? sourceCode.getText().split('\\n')[closingLine - 1].slice(closingCol)\n : ''\n const singleLineLength = parens.openingParen.loc.start.column + 1 + paramsText.length + 1 + closingLineText.length\n\n if (singleLineLength <= maxLength) {\n context.report({\n fix: fixer => fixer.replaceTextRange(\n [parens.openingParen.range[0], parens.closingParen.range[1]],\n `(${paramsText})`,\n ),\n messageId: 'singleLine',\n node,\n })\n }\n}\n","import type {MessageId} from './MessageId'\n\nexport const messageIds: Record<MessageId, string> = {\n singleLine: 'Function parameters can be on a single line',\n}\n","import {checkFunction} from './checkFunction'\nimport {messageIds} from './messageIds'\nimport type {MessageId} from './MessageId'\nimport type {Options} from './Options'\nimport type {TSESLint} from '@typescript-eslint/utils'\n\nexport const singleLineFunctionParameters: TSESLint.RuleModule<MessageId, [Options]> = {\n create(context) {\n const sourceCode = context.sourceCode ?? context.getSourceCode()\n\n return {\n FunctionDeclaration(node): void {\n checkFunction(sourceCode, context, node)\n },\n\n FunctionExpression(node): void {\n checkFunction(sourceCode, context, node)\n },\n\n TSCallSignatureDeclaration(node): void {\n checkFunction(sourceCode, context, node)\n },\n\n TSFunctionType(node): void {\n checkFunction(sourceCode, context, node)\n },\n\n TSMethodSignature(node): void {\n checkFunction(sourceCode, context, node)\n },\n }\n },\n\n meta: {\n docs: {\n description: 'Enforce function parameters to be on a single line when they fit.',\n },\n fixable: 'code',\n messages: messageIds,\n schema: [{\n additionalProperties: false,\n properties: {\n maxLength: {\n type: 'number',\n },\n },\n type: 'object',\n }],\n type: 'layout',\n },\n}\n","import type {TSESTree} from '@typescript-eslint/types'\n\nexport function formatAttributes(\n attributes: readonly TSESTree.ImportAttribute[],\n): string {\n if (attributes.length === 0)\n return ''\n\n const formatted = attributes.map(\n attr => {\n const key = attr.key.type === 'Identifier'\n ? attr.key.name\n : attr.key.value\n const value = attr.value.value\n return `${key}: '${value}'`\n },\n ).join(', ')\n\n return ` with {${formatted}}`\n}\n","import type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function formatNamed(\n specifiers: TSESTree.ImportSpecifier[],\n sourceCode: TSESLint.SourceCode,\n): string {\n return specifiers.map(s => sourceCode.getText(s)).join(', ')\n}\n","import {formatNamed} from './formatNamed'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function formatSpecifiers(\n declaration: TSESTree.ImportDeclaration,\n sourceCode: TSESLint.SourceCode,\n): string {\n const defaultSpecifier = declaration.specifiers.find(\n (s): s is TSESTree.ImportDefaultSpecifier => s.type === 'ImportDefaultSpecifier',\n )\n const namespaceSpecifier = declaration.specifiers.find(\n (s): s is TSESTree.ImportNamespaceSpecifier => s.type === 'ImportNamespaceSpecifier',\n )\n const namedSpecifiers = declaration.specifiers.filter(\n (s): s is TSESTree.ImportSpecifier => s.type === 'ImportSpecifier',\n )\n\n if (namespaceSpecifier)\n return `* as ${namespaceSpecifier.local.name}`\n\n if (defaultSpecifier && namedSpecifiers.length > 0) {\n return `${defaultSpecifier.local.name}, {${formatNamed(\n namedSpecifiers,\n sourceCode,\n )}}`\n }\n\n if (defaultSpecifier)\n return defaultSpecifier.local.name\n\n if (namedSpecifiers.length === 0)\n return ''\n\n return `{${formatNamed(namedSpecifiers, sourceCode)}}`\n}\n","import {formatAttributes} from './formatAttributes'\nimport {formatSpecifiers} from './formatSpecifiers'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function createImportFix(\n fixer: TSESLint.RuleFixer,\n declaration: TSESTree.ImportDeclaration,\n sourceCode: TSESLint.SourceCode,\n): TSESLint.RuleFix {\n const source = declaration.source.value\n const prefix = declaration.importKind === 'type' ? 'import type ' : 'import '\n const specifiers = formatSpecifiers(declaration, sourceCode)\n const attributes = formatAttributes(declaration.attributes)\n\n if (specifiers === '') {\n const result = `${prefix}'${source}'${attributes}`\n return fixer.replaceText(declaration, result)\n }\n\n const result = `${prefix}${specifiers} from '${source}'${attributes}`\n return fixer.replaceText(declaration, result)\n}\n","import type {TSESTree} from '@typescript-eslint/types'\n\nexport function isMultilineImport(\n declaration: TSESTree.ImportDeclaration,\n): boolean {\n const {end, start} = declaration.loc ?? {}\n return start?.line !== end?.line\n}\n","import {createImportFix} from './createImportFix'\nimport {isMultilineImport} from './isMultilineImport'\nimport type {MessageIds} from './MessageIds'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport const singleLineImports: TSESLint.RuleModule<MessageIds, []> = {\n create(context) {\n return {\n ImportDeclaration(node: TSESTree.ImportDeclaration): void {\n if (!isMultilineImport(node))\n return\n\n context.report({\n fix: fixer => createImportFix(fixer, node, context.sourceCode),\n messageId: 'multiline',\n node,\n })\n },\n }\n },\n\n meta: {\n docs: {\n description: 'Enforce imports to be on a single line.',\n },\n fixable: 'code',\n messages: {\n multiline: 'Import should be on a single line',\n },\n schema: [],\n type: 'layout',\n },\n}\n","import {formatAttributes} from '../singleLineImports/formatAttributes'\nimport type {ReExportDeclaration} from '@lib/ReExportDeclaration'\nimport type {TSESLint} from '@typescript-eslint/utils'\n\nexport function createReExportFix(\n fixer: TSESLint.RuleFixer,\n declaration: ReExportDeclaration,\n sourceCode: TSESLint.SourceCode,\n): TSESLint.RuleFix {\n const source = declaration.source!.value\n\n if (declaration.type === 'ExportAllDeclaration') {\n const exported = declaration.exported\n ? `* as ${sourceCode.getText(declaration.exported)}`\n : '*'\n const attributes = formatAttributes(declaration.attributes)\n const result = `export ${exported} from '${source}'${attributes}`\n return fixer.replaceText(declaration, result)\n }\n\n const prefix = declaration.exportKind === 'type' ? 'export type ' : 'export '\n const specifiers = declaration.specifiers.map(\n s => sourceCode.getText(s),\n ).join(', ')\n const attributes = formatAttributes(declaration.attributes)\n const result = `${prefix}{${specifiers}} from '${source}'${attributes}`\n\n return fixer.replaceText(declaration, result)\n}\n","import type {ReExportDeclaration} from '@lib/ReExportDeclaration'\n\nexport function isMultilineReExport(declaration: ReExportDeclaration): boolean {\n const {end, start} = declaration.loc ?? {}\n return start?.line !== end?.line\n}\n","import {createReExportFix} from './createReExportFix'\nimport {isMultilineReExport} from './isMultilineReExport'\nimport type {MessageIds} from './MessageIds'\nimport type {ReExportDeclaration} from '@lib/ReExportDeclaration'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport const singleLineReExports: TSESLint.RuleModule<MessageIds, []> = {\n create(context) {\n const checkDeclaration = (\n node: TSESTree.Node,\n declaration: ReExportDeclaration,\n ): void => {\n // Skip local exports (only process re-exports with a source)\n if (!declaration.source)\n return\n\n if (!isMultilineReExport(declaration))\n return\n\n context.report({\n fix: fixer => createReExportFix(fixer, declaration, context.sourceCode),\n messageId: 'multiline',\n node,\n })\n }\n\n return {\n ExportAllDeclaration: (node: TSESTree.ExportAllDeclaration): void => {\n checkDeclaration(node, node)\n },\n ExportNamedDeclaration: (node: TSESTree.ExportNamedDeclaration): void => {\n checkDeclaration(node, node)\n },\n }\n },\n\n meta: {\n docs: {\n description: 'Enforce re-exports to be on a single line.',\n },\n fixable: 'code',\n messages: {\n multiline: 'Re-export should be on a single line',\n },\n schema: [],\n type: 'layout',\n },\n}\n","import type {ImportGroup} from './ImportGroup'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function categorizeImport(\n declaration: TSESTree.ImportDeclaration,\n): ImportGroup {\n if (declaration.specifiers.some(s => s.type === 'ImportNamespaceSpecifier')) {\n return declaration.importKind === 'type'\n ? 'type-namespace'\n : 'namespace'\n }\n\n if (declaration.specifiers.some(s => s.type === 'ImportDefaultSpecifier')) {\n return declaration.importKind === 'type'\n ? 'type-default'\n : 'default'\n }\n\n if (declaration.importKind === 'type')\n return 'type-named'\n\n if (declaration.specifiers.length === 0)\n return 'side-effect'\n\n return 'named'\n}\n","import {categorizeImport} from './categorizeImport'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function getImportSortKey(\n declaration: TSESTree.ImportDeclaration,\n): string {\n const group = categorizeImport(declaration)\n\n if (group === 'side-effect')\n return declaration.source.value\n\n if (group === 'namespace' || group === 'type-namespace') {\n const namespaceSpecifier = declaration.specifiers.find(\n s => s.type === 'ImportNamespaceSpecifier',\n )\n return `*${namespaceSpecifier?.local.name ?? ''}`\n }\n\n if (group === 'default' || group === 'type-default') {\n const defaultSpecifier = declaration.specifiers.find(\n s => s.type === 'ImportDefaultSpecifier',\n )\n return defaultSpecifier?.local.name ?? ''\n }\n\n const specifier = declaration.specifiers[0]\n return specifier.local.name\n}\n","import {categorizeImport} from './categorizeImport'\nimport {getImportSortKey} from './getImportSortKey'\nimport type {CategorizedImport} from './CategorizedImport'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function categorizeImports(\n declarations: TSESTree.ImportDeclaration[],\n): CategorizedImport[] {\n return declarations.map(declaration => ({\n declaration,\n group: categorizeImport(declaration),\n sortKey: getImportSortKey(declaration),\n }))\n}\n","export function compare(a: string, b: string): number {\n return a.localeCompare(b, 'en', {sensitivity: 'case'})\n}\n","import type {ImportGroup} from './ImportGroup'\n\nexport const importGroupOrder: ImportGroup[] = [\n 'side-effect',\n 'namespace',\n 'default',\n 'named',\n 'type-namespace',\n 'type-default',\n 'type-named',\n]\n","import {compare} from '@lib/compare'\nimport {importGroupOrder} from './importGroupOrder'\nimport type {CategorizedImport} from './CategorizedImport'\nimport type {ImportValidationError} from './ImportValidationError'\n\nexport function checkAlphabeticalSorting(\n categorizedImports: CategorizedImport[],\n): ImportValidationError[] {\n const errors: ImportValidationError[] = []\n\n for (const importGroup of importGroupOrder) {\n const groupImports = categorizedImports.filter(c => c.group === importGroup)\n const expectedSortedImports = [...groupImports].sort((a, b) => compare(\n a.sortKey,\n b.sortKey,\n ))\n for (let i = 0; i < groupImports.length; i++) {\n if (groupImports[i] !== expectedSortedImports[i]) {\n errors.push({\n messageId: 'sortedImports',\n node: groupImports[i].declaration,\n })\n }\n }\n }\n\n return errors\n}\n","import {importGroupOrder} from './importGroupOrder'\nimport type {CategorizedImport} from './CategorizedImport'\nimport type {ImportValidationError} from './ImportValidationError'\n\nexport function checkGroupOrdering(\n categorizedImports: CategorizedImport[],\n): ImportValidationError[] {\n const errors: ImportValidationError[] = []\n\n let currentGroupIndex = -1\n for (const {declaration, group: importGroup} of categorizedImports) {\n const groupIndex = importGroupOrder.indexOf(importGroup)\n if (groupIndex < currentGroupIndex) {\n errors.push({\n messageId: 'wrongGroup',\n node: declaration,\n })\n } else\n currentGroupIndex = groupIndex\n }\n\n return errors\n}\n","import type {TSESTree} from '@typescript-eslint/types'\n\nexport function getImportSpecifierName(\n specifier: TSESTree.ImportSpecifier,\n): string {\n return specifier.imported.type === 'Identifier'\n ? specifier.imported.name\n : String(specifier.imported.value)\n}\n","import {compare} from '@lib/compare'\nimport {getImportSpecifierName} from './getImportSpecifierName'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function areSpecifiersSorted(\n specifiers: TSESTree.ImportSpecifier[],\n): boolean {\n const names = specifiers.map(s => getImportSpecifierName(s))\n const sorted = [...names].sort((a, b) => compare(a, b))\n return names.every((name, i) => name === sorted[i])\n}\n","import type {TSESTree} from '@typescript-eslint/types'\n\nexport function getImportNamedSpecifiers(\n declaration: TSESTree.ImportDeclaration,\n): TSESTree.ImportSpecifier[] {\n return declaration.specifiers.filter(\n (s): s is TSESTree.ImportSpecifier => s.type === 'ImportSpecifier',\n )\n}\n","import {areSpecifiersSorted} from './areSpecifiersSorted'\nimport {getImportNamedSpecifiers} from './getImportNamedSpecifiers'\nimport type {CategorizedImport} from './CategorizedImport'\nimport type {ImportValidationError} from './ImportValidationError'\n\nexport function checkSpecifiersSorting(\n categorized: CategorizedImport[],\n): ImportValidationError[] {\n const errors: ImportValidationError[] = []\n const namedImportDeclarations = categorized.filter(c => c.group === 'named')\n\n for (const {declaration} of namedImportDeclarations) {\n const namedSpecifiers = getImportNamedSpecifiers(declaration)\n if (namedSpecifiers.length > 1 && !areSpecifiersSorted(namedSpecifiers)) {\n errors.push({\n messageId: 'sortedNames',\n node: declaration,\n })\n }\n }\n\n return errors\n}\n","import {compare} from '@lib/compare'\nimport {getImportSpecifierName} from './getImportSpecifierName'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function sortImportSpecifiersText(\n specifiers: TSESTree.ImportSpecifier[],\n sourceCode: TSESLint.SourceCode,\n): string {\n const sorted = [...specifiers].sort((a, b) => {\n const nameA = getImportSpecifierName(a)\n const nameB = getImportSpecifierName(b)\n return compare(nameA, nameB)\n })\n return sorted.map(s => sourceCode.getText(s)).join(', ')\n}\n","import {areSpecifiersSorted} from '../areSpecifiersSorted'\nimport {getImportNamedSpecifiers} from '../getImportNamedSpecifiers'\nimport {sortImportSpecifiersText} from '../sortImportSpecifiersText'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function formatNamedImportSpecifiers(\n declaration: TSESTree.ImportDeclaration,\n sourceCode: TSESLint.SourceCode,\n): string {\n const specifiers = getImportNamedSpecifiers(declaration)\n\n if (specifiers.length > 1 && !areSpecifiersSorted(specifiers)) {\n const sortedSpecifiers = sortImportSpecifiersText(specifiers, sourceCode)\n const source = declaration.source.value\n const prefix = declaration.importKind === 'type' ? 'import type ' : 'import '\n return `${prefix}{${sortedSpecifiers}} from '${source}'`\n }\n\n return sourceCode.getText(declaration)\n}\n","import {formatNamedImportSpecifiers} from './formatNamedImportSpecifiers'\nimport {importGroupOrder} from '../importGroupOrder'\nimport type {CategorizedImport} from '../CategorizedImport'\nimport type {ImportGroup} from '../ImportGroup'\nimport type {TSESLint} from '@typescript-eslint/utils'\n\nexport function buildSortedImportCode(\n grouped: Record<ImportGroup, CategorizedImport[]>,\n sourceCode: TSESLint.SourceCode,\n): string[] {\n const sortedCode: string[] = []\n\n for (const group of importGroupOrder) {\n for (const {declaration} of grouped[group] ?? []) {\n if (group === 'named' || group === 'type-named')\n sortedCode.push(formatNamedImportSpecifiers(declaration, sourceCode))\n else\n sortedCode.push(sourceCode.getText(declaration))\n }\n }\n\n return sortedCode\n}\n","import type {CategorizedImport} from '../CategorizedImport'\nimport type {ImportGroup} from '../ImportGroup'\n\nexport function groupImportsByType(\n categorized: CategorizedImport[],\n): Record<ImportGroup, CategorizedImport[]> {\n const grouped: Record<ImportGroup, CategorizedImport[]> = {\n default: [],\n named: [],\n namespace: [],\n 'side-effect': [],\n 'type-default': [],\n 'type-named': [],\n 'type-namespace': [],\n }\n\n for (const item of categorized)\n grouped[item.group].push(item)\n\n return grouped\n}\n","import {compare} from '@lib/compare'\nimport type {CategorizedImport} from '../CategorizedImport'\nimport type {ImportGroup} from '../ImportGroup'\n\nexport function sortImportGroups(\n grouped: Record<ImportGroup, CategorizedImport[]>,\n): void {\n grouped['side-effect'].sort((a, b) => compare(a.sortKey, b.sortKey))\n grouped['namespace'].sort((a, b) => compare(a.sortKey, b.sortKey))\n grouped['default'].sort((a, b) => compare(a.sortKey, b.sortKey))\n grouped['named'].sort((a, b) => compare(a.sortKey, b.sortKey))\n grouped['type-namespace'].sort((a, b) => compare(a.sortKey, b.sortKey))\n grouped['type-default'].sort((a, b) => compare(a.sortKey, b.sortKey))\n grouped['type-named'].sort((a, b) => compare(a.sortKey, b.sortKey))\n}\n","import {buildSortedImportCode} from './buildSortedImportCode'\nimport {categorizeImports} from '../categorizeImports'\nimport {groupImportsByType} from './groupImportsByType'\nimport {sortImportGroups} from './sortImportGroups'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function createFixForGroup(\n fixer: TSESLint.RuleFixer,\n importDeclarations: TSESTree.ImportDeclaration[],\n sourceCode: TSESLint.SourceCode,\n): null | TSESLint.RuleFix {\n if (importDeclarations.length === 0)\n return null\n\n const categorized = categorizeImports(importDeclarations)\n const grouped = groupImportsByType(categorized)\n\n sortImportGroups(grouped)\n\n const sortedCode = buildSortedImportCode(grouped, sourceCode)\n .join('\\n')\n\n const firstImport = importDeclarations[0]\n const lastImport = importDeclarations[importDeclarations.length - 1]\n\n return fixer.replaceTextRange(\n [firstImport.range![0], lastImport.range![1]],\n sortedCode,\n )\n}\n","import {createFixForGroup} from './createFixForGroup'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function createImportFix(\n fixer: TSESLint.RuleFixer,\n importGroups: TSESTree.ImportDeclaration[][],\n sourceCode: TSESLint.SourceCode,\n): TSESLint.RuleFix[] {\n const fixes: TSESLint.RuleFix[] = []\n\n for (const group of importGroups) {\n const fix = createFixForGroup(fixer, group, sourceCode)\n if (fix)\n fixes.push(fix)\n }\n\n return fixes\n}\n","import type {TSESTree} from '@typescript-eslint/types'\n\nexport function getImportGroups(\n programBody: TSESTree.ProgramStatement[],\n): TSESTree.ImportDeclaration[][] {\n const groups: TSESTree.ImportDeclaration[][] = []\n let currentImportGroup: TSESTree.ImportDeclaration[] = []\n\n for (const statement of programBody) {\n if (statement.type === 'ImportDeclaration') {\n currentImportGroup.push(statement)\n continue\n }\n\n if (currentImportGroup.length > 0) {\n groups.push(currentImportGroup)\n currentImportGroup = []\n }\n }\n\n if (currentImportGroup.length > 0)\n groups.push(currentImportGroup)\n\n return groups\n}\n","import {categorizeImports} from './categorizeImports'\nimport {checkAlphabeticalSorting} from './checkAlphabeticalSorting'\nimport {checkGroupOrdering} from './checkGroupOrdering'\nimport {checkSpecifiersSorting} from './checkSpecifiersSorting'\nimport {createImportFix} from './createFix'\nimport {getImportGroups} from './getImportGroups'\nimport type {ImportValidationError} from './ImportValidationError'\nimport type {MessageIds} from './MessageIds'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport const sortedImports: TSESLint.RuleModule<MessageIds, []> = {\n create(context) {\n return {\n Program(node: TSESTree.Program): void {\n const programBody = node.body\n const importGroups = getImportGroups(programBody)\n if (importGroups.length === 0)\n return\n\n const allImportErrors: ImportValidationError[] = []\n\n // Check each import group independently\n for (const group of importGroups) {\n const categorized = categorizeImports(group)\n const errors: ImportValidationError[] = [\n ...checkGroupOrdering(categorized),\n ...checkAlphabeticalSorting(categorized),\n ...checkSpecifiersSorting(categorized),\n ]\n allImportErrors.push(...errors)\n }\n\n for (const error of allImportErrors) {\n context.report({\n fix(fixer) {\n const sourceCode = context.sourceCode\n return createImportFix(fixer, importGroups, sourceCode)\n },\n messageId: error.messageId,\n node: error.node,\n })\n }\n },\n }\n },\n meta: {\n docs: {\n description: 'Enforce sorted imports alphabetically.',\n },\n fixable: 'code',\n messages: {\n sortedImports: 'Imports should be sorted alphabetically',\n sortedNames: 'Named imports should be sorted alphabetically',\n wrongGroup: 'Import is in wrong group',\n },\n schema: [],\n type: 'suggestion',\n },\n}\n","import type {ReExportDeclaration} from '@lib/ReExportDeclaration'\nimport type {ReExportGroup} from './ReExportGroup'\n\nexport function categorizeReExport(\n declaration: ReExportDeclaration,\n): ReExportGroup {\n // Example: export * from 'module' or export * as ns from 'module'\n if (declaration.type === 'ExportAllDeclaration') {\n // Example: export type * from 'module'\n if (declaration.exportKind === 'type') {\n // Example: export type * as ns from 'module'\n if (declaration.exported)\n return 'type-namespace'\n // Example: export type * from 'module'\n return 'type-all'\n }\n // Example: export * as ns from 'module'\n if (declaration.exported)\n return 're-export-namespace'\n // Example: export * from 'module'\n return 're-export-all'\n }\n\n // Example: export type {Type} from 'module'\n if (declaration.exportKind === 'type')\n return 'type-named'\n\n // Example: export { type Type } from 'module' (inline type modifier)\n if (declaration.specifiers?.some(s => s.exportKind === 'type'))\n return 'type-named'\n\n // Example: export {value} from 'module'\n return 're-export-named'\n}\n","import {categorizeReExport} from './categorizeReExport'\nimport type {ReExportDeclaration} from '@lib/ReExportDeclaration'\n\nexport function getReExportSortKey(declaration: ReExportDeclaration): string {\n const group = categorizeReExport(declaration)\n\n if (declaration.type === 'ExportAllDeclaration') {\n if (group === 're-export-namespace') {\n if (declaration.exported?.type === 'Identifier')\n return `*${declaration.exported.name}`\n }\n return declaration.source.value\n }\n\n const specifier = declaration.specifiers[0]\n if (!specifier)\n return ''\n\n return specifier.local.type === 'Identifier'\n ? specifier.local.name\n : specifier.local.value\n}\n","import {categorizeReExport} from './categorizeReExport'\nimport {getReExportSortKey} from './getReExportSortKey'\nimport type {CategorizedReExport} from './CategorizedReExport'\nimport type {ReExportDeclaration} from '@lib/ReExportDeclaration'\n\nexport function categorizeReExports(\n declarations: ReExportDeclaration[],\n): CategorizedReExport[] {\n return declarations.map(declaration => {\n return {\n declaration,\n group: categorizeReExport(declaration),\n sortKey: getReExportSortKey(declaration),\n } as CategorizedReExport\n })\n}\n","import type {ReExportGroup} from './ReExportGroup'\n\nexport const reExportGroupOrder: ReExportGroup[] = [\n 're-export-all',\n 're-export-namespace',\n 're-export-named',\n 'type-all',\n 'type-namespace',\n 'type-named',\n]\n","import {compare} from '@lib/compare'\nimport {reExportGroupOrder} from './reExportGroupOrder'\nimport type {CategorizedReExport} from './CategorizedReExport'\nimport type {ReExportValidationError} from './ReExportValidationError'\n\nexport function checkAlphabeticalSorting(\n categorized: CategorizedReExport[],\n): ReExportValidationError[] {\n const errors: ReExportValidationError[] = []\n\n for (const group of reExportGroupOrder) {\n const groupReExports = categorized.filter(c => c.group === group)\n const sorted = [...groupReExports].sort((a, b) =>\n compare(a.sortKey, b.sortKey),\n )\n for (let i = 0; i < groupReExports.length; i++) {\n if (groupReExports[i] !== sorted[i]) {\n errors.push({\n messageId: 'sortedReExports',\n node: groupReExports[i].declaration,\n })\n }\n }\n }\n\n return errors\n}\n","import {reExportGroupOrder} from './reExportGroupOrder'\nimport type {CategorizedReExport} from './CategorizedReExport'\nimport type {ReExportValidationError} from './ReExportValidationError'\n\nexport function checkGroupOrdering(\n categorized: CategorizedReExport[],\n): ReExportValidationError[] {\n const errors: ReExportValidationError[] = []\n\n let currentGroupIndex = -1\n for (const {declaration, group} of categorized) {\n const groupIndex = reExportGroupOrder.indexOf(group)\n if (groupIndex < currentGroupIndex) {\n errors.push({\n messageId: 'wrongGroup',\n node: declaration,\n })\n } else\n currentGroupIndex = groupIndex\n }\n\n return errors\n}\n","import type {TSESTree} from '@typescript-eslint/types'\n\nexport function getSpecifierName(specifier: TSESTree.ExportSpecifier): string {\n return specifier.local.type === 'Identifier'\n ? specifier.local.name\n : String(specifier.local.value)\n}\n","import {compare} from '@lib/compare'\nimport {getSpecifierName} from './getSpecifierName'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function areSpecifiersSorted(\n specifiers: TSESTree.ExportSpecifier[],\n): boolean {\n const names = specifiers.map(s => getSpecifierName(s))\n const sorted = [...names].sort((a, b) => compare(a, b))\n return names.every((name, i) => name === sorted[i])\n}\n","import type {TSESTree} from '@typescript-eslint/types'\n\nexport function getReExportNamedSpecifiers(\n declaration: TSESTree.ExportNamedDeclaration,\n): TSESTree.ExportSpecifier[] {\n return declaration.specifiers.filter(\n s => s.type === 'ExportSpecifier' && s.local.type === 'Identifier',\n )\n}\n","import type {CategorizedNamedReExport} from './CategorizedNamedReExport'\nimport type {CategorizedReExport} from './CategorizedReExport'\n\nexport function isNamedReExport(\n x: CategorizedReExport,\n): x is CategorizedNamedReExport {\n return x.group !== 're-export-all' && x.group !== 're-export-namespace'\n}\n","import {areSpecifiersSorted} from './areSpecifiersSorted'\nimport {getReExportNamedSpecifiers} from './getReExportNamedSpecifiers'\nimport {isNamedReExport} from './isNamedReExport'\nimport type {CategorizedReExport} from './CategorizedReExport'\nimport type {ReExportValidationError} from './ReExportValidationError'\n\nexport function checkSpecifiersSorting(\n categorized: CategorizedReExport[],\n): ReExportValidationError[] {\n const errors: ReExportValidationError[] = []\n const namedReExports = categorized.filter(isNamedReExport)\n\n for (const {declaration} of namedReExports) {\n const specifiers = getReExportNamedSpecifiers(declaration)\n const isSorted = areSpecifiersSorted(specifiers)\n if (specifiers.length > 1 && !isSorted) {\n errors.push({\n messageId: 'sortedNames',\n node: declaration,\n })\n }\n }\n\n return errors\n}\n","import {compare} from '@lib/compare'\nimport {getSpecifierName} from './getSpecifierName'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function sortSpecifiersText(\n specifiers: TSESTree.ExportSpecifier[],\n sourceCode: TSESLint.SourceCode,\n): string {\n const sorted = [...specifiers].sort((a, b) => {\n const nameA = getSpecifierName(a)\n const nameB = getSpecifierName(b)\n return compare(nameA, nameB)\n })\n return sorted.map(s => sourceCode.getText(s)).join(', ')\n}\n","import {areSpecifiersSorted} from '../areSpecifiersSorted'\nimport {getReExportNamedSpecifiers} from '../getReExportNamedSpecifiers'\nimport {sortSpecifiersText} from '../sortSpecifiersText'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport function formatNamedReExportSpecifiers(\n declaration: TSESTree.ExportNamedDeclaration,\n sourceCode: TSESLint.SourceCode,\n): string {\n const specifiers = getReExportNamedSpecifiers(declaration)\n\n if (specifiers.length > 1 && !areSpecifiersSorted(specifiers)) {\n const sortedSpecifiers = sortSpecifiersText(specifiers, sourceCode)\n const source = declaration.source!.value\n const prefix = declaration.exportKind === 'type' ? 'export type ' : 'export '\n return `${prefix}{${sortedSpecifiers}} from '${source}'`\n }\n\n return sourceCode.getText(declaration)\n}\n","import {formatNamedReExportSpecifiers} from './formatNamedReExportSpecifiers'\nimport {isNamedReExport} from '../isNamedReExport'\nimport {reExportGroupOrder} from '../reExportGroupOrder'\nimport type {CategorizedReExport} from '../CategorizedReExport'\nimport type {ReExportGroup} from '../ReExportGroup'\nimport type {TSESLint} from '@typescript-eslint/utils'\n\nexport function buildSortedReExportCode(\n grouped: Record<ReExportGroup, CategorizedReExport[]>,\n sourceCode: TSESLint.SourceCode,\n): string[] {\n const sortedCode: string[] = []\n\n for (const group of reExportGroupOrder) {\n for (const item of grouped[group]) {\n if (isNamedReExport(item)) {\n sortedCode.push(\n formatNamedReExportSpecifiers(\n item.declaration,\n sourceCode,\n ),\n )\n } else\n sortedCode.push(sourceCode.getText(item.declaration))\n }\n }\n\n return sortedCode\n}\n","import type {CategorizedReExport} from '../CategorizedReExport'\nimport type {ReExportGroup} from '../ReExportGroup'\n\nexport function groupReExportsByType(\n categorized: CategorizedReExport[],\n): Record<ReExportGroup, CategorizedReExport[]> {\n const grouped: Record<ReExportGroup, CategorizedReExport[]> = {\n 're-export-all': [],\n 're-export-named': [],\n 're-export-namespace': [],\n 'type-all': [],\n 'type-named': [],\n 'type-namespace': [],\n }\n\n for (const item of categorized)\n grouped[item.group].push(item)\n\n return grouped\n}\n","import {compare} from '@lib/compare'\nimport type {CategorizedReExport} from '../CategorizedReExport'\nimport type {ReExportGroup} from '../ReExportGroup'\n\nexport function sortExportGroups(\n grouped: Record<ReExportGroup, CategorizedReExport[]>,\n): void {\n grouped['re-export-all'].sort((a, b) => compare(a.sortKey, b.sortKey))\n grouped['re-export-namespace'].sort((a, b) => compare(a.sortKey, b.sortKey))\n grouped['re-export-named'].sort((a, b) => compare(a.sortKey, b.sortKey))\n grouped['type-all'].sort((a, b) => compare(a.sortKey, b.sortKey))\n grouped['type-namespace'].sort((a, b) => compare(a.sortKey, b.sortKey))\n grouped['type-named'].sort((a, b) => compare(a.sortKey, b.sortKey))\n}\n","import {buildSortedReExportCode} from './buildSortedReExportCode'\nimport {categorizeReExports} from '../categorizeReExports'\nimport {groupReExportsByType} from './groupReExportsByType'\nimport {sortExportGroups} from './sortExportGroups'\nimport type {ReExportDeclaration} from '@lib/ReExportDeclaration'\nimport type {TSESLint} from '@typescript-eslint/utils'\n\nexport function createFixForGroup(\n fixer: TSESLint.RuleFixer,\n reExportDeclarations: ReExportDeclaration[],\n sourceCode: TSESLint.SourceCode,\n): null | TSESLint.RuleFix {\n if (reExportDeclarations.length === 0)\n return null\n\n const categorized = categorizeReExports(reExportDeclarations)\n const grouped = groupReExportsByType(categorized)\n\n sortExportGroups(grouped)\n\n const sortedCode = buildSortedReExportCode(grouped, sourceCode)\n .join('\\n')\n\n const firstReExport = reExportDeclarations[0]\n const lastReExport = reExportDeclarations[reExportDeclarations.length - 1]\n\n return fixer.replaceTextRange(\n [firstReExport.range![0], lastReExport.range![1]],\n sortedCode,\n )\n}\n","import {createFixForGroup} from './createFixForGroup'\nimport type {ReExportDeclaration} from '@lib/ReExportDeclaration'\nimport type {TSESLint} from '@typescript-eslint/utils'\n\nexport function createReExportFix(\n fixer: TSESLint.RuleFixer,\n reExportGroups: ReExportDeclaration[][],\n sourceCode: TSESLint.SourceCode,\n): TSESLint.RuleFix[] {\n const fixes: TSESLint.RuleFix[] = []\n\n for (const group of reExportGroups) {\n const fix = createFixForGroup(fixer, group, sourceCode)\n if (fix)\n fixes.push(fix)\n }\n\n return fixes\n}\n","import type {ReExportDeclaration} from '@lib/ReExportDeclaration'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function isReExportDeclaration(\n statement: TSESTree.ProgramStatement,\n): statement is ReExportDeclaration {\n return (statement.type === 'ExportNamedDeclaration' && statement.source !== null)\n || statement.type === 'ExportAllDeclaration'\n}\n","import {isReExportDeclaration} from './isReExportDeclaration'\nimport type {ReExportDeclaration} from '@lib/ReExportDeclaration'\nimport type {TSESTree} from '@typescript-eslint/types'\n\nexport function getReExportGroups(\n programBody: TSESTree.ProgramStatement[],\n): ReExportDeclaration[][] {\n const groups: ReExportDeclaration[][] = []\n let currentGroup: ReExportDeclaration[] = []\n\n for (const statement of programBody) {\n if (isReExportDeclaration(statement)) {\n currentGroup.push(statement)\n continue\n }\n\n if (currentGroup.length > 0) {\n groups.push(currentGroup)\n currentGroup = []\n }\n }\n\n if (currentGroup.length > 0)\n groups.push(currentGroup)\n\n return groups\n}\n","import {categorizeReExports} from './categorizeReExports'\nimport {checkAlphabeticalSorting} from './checkAlphabeticalSorting'\nimport {checkGroupOrdering} from './checkGroupOrdering'\nimport {checkSpecifiersSorting} from './checkSpecifiersSorting'\nimport {createReExportFix} from './createFix'\nimport {getReExportGroups} from './getReExportGroups'\nimport type {MessageIds} from './MessageIds'\nimport type {ReExportValidationError} from './ReExportValidationError'\nimport type {TSESLint} from '@typescript-eslint/utils'\nimport type {TSESTree} from '@typescript-eslint/utils'\n\nexport const sortedReExports: TSESLint.RuleModule<MessageIds, []> = {\n create(context) {\n return {\n Program(node: TSESTree.Program): void {\n const programBody = node.body\n const reExportGroups = getReExportGroups(programBody)\n if (reExportGroups.length === 0)\n return\n\n const allReExportErrors: ReExportValidationError[] = []\n\n // Check each re-export group independently\n for (const group of reExportGroups) {\n const categorizedReExports = categorizeReExports(group)\n const groupErrors: ReExportValidationError[] = [\n ...checkGroupOrdering(categorizedReExports),\n ...checkAlphabeticalSorting(categorizedReExports),\n ...checkSpecifiersSorting(categorizedReExports),\n ]\n allReExportErrors.push(...groupErrors)\n }\n\n for (const error of allReExportErrors) {\n context.report({\n fix(fixer) {\n const sourceCode = context.sourceCode\n return createReExportFix(fixer, reExportGroups, sourceCode)\n },\n messageId: error.messageId,\n node: error.node,\n })\n }\n },\n }\n },\n meta: {\n docs: {\n description: 'Enforce sorted exports alphabetically.',\n },\n fixable: 'code',\n messages: {\n sortedNames: 'Named exports should be sorted alphabetically',\n sortedReExports: 'Exports should be sorted alphabetically',\n wrongGroup: 'Export is in wrong group',\n },\n schema: [],\n type: 'suggestion',\n },\n}\n","import {arrayItemsLineBreak} from '../rules/arrayItemsLineBreak'\nimport {braceStyleControlStatements} from '../rules/braceStyleControlStatements'\nimport {braceStyleObjectLiteral} from '../rules/braceStyleObjectLiteral'\nimport {compactArrayItems} from '../rules/compactArrayItems'\nimport {exportFilenameMatch} from '../rules/exportFilenameMatch'\nimport {functionCallArgumentLineBreak} from '../rules/functionCallArgumentLineBreak'\nimport {functionCognitiveComplexity} from '../rules/functionCognitiveComplexity'\nimport {functionParameterLineBreak} from '../rules/functionParameterLineBreak'\nimport {importsAndReExportsAtTop} from '../rules/importsAndReExportsAtTop'\nimport {individualImports} from '../rules/individualImports'\nimport {individualReExports} from '../rules/individualReExports'\nimport {interfacePropertyLineBreak} from '../rules/interfacePropertyLineBreak'\nimport {maxDeclarationsPerFile} from '../rules/maxDeclarationsPerFile'\nimport {multilineUnionTypeAliases} from '../rules/multilineUnionTypeAliases'\nimport {namingConvention} from '../rules/namingConvention'\nimport {noInlineObjectTypes} from '../rules/noInlineObjectTypes'\nimport {noUnnecessaryBraces} from '../rules/noUnnecessaryBraces'\nimport {objectPropertyLineBreak} from '../rules/objectPropertyLineBreak'\nimport {oneExportPerFile} from '../rules/oneExportPerFile'\nimport {preferInlineExport} from '../rules/preferInlineExport'\nimport {singleLineArrowFunctionParameters} from '../rules/singleLineArrowFunctionParameters'\nimport {singleLineFunctionParameters} from '../rules/singleLineFunctionParameters'\nimport {singleLineImports} from '../rules/singleLineImports'\nimport {singleLineReExports} from '../rules/singleLineReExports'\nimport {sortedImports} from '../rules/sortedImports'\nimport {sortedReExports} from '../rules/sortedReExports'\nimport type {TSESLint} from '@typescript-eslint/utils'\n\nexport const customRules: TSESLint.FlatConfig.Config = {\n plugins: {\n '@borela-tech': {\n rules: {\n 'array-items-line-break': arrayItemsLineBreak,\n 'brace-style-control-statements': braceStyleControlStatements,\n 'brace-style-object-literal': braceStyleObjectLiteral,\n 'compact-array-items': compactArrayItems,\n 'export-filename-match': exportFilenameMatch,\n 'function-call-argument-line-break': functionCallArgumentLineBreak,\n 'function-cognitive-complexity': functionCognitiveComplexity,\n 'function-parameter-line-break': functionParameterLineBreak,\n 'imports-and-re-exports-at-top': importsAndReExportsAtTop,\n 'individual-imports': individualImports,\n 'individual-re-exports': individualReExports,\n 'interface-property-line-break': interfacePropertyLineBreak,\n 'max-declarations-per-file': maxDeclarationsPerFile,\n 'multiline-union-type-aliases': multilineUnionTypeAliases,\n 'naming-convention': namingConvention,\n 'no-inline-object-types': noInlineObjectTypes,\n 'no-unnecessary-braces': noUnnecessaryBraces,\n 'object-property-line-break': objectPropertyLineBreak,\n 'one-export-per-file': oneExportPerFile,\n 'prefer-inline-export': preferInlineExport,\n 'single-line-arrow-function-parameters': singleLineArrowFunctionParameters,\n 'single-line-function-parameters': singleLineFunctionParameters,\n 'single-line-imports': singleLineImports,\n 'single-line-re-exports': singleLineReExports,\n 'sorted-imports': sortedImports,\n 'sorted-re-exports': sortedReExports,\n },\n },\n },\n rules: {\n '@borela-tech/array-items-line-break': [\n 'error',\n {maxLength: 80},\n ],\n '@borela-tech/brace-style-control-statements': 'error',\n '@borela-tech/brace-style-object-literal': 'error',\n '@borela-tech/compact-array-items': 'error',\n '@borela-tech/export-filename-match': 'error',\n '@borela-tech/function-call-argument-line-break': [\n 'error',\n {maxLength: 80},\n ],\n '@borela-tech/function-cognitive-complexity': [\n 'error',\n {maxCognitiveComplexity: 15},\n ],\n '@borela-tech/function-parameter-line-break': [\n 'error',\n {maxLength: 80},\n ],\n '@borela-tech/imports-and-re-exports-at-top': 'error',\n '@borela-tech/individual-imports': 'error',\n '@borela-tech/individual-re-exports': 'error',\n '@borela-tech/interface-property-line-break': [\n 'error',\n {maxLength: 80},\n ],\n '@borela-tech/max-declarations-per-file': 'error',\n '@borela-tech/multiline-union-type-aliases': 'error',\n '@borela-tech/naming-convention': 'error',\n '@borela-tech/no-inline-object-types': 'error',\n '@borela-tech/no-unnecessary-braces': 'error',\n '@borela-tech/object-property-line-break': 'error',\n '@borela-tech/one-export-per-file': 'error',\n '@borela-tech/prefer-inline-export': 'error',\n '@borela-tech/single-line-arrow-function-parameters': [\n 'error',\n {maxLength: 80},\n ],\n '@borela-tech/single-line-function-parameters': [\n 'error',\n {maxLength: 80},\n ],\n '@borela-tech/single-line-imports': 'error',\n '@borela-tech/single-line-re-exports': 'error',\n '@borela-tech/sorted-imports': 'error',\n '@borela-tech/sorted-re-exports': 'error',\n },\n}\n","import type {TSESLint} from '@typescript-eslint/utils'\n\nexport const generalRules: TSESLint.FlatConfig.Config = {\n rules: {\n 'capitalized-comments': [\n 'error',\n 'always',\n {ignoreConsecutiveComments: true},\n ],\n complexity: ['error', 10],\n 'no-restricted-exports': ['error', {\n restrictDefaultExports: {\n direct: true,\n },\n }],\n 'react/react-in-jsx-scope': 'off',\n },\n}\n","import type {TSESLint} from '@typescript-eslint/utils'\n\nexport const ignores: TSESLint.FlatConfig.Config = {\n ignores: [\n 'src/graphql/sdk.ts',\n '**/node_modules/**',\n '**/dist/**',\n ],\n}\n","import type {TSESLint} from '@typescript-eslint/utils'\n\nexport const languageOptions: TSESLint.FlatConfig.Config = {\n languageOptions: {\n parserOptions: {\n projectService: true,\n },\n },\n settings: {\n react: {\n version: '19',\n },\n },\n}\n","import perfectionist from 'eslint-plugin-perfectionist'\nimport type {TSESLint} from '@typescript-eslint/utils'\n\nexport const perfectionistRules: TSESLint.FlatConfig.Config = {\n plugins: {perfectionist},\n rules: {\n 'perfectionist/sort-array-includes': ['error', {\n order: 'asc',\n type: 'natural',\n }],\n 'perfectionist/sort-decorators': ['error', {\n order: 'asc',\n type: 'natural',\n }],\n 'perfectionist/sort-enums': ['error', {\n order: 'asc',\n type: 'natural',\n }],\n 'perfectionist/sort-heritage-clauses': ['error', {\n order: 'asc',\n type: 'natural',\n }],\n 'perfectionist/sort-interfaces': ['error', {\n order: 'asc',\n type: 'natural',\n }],\n 'perfectionist/sort-intersection-types': ['error', {\n order: 'asc',\n type: 'natural',\n }],\n 'perfectionist/sort-jsx-props': ['error', {\n order: 'asc',\n type: 'natural',\n }],\n 'perfectionist/sort-maps': ['error', {\n order: 'asc',\n type: 'natural',\n }],\n 'perfectionist/sort-object-types': ['error', {\n order: 'asc',\n type: 'natural',\n }],\n 'perfectionist/sort-objects': ['error', {\n order: 'asc',\n type: 'natural',\n }],\n 'perfectionist/sort-sets': ['error', {\n order: 'asc',\n type: 'natural',\n }],\n 'perfectionist/sort-switch-case': ['error', {\n order: 'asc',\n type: 'natural',\n }],\n 'perfectionist/sort-union-types': ['error', {\n order: 'asc',\n type: 'natural',\n }],\n },\n}\n","import rule from 'eslint-plugin-react-hooks'\nimport type {TSESLint} from '@typescript-eslint/utils'\n\nexport const reactHooks: TSESLint.FlatConfig.Config = {\n plugins: {\n 'react-hooks': rule,\n },\n rules: rule.configs.recommended.rules,\n}\n","import type {TSESLint} from '@typescript-eslint/utils'\n\nexport const stylisticRules: TSESLint.FlatConfig.Config = {\n rules: {\n '@stylistic/array-bracket-spacing': [\n 'error',\n 'never',\n ],\n '@stylistic/arrow-parens': [\n 'error',\n 'as-needed',\n ],\n '@stylistic/block-spacing': 'off',\n '@stylistic/brace-style': [\n 'error',\n '1tbs',\n {allowSingleLine: true},\n ],\n '@stylistic/indent': [\n 'error',\n 2,\n {ignoredNodes: ['TSMappedType > *']},\n ],\n '@stylistic/jsx-tag-spacing': ['error', {\n afterOpening: 'never',\n beforeClosing: 'never',\n beforeSelfClosing: 'never',\n closingSlash: 'never',\n }],\n '@stylistic/jsx-wrap-multilines': 'off',\n '@stylistic/lines-between-class-members': 'off',\n '@stylistic/object-curly-newline': 'off',\n '@stylistic/object-curly-spacing': [\n 'error',\n 'never',\n ],\n '@stylistic/operator-linebreak': [\n 'error',\n 'before',\n {overrides: {'=': 'after'}},\n ],\n '@stylistic/quote-props': [\n 'error',\n 'as-needed',\n ],\n '@stylistic/quotes': [\n 'error',\n 'single',\n {avoidEscape: true},\n ],\n '@stylistic/semi': [\n 'error',\n 'never',\n {beforeStatementContinuationChars: 'always'},\n ],\n },\n}\n","import type {TSESLint} from '@typescript-eslint/utils'\n\nexport const typescriptRules: TSESLint.FlatConfig.Config = {\n rules: {\n '@typescript-eslint/consistent-indexed-object-style': 'off',\n '@typescript-eslint/consistent-type-imports': [\n 'error',\n {fixStyle: 'separate-type-imports'},\n ],\n '@typescript-eslint/explicit-function-return-type': 'error',\n '@typescript-eslint/no-empty-function': 'off',\n '@typescript-eslint/no-unused-vars': ['error', {\n argsIgnorePattern: '^_',\n caughtErrorsIgnorePattern: '^_',\n varsIgnorePattern: '^_',\n }],\n },\n}\n","'use strict';\nmodule.exports = require('./globals.json');\n","import eslintPluginUnicorn from 'eslint-plugin-unicorn'\nimport globals from 'globals'\nimport type {TSESLint} from '@typescript-eslint/utils'\n\nexport const unicornRules: TSESLint.FlatConfig.Config = {\n languageOptions: {\n globals: {\n ...globals.builtin,\n },\n },\n plugins: {\n unicorn: eslintPluginUnicorn,\n },\n rules: {\n 'unicorn/better-regex': 'error',\n 'unicorn/catch-error-name': 'error',\n 'unicorn/consistent-date-clone': 'error',\n 'unicorn/consistent-destructuring': 'error',\n 'unicorn/escape-case': 'error',\n 'unicorn/no-array-for-each': 'error',\n 'unicorn/no-array-reduce': 'error',\n 'unicorn/no-await-in-promise-methods': 'error',\n 'unicorn/no-invalid-remove-event-listener': 'error',\n 'unicorn/no-new-array': 'error',\n 'unicorn/no-new-buffer': 'error',\n 'unicorn/no-object-as-default-parameter': 'error',\n 'unicorn/no-single-promise-in-promise-methods': 'error',\n 'unicorn/no-unnecessary-await': 'error',\n 'unicorn/no-unreadable-iife': 'error',\n 'unicorn/no-useless-collection-argument': 'error',\n 'unicorn/no-useless-error-capture-stack-trace': 'error',\n 'unicorn/no-useless-fallback-in-spread': 'error',\n 'unicorn/no-useless-promise-resolve-reject': 'error',\n 'unicorn/no-useless-spread': 'error',\n 'unicorn/no-useless-switch-case': 'error',\n 'unicorn/number-literal-case': 'error',\n 'unicorn/numeric-separators-style': 'error',\n 'unicorn/prefer-array-find': 'error',\n 'unicorn/prefer-array-flat': 'error',\n 'unicorn/prefer-array-flat-map': 'error',\n 'unicorn/prefer-array-index-of': 'error',\n 'unicorn/prefer-array-some': 'error',\n 'unicorn/prefer-bigint-literals': 'error',\n 'unicorn/prefer-blob-reading-methods': 'error',\n 'unicorn/prefer-date-now': 'error',\n 'unicorn/prefer-import-meta-properties': 'error',\n 'unicorn/prefer-includes': 'error',\n 'unicorn/prefer-logical-operator-over-ternary': 'error',\n 'unicorn/prefer-number-properties': 'error',\n 'unicorn/prefer-object-from-entries': 'error',\n 'unicorn/prefer-optional-catch-binding': 'error',\n 'unicorn/prefer-prototype-methods': 'error',\n 'unicorn/prefer-response-static-json': 'error',\n 'unicorn/prefer-set-has': 'error',\n 'unicorn/prefer-set-size': 'error',\n 'unicorn/prefer-string-raw': 'error',\n 'unicorn/prefer-string-replace-all': 'error',\n 'unicorn/prefer-string-starts-ends-with': 'error',\n 'unicorn/prefer-string-trim-start-end': 'error',\n 'unicorn/prefer-structured-clone': 'error',\n 'unicorn/prefer-switch': 'error',\n 'unicorn/require-module-attributes': 'error',\n 'unicorn/require-module-specifiers': 'error',\n 'unicorn/template-indent': 'error',\n },\n}\n","import eslint from '@eslint/js'\nimport react from 'eslint-plugin-react'\nimport stylistic from '@stylistic/eslint-plugin'\nimport typescript from 'typescript-eslint'\nimport {customRules} from './main/customRules'\nimport {generalRules} from './main/generalRules'\nimport {ignores} from './main/ignores'\nimport {languageOptions} from './main/languageOptions'\nimport {perfectionistRules} from './main/perfectionistRules'\nimport {reactHooks} from './main/reactHooks'\nimport {stylisticRules} from './main/stylisticRules'\nimport {typescriptRules} from './main/typescriptRules'\nimport {unicornRules} from './main/unicornRules'\nimport type {TSESLint} from '@typescript-eslint/utils'\n\nexport const config: TSESLint.FlatConfig.ConfigArray = [\n ignores,\n languageOptions,\n //////////////////////////////////////////////////////////////////////////////\n eslint.configs.recommended,\n react.configs.flat.recommended,\n stylistic.configs.recommended,\n ...typescript.configs.recommended,\n ...typescript.configs.stylistic,\n //////////////////////////////////////////////////////////////////////////////\n customRules,\n generalRules,\n perfectionistRules,\n reactHooks,\n stylisticRules,\n typescriptRules,\n unicornRules,\n]\n"],"names":["getLineIndent","buildMultilineFix","defaultOptions","node","messageIds","isSingleLineStatement","checkObjectExpression","isExempt","getParens","getFunctionName","checkFunction","getBraces","toPascalCase","createImportFix","result","createReExportFix","attributes","checkAlphabeticalSorting","checkGroupOrdering","areSpecifiersSorted","checkSpecifiersSorting","createFixForGroup","globals"],"mappings":";;;;;;;;AAEO,SAASA,gBACd,YACA,MACQ;AACR,QAAM,OAAO,WAAW,QAAA;AACxB,QAAM,QAAQ,KAAK,MAAM,IAAI;AAC7B,QAAM,WAAW,MAAM,OAAO,CAAC,KAAK;AACpC,QAAM,QAAQ,SAAS,MAAM,QAAQ;AACrC,SAAO,QAAQ,CAAC,KAAK;AACvB;ACNO,SAASC,oBACd,OACA,UACA,UACA,YACkB;AAClB,QAAM,cAAc,SAAS,eAAe,IAAI,MAAM;AACtD,QAAM,aAAaD,gBAAc,YAAY,WAAW;AACxD,QAAM,aAAa,aAAa;AAEhC,QAAM,kBAAkB,SACrB,OAAO,CAAC,OAA4B,OAAO,IAAI;AAElD,QAAM,iBAAiB,gBACpB,IAAI,CAAA,YAAW;AACd,UAAM,OAAO,WAAW,QAAQ,OAAO;AACvC,WAA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