GitShow/antfu/eslint-plugin-command
antfu

eslint-plugin-command

Comment-as-command for one-off codemod with ESLint.

by antfu
codemodeslint-plugin
Star on GitHubForkWebsitenpm

TypeScript

372 stars18 forks19 contributorsActive · 3w agoSince 2024v4.0.0MIT

Meet the team

See all 19 on GitHub →
antfu
antfu98 contributions
sxzz
sxzz12 contributions
9romise
9romise3 contributions
posva
posva2 contributions
kvoon3
kvoon32 contributions
ddosakura
ddosakura2 contributions
hyoban
hyoban2 contributions
ntnyq
ntnyq1 contribution

Languages

View on GitHub →
TypeScript99.2%
JavaScript0.8%

Commit activity

Last 12 weeks · 11 commits

Full graph →

Community health

5 of 6 standards met

Community profile →
85
✓README✓License✓Contributing✓Code of Conduct○Issue Template✓PR Template

Recent PRs & issues

Active · 1 in progress · Last activity 3w ago
See all on GitHub →
Soundvessel
[BUG] `/// keep-sorted` error with "as const satisfies ..." combinationOpenIssue

Describe the bug Appears related to https://github.com/antfu/eslint-plugin-command/issues/25 but this is when is used with e,g. The following produces the error on keep-sorted; Reproduction see above System Info Used Package Manager yarn Validations [x] Follow our Code of Conduct [x] Read the Contributing Guide. [x] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate. [x] Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead. [x] The provided reproduction is a minimal reproducible of the bug. Contributions [ ] I am willing to submit a PR to fix this issue [ ] I am willing to submit a PR with failing tests (actually just go ahead and do it, thanks!)

Soundvessel · 1w ago
luo2430
feat(keep-sorted): support class properties and member expressionsOpenPR

Add PropertyDefinition to node lookup so that class fields with array/object initializers can be sorted Extend getString to handle MemberExpression (e.g. ItemTag.Apple) so enum-like members can be used as sortable array elements

luo2430 · 1mo ago

Recent fixes

View closed PRs →
KazariAI
feat!: drop node 20 support, update `@es-joy/jsdoccomment` to v0.92MergedPR

This updates and its dependency to esm only, reducing their combined install size by 1,028,848 bytes (81.3%). This pull request was created with assistance from a code agent.*

KazariAI · 3w ago
sxzz
chore: remove unused `semver`MergedPR

🔗 Linked issue 🧭 Context 📚 Description

sxzz · 1mo ago
luo2430
feat(keep-sorted): support `as const` expressionsMergedPR

Extend keep-sorted to handle TSAsExpression nodes, enabling sorting of objects and arrays annotated with (e.g. ). Also add test coverage for: with with (no export) with 🔗 Linked issue N/A — this is a straightforward enhancement discovered while using the tool. 🧭 Context The command already supports expressions via , but did not recognize assertions (). This meant that object literals and arrays with were silently skipped during sorting, which is inconsistent and unexpected for users. Added to the node types recognized by , including unwrapping logic to reach the underlying or . 📚 Description TypeScript's assertion is commonly used to create deeply readonly literal types (e.g., ). Previously, would not sort these because was not included in the allowed node types for variable declarations or in the unwrap logic. This PR: 1. Adds to — allows the command to locate sorted blocks inside . 2. Adds to the variable declaration guard — prevents the node from being discarded when extracted from . 3. Adds to the unwrap logic** — unwraps to access the inner or for sorting, mirroring the existing behavior. Tests are added for three previously uncovered scenarios to ensure robustness. Thanks for reviewing — let me know if you'd like any adjustments! Also, thank you for building and maintaining this excellent ESLint plugin!

luo2430 · 1mo ago
Structured data for AI agents

Repository: antfu/eslint-plugin-command. Description: Comment-as-command for one-off codemod with ESLint. Stars: 372, Forks: 18. Primary language: TypeScript. Languages: TypeScript (99.2%), JavaScript (0.8%). License: MIT. Homepage: https://eslint-plugin-command.antfu.me/ Topics: codemod, eslint-plugin. Latest release: v4.0.0 (3w ago). Open PRs: 1, open issues: 5. Last activity: 3w ago. Community health: 85%. Top contributors: antfu, sxzz, 9romise, posva, kvoon3, ddosakura, hyoban, ntnyq, mancuoj, luo2430 and others.

·@ofershap

Replace github.com with gitshow.dev