GitShow/antfu/eslint-config
antfu

eslint-config

Anthony's ESLint config preset

by antfu
eslinteslint-configeslint-flat-config
Star on GitHubForkWebsitenpm

JavaScript

6.3k stars576 forks153 contributorsActive · 2w agoSince 2019v9.3.0MIT

Meet the team

See all 153 on GitHub →
antfu
antfu1.1k contributions
renovate-bot
renovate-bot37 contributions
zanminkian
zanminkian36 contributions
hyoban
hyoban16 contributions
ryoppippi
ryoppippi8 contributions
renovate[bot]Bot
renovate[bot]7 contributions
9romise
9romise6 contributions
Rel1cx
Rel1cx4 contributions

Languages

View on GitHub →
JavaScript59.9%
TypeScript37.6%
Vue1.8%
HTML0.3%
Astro0.2%
CSS0.1%
Other0.1%

Commit activity

Last 12 weeks · 12 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 · Last activity 2w ago
See all on GitHub →
Twisuki
Also respect `.git/info/exclude` by defaultOpenIssue

Clear and concise description of the problem As a developer using this project I want ESLint to also respect so that personal-only ignores (, personal AI scratch files, debug logs, etc.) don't need to be added to the team to silence the linter. Git itself treats as a first-class ignore layer right next to , but (the default) only reads the latter. So if I add and some docs to to avoid polluting the team , ESLint still happily lints my and fails. Suggested solution In , when is true, pass alongside to . Alternative _No response_ Additional context This is intentionally different from the previously declined request in . That one required running for every ESLint invocation; is a fixed path inside the repo with zero extra lookup cost, and the upstream parser already handles its gitignore syntax. Validations [x] Follow our Code of Conduct [x] Read the Contributing Guide. [x] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

Twisuki · 23h ago
KazariEX
Proposal: remove `eslint-plugin-unicorn` from the default dependency graphOpenIssue

Summary Would you be open to removing from the default dependency graph, while preserving the small subset of Unicorn rules currently enabled by through existing plugins, ESLint core rules, and a few focused rules in ? This is not a proposal to remove Unicorn integration entirely. Users who want or arbitrary Unicorn overrides could still opt in explicitly through an optional peer dependency. Motivation currently: enables Unicorn by default in ; uses only 15 Unicorn rules in its default preset in ; installs the entire plugin as a hard dependency and imports it statically through . Disabling it with therefore avoids running the rules, but does not remove Unicorn or its transitive dependencies from installation. This became more visible in . Compared with , its unpacked production dependency tree increased by approximately 3.6 MB: Using the currently resolved production dependency trees and npm registry metadata: : approximately 7.047 MB across 38 packages : approximately 10.623 MB across 43 packages The exact installed delta varies with package-manager deduplication, but none of the three rules responsible for the new large dependencies are enabled by the default Antfu preset. This is also not a one-off case. For example, Unicorn's imports , , and . Their current combined production subtree is roughly 2.87 MB, primarily from and . is useful for that rule, but the rule is not among the 15 enabled by . In other words, every user pays the dependency cost of the entire plugin, including dependencies used only by rules that the default config never enables, even though the preset enables only 15 Unicorn rules. Audit of the 15 enabled rules I looked for replacements in ESLint core and plugins that are already dependencies of this preset. This suggests that we do not need to reproduce all of Unicorn: 1. Reuse for and . 2. Reuse type-aware rules where available. 3. Reuse for the regex portion of . 4. Let existing core rules handle the behavior they already cover. 5. Add only the remaining small, high-value gaps to , after deciding which preferences are worth preserving. Parity tests could run the previous Unicorn rules and the replacements against the same fixtures, making intentional coverage differences visible. About I also evaluated as a lightweight alternative. It is small and currently has no runtime dependencies, but its rules are not drop-in replacements for the enabled Unicorn rules: is broader and semantically different from : it discourages generic generally and suggests custom error classes, while Unicorn changes to only in recognized type-checking branches. overlaps the ESLint core rule already enabled by this preset. It currently has no equivalents for , , or . All three fit the plugin's error-handling scope well, so proposing or contributing them there may be preferable to creating Antfu-specific versions immediately. Therefore, adding it today would not recover the desired behavior. A reasonable first option is to propose or contribute the three error-focused rules, namely , , and , upstream, then use only for rules that are too specific to this preset or cannot find a suitable shared home. Proposed migration Because currently defaults to and supports , this would likely belong in a major release. A possible migration path: 1. Add or select replacements for the current default 15-rule subset. 2. Move the remaining accepted rules or partial-rule gaps into . 3. Remove the static Unicorn import and hard dependency. 4. Keep full Unicorn support as explicit opt-in through an optional peer dependency loaded only when is explicitly requested. 5. Document any intentional reductions in JavaScript versus type-aware TypeScript coverage. Users who want the full Unicorn preset would continue to install themselves. Users of the default preset would no longer pay for dependencies needed only by rules that the preset never enables. Would this direction be acceptable? In particular: 1. Is preserving exact behavior for all 15 rules required, or can low-value/mostly stylistic rules be dropped? 2. Would be the preferred home for the remaining focused rules? 3. Should full Unicorn support remain available as an optional peer integration? This issue was created with assistance from a code agent.*

