@d3lm/lint-preset 1.0.1 → 1.1.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/README.md +4 -3
- package/dist/{chunk-6BKFZQBT.js → chunk-2FOICQKT.js} +8 -8
- package/dist/chunk-2FOICQKT.js.map +1 -0
- package/dist/{chunk-4SIRQMJX.cjs → chunk-Z6QEJITH.cjs} +8 -8
- package/dist/chunk-Z6QEJITH.cjs.map +1 -0
- package/dist/eslint.cjs +9 -9
- package/dist/eslint.js +1 -1
- package/dist/oxlint.cjs +5 -5
- package/dist/oxlint.js +1 -1
- package/dist/rules.cjs +11 -0
- package/dist/rules.cjs.map +1 -1
- package/dist/rules.js +11 -0
- package/dist/rules.js.map +1 -1
- package/package.json +14 -13
- package/dist/chunk-4SIRQMJX.cjs.map +0 -1
- package/dist/chunk-6BKFZQBT.js.map +0 -1
package/dist/rules.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/rules/block-scoped-case.ts","../src/rules/comment-preceding-blank-line.ts","../src/rules/comment-syntax.ts","../src/rules/newline-around-multiline.ts","../src/rules/no-implicit-object-return.ts","../src/rules/index.ts"],"sourcesContent":["import type { Rule } from 'eslint';\n\nconst leadingWhitespace = (line: string) => /^[ \\t]*/.exec(line)?.[0].length ?? 0;\n\nconst rule: Rule.RuleModule = {\n meta: {\n type: 'suggestion',\n docs: {\n description: 'Require case clauses to use block scope (braces).',\n },\n fixable: 'code',\n schema: [],\n messages: {\n missingBlock: 'Case clause should be wrapped in a block (braces).',\n },\n },\n create(context) {\n const sourceCode = context.sourceCode;\n\n return {\n SwitchCase(node) {\n const { consequent } = node;\n\n if (consequent.length === 0) {\n return;\n }\n\n // already wrapped in a single BlockStatement\n if (consequent.length === 1 && consequent[0].type === 'BlockStatement') {\n return;\n }\n\n context.report({\n node,\n messageId: 'missingBlock',\n fix(fixer) {\n const caseKeyword = sourceCode.getFirstToken(node);\n\n if (!caseKeyword) {\n return [];\n }\n\n const colonToken = sourceCode.getTokenAfter(\n node.test ? (node.test as Rule.Node) : caseKeyword,\n (token) => token.value === ':',\n );\n\n if (!colonToken) {\n return [];\n }\n\n const lastConsequent = consequent.at(-1);\n const lastToken = sourceCode.getLastToken(lastConsequent as Rule.Node);\n\n if (!lastToken) {\n return [];\n }\n\n const caseIndent = ' '.repeat(caseKeyword.loc.start.column);\n const bodyIndent = caseIndent + ' ';\n\n const text = sourceCode.getText();\n const bodyText = text.slice(colonToken.range[1], lastToken.range[1]);\n\n const lines = bodyText.split('\\n');\n\n /**\n * Lines after the colon line keep their relative nesting; we only shift\n * them so the shallowest one lands at the desired body indent.\n */\n const restLines = lines.slice(1);\n const restIndents = restLines.filter((line) => line.trim() !== '').map((line) => leadingWhitespace(line));\n const indentDelta = restIndents.length > 0 ? bodyIndent.length - Math.min(...restIndents) : 0;\n\n const bodyLines: string[] = [];\n\n // code sharing the colon line (e.g. `case 1: foo()`) must be preserved\n const firstLine = lines[0].trim();\n\n if (firstLine) {\n bodyLines.push(bodyIndent + firstLine);\n }\n\n for (const line of restLines) {\n if (line.trim() === '') {\n bodyLines.push('');\n continue;\n }\n\n const lead = leadingWhitespace(line);\n const newIndent = Math.max(0, lead + indentDelta);\n\n bodyLines.push(' '.repeat(newIndent) + line.slice(lead));\n }\n\n while (bodyLines.length > 0 && bodyLines[0] === '') {\n bodyLines.shift();\n }\n\n while (bodyLines.length > 0 && bodyLines.at(-1) === '') {\n bodyLines.pop();\n }\n\n const result = ` {\\n${bodyLines.join('\\n')}\\n${caseIndent}}`;\n\n return fixer.replaceTextRange([colonToken.range[1], lastToken.range[1]], result);\n },\n });\n },\n };\n },\n};\n\nexport default rule;\n","import type { Rule } from 'eslint';\n\ninterface Comment {\n type: string;\n value: string;\n range?: [number, number];\n loc?: Rule.Node['loc'];\n}\n\ninterface RuleOptions {\n allowInObjects?: boolean;\n allowInArrays?: boolean;\n allowInInterfaces?: boolean;\n}\n\nconst rule: Rule.RuleModule = {\n meta: {\n type: 'layout',\n docs: {\n description:\n 'Require a blank line before comments, with an exception for comments inside chained member-call expressions.',\n },\n fixable: 'whitespace',\n schema: [\n {\n type: 'object',\n properties: {\n allowInObjects: {\n type: 'boolean',\n },\n allowInArrays: {\n type: 'boolean',\n },\n allowInInterfaces: {\n type: 'boolean',\n },\n },\n additionalProperties: false,\n },\n ],\n messages: {\n missingBlankLine: 'Expected blank line before comment.',\n },\n },\n create(context) {\n const sourceCode = context.sourceCode;\n\n const options = (context.options[0] as RuleOptions | undefined) ?? {};\n\n const allowInObjects = options.allowInObjects ?? false;\n const allowInArrays = options.allowInArrays ?? false;\n const allowInInterfaces = options.allowInInterfaces ?? false;\n\n function isChainedCallContext(comment: Comment): boolean {\n if (!comment.range) {\n return false;\n }\n\n let current = (sourceCode.getNodeByRangeIndex(comment.range[0]) ?? undefined) as Rule.Node | undefined;\n\n while (current?.type === 'CallExpression' || current?.type === 'MemberExpression') {\n if (current.type === 'CallExpression' && current.callee.type === 'MemberExpression') {\n return true;\n }\n\n current = current.parent as Rule.Node | undefined;\n }\n\n return false;\n }\n\n function isCommentAllowedByEnclosure(comment: Comment): boolean {\n if (!comment.range) {\n return false;\n }\n\n const node = sourceCode.getNodeByRangeIndex(comment.range[0]) as Rule.Node | null;\n\n if (!node) {\n return false;\n }\n\n // TS-specific node types aren't part of the ESTree `Rule.Node` union\n const type = node.type as string;\n\n if (allowInObjects && (type === 'ObjectExpression' || type === 'ObjectPattern')) {\n return true;\n }\n\n if (allowInArrays && (type === 'ArrayExpression' || type === 'ArrayPattern')) {\n return true;\n }\n\n if (allowInInterfaces && (type === 'TSInterfaceBody' || type === 'TSTypeLiteral')) {\n return true;\n }\n\n return false;\n }\n\n function isAtBlockStart(comment: Comment): boolean {\n const tokenBefore = sourceCode.getTokenBefore(comment as unknown as Rule.Node, {\n includeComments: false,\n });\n\n if (!tokenBefore) {\n return true;\n }\n\n return ['{', '(', '['].includes(tokenBefore.value);\n }\n\n return {\n Program() {\n const comments = sourceCode.getAllComments();\n\n for (const comment of comments) {\n if (!comment.loc || !comment.range) {\n continue;\n }\n\n const commentLine = comment.loc.start.line;\n\n if (commentLine <= 1) {\n continue;\n }\n\n if (isAtBlockStart(comment)) {\n continue;\n }\n\n if (isChainedCallContext(comment)) {\n continue;\n }\n\n if (isCommentAllowedByEnclosure(comment)) {\n continue;\n }\n\n const tokenBefore = sourceCode.getTokenBefore(comment as unknown as Rule.Node, {\n includeComments: true,\n });\n\n if (!tokenBefore?.loc) {\n continue;\n }\n\n const linesBetween = commentLine - tokenBefore.loc.end.line;\n\n if (linesBetween >= 2) {\n continue;\n }\n\n if (linesBetween === 0) {\n continue;\n }\n\n /*\n * Insert the blank line before the comment's leading indentation so the\n * comment keeps its position instead of being dedented.\n */\n const commentStart = comment.range[0];\n const lineStart = sourceCode.getText().lastIndexOf('\\n', commentStart - 1) + 1;\n\n context.report({\n loc: comment.loc,\n messageId: 'missingBlankLine',\n fix(fixer) {\n return fixer.insertTextBeforeRange([lineStart, lineStart], '\\n');\n },\n });\n }\n },\n };\n },\n};\n\nexport default rule;\n","import type { AST, Rule } from 'eslint';\n\ninterface CommentLike {\n readonly type: string;\n readonly value: string;\n readonly range?: [number, number];\n readonly loc?: Rule.Node['loc'];\n}\n\ninterface LineOptions {\n readonly requireLeadingSpace: boolean;\n readonly requireLowercase: boolean;\n readonly forbidTrailingPunctuation: boolean;\n readonly allowedEndings: readonly string[];\n}\n\ninterface BlockOptions {\n readonly requireCapital: boolean;\n readonly requireTrailingPunctuation: boolean;\n readonly enforceOpening: boolean;\n readonly enforceClosing: boolean;\n readonly requireSpaceAfterStar: boolean;\n readonly requireParagraphCapital: boolean;\n readonly paragraphEndings: readonly string[];\n readonly requireJSDocSpacing: boolean;\n readonly enforceParamStyle: boolean;\n}\n\ninterface ResolvedOptions {\n readonly ignoredWords: ReadonlySet<string>;\n readonly ignoredPatterns: readonly RegExp[];\n readonly ignoreUrls: boolean;\n readonly ignoreDirectives: boolean;\n readonly line: LineOptions;\n readonly block: BlockOptions;\n}\n\ntype MessageId =\n | 'lineLeadingSpace'\n | 'lineLowercase'\n | 'lineTrailingPunctuation'\n | 'blockCapital'\n | 'blockTrailingPunctuation'\n | 'blockSingleLineJSDoc'\n | 'blockOpening'\n | 'blockClosing'\n | 'blockEmptyLineBeforeClose'\n | 'blockLineSpaceAfterStar'\n | 'blockParagraphCapital'\n | 'blockParagraphEnding'\n | 'blockJSDocBlankLine'\n | 'paramMissingDash'\n | 'paramDescriptionPeriod';\n\ntype AnyComment = CommentLike | AST.Token;\n\nconst URL_PATTERN = /\\bhttps?:\\/\\//;\n\nconst DIRECTIVE_PATTERN =\n /^\\s*(?:eslint(?:-[a-z-]+)?\\b|@ts-[a-z-]+|@(?:jsx|jsxFrag|jsxImportSource|jsxRuntime)\\b|istanbul\\s|c8\\s|v8\\s|prettier-ignore\\b|stylelint-[a-z-]+|webpack[A-Z][a-zA-Z]*|#(?:region|endregion)\\b|type\\s*:)/;\n\nconst TAG_PATTERN = /^\\s*(?:TODO|FIXME|HACK|NOTE|BUG|XXX|SAFETY|WARNING|INFO|OPTIMIZE|REVIEW|PERF|DEPRECATED)\\b/i;\n\nconst FIRST_WORD_PATTERN = /^\\s*([A-Za-z_$][\\w$]*)/;\nconst ALL_CAPS_WORD = /^[A-Z][A-Z0-9_]*$/;\n\nconst JSDOC_TAG_LINE = /^\\s*\\*\\s*@[A-Za-z]/;\nconst SINGLE_LINE_JSDOC_TAG = /^@[A-Za-z][\\w-]*$/;\nconst PARAM_DESC_RE = /^@param\\s+(?:\\{[^}]*\\}\\s+)?(\\S+)\\s+(.*\\S)\\s*$/;\nconst BLOCK_LINE_WITH_TEXT = /^(\\s*\\*)(\\s*)(\\S.*?)\\s*$/;\nconst BLOCK_LINE_EMPTY = /^\\s*\\*\\s*$/;\nconst CODE_FENCE_LINE = /^\\s*\\*\\s*```/;\n\nconst DEFAULT_LINE_ENDINGS = Object.freeze(['etc.', '...', 'e.g.', 'i.e.']);\nconst DEFAULT_PARAGRAPH_ENDINGS = Object.freeze(['.', '!', '?', ':', ';', '`', ')', ']', '}']);\n\nconst DEFAULT_OPTIONS: ResolvedOptions = {\n ignoredWords: new Set<string>(),\n ignoredPatterns: [],\n ignoreUrls: true,\n ignoreDirectives: true,\n line: {\n requireLeadingSpace: true,\n requireLowercase: true,\n forbidTrailingPunctuation: true,\n allowedEndings: DEFAULT_LINE_ENDINGS,\n },\n block: {\n requireCapital: true,\n requireTrailingPunctuation: true,\n enforceOpening: false,\n enforceClosing: false,\n requireSpaceAfterStar: true,\n requireParagraphCapital: true,\n paragraphEndings: DEFAULT_PARAGRAPH_ENDINGS,\n requireJSDocSpacing: true,\n enforceParamStyle: true,\n },\n};\n\nfunction isUpperCase(char: string): boolean {\n return char !== char.toLowerCase() && char === char.toUpperCase();\n}\n\nfunction isLowerCase(char: string): boolean {\n return char !== char.toUpperCase() && char === char.toLowerCase();\n}\n\nfunction isTrailingPunctuation(char: string): boolean {\n return char === '.' || char === '!' || char === '?' || char === ';' || char === ':';\n}\n\nfunction isBlockEndingPunctuation(char: string): boolean {\n return (\n char === '.' ||\n char === '!' ||\n char === '?' ||\n char === ';' ||\n char === ':' ||\n char === ')' ||\n char === ']' ||\n char === '}' ||\n char === '`' ||\n char === '>'\n );\n}\n\nfunction indexOfLastNonSpace(value: string): number {\n for (let index = value.length - 1; index >= 0; index -= 1) {\n const char = value.codePointAt(index);\n\n if (char !== 0x20 && char !== 0x09 && char !== 0x0a && char !== 0x0d) {\n return index;\n }\n }\n\n return -1;\n}\n\nfunction endsWithAny(value: string, endings: readonly string[]): boolean {\n for (const ending of endings) {\n if (value.endsWith(ending)) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction resolveOptions(raw: unknown): ResolvedOptions {\n if (!raw || typeof raw !== 'object') {\n return DEFAULT_OPTIONS;\n }\n\n const input = raw as Record<string, unknown>;\n const line = (input.line ?? {}) as Partial<LineOptions>;\n const block = (input.block ?? {}) as Partial<BlockOptions>;\n\n const patterns = Array.isArray(input.ignoredPatterns)\n ? (input.ignoredPatterns as string[]).map((source) => new RegExp(source))\n : DEFAULT_OPTIONS.ignoredPatterns;\n\n return {\n ignoredWords: new Set(Array.isArray(input.ignoredWords) ? (input.ignoredWords as string[]) : []),\n ignoredPatterns: patterns,\n ignoreUrls: (input.ignoreUrls as boolean | undefined) ?? DEFAULT_OPTIONS.ignoreUrls,\n ignoreDirectives: (input.ignoreDirectives as boolean | undefined) ?? DEFAULT_OPTIONS.ignoreDirectives,\n line: { ...DEFAULT_OPTIONS.line, ...line },\n block: { ...DEFAULT_OPTIONS.block, ...block },\n };\n}\n\nfunction shouldSkipComment(value: string, options: ResolvedOptions): boolean {\n const trimmed = value.trim();\n\n if (!trimmed) {\n return true;\n }\n\n if (options.ignoreDirectives && (DIRECTIVE_PATTERN.test(trimmed) || TAG_PATTERN.test(trimmed))) {\n return true;\n }\n\n if (options.ignoreUrls && URL_PATTERN.test(trimmed)) {\n return true;\n }\n\n for (const pattern of options.ignoredPatterns) {\n if (pattern.test(trimmed)) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction checkLineComment(context: Rule.RuleContext, comment: AnyComment, options: ResolvedOptions): void {\n const { line } = options;\n const raw = comment.value;\n const loc = comment.loc;\n const range = comment.range;\n\n if (!loc || !range) {\n return;\n }\n\n const rangeStart = range[0];\n\n if (line.requireLeadingSpace && raw.length > 0) {\n const first = raw.codePointAt(0);\n\n // allow \"///\" banner comments and tab-indented comments\n if (first !== 0x20 && first !== 0x2f && first !== 0x09) {\n context.report({\n loc,\n messageId: 'lineLeadingSpace',\n fix: (fixer) => fixer.insertTextAfterRange([rangeStart, rangeStart + 2], ' '),\n });\n }\n }\n\n const trimmed = raw.trim();\n\n if (!trimmed) {\n return;\n }\n\n const firstWordMatch = FIRST_WORD_PATTERN.exec(trimmed);\n\n if (firstWordMatch && line.requireLowercase) {\n const word = firstWordMatch[1];\n const firstChar = word[0];\n\n if (isUpperCase(firstChar) && !ALL_CAPS_WORD.test(word) && !options.ignoredWords.has(word)) {\n context.report({\n loc,\n messageId: 'lineLowercase',\n fix: (fixer) => {\n const offset = rangeStart + 2 + raw.indexOf(firstChar);\n\n return fixer.replaceTextRange([offset, offset + 1], firstChar.toLowerCase());\n },\n });\n }\n }\n\n if (line.forbidTrailingPunctuation && !endsWithAny(trimmed, line.allowedEndings)) {\n const lastChar = trimmed.at(-1) ?? '';\n\n if (isTrailingPunctuation(lastChar)) {\n context.report({\n loc,\n messageId: 'lineTrailingPunctuation',\n fix: (fixer) => {\n const offset = rangeStart + 2 + indexOfLastNonSpace(raw);\n\n return fixer.removeRange([offset, offset + 1]);\n },\n });\n }\n }\n}\n\nfunction checkSingleLineBlock(context: Rule.RuleContext, comment: AnyComment, options: ResolvedOptions): void {\n const { block } = options;\n const raw = comment.value;\n const loc = comment.loc;\n const range = comment.range;\n\n if (!loc || !range) {\n return;\n }\n\n const trimmed = raw.trim();\n\n if (!trimmed) {\n return;\n }\n\n if (raw.startsWith('*')) {\n const inner = raw.slice(1).trim();\n\n if (!inner) {\n return;\n }\n\n if (SINGLE_LINE_JSDOC_TAG.test(inner)) {\n return;\n }\n\n const sourceCode = context.sourceCode;\n const sourceLine = sourceCode.lines[loc.start.line - 1] ?? '';\n const prefix = sourceLine.slice(0, loc.start.column);\n const canFix = /^\\s*$/.test(prefix);\n\n context.report({\n loc,\n messageId: 'blockSingleLineJSDoc',\n fix: canFix ? (fixer) => fixer.replaceTextRange(range, `/**\\n${prefix} * ${inner}\\n${prefix} */`) : undefined,\n });\n\n return;\n }\n\n const rangeStart = range[0];\n const firstWordMatch = FIRST_WORD_PATTERN.exec(trimmed);\n\n if (firstWordMatch && block.requireCapital) {\n const word = firstWordMatch[1];\n const firstChar = word[0];\n\n if (isLowerCase(firstChar) && !ALL_CAPS_WORD.test(word) && !options.ignoredWords.has(word)) {\n context.report({\n loc,\n messageId: 'blockCapital',\n fix: (fixer) => {\n const offset = rangeStart + 2 + raw.indexOf(firstChar);\n\n return fixer.replaceTextRange([offset, offset + 1], firstChar.toUpperCase());\n },\n });\n }\n }\n\n if (block.requireTrailingPunctuation) {\n const lastChar = trimmed.at(-1) ?? '';\n\n if (!isBlockEndingPunctuation(lastChar)) {\n context.report({\n loc,\n messageId: 'blockTrailingPunctuation',\n fix: (fixer) => {\n const offset = rangeStart + 2 + indexOfLastNonSpace(raw);\n\n return fixer.insertTextAfterRange([offset, offset + 1], '.');\n },\n });\n }\n }\n}\n\nfunction offsetOfLine(comment: AnyComment, lines: readonly string[], lineIndex: number): number {\n const range = comment.range;\n\n if (!range) {\n return 0;\n }\n\n // base = range start + length of `/*`, then cumulative line lengths plus their '\\n' separators\n let offset = range[0] + 2;\n\n for (let index = 0; index < lineIndex; index += 1) {\n offset += lines[index].length + 1;\n }\n\n return offset;\n}\n\nfunction skipParagraphFirstWord(text: string, options: ResolvedOptions): boolean {\n const match = FIRST_WORD_PATTERN.exec(text);\n\n if (!match) {\n return true;\n }\n\n const word = match[1];\n\n return ALL_CAPS_WORD.test(word) || options.ignoredWords.has(word);\n}\n\nfunction reportParagraphEnding(\n context: Rule.RuleContext,\n comment: AnyComment,\n text: string,\n options: ResolvedOptions,\n): void {\n const { block } = options;\n const loc = comment.loc;\n\n if (!loc) {\n return;\n }\n\n for (const ending of block.paragraphEndings) {\n if (text.endsWith(ending)) {\n return;\n }\n }\n\n context.report({\n loc,\n messageId: 'blockParagraphEnding',\n data: { endings: `[${block.paragraphEndings.join(' ')}]` },\n });\n}\n\nfunction checkParameterLine(\n context: Rule.RuleContext,\n comment: AnyComment,\n lines: readonly string[],\n lineIndex: number,\n text: string,\n starSegment: string,\n spaces: string,\n): void {\n const loc = comment.loc;\n\n if (!loc) {\n return;\n }\n\n const match = PARAM_DESC_RE.exec(text);\n\n if (!match) {\n return;\n }\n\n const descPart = match[2];\n const textStart = offsetOfLine(comment, lines, lineIndex) + starSegment.length + spaces.length;\n\n if (!descPart.startsWith('- ')) {\n const prefixMatch = /^@param\\s+(?:\\{[^}]*\\}\\s+)?\\S+\\s+/.exec(text);\n\n if (!prefixMatch) {\n return;\n }\n\n const descStartOffset = textStart + prefixMatch[0].length;\n\n context.report({\n loc,\n messageId: 'paramMissingDash',\n fix: (fixer) => fixer.insertTextBeforeRange([descStartOffset, descStartOffset + 1], '- '),\n });\n\n return;\n }\n\n const description = descPart.slice(2).trim();\n\n if (!description) {\n return;\n }\n\n if (!description.endsWith('.')) {\n const textEndOffset = textStart + text.length;\n\n context.report({\n loc,\n messageId: 'paramDescriptionPeriod',\n fix: (fixer) => fixer.insertTextAfterRange([textEndOffset - 1, textEndOffset], '.'),\n });\n }\n}\n\nfunction checkMultiLineBlock(context: Rule.RuleContext, comment: AnyComment, options: ResolvedOptions): void {\n const { block } = options;\n const loc = comment.loc;\n const range = comment.range;\n\n if (!loc || !range) {\n return;\n }\n\n const lines = comment.value.split('\\n');\n const firstLine = lines[0];\n const lastLine = lines.at(-1) ?? '';\n\n if (block.enforceOpening) {\n const opening = firstLine.trim();\n\n if (opening !== '' && opening !== '*') {\n context.report({ loc, messageId: 'blockOpening' });\n\n return;\n }\n }\n\n if (block.enforceClosing) {\n if (lastLine.trim() !== '') {\n context.report({ loc, messageId: 'blockClosing' });\n\n return;\n }\n\n if (lines.length >= 3 && BLOCK_LINE_EMPTY.test(lines.at(-2) ?? '')) {\n context.report({ loc, messageId: 'blockEmptyLineBeforeClose' });\n }\n }\n\n let insideCodeBlock = false;\n let paragraphStart = true;\n let previousText: string | undefined;\n\n for (let index = 1; index < lines.length - 1; index += 1) {\n const line = lines[index];\n\n if (CODE_FENCE_LINE.test(line)) {\n insideCodeBlock = !insideCodeBlock;\n paragraphStart = true;\n previousText = undefined;\n\n continue;\n }\n\n if (insideCodeBlock) {\n continue;\n }\n\n if (BLOCK_LINE_EMPTY.test(line)) {\n if (previousText !== undefined && block.requireParagraphCapital) {\n reportParagraphEnding(context, comment, previousText, options);\n }\n\n paragraphStart = true;\n previousText = undefined;\n\n continue;\n }\n\n const match = BLOCK_LINE_WITH_TEXT.exec(line);\n\n if (!match) {\n continue;\n }\n\n const [, starSegment, spaces, text] = match;\n\n if (block.requireSpaceAfterStar && spaces.length === 0) {\n const lineOffset = offsetOfLine(comment, lines, index);\n const starEnd = lineOffset + starSegment.length;\n\n context.report({\n loc,\n messageId: 'blockLineSpaceAfterStar',\n fix: (fixer) => fixer.insertTextAfterRange([starEnd - 1, starEnd], ' '),\n });\n\n continue;\n }\n\n if (block.requireJSDocSpacing && JSDOC_TAG_LINE.test(line) && previousText !== undefined) {\n const previousLine = lines[index - 1];\n\n if (!BLOCK_LINE_EMPTY.test(previousLine) && !JSDOC_TAG_LINE.test(previousLine)) {\n context.report({ loc, messageId: 'blockJSDocBlankLine' });\n }\n }\n\n if (paragraphStart && block.requireParagraphCapital && !JSDOC_TAG_LINE.test(line)) {\n const firstChar = text[0];\n\n if (firstChar && isLowerCase(firstChar) && !skipParagraphFirstWord(text, options)) {\n const lineOffset = offsetOfLine(comment, lines, index);\n const charOffset = lineOffset + starSegment.length + spaces.length;\n\n context.report({\n loc,\n messageId: 'blockParagraphCapital',\n fix: (fixer) => fixer.replaceTextRange([charOffset, charOffset + 1], firstChar.toUpperCase()),\n });\n }\n }\n\n paragraphStart = false;\n\n if (block.enforceParamStyle && /^@param\\s/.test(text)) {\n checkParameterLine(context, comment, lines, index, text, starSegment, spaces);\n previousText = undefined;\n } else {\n previousText = text;\n }\n }\n\n if (previousText !== undefined && block.requireParagraphCapital) {\n reportParagraphEnding(context, comment, previousText, options);\n }\n}\n\nconst messages: Record<MessageId, string> = {\n lineLeadingSpace: 'Line comment should start with a space.',\n lineLowercase: 'Line comment should start with a lowercase letter.',\n lineTrailingPunctuation: 'Line comment should not end with punctuation.',\n blockCapital: 'Block comment should start with an uppercase letter.',\n blockTrailingPunctuation: 'Block comment should end with punctuation.',\n blockSingleLineJSDoc: 'JSDoc-style block comments (/** ... */) must span multiple lines.',\n blockOpening: \"Block comment should start with '/**\\\\n *' (or '/*\\\\n *').\",\n blockClosing: \"Block comment should end with '\\\\n */'.\",\n blockEmptyLineBeforeClose: 'Block comment should not end with an empty line.',\n blockLineSpaceAfterStar: \"Each line of a block comment requires a space after '*'.\",\n blockParagraphCapital: 'Paragraph should start with an uppercase letter.',\n blockParagraphEnding: 'Paragraph should end with one of {{endings}}.',\n blockJSDocBlankLine: 'Insert a blank line before JSDoc tags.',\n paramMissingDash: \"@param should use ' - ' between name and description.\",\n paramDescriptionPeriod: '@param description should end with a period.',\n};\n\nconst rule: Rule.RuleModule = {\n meta: {\n type: 'suggestion',\n docs: {\n description:\n 'Enforce comment casing, punctuation, and JSDoc/paragraph structure for line, single-line block, and multi-line block comments.',\n },\n fixable: 'code',\n schema: [\n {\n type: 'object',\n additionalProperties: false,\n properties: {\n ignoredWords: {\n type: 'array',\n items: { type: 'string' },\n uniqueItems: true,\n },\n ignoredPatterns: {\n type: 'array',\n items: { type: 'string' },\n uniqueItems: true,\n },\n ignoreUrls: { type: 'boolean' },\n ignoreDirectives: { type: 'boolean' },\n line: {\n type: 'object',\n additionalProperties: false,\n properties: {\n requireLeadingSpace: { type: 'boolean' },\n requireLowercase: { type: 'boolean' },\n forbidTrailingPunctuation: { type: 'boolean' },\n allowedEndings: {\n type: 'array',\n items: { type: 'string' },\n uniqueItems: true,\n },\n },\n },\n block: {\n type: 'object',\n additionalProperties: false,\n properties: {\n requireCapital: { type: 'boolean' },\n requireTrailingPunctuation: { type: 'boolean' },\n enforceOpening: { type: 'boolean' },\n enforceClosing: { type: 'boolean' },\n requireSpaceAfterStar: { type: 'boolean' },\n requireParagraphCapital: { type: 'boolean' },\n paragraphEndings: {\n type: 'array',\n items: { type: 'string' },\n uniqueItems: true,\n },\n requireJSDocSpacing: { type: 'boolean' },\n enforceParamStyle: { type: 'boolean' },\n },\n },\n },\n },\n ],\n messages,\n },\n create(context) {\n const sourceCode = context.sourceCode;\n const options = resolveOptions(context.options[0]);\n\n return {\n Program() {\n const comments = sourceCode.getAllComments();\n\n for (const comment of comments) {\n if (shouldSkipComment(comment.value, options)) {\n continue;\n }\n\n if (comment.type === 'Line') {\n checkLineComment(context, comment, options);\n\n continue;\n }\n\n if (comment.value.includes('\\n')) {\n checkMultiLineBlock(context, comment, options);\n } else {\n checkSingleLineBlock(context, comment, options);\n }\n }\n },\n };\n },\n};\n\nexport default rule;\n","import type { Rule } from 'eslint';\n\nfunction isAlwaysPadded(node: Rule.Node) {\n /*\n * Class methods and static blocks always get blank lines between\n * siblings, even when single-line, so they never feel crammed together.\n */\n return node.type === 'MethodDefinition' || node.type === 'StaticBlock';\n}\n\nfunction isImportOrExport(node: Rule.Node) {\n /*\n * Imports and re-exports are grouped together with no blank lines between\n * them, so this rule ignores them entirely, both as a subject and as a\n * neighbor. Declared exports (export const/function/class) still pad like\n * regular code, since they contain real multiline bodies.\n */\n if (node.type === 'ImportDeclaration' || node.type === 'ExportAllDeclaration') {\n return true;\n }\n\n return node.type === 'ExportNamedDeclaration' && !node.declaration;\n}\n\nconst rule: Rule.RuleModule = {\n meta: {\n type: 'layout',\n docs: {\n description:\n 'Require blank lines around multiline statements, class methods, static blocks, and switch case bodies.',\n },\n fixable: 'whitespace',\n schema: [],\n messages: {\n missingBlankBefore: 'Expected blank line before this.',\n missingBlankAfter: 'Expected blank line after this.',\n },\n },\n create(context) {\n const sourceCode = context.sourceCode;\n\n function checkBody(body: Rule.Node[], options: { alwaysPadMembers?: boolean } = {}) {\n for (let index = 0; index < body.length; index++) {\n const node = body[index];\n\n if (!node.loc || isImportOrExport(node)) {\n continue;\n }\n\n const isMultiline = node.loc.start.line !== node.loc.end.line;\n const forceByKind = options.alwaysPadMembers === true && isAlwaysPadded(node);\n const needsPadding = isMultiline || forceByKind;\n\n if (!needsPadding) {\n continue;\n }\n\n if (index > 0) {\n const previous = body[index - 1];\n\n if (previous.loc && !isImportOrExport(previous)) {\n const linesBetween = node.loc.start.line - previous.loc.end.line;\n\n if (linesBetween < 2) {\n context.report({\n node,\n messageId: 'missingBlankBefore',\n fix(fixer) {\n const previousToken = sourceCode.getLastToken(previous);\n\n if (!previousToken) {\n return null;\n }\n\n return fixer.insertTextAfter(previousToken, '\\n');\n },\n });\n }\n }\n }\n\n if (index < body.length - 1) {\n const next = body[index + 1];\n\n if (next.loc && !isImportOrExport(next)) {\n const linesBetween = next.loc.start.line - node.loc.end.line;\n\n if (linesBetween < 2) {\n context.report({\n node,\n messageId: 'missingBlankAfter',\n fix(fixer) {\n const lastToken = sourceCode.getLastToken(node);\n\n if (!lastToken) {\n return null;\n }\n\n return fixer.insertTextAfter(lastToken, '\\n');\n },\n });\n }\n }\n }\n }\n }\n\n return {\n Program(node) {\n checkBody(node.body as Rule.Node[]);\n },\n BlockStatement(node) {\n checkBody(node.body as Rule.Node[]);\n },\n StaticBlock(node) {\n checkBody(node.body as Rule.Node[]);\n },\n SwitchCase(node) {\n checkBody(node.consequent as Rule.Node[]);\n },\n ClassBody(node) {\n checkBody(node.body as Rule.Node[], { alwaysPadMembers: true });\n },\n };\n },\n};\n\nexport default rule;\n","import type { Rule } from 'eslint';\n\nconst rule: Rule.RuleModule = {\n meta: {\n type: 'suggestion',\n docs: {\n description:\n 'Disallow returning an object literal from an arrow function concise body (e.g. `() => ({})`); require a block body with an explicit return.',\n },\n fixable: 'code',\n schema: [],\n messages: {\n implicitObjectReturn:\n 'Avoid returning an object literal directly from an arrow function; use a block body with an explicit return.',\n },\n },\n create(context) {\n const sourceCode = context.sourceCode;\n\n return {\n ArrowFunctionExpression(node) {\n const body = node.body;\n\n // only concise bodies that resolve straight to an object literal\n if (!node.expression || body.type !== 'ObjectExpression') {\n return;\n }\n\n context.report({\n node: body,\n messageId: 'implicitObjectReturn',\n fix(fixer) {\n const arrowToken = sourceCode.getTokenBefore(body, (token) => token.value === '=>');\n\n // an object concise body is always parenthesized, otherwise it parses as a block\n const openParen = sourceCode.getTokenBefore(body);\n const closeParen = sourceCode.getTokenAfter(body);\n\n if (!arrowToken || openParen?.value !== '(' || closeParen?.value !== ')') {\n return null;\n }\n\n const objectText = sourceCode.getText(body);\n\n return fixer.replaceTextRange([arrowToken.range[1], closeParen.range[1]], ` { return ${objectText}; }`);\n },\n });\n },\n };\n },\n};\n\nexport default rule;\n","import type { ESLint } from 'eslint';\n\nimport blockScopedCase from './block-scoped-case.js';\nimport commentPrecedingBlankLine from './comment-preceding-blank-line.js';\nimport commentSyntax from './comment-syntax.js';\nimport newlineAroundMultiline from './newline-around-multiline.js';\nimport noImplicitObjectReturn from './no-implicit-object-return.js';\n\nexport const customRules: ESLint.Plugin = {\n meta: {\n name: '@d3lm/lint-preset-rules',\n version: '0.1.0',\n },\n rules: {\n 'newline-around-multiline': newlineAroundMultiline,\n 'block-scoped-case': blockScopedCase,\n 'comment-syntax': commentSyntax,\n 'comment-preceding-blank-line': commentPrecedingBlankLine,\n 'no-implicit-object-return': noImplicitObjectReturn,\n },\n};\n\nexport default customRules;\n"],"mappings":";AAEA,IAAM,oBAAoB,CAAC,SAAiB,UAAU,KAAK,IAAI,IAAI,CAAC,EAAE,UAAU;AAEhF,IAAM,OAAwB;AAAA,EAC5B,MAAM;AAAA,IACJ,MAAM;AAAA,IACN,MAAM;AAAA,MACJ,aAAa;AAAA,IACf;AAAA,IACA,SAAS;AAAA,IACT,QAAQ,CAAC;AAAA,IACT,UAAU;AAAA,MACR,cAAc;AAAA,IAChB;AAAA,EACF;AAAA,EACA,OAAO,SAAS;AACd,UAAM,aAAa,QAAQ;AAE3B,WAAO;AAAA,MACL,WAAW,MAAM;AACf,cAAM,EAAE,WAAW,IAAI;AAEvB,YAAI,WAAW,WAAW,GAAG;AAC3B;AAAA,QACF;AAGA,YAAI,WAAW,WAAW,KAAK,WAAW,CAAC,EAAE,SAAS,kBAAkB;AACtE;AAAA,QACF;AAEA,gBAAQ,OAAO;AAAA,UACb;AAAA,UACA,WAAW;AAAA,UACX,IAAI,OAAO;AACT,kBAAM,cAAc,WAAW,cAAc,IAAI;AAEjD,gBAAI,CAAC,aAAa;AAChB,qBAAO,CAAC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AAK;AACxE,qBAAO;AAAA,YACT;AAEA,kBAAM,aAAa,WAAW,QAAQ,IAAI;AAE1C,mBAAO,MAAM,iBAAiB,CAAC,WAAW,MAAM,CAAC,GAAG,WAAW,MAAM,CAAC,CAAC,GAAG,aAAa,UAAU,KAAK;AAAA,UACxG;AAAA,QACF,CAAC;AAAA,MACH;AAAA,IACF;AAAA,EACF;AACF;AAEA,IAAO,oCAAQA;;;AC5CR,IAAM,cAA6B;AAAA,EACxC,MAAM;AAAA,IACJ,MAAM;AAAA,IACN,SAAS;AAAA,EACX;AAAA,EACA,OAAO;AAAA,IACL,4BAA4B;AAAA,IAC5B,qBAAqB;AAAA,IACrB,kBAAkB;AAAA,IAClB,gCAAgC;AAAA,IAChC,6BAA6B;AAAA,EAC/B;AACF;AAEA,IAAO,gBAAQ;","names":["rule","rule","rule","rule"]}
|
|
1
|
+
{"version":3,"sources":["../src/rules/block-scoped-case.ts","../src/rules/comment-preceding-blank-line.ts","../src/rules/comment-syntax.ts","../src/rules/newline-around-multiline.ts","../src/rules/no-implicit-object-return.ts","../src/rules/index.ts"],"sourcesContent":["import type { Rule } from 'eslint';\n\nconst leadingWhitespace = (line: string) => /^[ \\t]*/.exec(line)?.[0].length ?? 0;\n\nconst rule: Rule.RuleModule = {\n meta: {\n type: 'suggestion',\n docs: {\n description: 'Require case clauses to use block scope (braces).',\n },\n fixable: 'code',\n schema: [],\n messages: {\n missingBlock: 'Case clause should be wrapped in a block (braces).',\n },\n },\n create(context) {\n const sourceCode = context.sourceCode;\n\n return {\n SwitchCase(node) {\n const { consequent } = node;\n\n if (consequent.length === 0) {\n return;\n }\n\n // already wrapped in a single BlockStatement\n if (consequent.length === 1 && consequent[0].type === 'BlockStatement') {\n return;\n }\n\n context.report({\n node,\n messageId: 'missingBlock',\n fix(fixer) {\n const caseKeyword = sourceCode.getFirstToken(node);\n\n if (!caseKeyword) {\n return [];\n }\n\n const colonToken = sourceCode.getTokenAfter(\n node.test ? (node.test as Rule.Node) : caseKeyword,\n (token) => token.value === ':',\n );\n\n if (!colonToken) {\n return [];\n }\n\n const lastConsequent = consequent.at(-1);\n const lastToken = sourceCode.getLastToken(lastConsequent as Rule.Node);\n\n if (!lastToken) {\n return [];\n }\n\n const caseIndent = ' '.repeat(caseKeyword.loc.start.column);\n const bodyIndent = caseIndent + ' ';\n\n const text = sourceCode.getText();\n const bodyText = text.slice(colonToken.range[1], lastToken.range[1]);\n\n const lines = bodyText.split('\\n');\n\n /**\n * Lines after the colon line keep their relative nesting; we only shift\n * them so the shallowest one lands at the desired body indent.\n */\n const restLines = lines.slice(1);\n const restIndents = restLines.filter((line) => line.trim() !== '').map((line) => leadingWhitespace(line));\n const indentDelta = restIndents.length > 0 ? bodyIndent.length - Math.min(...restIndents) : 0;\n\n const bodyLines: string[] = [];\n\n // code sharing the colon line (e.g. `case 1: foo()`) must be preserved\n const firstLine = lines[0].trim();\n\n if (firstLine) {\n bodyLines.push(bodyIndent + firstLine);\n }\n\n for (const line of restLines) {\n if (line.trim() === '') {\n bodyLines.push('');\n continue;\n }\n\n const lead = leadingWhitespace(line);\n const newIndent = Math.max(0, lead + indentDelta);\n\n bodyLines.push(' '.repeat(newIndent) + line.slice(lead));\n }\n\n while (bodyLines.length > 0 && bodyLines[0] === '') {\n bodyLines.shift();\n }\n\n while (bodyLines.length > 0 && bodyLines.at(-1) === '') {\n bodyLines.pop();\n }\n\n const result = ` {\\n${bodyLines.join('\\n')}\\n${caseIndent}}`;\n\n return fixer.replaceTextRange([colonToken.range[1], lastToken.range[1]], result);\n },\n });\n },\n };\n },\n};\n\nexport default rule;\n","import type { Rule } from 'eslint';\n\ninterface Comment {\n type: string;\n value: string;\n range?: [number, number];\n loc?: Rule.Node['loc'];\n}\n\ninterface RuleOptions {\n allowInObjects?: boolean;\n allowInArrays?: boolean;\n allowInInterfaces?: boolean;\n}\n\nconst rule: Rule.RuleModule = {\n meta: {\n type: 'layout',\n docs: {\n description:\n 'Require a blank line before comments, with an exception for comments inside chained member-call expressions.',\n },\n fixable: 'whitespace',\n schema: [\n {\n type: 'object',\n properties: {\n allowInObjects: {\n type: 'boolean',\n },\n allowInArrays: {\n type: 'boolean',\n },\n allowInInterfaces: {\n type: 'boolean',\n },\n },\n additionalProperties: false,\n },\n ],\n messages: {\n missingBlankLine: 'Expected blank line before comment.',\n },\n },\n create(context) {\n const sourceCode = context.sourceCode;\n\n const options = (context.options[0] as RuleOptions | undefined) ?? {};\n\n const allowInObjects = options.allowInObjects ?? false;\n const allowInArrays = options.allowInArrays ?? false;\n const allowInInterfaces = options.allowInInterfaces ?? false;\n\n function isChainedCallContext(comment: Comment): boolean {\n if (!comment.range) {\n return false;\n }\n\n let current = (sourceCode.getNodeByRangeIndex(comment.range[0]) ?? undefined) as Rule.Node | undefined;\n\n while (current?.type === 'CallExpression' || current?.type === 'MemberExpression') {\n if (current.type === 'CallExpression' && current.callee.type === 'MemberExpression') {\n return true;\n }\n\n current = current.parent as Rule.Node | undefined;\n }\n\n return false;\n }\n\n function isCommentAllowedByEnclosure(comment: Comment): boolean {\n if (!comment.range) {\n return false;\n }\n\n const node = sourceCode.getNodeByRangeIndex(comment.range[0]) as Rule.Node | null;\n\n if (!node) {\n return false;\n }\n\n // TS-specific node types aren't part of the ESTree `Rule.Node` union\n const type = node.type as string;\n\n if (allowInObjects && (type === 'ObjectExpression' || type === 'ObjectPattern')) {\n return true;\n }\n\n if (allowInArrays && (type === 'ArrayExpression' || type === 'ArrayPattern')) {\n return true;\n }\n\n if (allowInInterfaces && (type === 'TSInterfaceBody' || type === 'TSTypeLiteral')) {\n return true;\n }\n\n return false;\n }\n\n function isAtBlockStart(comment: Comment): boolean {\n const tokenBefore = sourceCode.getTokenBefore(comment as unknown as Rule.Node, {\n includeComments: false,\n });\n\n if (!tokenBefore) {\n return true;\n }\n\n return ['{', '(', '['].includes(tokenBefore.value);\n }\n\n return {\n Program() {\n const comments = sourceCode.getAllComments();\n\n for (const comment of comments) {\n if (!comment.loc || !comment.range) {\n continue;\n }\n\n const commentLine = comment.loc.start.line;\n\n if (commentLine <= 1) {\n continue;\n }\n\n if (isAtBlockStart(comment)) {\n continue;\n }\n\n if (isChainedCallContext(comment)) {\n continue;\n }\n\n if (isCommentAllowedByEnclosure(comment)) {\n continue;\n }\n\n const tokenBefore = sourceCode.getTokenBefore(comment as unknown as Rule.Node, {\n includeComments: true,\n });\n\n if (!tokenBefore?.loc) {\n continue;\n }\n\n const linesBetween = commentLine - tokenBefore.loc.end.line;\n\n if (linesBetween >= 2) {\n continue;\n }\n\n if (linesBetween === 0) {\n continue;\n }\n\n /**\n * Insert the blank line before the comment's leading indentation so the\n * comment keeps its position instead of being dedented.\n */\n const commentStart = comment.range[0];\n const lineStart = sourceCode.getText().lastIndexOf('\\n', commentStart - 1) + 1;\n\n context.report({\n loc: comment.loc,\n messageId: 'missingBlankLine',\n fix(fixer) {\n return fixer.insertTextBeforeRange([lineStart, lineStart], '\\n');\n },\n });\n }\n },\n };\n },\n};\n\nexport default rule;\n","import type { AST, Rule } from 'eslint';\n\ninterface CommentLike {\n readonly type: string;\n readonly value: string;\n readonly range?: [number, number];\n readonly loc?: Rule.Node['loc'];\n}\n\ninterface LineOptions {\n readonly requireLeadingSpace: boolean;\n readonly requireLowercase: boolean;\n readonly forbidTrailingPunctuation: boolean;\n readonly allowedEndings: readonly string[];\n}\n\ninterface BlockOptions {\n readonly requireCapital: boolean;\n readonly requireTrailingPunctuation: boolean;\n readonly requireJSDocOpening: boolean;\n readonly enforceOpening: boolean;\n readonly enforceClosing: boolean;\n readonly requireSpaceAfterStar: boolean;\n readonly requireParagraphCapital: boolean;\n readonly paragraphEndings: readonly string[];\n readonly requireJSDocSpacing: boolean;\n readonly enforceParamStyle: boolean;\n}\n\ninterface ResolvedOptions {\n readonly ignoredWords: ReadonlySet<string>;\n readonly ignoredPatterns: readonly RegExp[];\n readonly ignoreUrls: boolean;\n readonly ignoreDirectives: boolean;\n readonly line: LineOptions;\n readonly block: BlockOptions;\n}\n\ntype MessageId =\n | 'lineLeadingSpace'\n | 'lineLowercase'\n | 'lineTrailingPunctuation'\n | 'blockCapital'\n | 'blockTrailingPunctuation'\n | 'blockSingleLineJSDoc'\n | 'blockJSDocOpening'\n | 'blockOpening'\n | 'blockClosing'\n | 'blockEmptyLineBeforeClose'\n | 'blockLineSpaceAfterStar'\n | 'blockParagraphCapital'\n | 'blockParagraphEnding'\n | 'blockJSDocBlankLine'\n | 'paramMissingDash'\n | 'paramDescriptionPeriod';\n\ntype AnyComment = CommentLike | AST.Token;\n\nconst URL_PATTERN = /\\bhttps?:\\/\\//;\n\nconst DIRECTIVE_PATTERN =\n /^\\s*(?:eslint(?:-[a-z-]+)?\\b|@ts-[a-z-]+|@(?:jsx|jsxFrag|jsxImportSource|jsxRuntime)\\b|istanbul\\s|c8\\s|v8\\s|prettier-ignore\\b|stylelint-[a-z-]+|webpack[A-Z][a-zA-Z]*|#(?:region|endregion)\\b|type\\s*:)/;\n\nconst TAG_PATTERN = /^\\s*(?:TODO|FIXME|HACK|NOTE|BUG|XXX|SAFETY|WARNING|INFO|OPTIMIZE|REVIEW|PERF|DEPRECATED)\\b/i;\n\nconst FIRST_WORD_PATTERN = /^\\s*([A-Za-z_$][\\w$]*)/;\nconst ALL_CAPS_WORD = /^[A-Z][A-Z0-9_]*$/;\n\nconst JSDOC_TAG_LINE = /^\\s*\\*\\s*@[A-Za-z]/;\nconst SINGLE_LINE_JSDOC_TAG = /^@[A-Za-z][\\w-]*$/;\nconst PARAM_DESC_RE = /^@param\\s+(?:\\{[^}]*\\}\\s+)?(\\S+)\\s+(.*\\S)\\s*$/;\nconst BLOCK_LINE_WITH_TEXT = /^(\\s*\\*)(\\s*)(\\S.*?)\\s*$/;\nconst BLOCK_LINE_EMPTY = /^\\s*\\*\\s*$/;\nconst CODE_FENCE_LINE = /^\\s*\\*\\s*```/;\n\nconst DEFAULT_LINE_ENDINGS = Object.freeze(['etc.', '...', 'e.g.', 'i.e.']);\nconst DEFAULT_PARAGRAPH_ENDINGS = Object.freeze(['.', '!', '?', ':', ';', '`', ')', ']', '}']);\n\nconst DEFAULT_OPTIONS: ResolvedOptions = {\n ignoredWords: new Set<string>(),\n ignoredPatterns: [],\n ignoreUrls: true,\n ignoreDirectives: true,\n line: {\n requireLeadingSpace: true,\n requireLowercase: true,\n forbidTrailingPunctuation: true,\n allowedEndings: DEFAULT_LINE_ENDINGS,\n },\n block: {\n requireCapital: true,\n requireTrailingPunctuation: true,\n requireJSDocOpening: true,\n enforceOpening: false,\n enforceClosing: false,\n requireSpaceAfterStar: true,\n requireParagraphCapital: true,\n paragraphEndings: DEFAULT_PARAGRAPH_ENDINGS,\n requireJSDocSpacing: true,\n enforceParamStyle: true,\n },\n};\n\nfunction isUpperCase(char: string): boolean {\n return char !== char.toLowerCase() && char === char.toUpperCase();\n}\n\nfunction isLowerCase(char: string): boolean {\n return char !== char.toUpperCase() && char === char.toLowerCase();\n}\n\nfunction isTrailingPunctuation(char: string): boolean {\n return char === '.' || char === '!' || char === '?' || char === ';' || char === ':';\n}\n\nfunction isBlockEndingPunctuation(char: string): boolean {\n return (\n char === '.' ||\n char === '!' ||\n char === '?' ||\n char === ';' ||\n char === ':' ||\n char === ')' ||\n char === ']' ||\n char === '}' ||\n char === '`' ||\n char === '>'\n );\n}\n\nfunction indexOfLastNonSpace(value: string): number {\n for (let index = value.length - 1; index >= 0; index -= 1) {\n const char = value.codePointAt(index);\n\n if (char !== 0x20 && char !== 0x09 && char !== 0x0a && char !== 0x0d) {\n return index;\n }\n }\n\n return -1;\n}\n\nfunction endsWithAny(value: string, endings: readonly string[]): boolean {\n for (const ending of endings) {\n if (value.endsWith(ending)) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction resolveOptions(raw: unknown): ResolvedOptions {\n if (!raw || typeof raw !== 'object') {\n return DEFAULT_OPTIONS;\n }\n\n const input = raw as Record<string, unknown>;\n const line = (input.line ?? {}) as Partial<LineOptions>;\n const block = (input.block ?? {}) as Partial<BlockOptions>;\n\n const patterns = Array.isArray(input.ignoredPatterns)\n ? (input.ignoredPatterns as string[]).map((source) => new RegExp(source))\n : DEFAULT_OPTIONS.ignoredPatterns;\n\n return {\n ignoredWords: new Set(Array.isArray(input.ignoredWords) ? (input.ignoredWords as string[]) : []),\n ignoredPatterns: patterns,\n ignoreUrls: (input.ignoreUrls as boolean | undefined) ?? DEFAULT_OPTIONS.ignoreUrls,\n ignoreDirectives: (input.ignoreDirectives as boolean | undefined) ?? DEFAULT_OPTIONS.ignoreDirectives,\n line: { ...DEFAULT_OPTIONS.line, ...line },\n block: { ...DEFAULT_OPTIONS.block, ...block },\n };\n}\n\nfunction shouldSkipComment(value: string, options: ResolvedOptions): boolean {\n const trimmed = value.trim();\n\n if (!trimmed) {\n return true;\n }\n\n if (options.ignoreDirectives && (DIRECTIVE_PATTERN.test(trimmed) || TAG_PATTERN.test(trimmed))) {\n return true;\n }\n\n if (options.ignoreUrls && URL_PATTERN.test(trimmed)) {\n return true;\n }\n\n for (const pattern of options.ignoredPatterns) {\n if (pattern.test(trimmed)) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction checkLineComment(context: Rule.RuleContext, comment: AnyComment, options: ResolvedOptions): void {\n const { line } = options;\n const raw = comment.value;\n const loc = comment.loc;\n const range = comment.range;\n\n if (!loc || !range) {\n return;\n }\n\n const rangeStart = range[0];\n\n if (line.requireLeadingSpace && raw.length > 0) {\n const first = raw.codePointAt(0);\n\n // allow \"///\" banner comments and tab-indented comments\n if (first !== 0x20 && first !== 0x2f && first !== 0x09) {\n context.report({\n loc,\n messageId: 'lineLeadingSpace',\n fix: (fixer) => fixer.insertTextAfterRange([rangeStart, rangeStart + 2], ' '),\n });\n }\n }\n\n const trimmed = raw.trim();\n\n if (!trimmed) {\n return;\n }\n\n const firstWordMatch = FIRST_WORD_PATTERN.exec(trimmed);\n\n if (firstWordMatch && line.requireLowercase) {\n const word = firstWordMatch[1];\n const firstChar = word[0];\n\n if (isUpperCase(firstChar) && !ALL_CAPS_WORD.test(word) && !options.ignoredWords.has(word)) {\n context.report({\n loc,\n messageId: 'lineLowercase',\n fix: (fixer) => {\n const offset = rangeStart + 2 + raw.indexOf(firstChar);\n\n return fixer.replaceTextRange([offset, offset + 1], firstChar.toLowerCase());\n },\n });\n }\n }\n\n if (line.forbidTrailingPunctuation && !endsWithAny(trimmed, line.allowedEndings)) {\n const lastChar = trimmed.at(-1) ?? '';\n\n if (isTrailingPunctuation(lastChar)) {\n context.report({\n loc,\n messageId: 'lineTrailingPunctuation',\n fix: (fixer) => {\n const offset = rangeStart + 2 + indexOfLastNonSpace(raw);\n\n return fixer.removeRange([offset, offset + 1]);\n },\n });\n }\n }\n}\n\nfunction checkSingleLineBlock(context: Rule.RuleContext, comment: AnyComment, options: ResolvedOptions): void {\n const { block } = options;\n const raw = comment.value;\n const loc = comment.loc;\n const range = comment.range;\n\n if (!loc || !range) {\n return;\n }\n\n const trimmed = raw.trim();\n\n if (!trimmed) {\n return;\n }\n\n if (raw.startsWith('*')) {\n const inner = raw.slice(1).trim();\n\n if (!inner) {\n return;\n }\n\n if (SINGLE_LINE_JSDOC_TAG.test(inner)) {\n return;\n }\n\n const sourceCode = context.sourceCode;\n const sourceLine = sourceCode.lines[loc.start.line - 1] ?? '';\n const prefix = sourceLine.slice(0, loc.start.column);\n const canFix = /^\\s*$/.test(prefix);\n\n context.report({\n loc,\n messageId: 'blockSingleLineJSDoc',\n fix: canFix ? (fixer) => fixer.replaceTextRange(range, `/**\\n${prefix} * ${inner}\\n${prefix} */`) : undefined,\n });\n\n return;\n }\n\n const rangeStart = range[0];\n const firstWordMatch = FIRST_WORD_PATTERN.exec(trimmed);\n\n if (firstWordMatch && block.requireCapital) {\n const word = firstWordMatch[1];\n const firstChar = word[0];\n\n if (isLowerCase(firstChar) && !ALL_CAPS_WORD.test(word) && !options.ignoredWords.has(word)) {\n context.report({\n loc,\n messageId: 'blockCapital',\n fix: (fixer) => {\n const offset = rangeStart + 2 + raw.indexOf(firstChar);\n\n return fixer.replaceTextRange([offset, offset + 1], firstChar.toUpperCase());\n },\n });\n }\n }\n\n if (block.requireTrailingPunctuation) {\n const lastChar = trimmed.at(-1) ?? '';\n\n if (!isBlockEndingPunctuation(lastChar)) {\n context.report({\n loc,\n messageId: 'blockTrailingPunctuation',\n fix: (fixer) => {\n const offset = rangeStart + 2 + indexOfLastNonSpace(raw);\n\n return fixer.insertTextAfterRange([offset, offset + 1], '.');\n },\n });\n }\n }\n}\n\nfunction offsetOfLine(comment: AnyComment, lines: readonly string[], lineIndex: number): number {\n const range = comment.range;\n\n if (!range) {\n return 0;\n }\n\n // base = range start + length of `/*`, then cumulative line lengths plus their '\\n' separators\n let offset = range[0] + 2;\n\n for (let index = 0; index < lineIndex; index += 1) {\n offset += lines[index].length + 1;\n }\n\n return offset;\n}\n\nfunction skipParagraphFirstWord(text: string, options: ResolvedOptions): boolean {\n const match = FIRST_WORD_PATTERN.exec(text);\n\n if (!match) {\n return true;\n }\n\n const word = match[1];\n\n return ALL_CAPS_WORD.test(word) || options.ignoredWords.has(word);\n}\n\nfunction reportParagraphEnding(\n context: Rule.RuleContext,\n comment: AnyComment,\n text: string,\n options: ResolvedOptions,\n): void {\n const { block } = options;\n const loc = comment.loc;\n\n if (!loc) {\n return;\n }\n\n for (const ending of block.paragraphEndings) {\n if (text.endsWith(ending)) {\n return;\n }\n }\n\n context.report({\n loc,\n messageId: 'blockParagraphEnding',\n data: { endings: `[${block.paragraphEndings.join(' ')}]` },\n });\n}\n\nfunction checkParameterLine(\n context: Rule.RuleContext,\n comment: AnyComment,\n lines: readonly string[],\n lineIndex: number,\n text: string,\n starSegment: string,\n spaces: string,\n): void {\n const loc = comment.loc;\n\n if (!loc) {\n return;\n }\n\n const match = PARAM_DESC_RE.exec(text);\n\n if (!match) {\n return;\n }\n\n const descPart = match[2];\n const textStart = offsetOfLine(comment, lines, lineIndex) + starSegment.length + spaces.length;\n\n if (!descPart.startsWith('- ')) {\n const prefixMatch = /^@param\\s+(?:\\{[^}]*\\}\\s+)?\\S+\\s+/.exec(text);\n\n if (!prefixMatch) {\n return;\n }\n\n const descStartOffset = textStart + prefixMatch[0].length;\n\n context.report({\n loc,\n messageId: 'paramMissingDash',\n fix: (fixer) => fixer.insertTextBeforeRange([descStartOffset, descStartOffset + 1], '- '),\n });\n\n return;\n }\n\n const description = descPart.slice(2).trim();\n\n if (!description) {\n return;\n }\n\n if (!description.endsWith('.')) {\n const textEndOffset = textStart + text.length;\n\n context.report({\n loc,\n messageId: 'paramDescriptionPeriod',\n fix: (fixer) => fixer.insertTextAfterRange([textEndOffset - 1, textEndOffset], '.'),\n });\n }\n}\n\nfunction checkMultiLineBlock(context: Rule.RuleContext, comment: AnyComment, options: ResolvedOptions): void {\n const { block } = options;\n const loc = comment.loc;\n const range = comment.range;\n\n if (!loc || !range) {\n return;\n }\n\n const lines = comment.value.split('\\n');\n const firstLine = lines[0];\n const lastLine = lines.at(-1) ?? '';\n\n // the comment value excludes the `/*` opener, so a `/**` comment has a value starting with `*`\n if (block.requireJSDocOpening && !comment.value.startsWith('*')) {\n const openerEnd = range[0] + 2;\n\n context.report({\n loc,\n messageId: 'blockJSDocOpening',\n fix: (fixer) => fixer.insertTextAfterRange([range[0], openerEnd], '*'),\n });\n }\n\n if (block.enforceOpening) {\n const opening = firstLine.trim();\n\n if (opening !== '' && opening !== '*') {\n context.report({ loc, messageId: 'blockOpening' });\n\n return;\n }\n }\n\n if (block.enforceClosing) {\n if (lastLine.trim() !== '') {\n context.report({ loc, messageId: 'blockClosing' });\n\n return;\n }\n\n if (lines.length >= 3 && BLOCK_LINE_EMPTY.test(lines.at(-2) ?? '')) {\n context.report({ loc, messageId: 'blockEmptyLineBeforeClose' });\n }\n }\n\n let insideCodeBlock = false;\n let paragraphStart = true;\n let previousText: string | undefined;\n\n for (let index = 1; index < lines.length - 1; index += 1) {\n const line = lines[index];\n\n if (CODE_FENCE_LINE.test(line)) {\n insideCodeBlock = !insideCodeBlock;\n paragraphStart = true;\n previousText = undefined;\n\n continue;\n }\n\n if (insideCodeBlock) {\n continue;\n }\n\n if (BLOCK_LINE_EMPTY.test(line)) {\n if (previousText !== undefined && block.requireParagraphCapital) {\n reportParagraphEnding(context, comment, previousText, options);\n }\n\n paragraphStart = true;\n previousText = undefined;\n\n continue;\n }\n\n const match = BLOCK_LINE_WITH_TEXT.exec(line);\n\n if (!match) {\n continue;\n }\n\n const [, starSegment, spaces, text] = match;\n\n if (block.requireSpaceAfterStar && spaces.length === 0) {\n const lineOffset = offsetOfLine(comment, lines, index);\n const starEnd = lineOffset + starSegment.length;\n\n context.report({\n loc,\n messageId: 'blockLineSpaceAfterStar',\n fix: (fixer) => fixer.insertTextAfterRange([starEnd - 1, starEnd], ' '),\n });\n\n continue;\n }\n\n if (block.requireJSDocSpacing && JSDOC_TAG_LINE.test(line) && previousText !== undefined) {\n const previousLine = lines[index - 1];\n\n if (!BLOCK_LINE_EMPTY.test(previousLine) && !JSDOC_TAG_LINE.test(previousLine)) {\n context.report({ loc, messageId: 'blockJSDocBlankLine' });\n }\n }\n\n if (paragraphStart && block.requireParagraphCapital && !JSDOC_TAG_LINE.test(line)) {\n const firstChar = text[0];\n\n if (firstChar && isLowerCase(firstChar) && !skipParagraphFirstWord(text, options)) {\n const lineOffset = offsetOfLine(comment, lines, index);\n const charOffset = lineOffset + starSegment.length + spaces.length;\n\n context.report({\n loc,\n messageId: 'blockParagraphCapital',\n fix: (fixer) => fixer.replaceTextRange([charOffset, charOffset + 1], firstChar.toUpperCase()),\n });\n }\n }\n\n paragraphStart = false;\n\n if (block.enforceParamStyle && /^@param\\s/.test(text)) {\n checkParameterLine(context, comment, lines, index, text, starSegment, spaces);\n previousText = undefined;\n } else {\n previousText = text;\n }\n }\n\n if (previousText !== undefined && block.requireParagraphCapital) {\n reportParagraphEnding(context, comment, previousText, options);\n }\n}\n\nconst messages: Record<MessageId, string> = {\n lineLeadingSpace: 'Line comment should start with a space.',\n lineLowercase: 'Line comment should start with a lowercase letter.',\n lineTrailingPunctuation: 'Line comment should not end with punctuation.',\n blockCapital: 'Block comment should start with an uppercase letter.',\n blockTrailingPunctuation: 'Block comment should end with punctuation.',\n blockSingleLineJSDoc: 'JSDoc-style block comments (/** ... */) must span multiple lines.',\n blockJSDocOpening: \"Multi-line block comments must start with '/**', not '/*'.\",\n blockOpening: \"Block comment should start with '/**\\\\n *' (or '/*\\\\n *').\",\n blockClosing: \"Block comment should end with '\\\\n */'.\",\n blockEmptyLineBeforeClose: 'Block comment should not end with an empty line.',\n blockLineSpaceAfterStar: \"Each line of a block comment requires a space after '*'.\",\n blockParagraphCapital: 'Paragraph should start with an uppercase letter.',\n blockParagraphEnding: 'Paragraph should end with one of {{endings}}.',\n blockJSDocBlankLine: 'Insert a blank line before JSDoc tags.',\n paramMissingDash: \"@param should use ' - ' between name and description.\",\n paramDescriptionPeriod: '@param description should end with a period.',\n};\n\nconst rule: Rule.RuleModule = {\n meta: {\n type: 'suggestion',\n docs: {\n description:\n 'Enforce comment casing, punctuation, and JSDoc/paragraph structure for line, single-line block, and multi-line block comments.',\n },\n fixable: 'code',\n schema: [\n {\n type: 'object',\n additionalProperties: false,\n properties: {\n ignoredWords: {\n type: 'array',\n items: { type: 'string' },\n uniqueItems: true,\n },\n ignoredPatterns: {\n type: 'array',\n items: { type: 'string' },\n uniqueItems: true,\n },\n ignoreUrls: { type: 'boolean' },\n ignoreDirectives: { type: 'boolean' },\n line: {\n type: 'object',\n additionalProperties: false,\n properties: {\n requireLeadingSpace: { type: 'boolean' },\n requireLowercase: { type: 'boolean' },\n forbidTrailingPunctuation: { type: 'boolean' },\n allowedEndings: {\n type: 'array',\n items: { type: 'string' },\n uniqueItems: true,\n },\n },\n },\n block: {\n type: 'object',\n additionalProperties: false,\n properties: {\n requireCapital: { type: 'boolean' },\n requireTrailingPunctuation: { type: 'boolean' },\n requireJSDocOpening: { type: 'boolean' },\n enforceOpening: { type: 'boolean' },\n enforceClosing: { type: 'boolean' },\n requireSpaceAfterStar: { type: 'boolean' },\n requireParagraphCapital: { type: 'boolean' },\n paragraphEndings: {\n type: 'array',\n items: { type: 'string' },\n uniqueItems: true,\n },\n requireJSDocSpacing: { type: 'boolean' },\n enforceParamStyle: { type: 'boolean' },\n },\n },\n },\n },\n ],\n messages,\n },\n create(context) {\n const sourceCode = context.sourceCode;\n const options = resolveOptions(context.options[0]);\n\n return {\n Program() {\n const comments = sourceCode.getAllComments();\n\n for (const comment of comments) {\n if (shouldSkipComment(comment.value, options)) {\n continue;\n }\n\n if (comment.type === 'Line') {\n checkLineComment(context, comment, options);\n\n continue;\n }\n\n if (comment.value.includes('\\n')) {\n checkMultiLineBlock(context, comment, options);\n } else {\n checkSingleLineBlock(context, comment, options);\n }\n }\n },\n };\n },\n};\n\nexport default rule;\n","import type { Rule } from 'eslint';\n\nfunction isAlwaysPadded(node: Rule.Node) {\n /**\n * Class methods and static blocks always get blank lines between\n * siblings, even when single-line, so they never feel crammed together.\n */\n return node.type === 'MethodDefinition' || node.type === 'StaticBlock';\n}\n\nfunction isImportOrExport(node: Rule.Node) {\n /**\n * Imports and re-exports are grouped together with no blank lines between\n * them, so this rule ignores them entirely, both as a subject and as a\n * neighbor. Declared exports (export const/function/class) still pad like\n * regular code, since they contain real multiline bodies.\n */\n if (node.type === 'ImportDeclaration' || node.type === 'ExportAllDeclaration') {\n return true;\n }\n\n return node.type === 'ExportNamedDeclaration' && !node.declaration;\n}\n\nconst rule: Rule.RuleModule = {\n meta: {\n type: 'layout',\n docs: {\n description:\n 'Require blank lines around multiline statements, class methods, static blocks, and switch case bodies.',\n },\n fixable: 'whitespace',\n schema: [],\n messages: {\n missingBlankBefore: 'Expected blank line before this.',\n missingBlankAfter: 'Expected blank line after this.',\n },\n },\n create(context) {\n const sourceCode = context.sourceCode;\n\n function checkBody(body: Rule.Node[], options: { alwaysPadMembers?: boolean } = {}) {\n for (let index = 0; index < body.length; index++) {\n const node = body[index];\n\n if (!node.loc || isImportOrExport(node)) {\n continue;\n }\n\n const isMultiline = node.loc.start.line !== node.loc.end.line;\n const forceByKind = options.alwaysPadMembers === true && isAlwaysPadded(node);\n const needsPadding = isMultiline || forceByKind;\n\n if (!needsPadding) {\n continue;\n }\n\n if (index > 0) {\n const previous = body[index - 1];\n\n if (previous.loc && !isImportOrExport(previous)) {\n const linesBetween = node.loc.start.line - previous.loc.end.line;\n\n if (linesBetween < 2) {\n context.report({\n node,\n messageId: 'missingBlankBefore',\n fix(fixer) {\n const previousToken = sourceCode.getLastToken(previous);\n\n if (!previousToken) {\n return null;\n }\n\n return fixer.insertTextAfter(previousToken, '\\n');\n },\n });\n }\n }\n }\n\n if (index < body.length - 1) {\n const next = body[index + 1];\n\n if (next.loc && !isImportOrExport(next)) {\n const linesBetween = next.loc.start.line - node.loc.end.line;\n\n if (linesBetween < 2) {\n context.report({\n node,\n messageId: 'missingBlankAfter',\n fix(fixer) {\n const lastToken = sourceCode.getLastToken(node);\n\n if (!lastToken) {\n return null;\n }\n\n return fixer.insertTextAfter(lastToken, '\\n');\n },\n });\n }\n }\n }\n }\n }\n\n return {\n Program(node) {\n checkBody(node.body as Rule.Node[]);\n },\n BlockStatement(node) {\n checkBody(node.body as Rule.Node[]);\n },\n StaticBlock(node) {\n checkBody(node.body as Rule.Node[]);\n },\n SwitchCase(node) {\n checkBody(node.consequent as Rule.Node[]);\n },\n ClassBody(node) {\n checkBody(node.body as Rule.Node[], { alwaysPadMembers: true });\n },\n };\n },\n};\n\nexport default rule;\n","import type { Rule } from 'eslint';\n\nconst rule: Rule.RuleModule = {\n meta: {\n type: 'suggestion',\n docs: {\n description:\n 'Disallow returning an object literal from an arrow function concise body (e.g. `() => ({})`); require a block body with an explicit return.',\n },\n fixable: 'code',\n schema: [],\n messages: {\n implicitObjectReturn:\n 'Avoid returning an object literal directly from an arrow function; use a block body with an explicit return.',\n },\n },\n create(context) {\n const sourceCode = context.sourceCode;\n\n return {\n ArrowFunctionExpression(node) {\n const body = node.body;\n\n // only concise bodies that resolve straight to an object literal\n if (!node.expression || body.type !== 'ObjectExpression') {\n return;\n }\n\n context.report({\n node: body,\n messageId: 'implicitObjectReturn',\n fix(fixer) {\n const arrowToken = sourceCode.getTokenBefore(body, (token) => token.value === '=>');\n\n // an object concise body is always parenthesized, otherwise it parses as a block\n const openParen = sourceCode.getTokenBefore(body);\n const closeParen = sourceCode.getTokenAfter(body);\n\n if (!arrowToken || openParen?.value !== '(' || closeParen?.value !== ')') {\n return null;\n }\n\n const objectText = sourceCode.getText(body);\n\n return fixer.replaceTextRange([arrowToken.range[1], closeParen.range[1]], ` { return ${objectText}; }`);\n },\n });\n },\n };\n },\n};\n\nexport default rule;\n","import type { ESLint } from 'eslint';\n\nimport blockScopedCase from './block-scoped-case.js';\nimport commentPrecedingBlankLine from './comment-preceding-blank-line.js';\nimport commentSyntax from './comment-syntax.js';\nimport newlineAroundMultiline from './newline-around-multiline.js';\nimport noImplicitObjectReturn from './no-implicit-object-return.js';\n\nexport const customRules: ESLint.Plugin = {\n meta: {\n name: '@d3lm/lint-preset-rules',\n version: '0.1.0',\n },\n rules: {\n 'newline-around-multiline': newlineAroundMultiline,\n 'block-scoped-case': blockScopedCase,\n 'comment-syntax': commentSyntax,\n 'comment-preceding-blank-line': commentPrecedingBlankLine,\n 'no-implicit-object-return': noImplicitObjectReturn,\n },\n};\n\nexport default customRules;\n"],"mappings":";AAEA,IAAM,oBAAoB,CAAC,SAAiB,UAAU,KAAK,IAAI,IAAI,CAAC,EAAE,UAAU;AAEhF,IAAM,OAAwB;AAAA,EAC5B,MAAM;AAAA,IACJ,MAAM;AAAA,IACN,MAAM;AAAA,MACJ,aAAa;AAAA,IACf;AAAA,IACA,SAAS;AAAA,IACT,QAAQ,CAAC;AAAA,IACT,UAAU;AAAA,MACR,cAAc;AAAA,IAChB;AAAA,EACF;AAAA,EACA,OAAO,SAAS;AACd,UAAM,aAAa,QAAQ;AAE3B,WAAO;AAAA,MACL,WAAW,MAAM;AACf,cAAM,EAAE,WAAW,IAAI;AAEvB,YAAI,WAAW,WAAW,GAAG;AAC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
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Opinionated Oxlint + ESLint preset. Oxlint handles non-type-aware rules, while ESLint layers only type-aware rules not covered by Oxlint on top.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"build": "tsup",
|
|
9
|
+
"test": "vitest run",
|
|
10
|
+
"test:watch": "vitest",
|
|
11
|
+
"lint": "pnpm run build && oxlint && eslint",
|
|
12
|
+
"lint:fix": "pnpm run build && oxlint --fix && eslint --fix",
|
|
13
|
+
"prepublishOnly": "pnpm run build"
|
|
14
|
+
},
|
|
7
15
|
"exports": {
|
|
8
16
|
"./eslint": {
|
|
9
17
|
"types": "./dist/eslint.d.ts",
|
|
@@ -37,13 +45,13 @@
|
|
|
37
45
|
"peerDependencies": {
|
|
38
46
|
"@stylistic/eslint-plugin": ">=5.0.0",
|
|
39
47
|
"@typescript-eslint/eslint-plugin": ">=8.0.0",
|
|
40
|
-
"eslint": ">=
|
|
48
|
+
"eslint": ">=10.4.0",
|
|
41
49
|
"eslint-config-prettier": ">=10.0.0",
|
|
42
50
|
"eslint-plugin-jsdoc": ">=62.0.0",
|
|
43
51
|
"eslint-plugin-oxlint": ">=1.60.0",
|
|
44
52
|
"eslint-plugin-prettier": ">=5.0.0",
|
|
45
53
|
"eslint-plugin-react-hooks": ">=7.0.0",
|
|
46
|
-
"eslint-plugin-unicorn": ">=
|
|
54
|
+
"eslint-plugin-unicorn": ">=70.0.0",
|
|
47
55
|
"oxlint": ">=1.60.0",
|
|
48
56
|
"oxlint-tsgolint": ">=0.21.1",
|
|
49
57
|
"typescript-eslint": ">=8.0.0"
|
|
@@ -59,25 +67,18 @@
|
|
|
59
67
|
"@types/eslint": "^9.6.1",
|
|
60
68
|
"@types/node": "^25.9.2",
|
|
61
69
|
"common-tags": "^1.8.2",
|
|
62
|
-
"eslint": "^10.
|
|
70
|
+
"eslint": "^10.6.0",
|
|
63
71
|
"eslint-config-prettier": "^10.1.8",
|
|
64
72
|
"eslint-plugin-jsdoc": "^62.9.0",
|
|
65
73
|
"eslint-plugin-oxlint": "^1.60.0",
|
|
66
74
|
"eslint-plugin-prettier": "^5.5.5",
|
|
67
75
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
68
|
-
"eslint-plugin-unicorn": "^
|
|
76
|
+
"eslint-plugin-unicorn": "^70.0.0",
|
|
69
77
|
"oxlint": "^1.60.0",
|
|
70
78
|
"oxlint-tsgolint": "^0.21.1",
|
|
71
79
|
"tsup": "^8.5.1",
|
|
72
80
|
"typescript": "^6.0.2",
|
|
73
81
|
"typescript-eslint": "^8.32.1",
|
|
74
82
|
"vitest": "^4.1.4"
|
|
75
|
-
},
|
|
76
|
-
"scripts": {
|
|
77
|
-
"build": "tsup",
|
|
78
|
-
"test": "vitest run",
|
|
79
|
-
"test:watch": "vitest",
|
|
80
|
-
"lint": "pnpm run build && oxlint && eslint",
|
|
81
|
-
"lint:fix": "pnpm run build && oxlint --fix && eslint --fix"
|
|
82
83
|
}
|
|
83
|
-
}
|
|
84
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/delm/dev/eslint-plugin/dist/chunk-4SIRQMJX.cjs","../src/configs/unicorn.ts","../src/configs/abbreviations.ts","../src/configs/javascript.ts","../src/configs/react.ts","../src/configs/typescript.ts"],"names":[],"mappings":"AAAA;ACqBO,IAAM,mBAAA,EAAyC;AAAA;AAAA,EAEpD,qCAAA,EAAuC,OAAA;AAAA,EACvC,uBAAA,EAAyB,MAAA;AAAA,EACzB,kCAAA,EAAoC,OAAA;AAAA,EACpC,0CAAA,EAA4C,OAAA;AAAA,EAC5C,sBAAA,EAAwB,OAAA;AAAA,EACxB,8CAAA,EAAgD,OAAA;AAAA,EAChD,qBAAA,EAAuB,OAAA;AAAA,EACvB,8BAAA,EAAgC,OAAA;AAAA,EAChC,uCAAA,EAAyC,OAAA;AAAA,EACzC,iCAAA,EAAmC,OAAA;AAAA,EACn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,CAAC,oCAAK,UAAA,+BAAY,eAAA,UAAiB,OAAA,EAAQ,SAAA,EAAW,CAAC,CAAA,EAAI,oCAAI,UAAA,+BAAY,QAAA,UAAU,CAAC,GAAE,CAAC,CAAC,CAAA;AAC/G;AAEA,SAAS,mBAAA,CAAoB,QAAA,EAAoB,WAAA,EAAuB,CAAC,CAAA,EAAG;AAC1E,EAAA,OAAO,CAAA,EAAA,EAAK,CAAC,GAAG,QAAA,EAAU,GAAG,UAAU,CAAA,CAAE,IAAA,CAAK,GAAG,CAAC,CAAA,EAAA,CAAA;AACpD;ALwYA;AACA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,icAAC","file":"/Users/delm/dev/eslint-plugin/dist/chunk-4SIRQMJX.cjs","sourcesContent":[null,"import type { Linter } from 'eslint';\n\n/*\n * Mirror of `eslint-plugin-unicorn`'s recommended config, split by runtime.\n *\n * Oxlint natively implements most unicorn rules, so we enable those under the\n * canonical `unicorn/` prefix (fast, Rust). Rules oxlint hasn't ported run\n * through the original JS plugin, aliased as `unicornx` in `jsPlugins` (see\n * `src/oxlint.ts`), because oxlint's built-in plugin owns the `unicorn/`\n * namespace.\n *\n * `unicorn/prevent-abbreviations` is also not ported; it lives in\n * `javascript.ts` because it takes user-configurable options.\n */\n\n/**\n * Unicorn recommended rules natively implemented by Oxlint, grouped by the\n * oxlint category they belong to. Only the correctness group is enabled by\n * oxlint's defaults (as `warn`); everything is set explicitly to `error` to\n * match the recommended config.\n */\nexport const unicornRulesOxlint: Linter.RulesRecord = {\n // correctness\n 'unicorn/no-await-in-promise-methods': 'error',\n 'unicorn/no-empty-file': 'warn',\n 'unicorn/no-invalid-fetch-options': 'error',\n 'unicorn/no-invalid-remove-event-listener': 'error',\n 'unicorn/no-new-array': 'error',\n 'unicorn/no-single-promise-in-promise-methods': 'error',\n 'unicorn/no-thenable': 'error',\n 'unicorn/no-unnecessary-await': 'error',\n 'unicorn/no-useless-fallback-in-spread': 'error',\n 'unicorn/no-useless-length-check': 'error',\n 'unicorn/no-useless-spread': 'error',\n 'unicorn/prefer-set-size': 'error',\n 'unicorn/prefer-string-starts-ends-with': 'error',\n\n // perf\n 'unicorn/prefer-array-find': 'error',\n 'unicorn/prefer-array-flat-map': 'error',\n 'unicorn/prefer-set-has': 'error',\n\n // restriction\n 'unicorn/no-abusive-eslint-disable': 'error',\n 'unicorn/no-anonymous-default-export': 'error',\n 'unicorn/no-array-for-each': 'error',\n 'unicorn/no-array-reduce': 'error',\n 'unicorn/no-document-cookie': 'error',\n 'unicorn/no-magic-array-flat-depth': 'error',\n 'unicorn/no-process-exit': 'error',\n 'unicorn/no-useless-error-capture-stack-trace': 'error',\n 'unicorn/prefer-modern-math-apis': 'error',\n 'unicorn/prefer-module': 'error',\n 'unicorn/prefer-node-protocol': 'error',\n 'unicorn/prefer-number-properties': 'error',\n\n // suspicious\n 'unicorn/consistent-function-scoping': 'error',\n 'unicorn/no-accessor-recursion': 'error',\n 'unicorn/no-array-reverse': 'error',\n 'unicorn/no-array-sort': 'error',\n 'unicorn/no-instanceof-builtins': 'error',\n 'unicorn/prefer-add-event-listener': 'error',\n 'unicorn/require-module-specifiers': 'error',\n\n // pedantic\n 'unicorn/consistent-assert': 'error',\n 'unicorn/consistent-empty-array-spread': 'error',\n 'unicorn/escape-case': 'error',\n 'unicorn/explicit-length-check': 'error',\n 'unicorn/new-for-builtins': 'error',\n 'unicorn/no-array-callback-reference': 'error',\n 'unicorn/no-hex-escape': 'error',\n 'unicorn/no-immediate-mutation': 'error',\n 'unicorn/no-lonely-if': 'error',\n 'unicorn/no-negation-in-equality-check': 'error',\n 'unicorn/no-new-buffer': 'error',\n 'unicorn/no-object-as-default-parameter': 'error',\n 'unicorn/no-static-only-class': 'error',\n 'unicorn/no-this-assignment': 'error',\n 'unicorn/no-typeof-undefined': 'error',\n 'unicorn/no-unnecessary-array-flat-depth': 'error',\n 'unicorn/no-unnecessary-array-splice-count': 'error',\n 'unicorn/no-unnecessary-slice-end': 'error',\n 'unicorn/no-unreadable-iife': 'error',\n 'unicorn/no-useless-promise-resolve-reject': 'error',\n 'unicorn/no-useless-switch-case': 'error',\n 'unicorn/prefer-array-flat': 'error',\n 'unicorn/prefer-array-some': 'error',\n 'unicorn/prefer-at': 'error',\n 'unicorn/prefer-blob-reading-methods': 'error',\n 'unicorn/prefer-code-point': 'error',\n 'unicorn/prefer-date-now': 'error',\n 'unicorn/prefer-dom-node-append': 'error',\n 'unicorn/prefer-dom-node-dataset': 'error',\n 'unicorn/prefer-dom-node-remove': 'error',\n 'unicorn/prefer-event-target': 'error',\n 'unicorn/prefer-math-min-max': 'error',\n 'unicorn/prefer-math-trunc': 'error',\n 'unicorn/prefer-native-coercion-functions': 'error',\n 'unicorn/prefer-prototype-methods': 'error',\n 'unicorn/prefer-query-selector': 'error',\n 'unicorn/prefer-regexp-test': 'error',\n 'unicorn/prefer-string-replace-all': 'error',\n 'unicorn/prefer-string-slice': 'error',\n 'unicorn/prefer-top-level-await': 'error',\n 'unicorn/prefer-type-error': 'error',\n 'unicorn/require-number-to-fixed-digits-argument': 'error',\n\n // style\n 'unicorn/catch-error-name': ['error', { name: 'error' }],\n 'unicorn/consistent-date-clone': 'error',\n 'unicorn/consistent-existence-index-check': 'error',\n 'unicorn/consistent-template-literal-escape': 'error',\n 'unicorn/empty-brace-spaces': 'error',\n 'unicorn/error-message': 'error',\n 'unicorn/no-array-method-this-argument': 'error',\n 'unicorn/no-await-expression-member': 'error',\n 'unicorn/no-console-spaces': 'error',\n 'unicorn/no-unreadable-array-destructuring': 'error',\n 'unicorn/no-useless-collection-argument': 'error',\n 'unicorn/no-zero-fractions': 'error',\n 'unicorn/numeric-separators-style': 'error',\n 'unicorn/prefer-array-index-of': 'error',\n 'unicorn/prefer-bigint-literals': 'error',\n 'unicorn/prefer-class-fields': 'error',\n 'unicorn/prefer-classlist-toggle': 'error',\n 'unicorn/prefer-default-parameters': 'error',\n 'unicorn/prefer-dom-node-text-content': 'error',\n 'unicorn/prefer-global-this': 'error',\n 'unicorn/prefer-includes': 'error',\n 'unicorn/prefer-keyboard-event-key': 'error',\n 'unicorn/prefer-logical-operator-over-ternary': 'error',\n 'unicorn/prefer-modern-dom-apis': 'error',\n 'unicorn/prefer-negative-index': 'error',\n 'unicorn/prefer-object-from-entries': 'error',\n 'unicorn/prefer-optional-catch-binding': 'error',\n 'unicorn/prefer-reflect-apply': 'error',\n 'unicorn/prefer-response-static-json': 'error',\n 'unicorn/prefer-spread': 'error',\n 'unicorn/prefer-string-raw': 'error',\n 'unicorn/prefer-string-trim-start-end': 'error',\n 'unicorn/prefer-structured-clone': 'error',\n 'unicorn/relative-url-style': 'error',\n 'unicorn/require-array-join-separator': 'error',\n 'unicorn/require-module-attributes': 'error',\n 'unicorn/switch-case-braces': 'error',\n 'unicorn/switch-case-break-position': 'error',\n 'unicorn/text-encoding-identifier-case': 'error',\n 'unicorn/throw-new-error': 'error',\n};\n\n/**\n * Unicorn recommended rules that Oxlint hasn't ported. They run inside Oxlint\n * through the original JS plugin under the `unicornx` alias.\n */\nexport const unicornRulesJsPlugin: Linter.RulesRecord = {\n 'unicornx/isolated-functions': 'error',\n 'unicornx/no-for-loop': 'error',\n 'unicornx/no-named-default': 'error',\n 'unicornx/no-unnecessary-polyfills': 'error',\n 'unicornx/prefer-export-from': 'error',\n 'unicornx/prefer-simple-condition-first': 'error',\n 'unicornx/prefer-single-call': 'error',\n 'unicornx/prefer-switch': 'error',\n 'unicornx/template-indent': 'error',\n\n /*\n * Native port exists but only in oxlint's nursery category, which can't be\n * enabled from config, so we run the JS original instead.\n */\n 'unicornx/no-useless-iterator-to-array': 'error',\n\n /*\n * Oxlint's port hardcodes uppercase hexadecimal digits, which fights\n * Prettier's lowercase formatting, so we run the JS original with the\n * lowercase option instead.\n */\n 'unicornx/number-literal-case': ['error', { hexadecimalValue: 'lowercase' }],\n};\n\n/**\n * Unicorn recommended rules that can't run inside Oxlint's JS-plugin host yet\n * because the compat layer is missing ESLint APIs (e.g.\n * `sourceCode.getDisableDirectives`). ESLint picks them up after Oxlint runs.\n */\nexport const unicornRulesEslint: Linter.RulesRecord = {\n 'unicorn/expiring-todo-comments': 'error',\n};\n","export const DEFAULT_ABBREVIATION_ALLOW_LIST = [\n 'fn',\n 'cb',\n 'err',\n 'prev',\n 'props',\n 'refs',\n 'ref',\n 'dev',\n 'i',\n 'arg',\n 'args',\n];\n\nexport const ABBREVIATION_REPLACEMENTS: Record<string, Record<string, boolean> | false> = {\n ref: false,\n refs: false,\n dev: false,\n dir: false,\n env: false,\n ev: { event: true },\n val: { value: true },\n msg: { message: true },\n el: { element: true },\n elem: { element: true },\n btn: { button: true },\n cb: { callback: true },\n fn: { function: true },\n err: { error: true },\n opts: { options: true },\n cfg: { config: true },\n obj: { object: true },\n arr: { array: true },\n str: { string: true },\n num: { number: true },\n curr: { current: true },\n len: { length: true },\n e: { event: true, error: true },\n};\n","import type { Linter } from 'eslint';\nimport { ABBREVIATION_REPLACEMENTS, DEFAULT_ABBREVIATION_ALLOW_LIST } from './abbreviations.js';\nimport { unicornRulesJsPlugin, unicornRulesOxlint } from './unicorn.js';\n\nexport const jsFileExtensions = ['**/*.js', '**/*.jsx', '**/*.mjs', '**/*.cjs'];\n\nexport const paddingLineEntries = [\n {\n blankLine: 'always',\n prev: '*',\n next: ['block', 'block-like', 'class', 'const', 'let'],\n },\n {\n blankLine: 'always',\n prev: 'block',\n next: '*',\n },\n {\n blankLine: 'always',\n prev: ['const'],\n next: '*',\n },\n {\n blankLine: 'always',\n prev: ['let'],\n next: '*',\n },\n {\n blankLine: 'any',\n prev: ['const'],\n next: ['const'],\n },\n {\n blankLine: 'any',\n prev: ['let'],\n next: ['let'],\n },\n {\n blankLine: 'always',\n prev: ['let'],\n next: ['const'],\n },\n {\n blankLine: 'always',\n prev: ['const'],\n next: ['let'],\n },\n {\n blankLine: 'always',\n prev: ['singleline-const'],\n next: ['multiline-const'],\n },\n {\n blankLine: 'always',\n prev: ['multiline-const'],\n next: ['singleline-const'],\n },\n {\n blankLine: 'always',\n prev: ['singleline-let'],\n next: ['multiline-let'],\n },\n {\n blankLine: 'always',\n prev: ['multiline-let'],\n next: ['singleline-let'],\n },\n {\n blankLine: 'any',\n prev: ['case', 'block', 'block-like'],\n next: ['case', 'default'],\n },\n {\n blankLine: 'any',\n prev: '*',\n next: 'break',\n },\n {\n blankLine: 'always',\n prev: 'if',\n next: '*',\n },\n /*\n * Imports form a block: padded from anything that isn't an import, but\n * consecutive imports can sit together. The same-type rule comes last so it\n * wins over the surrounding `*` rules.\n */\n {\n blankLine: 'always',\n prev: 'import',\n next: '*',\n },\n {\n blankLine: 'always',\n prev: '*',\n next: 'import',\n },\n {\n blankLine: 'any',\n prev: 'import',\n next: 'import',\n },\n /*\n * Exports form a block: padded from anything that isn't an export, but\n * consecutive exports can sit together. The same-type rule comes last so it\n * wins over the surrounding `*` rules.\n */\n {\n blankLine: 'always',\n prev: 'export',\n next: '*',\n },\n {\n blankLine: 'always',\n prev: '*',\n next: 'export',\n },\n {\n blankLine: 'any',\n prev: 'export',\n next: 'export',\n },\n];\n\nexport const jsdocTagLineOptions = ['always', { count: 1, startLines: 1, applyToEndTag: false }];\n\nexport interface JavaScriptRuleOptions {\n preventAbbreviations?: {\n allowList?: string[];\n inheritAllowList?: boolean;\n replacements?: Record<string, Record<string, boolean> | false>;\n inheritReplacements?: boolean;\n };\n}\n\n/**\n * Non type-aware rules that run under Oxlint.\n */\nexport function jsRulesOxlint(options: JavaScriptRuleOptions = {}): Linter.RulesRecord {\n const { preventAbbreviations: preventAbbreviationsOptions } = options;\n\n const {\n inheritAllowList = true,\n inheritReplacements = true,\n allowList = [],\n replacements = {},\n } = preventAbbreviationsOptions ?? {};\n\n return {\n 'consistent-return': 'error',\n curly: ['error', 'all'],\n 'arrow-body-style': 'off',\n 'dot-notation': 'error',\n 'no-debugger': 'warn',\n 'no-unused-vars': 'off',\n 'no-async-promise-executor': 'error',\n 'no-case-declarations': 'error',\n 'default-case-last': 'error',\n 'no-cond-assign': 'error',\n 'no-dynamic-delete': 'off',\n 'no-unneeded-ternary': 'error',\n 'object-shorthand': 'error',\n 'no-constant-condition': ['error', { checkLoops: false }],\n\n '@stylistic/padding-line-between-statements': ['error', ...paddingLineEntries],\n '@stylistic/no-trailing-spaces': 'error',\n\n /*\n * Indentation is owned by Prettier. Oxlint's @stylistic/indent port\n * diverges from eslint-stylistic on edge cases (e.g., multiline object\n * args inside ternaries), so we leave the rule off.\n */\n '@stylistic/indent': 'off',\n '@stylistic/no-multiple-empty-lines': ['error', { max: 1 }],\n '@stylistic/multiline-comment-style': ['error', 'starred-block'],\n '@stylistic/spaced-comment': [\n 'error',\n 'always',\n {\n block: { balanced: true },\n },\n ],\n '@stylistic/brace-style': ['error', '1tbs'],\n '@stylistic/lines-around-comment': [\n 'error',\n {\n beforeBlockComment: true,\n beforeLineComment: true,\n allowBlockStart: true,\n allowBlockEnd: false,\n allowObjectStart: true,\n allowObjectEnd: false,\n allowArrayStart: true,\n allowArrayEnd: true,\n allowClassStart: true,\n allowInterfaceStart: true,\n allowInterfaceEnd: true,\n allowEnumStart: true,\n allowEnumEnd: true,\n allowTypeStart: true,\n allowTypeEnd: false,\n },\n ],\n\n // unicorn recommended, split between native oxlint ports and JS originals\n ...unicornRulesOxlint,\n ...unicornRulesJsPlugin,\n\n /*\n * Oxlint's built-in `unicorn` / `jsdoc` plugins don't implement these,\n * so we wire the original JS plugins under aliased names (see jsPlugins\n * in `src/oxlint.ts`). Rule IDs use the alias, not the canonical prefix.\n */\n 'unicornx/prevent-abbreviations': [\n 'error',\n {\n replacements: inheritReplacements ? { ...ABBREVIATION_REPLACEMENTS, ...replacements } : replacements,\n allowList: Object.fromEntries(\n (inheritAllowList ? [...DEFAULT_ABBREVIATION_ALLOW_LIST, ...allowList] : allowList).map((name) => [\n name,\n true,\n ]),\n ),\n },\n ],\n\n 'jsdocx/tag-lines': ['error', ...jsdocTagLineOptions],\n };\n}\n\n/**\n * Rules that can't run under Oxlint. ESLint-core rules that Oxlint hasn't\n * implemented yet and aren't exposed by any plugin we can alias into oxlint's\n * `jsPlugins` (the `@eslint/js` package only ships configs, not a raw `rules`\n * object). ESLint picks them up after Oxlint runs.\n *\n * Type-aware rules are served separately.\n */\nexport function jsRulesEslint(_options: JavaScriptRuleOptions = {}): Linter.RulesRecord {\n return {\n 'prefer-arrow-callback': 'error',\n 'no-useless-assignment': 'error',\n };\n}\n","import type { Linter } from 'eslint';\n\nexport interface ReactRuleOptions {\n fastRefresh?: boolean;\n performance?: boolean;\n}\n\nexport type ReactConfigOptions = boolean | ReactRuleOptions;\n\ninterface ResolvedReactRuleOptions {\n fastRefresh: boolean;\n performance: boolean;\n}\n\nexport const reactFileExtensions = ['**/*.jsx', '**/*.tsx'];\n\nexport function resolveReactRuleOptions(options: ReactConfigOptions = false): ResolvedReactRuleOptions {\n if (options === false) {\n return {\n fastRefresh: false,\n performance: false,\n };\n }\n\n if (options === true) {\n return {\n fastRefresh: true,\n performance: true,\n };\n }\n\n return {\n fastRefresh: options.fastRefresh ?? true,\n performance: options.performance ?? true,\n };\n}\n\nexport function reactRulesOxlint(options: ReactConfigOptions = false): Linter.RulesRecord {\n const resolvedOptions = resolveReactRuleOptions(options);\n\n return {\n 'react/jsx-key': 'error',\n 'react/jsx-no-duplicate-props': 'error',\n 'react/no-children-prop': 'error',\n 'react/no-danger-with-children': 'error',\n 'react/void-dom-elements-no-children': 'error',\n 'react/no-unknown-property': 'error',\n 'react/style-prop-object': 'error',\n 'react/button-has-type': 'error',\n 'react/checked-requires-onchange-or-readonly': 'error',\n 'react/forward-ref-uses-ref': 'error',\n 'react/jsx-props-no-spread-multi': 'error',\n 'react/jsx-no-script-url': 'error',\n 'react/jsx-no-target-blank': 'error',\n 'react/jsx-no-constructed-context-values': 'error',\n 'react/no-unstable-nested-components': 'error',\n 'react/no-array-index-key': 'warn',\n 'react/no-object-type-as-default-prop': 'warn',\n 'react/iframe-missing-sandbox': 'error',\n 'react/no-danger': 'warn',\n\n ...(resolvedOptions.fastRefresh && {\n 'react/only-export-components': ['warn', { allowConstantExport: true }],\n }),\n\n ...(resolvedOptions.performance && {\n 'react-perf/jsx-no-new-object-as-prop': 'warn',\n 'react-perf/jsx-no-new-array-as-prop': 'warn',\n 'react-perf/jsx-no-new-function-as-prop': 'warn',\n 'react-perf/jsx-no-jsx-as-prop': 'warn',\n }),\n };\n}\n","import type { Linter } from 'eslint';\n\nimport { jsRulesOxlint, type JavaScriptRuleOptions } from './javascript.js';\n\nexport const tsFileExtensions = ['**/*.ts', '**/*.tsx', '**/*.mts', '**/*.cts'];\n\nconst tsIgnoreDescriptionFormat = String.raw`^: TS\\d+ because .+$`;\n\nexport interface TypeScriptRuleOptions extends JavaScriptRuleOptions {\n namingConvention?: {\n variable?: {\n inheritFormat?: boolean;\n format?: string[];\n exceptions?: string[];\n };\n parameter?: {\n inheritFormat?: boolean;\n format?: string[];\n exceptions?: string[];\n };\n typeLike?: {\n inheritFormat?: boolean;\n format?: string[];\n exceptions?: string[];\n };\n memberLike?: {\n inheritFormat?: boolean;\n format?: string[];\n exceptions?: string[];\n };\n function?: {\n inheritFormat?: boolean;\n format?: string[];\n exceptions?: string[];\n };\n };\n}\n\ninterface NamingConventionFormatOptions {\n inheritFormat?: boolean;\n format?: string[];\n}\n\n/**\n * Non type-aware TypeScript rules that run under Oxlint.\n */\nexport function tsRulesOxlint(options: TypeScriptRuleOptions = {}): Linter.RulesRecord {\n return {\n ...jsRulesOxlint(options),\n\n /**\n * Oxlint exposes typescript-eslint rules under its own `typescript/`\n * namespace, so rule ids are prefixed `typescript/` rather than\n * `@typescript-eslint/`.\n */\n 'typescript/no-unused-vars': [\n 'error',\n {\n argsIgnorePattern: '^_',\n ignoreRestSiblings: true,\n },\n ],\n 'typescript/no-unnecessary-condition': 'error',\n 'typescript/no-floating-promises': 'error',\n 'typescript/no-non-null-assertion': 'error',\n 'typescript/no-empty-function': 'off',\n 'typescript/no-explicit-any': 'off',\n 'typescript/no-base-to-string': 'off',\n 'typescript/no-dynamic-delete': 'off',\n 'typescript/no-extra-non-null-assertion': 'error',\n 'typescript/no-non-null-asserted-optional-chain': 'error',\n 'typescript/explicit-module-boundary-types': 'off',\n 'typescript/ban-ts-comment': [\n 'error',\n {\n 'ts-expect-error': { descriptionFormat: tsIgnoreDescriptionFormat },\n 'ts-ignore': { descriptionFormat: tsIgnoreDescriptionFormat },\n 'ts-nocheck': true,\n 'ts-check': false,\n },\n ],\n\n '@stylistic/type-annotation-spacing': 'error',\n\n // comment handling conflicts with the padding-line heuristics\n '@stylistic/lines-around-comment': 'off',\n };\n}\n\n/**\n * TypeScript rules served by ESLint.\n *\n * These are not type-aware in the strict sense, but Oxlint's native\n * `typescript` plugin doesn't implement them today, so we run them under\n * ESLint.\n */\nexport function tsRulesEslint(options: TypeScriptRuleOptions = {}): Linter.RulesRecord {\n return {\n ...getESLintNamingConventionRule(options.namingConvention),\n '@typescript-eslint/explicit-member-accessibility': ['error', { accessibility: 'no-public' }],\n '@typescript-eslint/no-dynamic-delete': 'off',\n '@typescript-eslint/array-type': 'off',\n '@typescript-eslint/require-await': 'off',\n '@typescript-eslint/no-explicit-any': 'off',\n '@typescript-eslint/no-empty-function': 'off',\n '@typescript-eslint/prefer-nullish-coalescing': [\n 'error',\n {\n ignorePrimitives: true,\n },\n ],\n '@typescript-eslint/no-unused-vars': [\n 'error',\n {\n argsIgnorePattern: '^_',\n varsIgnorePattern: '^_',\n caughtErrorsIgnorePattern: '^_',\n destructuredArrayIgnorePattern: '^_',\n ignoreRestSiblings: true,\n },\n ],\n };\n}\n\n/**\n * ESLint-namespaced variant of the naming-convention rule. Keeps the same\n * filter / selector shape as {@link getNamingConventionRule}, only swapping\n * the rule id so it lines up with `@typescript-eslint/eslint-plugin`.\n */\nexport function getESLintNamingConventionRule(\n extensions?: TypeScriptRuleOptions['namingConvention'],\n): Linter.RulesRecord {\n const oxlintRules = getNamingConventionRule(extensions);\n\n return {\n '@typescript-eslint/naming-convention': oxlintRules['typescript/naming-convention'],\n };\n}\n\nexport function getNamingConventionRule(extensions?: TypeScriptRuleOptions['namingConvention']): Linter.RulesRecord {\n return {\n 'typescript/naming-convention': [\n 'error',\n {\n selector: ['variable'],\n format: mergeFormat(['camelCase', 'UPPER_CASE', 'PascalCase'], extensions?.variable),\n leadingUnderscore: 'allowSingleOrDouble',\n trailingUnderscore: 'forbid',\n filter: {\n regex: generateFilterRegex(['__dirname'], extensions?.variable?.exceptions),\n match: false,\n },\n },\n {\n selector: ['function'],\n format: mergeFormat(['camelCase', 'UPPER_CASE', 'PascalCase'], extensions?.function),\n leadingUnderscore: 'allowSingleOrDouble',\n trailingUnderscore: 'forbid',\n filter: {\n regex: generateFilterRegex(['__dirname'], extensions?.function?.exceptions),\n match: false,\n },\n },\n {\n selector: 'parameter',\n format: mergeFormat(['camelCase', 'UPPER_CASE', 'PascalCase'], extensions?.parameter),\n leadingUnderscore: 'allow',\n ...(extensions?.parameter?.exceptions?.length && {\n filter: {\n regex: generateFilterRegex([], extensions.parameter.exceptions),\n match: false,\n },\n }),\n },\n {\n selector: 'typeLike',\n format: mergeFormat(['PascalCase'], extensions?.typeLike),\n ...(extensions?.typeLike?.exceptions?.length && {\n filter: {\n regex: generateFilterRegex([], extensions.typeLike.exceptions),\n match: false,\n },\n }),\n },\n {\n selector: 'memberLike',\n modifiers: ['private'],\n format: mergeFormat(['camelCase', 'PascalCase'], extensions?.memberLike),\n leadingUnderscore: 'require',\n ...(extensions?.memberLike?.exceptions?.length && {\n filter: {\n regex: generateFilterRegex([], extensions.memberLike.exceptions),\n match: false,\n },\n }),\n },\n ],\n };\n}\n\nfunction mergeFormat(defaults: string[], extensions?: NamingConventionFormatOptions) {\n return [...new Set([...((extensions?.inheritFormat ?? true) ? defaults : []), ...(extensions?.format ?? [])])];\n}\n\nfunction generateFilterRegex(defaults: string[], extensions: string[] = []) {\n return `^(${[...defaults, ...extensions].join('|')})$`;\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/configs/unicorn.ts","../src/configs/abbreviations.ts","../src/configs/javascript.ts","../src/configs/react.ts","../src/configs/typescript.ts"],"sourcesContent":["import type { Linter } from 'eslint';\n\n/*\n * Mirror of `eslint-plugin-unicorn`'s recommended config, split by runtime.\n *\n * Oxlint natively implements most unicorn rules, so we enable those under the\n * canonical `unicorn/` prefix (fast, Rust). Rules oxlint hasn't ported run\n * through the original JS plugin, aliased as `unicornx` in `jsPlugins` (see\n * `src/oxlint.ts`), because oxlint's built-in plugin owns the `unicorn/`\n * namespace.\n *\n * `unicorn/prevent-abbreviations` is also not ported; it lives in\n * `javascript.ts` because it takes user-configurable options.\n */\n\n/**\n * Unicorn recommended rules natively implemented by Oxlint, grouped by the\n * oxlint category they belong to. Only the correctness group is enabled by\n * oxlint's defaults (as `warn`); everything is set explicitly to `error` to\n * match the recommended config.\n */\nexport const unicornRulesOxlint: Linter.RulesRecord = {\n // correctness\n 'unicorn/no-await-in-promise-methods': 'error',\n 'unicorn/no-empty-file': 'warn',\n 'unicorn/no-invalid-fetch-options': 'error',\n 'unicorn/no-invalid-remove-event-listener': 'error',\n 'unicorn/no-new-array': 'error',\n 'unicorn/no-single-promise-in-promise-methods': 'error',\n 'unicorn/no-thenable': 'error',\n 'unicorn/no-unnecessary-await': 'error',\n 'unicorn/no-useless-fallback-in-spread': 'error',\n 'unicorn/no-useless-length-check': 'error',\n 'unicorn/no-useless-spread': 'error',\n 'unicorn/prefer-set-size': 'error',\n 'unicorn/prefer-string-starts-ends-with': 'error',\n\n // perf\n 'unicorn/prefer-array-find': 'error',\n 'unicorn/prefer-array-flat-map': 'error',\n 'unicorn/prefer-set-has': 'error',\n\n // restriction\n 'unicorn/no-abusive-eslint-disable': 'error',\n 'unicorn/no-anonymous-default-export': 'error',\n 'unicorn/no-array-for-each': 'error',\n 'unicorn/no-array-reduce': 'error',\n 'unicorn/no-document-cookie': 'error',\n 'unicorn/no-magic-array-flat-depth': 'error',\n 'unicorn/no-process-exit': 'error',\n 'unicorn/no-useless-error-capture-stack-trace': 'error',\n 'unicorn/prefer-modern-math-apis': 'error',\n 'unicorn/prefer-module': 'error',\n 'unicorn/prefer-node-protocol': 'error',\n 'unicorn/prefer-number-properties': 'error',\n\n // suspicious\n 'unicorn/consistent-function-scoping': 'error',\n 'unicorn/no-accessor-recursion': 'error',\n 'unicorn/no-array-reverse': 'error',\n 'unicorn/no-array-sort': 'error',\n 'unicorn/no-instanceof-builtins': 'error',\n 'unicorn/prefer-add-event-listener': 'error',\n 'unicorn/require-module-specifiers': 'error',\n\n // pedantic\n 'unicorn/consistent-assert': 'error',\n 'unicorn/consistent-empty-array-spread': 'error',\n 'unicorn/escape-case': 'error',\n 'unicorn/explicit-length-check': 'error',\n 'unicorn/new-for-builtins': 'error',\n 'unicorn/no-array-callback-reference': 'error',\n 'unicorn/no-hex-escape': 'error',\n 'unicorn/no-immediate-mutation': 'error',\n 'unicorn/no-lonely-if': 'error',\n 'unicorn/no-negation-in-equality-check': 'error',\n 'unicorn/no-new-buffer': 'error',\n 'unicorn/no-object-as-default-parameter': 'error',\n 'unicorn/no-static-only-class': 'error',\n 'unicorn/no-this-assignment': 'error',\n 'unicorn/no-typeof-undefined': 'error',\n 'unicorn/no-unnecessary-array-flat-depth': 'error',\n 'unicorn/no-unnecessary-array-splice-count': 'error',\n 'unicorn/no-unnecessary-slice-end': 'error',\n 'unicorn/no-unreadable-iife': 'error',\n 'unicorn/no-useless-promise-resolve-reject': 'error',\n 'unicorn/no-useless-switch-case': 'error',\n 'unicorn/prefer-array-flat': 'error',\n 'unicorn/prefer-array-some': 'error',\n 'unicorn/prefer-at': 'error',\n 'unicorn/prefer-blob-reading-methods': 'error',\n 'unicorn/prefer-code-point': 'error',\n 'unicorn/prefer-date-now': 'error',\n 'unicorn/prefer-dom-node-append': 'error',\n 'unicorn/prefer-dom-node-dataset': 'error',\n 'unicorn/prefer-dom-node-remove': 'error',\n 'unicorn/prefer-event-target': 'error',\n 'unicorn/prefer-math-min-max': 'error',\n 'unicorn/prefer-math-trunc': 'error',\n 'unicorn/prefer-native-coercion-functions': 'error',\n 'unicorn/prefer-prototype-methods': 'error',\n 'unicorn/prefer-query-selector': 'error',\n 'unicorn/prefer-regexp-test': 'error',\n 'unicorn/prefer-string-replace-all': 'error',\n 'unicorn/prefer-string-slice': 'error',\n 'unicorn/prefer-top-level-await': 'error',\n 'unicorn/prefer-type-error': 'error',\n 'unicorn/require-number-to-fixed-digits-argument': 'error',\n\n // style\n 'unicorn/catch-error-name': ['error', { name: 'error' }],\n 'unicorn/consistent-date-clone': 'error',\n 'unicorn/consistent-existence-index-check': 'error',\n 'unicorn/consistent-template-literal-escape': 'error',\n 'unicorn/empty-brace-spaces': 'error',\n 'unicorn/error-message': 'error',\n 'unicorn/no-array-method-this-argument': 'error',\n 'unicorn/no-await-expression-member': 'error',\n 'unicorn/no-console-spaces': 'error',\n 'unicorn/no-unreadable-array-destructuring': 'error',\n 'unicorn/no-useless-collection-argument': 'error',\n 'unicorn/no-zero-fractions': 'error',\n 'unicorn/numeric-separators-style': 'error',\n 'unicorn/prefer-array-index-of': 'error',\n 'unicorn/prefer-bigint-literals': 'error',\n 'unicorn/prefer-class-fields': 'error',\n 'unicorn/prefer-classlist-toggle': 'error',\n 'unicorn/prefer-default-parameters': 'error',\n 'unicorn/prefer-dom-node-text-content': 'error',\n 'unicorn/prefer-global-this': 'error',\n 'unicorn/prefer-includes': 'error',\n 'unicorn/prefer-keyboard-event-key': 'error',\n 'unicorn/prefer-logical-operator-over-ternary': 'error',\n 'unicorn/prefer-modern-dom-apis': 'error',\n 'unicorn/prefer-negative-index': 'error',\n 'unicorn/prefer-object-from-entries': 'error',\n 'unicorn/prefer-optional-catch-binding': 'error',\n 'unicorn/prefer-reflect-apply': 'error',\n 'unicorn/prefer-response-static-json': 'error',\n 'unicorn/prefer-spread': 'error',\n 'unicorn/prefer-string-raw': 'error',\n 'unicorn/prefer-string-trim-start-end': 'error',\n 'unicorn/prefer-structured-clone': 'error',\n 'unicorn/relative-url-style': 'error',\n 'unicorn/require-array-join-separator': 'error',\n 'unicorn/require-module-attributes': 'error',\n 'unicorn/switch-case-braces': 'error',\n 'unicorn/switch-case-break-position': 'error',\n 'unicorn/text-encoding-identifier-case': 'error',\n 'unicorn/throw-new-error': 'error',\n};\n\n/**\n * Unicorn recommended rules that Oxlint hasn't ported. They run inside Oxlint\n * through the original JS plugin under the `unicornx` alias.\n */\nexport const unicornRulesJsPlugin: Linter.RulesRecord = {\n 'unicornx/isolated-functions': 'error',\n 'unicornx/no-for-loop': 'error',\n 'unicornx/no-named-default': 'error',\n 'unicornx/no-unnecessary-polyfills': 'error',\n 'unicornx/prefer-export-from': 'error',\n 'unicornx/prefer-simple-condition-first': 'error',\n 'unicornx/prefer-single-call': 'error',\n 'unicornx/prefer-switch': 'error',\n 'unicornx/template-indent': 'error',\n\n /*\n * Native port exists but only in oxlint's nursery category, which can't be\n * enabled from config, so we run the JS original instead.\n */\n 'unicornx/no-useless-iterator-to-array': 'error',\n\n /*\n * Oxlint's port hardcodes uppercase hexadecimal digits, which fights\n * Prettier's lowercase formatting, so we run the JS original with the\n * lowercase option instead.\n */\n 'unicornx/number-literal-case': ['error', { hexadecimalValue: 'lowercase' }],\n};\n\n/**\n * Unicorn recommended rules that can't run inside Oxlint's JS-plugin host yet\n * because the compat layer is missing ESLint APIs (e.g.\n * `sourceCode.getDisableDirectives`). ESLint picks them up after Oxlint runs.\n */\nexport const unicornRulesEslint: Linter.RulesRecord = {\n 'unicorn/expiring-todo-comments': 'error',\n};\n","export const DEFAULT_ABBREVIATION_ALLOW_LIST = [\n 'fn',\n 'cb',\n 'err',\n 'prev',\n 'props',\n 'refs',\n 'ref',\n 'dev',\n 'i',\n 'arg',\n 'args',\n];\n\nexport const ABBREVIATION_REPLACEMENTS: Record<string, Record<string, boolean> | false> = {\n ref: false,\n refs: false,\n dev: false,\n dir: false,\n env: false,\n ev: { event: true },\n val: { value: true },\n msg: { message: true },\n el: { element: true },\n elem: { element: true },\n btn: { button: true },\n cb: { callback: true },\n fn: { function: true },\n err: { error: true },\n opts: { options: true },\n cfg: { config: true },\n obj: { object: true },\n arr: { array: true },\n str: { string: true },\n num: { number: true },\n curr: { current: true },\n len: { length: true },\n e: { event: true, error: true },\n};\n","import type { Linter } from 'eslint';\nimport { ABBREVIATION_REPLACEMENTS, DEFAULT_ABBREVIATION_ALLOW_LIST } from './abbreviations.js';\nimport { unicornRulesJsPlugin, unicornRulesOxlint } from './unicorn.js';\n\nexport const jsFileExtensions = ['**/*.js', '**/*.jsx', '**/*.mjs', '**/*.cjs'];\n\nexport const paddingLineEntries = [\n {\n blankLine: 'always',\n prev: '*',\n next: ['block', 'block-like', 'class', 'const', 'let'],\n },\n {\n blankLine: 'always',\n prev: 'block',\n next: '*',\n },\n {\n blankLine: 'always',\n prev: ['const'],\n next: '*',\n },\n {\n blankLine: 'always',\n prev: ['let'],\n next: '*',\n },\n {\n blankLine: 'any',\n prev: ['const'],\n next: ['const'],\n },\n {\n blankLine: 'any',\n prev: ['let'],\n next: ['let'],\n },\n {\n blankLine: 'always',\n prev: ['let'],\n next: ['const'],\n },\n {\n blankLine: 'always',\n prev: ['const'],\n next: ['let'],\n },\n {\n blankLine: 'always',\n prev: ['singleline-const'],\n next: ['multiline-const'],\n },\n {\n blankLine: 'always',\n prev: ['multiline-const'],\n next: ['singleline-const'],\n },\n {\n blankLine: 'always',\n prev: ['singleline-let'],\n next: ['multiline-let'],\n },\n {\n blankLine: 'always',\n prev: ['multiline-let'],\n next: ['singleline-let'],\n },\n {\n blankLine: 'any',\n prev: ['case', 'block', 'block-like'],\n next: ['case', 'default'],\n },\n {\n blankLine: 'any',\n prev: '*',\n next: 'break',\n },\n {\n blankLine: 'always',\n prev: 'if',\n next: '*',\n },\n /*\n * Imports form a block: padded from anything that isn't an import, but\n * consecutive imports can sit together. The same-type rule comes last so it\n * wins over the surrounding `*` rules.\n */\n {\n blankLine: 'always',\n prev: 'import',\n next: '*',\n },\n {\n blankLine: 'always',\n prev: '*',\n next: 'import',\n },\n {\n blankLine: 'any',\n prev: 'import',\n next: 'import',\n },\n /*\n * Exports form a block: padded from anything that isn't an export, but\n * consecutive exports can sit together. The same-type rule comes last so it\n * wins over the surrounding `*` rules.\n */\n {\n blankLine: 'always',\n prev: 'export',\n next: '*',\n },\n {\n blankLine: 'always',\n prev: '*',\n next: 'export',\n },\n {\n blankLine: 'any',\n prev: 'export',\n next: 'export',\n },\n];\n\nexport const jsdocTagLineOptions = ['always', { count: 1, startLines: 1, applyToEndTag: false }];\n\nexport interface JavaScriptRuleOptions {\n preventAbbreviations?: {\n allowList?: string[];\n inheritAllowList?: boolean;\n replacements?: Record<string, Record<string, boolean> | false>;\n inheritReplacements?: boolean;\n };\n}\n\n/**\n * Non type-aware rules that run under Oxlint.\n */\nexport function jsRulesOxlint(options: JavaScriptRuleOptions = {}): Linter.RulesRecord {\n const { preventAbbreviations: preventAbbreviationsOptions } = options;\n\n const {\n inheritAllowList = true,\n inheritReplacements = true,\n allowList = [],\n replacements = {},\n } = preventAbbreviationsOptions ?? {};\n\n return {\n 'consistent-return': 'error',\n curly: ['error', 'all'],\n 'arrow-body-style': 'off',\n 'dot-notation': 'error',\n 'no-debugger': 'warn',\n 'no-unused-vars': 'off',\n 'no-async-promise-executor': 'error',\n 'no-case-declarations': 'error',\n 'default-case-last': 'error',\n 'no-cond-assign': 'error',\n 'no-dynamic-delete': 'off',\n 'no-unneeded-ternary': 'error',\n 'object-shorthand': 'error',\n 'no-constant-condition': ['error', { checkLoops: false }],\n\n '@stylistic/padding-line-between-statements': ['error', ...paddingLineEntries],\n '@stylistic/no-trailing-spaces': 'error',\n\n /*\n * Indentation is owned by Prettier. Oxlint's @stylistic/indent port\n * diverges from eslint-stylistic on edge cases (e.g., multiline object\n * args inside ternaries), so we leave the rule off.\n */\n '@stylistic/indent': 'off',\n '@stylistic/no-multiple-empty-lines': ['error', { max: 1 }],\n '@stylistic/multiline-comment-style': ['error', 'starred-block'],\n '@stylistic/spaced-comment': [\n 'error',\n 'always',\n {\n block: { balanced: true },\n },\n ],\n '@stylistic/brace-style': ['error', '1tbs'],\n '@stylistic/lines-around-comment': [\n 'error',\n {\n beforeBlockComment: true,\n beforeLineComment: true,\n allowBlockStart: true,\n allowBlockEnd: false,\n allowObjectStart: true,\n allowObjectEnd: false,\n allowArrayStart: true,\n allowArrayEnd: true,\n allowClassStart: true,\n allowInterfaceStart: true,\n allowInterfaceEnd: true,\n allowEnumStart: true,\n allowEnumEnd: true,\n allowTypeStart: true,\n allowTypeEnd: false,\n },\n ],\n\n // unicorn recommended, split between native oxlint ports and JS originals\n ...unicornRulesOxlint,\n ...unicornRulesJsPlugin,\n\n /*\n * Oxlint's built-in `unicorn` / `jsdoc` plugins don't implement these,\n * so we wire the original JS plugins under aliased names (see jsPlugins\n * in `src/oxlint.ts`). Rule IDs use the alias, not the canonical prefix.\n */\n 'unicornx/prevent-abbreviations': [\n 'error',\n {\n replacements: inheritReplacements ? { ...ABBREVIATION_REPLACEMENTS, ...replacements } : replacements,\n allowList: Object.fromEntries(\n (inheritAllowList ? [...DEFAULT_ABBREVIATION_ALLOW_LIST, ...allowList] : allowList).map((name) => [\n name,\n true,\n ]),\n ),\n },\n ],\n\n 'jsdocx/tag-lines': ['error', ...jsdocTagLineOptions],\n };\n}\n\n/**\n * Rules that can't run under Oxlint. ESLint-core rules that Oxlint hasn't\n * implemented yet and aren't exposed by any plugin we can alias into oxlint's\n * `jsPlugins` (the `@eslint/js` package only ships configs, not a raw `rules`\n * object). ESLint picks them up after Oxlint runs.\n *\n * Type-aware rules are served separately.\n */\nexport function jsRulesEslint(_options: JavaScriptRuleOptions = {}): Linter.RulesRecord {\n return {\n 'prefer-arrow-callback': 'error',\n 'no-useless-assignment': 'error',\n };\n}\n","import type { Linter } from 'eslint';\n\nexport interface ReactRuleOptions {\n fastRefresh?: boolean;\n performance?: boolean;\n}\n\nexport type ReactConfigOptions = boolean | ReactRuleOptions;\n\ninterface ResolvedReactRuleOptions {\n fastRefresh: boolean;\n performance: boolean;\n}\n\nexport const reactFileExtensions = ['**/*.jsx', '**/*.tsx'];\n\nexport function resolveReactRuleOptions(options: ReactConfigOptions = false): ResolvedReactRuleOptions {\n if (options === false) {\n return {\n fastRefresh: false,\n performance: false,\n };\n }\n\n if (options === true) {\n return {\n fastRefresh: true,\n performance: true,\n };\n }\n\n return {\n fastRefresh: options.fastRefresh ?? true,\n performance: options.performance ?? true,\n };\n}\n\nexport function reactRulesOxlint(options: ReactConfigOptions = false): Linter.RulesRecord {\n const resolvedOptions = resolveReactRuleOptions(options);\n\n return {\n 'react/jsx-key': 'error',\n 'react/jsx-no-duplicate-props': 'error',\n 'react/no-children-prop': 'error',\n 'react/no-danger-with-children': 'error',\n 'react/void-dom-elements-no-children': 'error',\n 'react/no-unknown-property': 'error',\n 'react/style-prop-object': 'error',\n 'react/button-has-type': 'error',\n 'react/checked-requires-onchange-or-readonly': 'error',\n 'react/forward-ref-uses-ref': 'error',\n 'react/jsx-props-no-spread-multi': 'error',\n 'react/jsx-no-script-url': 'error',\n 'react/jsx-no-target-blank': 'error',\n 'react/jsx-no-constructed-context-values': 'error',\n 'react/no-unstable-nested-components': 'error',\n 'react/no-array-index-key': 'warn',\n 'react/no-object-type-as-default-prop': 'warn',\n 'react/iframe-missing-sandbox': 'error',\n 'react/no-danger': 'warn',\n\n ...(resolvedOptions.fastRefresh && {\n 'react/only-export-components': ['warn', { allowConstantExport: true }],\n }),\n\n ...(resolvedOptions.performance && {\n 'react-perf/jsx-no-new-object-as-prop': 'warn',\n 'react-perf/jsx-no-new-array-as-prop': 'warn',\n 'react-perf/jsx-no-new-function-as-prop': 'warn',\n 'react-perf/jsx-no-jsx-as-prop': 'warn',\n }),\n };\n}\n","import type { Linter } from 'eslint';\n\nimport { jsRulesOxlint, type JavaScriptRuleOptions } from './javascript.js';\n\nexport const tsFileExtensions = ['**/*.ts', '**/*.tsx', '**/*.mts', '**/*.cts'];\n\nconst tsIgnoreDescriptionFormat = String.raw`^: TS\\d+ because .+$`;\n\nexport interface TypeScriptRuleOptions extends JavaScriptRuleOptions {\n namingConvention?: {\n variable?: {\n inheritFormat?: boolean;\n format?: string[];\n exceptions?: string[];\n };\n parameter?: {\n inheritFormat?: boolean;\n format?: string[];\n exceptions?: string[];\n };\n typeLike?: {\n inheritFormat?: boolean;\n format?: string[];\n exceptions?: string[];\n };\n memberLike?: {\n inheritFormat?: boolean;\n format?: string[];\n exceptions?: string[];\n };\n function?: {\n inheritFormat?: boolean;\n format?: string[];\n exceptions?: string[];\n };\n };\n}\n\ninterface NamingConventionFormatOptions {\n inheritFormat?: boolean;\n format?: string[];\n}\n\n/**\n * Non type-aware TypeScript rules that run under Oxlint.\n */\nexport function tsRulesOxlint(options: TypeScriptRuleOptions = {}): Linter.RulesRecord {\n return {\n ...jsRulesOxlint(options),\n\n /**\n * Oxlint exposes typescript-eslint rules under its own `typescript/`\n * namespace, so rule ids are prefixed `typescript/` rather than\n * `@typescript-eslint/`.\n */\n 'typescript/no-unused-vars': [\n 'error',\n {\n argsIgnorePattern: '^_',\n ignoreRestSiblings: true,\n },\n ],\n 'typescript/no-unnecessary-condition': 'error',\n 'typescript/no-floating-promises': 'error',\n 'typescript/no-non-null-assertion': 'error',\n 'typescript/no-empty-function': 'off',\n 'typescript/no-explicit-any': 'off',\n 'typescript/no-base-to-string': 'off',\n 'typescript/no-dynamic-delete': 'off',\n 'typescript/no-extra-non-null-assertion': 'error',\n 'typescript/no-non-null-asserted-optional-chain': 'error',\n 'typescript/explicit-module-boundary-types': 'off',\n 'typescript/ban-ts-comment': [\n 'error',\n {\n 'ts-expect-error': { descriptionFormat: tsIgnoreDescriptionFormat },\n 'ts-ignore': { descriptionFormat: tsIgnoreDescriptionFormat },\n 'ts-nocheck': true,\n 'ts-check': false,\n },\n ],\n\n '@stylistic/type-annotation-spacing': 'error',\n\n // comment handling conflicts with the padding-line heuristics\n '@stylistic/lines-around-comment': 'off',\n };\n}\n\n/**\n * TypeScript rules served by ESLint.\n *\n * These are not type-aware in the strict sense, but Oxlint's native\n * `typescript` plugin doesn't implement them today, so we run them under\n * ESLint.\n */\nexport function tsRulesEslint(options: TypeScriptRuleOptions = {}): Linter.RulesRecord {\n return {\n ...getESLintNamingConventionRule(options.namingConvention),\n '@typescript-eslint/explicit-member-accessibility': ['error', { accessibility: 'no-public' }],\n '@typescript-eslint/no-dynamic-delete': 'off',\n '@typescript-eslint/array-type': 'off',\n '@typescript-eslint/require-await': 'off',\n '@typescript-eslint/no-explicit-any': 'off',\n '@typescript-eslint/no-empty-function': 'off',\n '@typescript-eslint/prefer-nullish-coalescing': [\n 'error',\n {\n ignorePrimitives: true,\n },\n ],\n '@typescript-eslint/no-unused-vars': [\n 'error',\n {\n argsIgnorePattern: '^_',\n varsIgnorePattern: '^_',\n caughtErrorsIgnorePattern: '^_',\n destructuredArrayIgnorePattern: '^_',\n ignoreRestSiblings: true,\n },\n ],\n };\n}\n\n/**\n * ESLint-namespaced variant of the naming-convention rule. Keeps the same\n * filter / selector shape as {@link getNamingConventionRule}, only swapping\n * the rule id so it lines up with `@typescript-eslint/eslint-plugin`.\n */\nexport function getESLintNamingConventionRule(\n extensions?: TypeScriptRuleOptions['namingConvention'],\n): Linter.RulesRecord {\n const oxlintRules = getNamingConventionRule(extensions);\n\n return {\n '@typescript-eslint/naming-convention': oxlintRules['typescript/naming-convention'],\n };\n}\n\nexport function getNamingConventionRule(extensions?: TypeScriptRuleOptions['namingConvention']): Linter.RulesRecord {\n return {\n 'typescript/naming-convention': [\n 'error',\n {\n selector: ['variable'],\n format: mergeFormat(['camelCase', 'UPPER_CASE', 'PascalCase'], extensions?.variable),\n leadingUnderscore: 'allowSingleOrDouble',\n trailingUnderscore: 'forbid',\n filter: {\n regex: generateFilterRegex(['__dirname'], extensions?.variable?.exceptions),\n match: false,\n },\n },\n {\n selector: ['function'],\n format: mergeFormat(['camelCase', 'UPPER_CASE', 'PascalCase'], extensions?.function),\n leadingUnderscore: 'allowSingleOrDouble',\n trailingUnderscore: 'forbid',\n filter: {\n regex: generateFilterRegex(['__dirname'], extensions?.function?.exceptions),\n match: false,\n },\n },\n {\n selector: 'parameter',\n format: mergeFormat(['camelCase', 'UPPER_CASE', 'PascalCase'], extensions?.parameter),\n leadingUnderscore: 'allow',\n ...(extensions?.parameter?.exceptions?.length && {\n filter: {\n regex: generateFilterRegex([], extensions.parameter.exceptions),\n match: false,\n },\n }),\n },\n {\n selector: 'typeLike',\n format: mergeFormat(['PascalCase'], extensions?.typeLike),\n ...(extensions?.typeLike?.exceptions?.length && {\n filter: {\n regex: generateFilterRegex([], extensions.typeLike.exceptions),\n match: false,\n },\n }),\n },\n {\n selector: 'memberLike',\n modifiers: ['private'],\n format: mergeFormat(['camelCase', 'PascalCase'], extensions?.memberLike),\n leadingUnderscore: 'require',\n ...(extensions?.memberLike?.exceptions?.length && {\n filter: {\n regex: generateFilterRegex([], extensions.memberLike.exceptions),\n match: false,\n },\n }),\n },\n ],\n };\n}\n\nfunction mergeFormat(defaults: string[], extensions?: NamingConventionFormatOptions) {\n return [...new Set([...((extensions?.inheritFormat ?? true) ? defaults : []), ...(extensions?.format ?? [])])];\n}\n\nfunction generateFilterRegex(defaults: string[], extensions: string[] = []) {\n return `^(${[...defaults, ...extensions].join('|')})$`;\n}\n"],"mappings":";AAqBO,IAAM,qBAAyC;AAAA;AAAA,EAEpD,uCAAuC;AAAA,EACvC,yBAAyB;AAAA,EACzB,oCAAoC;AAAA,EACpC,4CAA4C;AAAA,EAC5C,wBAAwB;AAAA,EACxB,gDAAgD;AAAA,EAChD,uBAAuB;AAAA,EACvB,gCAAgC;AAAA,EAChC,yCAAyC;AAAA,EACzC,mCAAmC;AAAA,EACnC,6BAA6B;AAAA,EAC7B,2BAA2B;AAAA,EAC3B,0CAA0C;AAAA;AAAA,EAG1C,6BAA6B;AAAA,EAC7B,iCAAiC;AAAA,EACjC,0BAA0B;AAAA;AAAA,EAG1B,qCAAqC;AAAA,EACrC,u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