Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.
Vendored padding-line-between-statements
Source: ESLint Stylistic, commit 435c3ea0fd26a5fef9042c4b36b6e165fbbf8d08.
Copied files:
packages/eslint-plugin/rules/padding-line-between-statements/padding-line-between-statements.tspackages/eslint-plugin/rules/padding-line-between-statements/types.d.ts→padding-line-options.d.ts- Root
LICENSE, retained verbatim. Both OpenJS Foundation and ESLint Stylistic notices apply.
The rule is MIT-licensed. Keep LICENSE with every redistributed copy, including skill assets. No Stylistic, ESLint, TypeScript-ESLint, or additional parser runtime dependency is required.
Local adaptations
- Replace upstream type aliases with Oxlint's ESTree, context, token/comment, and rule types. Upstream's token type includes comments; Oxlint exposes those separately.
- Replace
AST_NODE_TYPESenum members with identical string literals. - Guard indexed reads for consuming repositories with
noUncheckedIndexedAccess. Impossible missing AST/configuration entries raise explicit invariant errors rather than introducing new non-null assertions. - Replace the repository-specific
createRulefactory withcreatePaddingLineRule(options). The anti-slop wrapper supplies typed options directly; it exposes no user configuration options. - Implement the small required AST helper surface in
padding-line-ast.tsusing Oxlint's public source-code/token API.isParenthesizedonly needs the one-pair check used to exclude parenthesized directive strings, not the upstream general-purpose overloads. - Retain the upstream statement matchers, scope tracking, comment-aware insertion/removal, selector support, and diagnostic text. Upstream naming and non-null assumptions remain localized here to keep future diffs reviewable; the file is not a model for new application code.
The opinionated policy lives outside this directory in ../../rules/require-readable-spacing.ts. It adds spacing without collapsing existing blank lines. Short local bindings, consecutive imports, and adjacent overload signatures/implementation remain grouped. Spacing is syntactic, not an inference of business-logic boundaries.
Updating and verification
Fetch an explicit upstream revision, compare the original rule and types against this revision, and port relevant fixes while retaining the adapters above. Update this record and preserve the license. Run pnpm check and pnpm sync:skill-assets as required by repository guidance.
Focused Oxlint RuleTester cases live in ../../rules/require-readable-spacing.test.ts; they test exact fixes, JSDoc/trailing comments, same-line statements, semicolon-free code, TypeScript exports/overloads, Effect-style generators, and upstream removal behavior. ../../rules/require-readable-spacing-cli.test.ts verifies the exported plugin through the native Oxlint CLI on multiple files, including rejection, autofix, and repeated-fix stability. The complete upstream JS/TS test suites have not been ported; this is focused compatibility evidence, not a claim of full upstream conformance.