KazariEX · 1w ago
tvogel
perfectionist/sort-imports: missing style-groups?OpenIssue

Is there a reason why and are missing in the options? For integrating TailwindCSS with Vuetify, it is important to have the style imports before others like . Is there a different strategy to deal with this? https://github.com/antfu/eslint-config/blob/5ada54fd1f6527b012203c9694212eb8fa11bc82/src/configs/perfectionist.ts#L25

tvogel · 1mo ago

Recent fixes

View closed PRs →
KazariAI
fix: mark `eslint-plugin-erasable-syntax-only` as optional peerMergedPR

Mark as an optional peer dependency to prevent it and its transitive dependencies from being bundled. This pull request was created with assistance from a code agent.*

KazariAI · 2w ago
dinwwwh
docs: add `format_on_save` to suggested Zed settingsMergedPR

Zed now defaults to for JavaScript/TypeScript, and is skipped when formatting is off. So with the current suggested settings, ESLint no longer auto-fixes on save. Adding fixes it.

dinwwwh · 1mo ago
ycs77
fix(deps): accept `eslint-plugin-astro` v2 to resolve unmet peer warningMergedPR

🔗 Linked issue No linked issue, but have linked commit: https://github.com/antfu/eslint-config/commit/82078763e3125e37eb673973eff2af3d4baa6c14 🧭 Context The devDependency was bumped to v2 (resolved through ) in the v9.1.0, but the constraint was left pinned at . Because does not allow v2, package managers report an unmet peer dependency for anyone installing v2. This will confuse Astro users. If I installed v2 with pnpm and then checked the peer version: Consumers currently have to ignore this warning with a manual override (e.g. ), which is not ideal. 📚 Description This PR relaxes the peer range from to , so both v1 and v2 are accepted. This matches the actual devDependency (v2) and aligns with how other peers in this config are declared with (e.g. , ). The change is limited to the field in ; no runtime logic or config behavior is affected, so no new tests are needed.

ycs77 · 1mo ago
Structured data for AI agents

Repository: antfu/eslint-config. Description: Anthony's ESLint config preset Stars: 6252, Forks: 576. Primary language: JavaScript. Languages: JavaScript (59.9%), TypeScript (37.6%), Vue (1.8%), HTML (0.3%), Astro (0.2%). License: MIT. Homepage: https://eslint-config.antfu.me/ Topics: eslint, eslint-config, eslint-flat-config. Latest release: v9.3.0 (2w ago). Open PRs: 4, open issues: 51. Last activity: 2w ago. Community health: 85%. Top contributors: antfu, renovate-bot, zanminkian, hyoban, ryoppippi, renovate[bot], 9romise, Rel1cx, oliver139, injurka and others.

·@ofershap

Replace github.com with gitshow.dev