GitShow/antfu/eslint-config
antfu

eslint-config

Anthony's ESLint config preset

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

JavaScript

6.2k stars574 forks151 contributorsActive · 5d agoSince 2019v9.1.0MIT

Meet the team

See all 151 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 · 27 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 5d ago
See all on GitHub →
Muromi-Rikka
Feature Request: Add compatibility support for Rslint (high-performance ESLint-compatible linter)OpenIssue

Clear and concise description of the problem As a developer using this project, I want to be compatible with Rslint so that I can leverage Rslint's Rust-powered high-performance linting runtime while retaining the convenience and rule conventions of this config preset. Rslint is an ESLint-compatible linter that follows the ESLint Flat Config specification and supports running most community ESLint plugins. However, it does not implement a subset of ESLint runtime APIs — including custom parsers, config processors, type-aware parser services, and code path analysis hooks — that relies on for full functionality. Currently, using the full preset directly with Rslint will fail or silently skip large numbers of rules due to these unsupported APIs. I am willing to help contribute implementation or testing for this feature if the maintainers are open to this compatibility support. Suggested solution We could add an optional Rslint-compatible mode / preset within the config package: 1. Add runtime detection for the Rslint environment, and automatically disable features that depend on unsupported ESLint APIs when running under Rslint, including: Type-aware TypeScript rules that rely on Custom parsers configured via (e.g. , custom parsers for markdown/JSON/YAML) Config-level options used for Vue SFC and multi-block file linting Rules that depend on code path analysis APIs 2. Export a dedicated preset entry that only includes rules and integrations verified to work with Rslint's supported API surface, so users can import it directly for out-of-the-box compatibility. 3. Ensure core static analysis and stylistic rules (built-in ESLint rules, , , import-related rules etc.) remain fully functional, as they are compatible with Rslint's supported API set. Alternative Alternative solutions considered: 1. Instead of built-in runtime detection, provide a standalone documentation page with a step-by-step guide for manually adapting to work with Rslint, including a clear list of compatible rules/integrations and the exact config overrides needed to disable incompatible features. 2. Publish a separate companion package (e.g. ) that ships a preconfigured, Rslint-optimized rule set, keeping the main package unchanged. Additional context Official Rslint ESLint plugin compatibility documentation: https://rslint.rs/guide/eslint-plugins Rslint fully supports the ESLint Flat Config format (the same format used by for ESLint v9+). Standard rule APIs including , , token/comment/scope analysis, autofix (), and editor quick fixes all work normally in Rslint. The unsupported ESLint APIs in Rslint are: , custom , config , and code path analysis hooks ( / etc.). 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.

Muromi-Rikka · 2w ago
gemmajacobson
Feature: Adding Canary Tokens to detect supply chain compromiseOpenIssue

Clear and concise description of the problem I'd like to add security canaries to this repo for monitoring and detecting supply chain attacks, and protecting the wider community. A great example of the benefits of canaries in protecting the community is seen in this Grafana post, and research Detecting the Modern Supply Chain Attack: High-Fidelity Canaries for CI/CD. I'm happy to raise the PR and implement it myself (see below). Suggested solution There's a free Tracebit Community Edition GitHub integration you can install here that sets this up in under 5 minutes - once you do, it injects canary tokens (decoy credentials that look real but nothing legitimate ever uses) into every running build. If anyone tries to use one, you get an alert straight away. Since no real process ever touches them, a trigger means there's likely an issue. Alternative _No response_ Additional context I'm also more than happy to raise a PR and implement it myself. No stress if it doesn't fit - thought it would be useful to share with the wider community. Full disclosure: I work for Tracebit and built this myself. Our Community Edition is fully designed with community in mind and will remain free forever. Thanks, Gemma 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.

gemmajacobson · 3w ago
chrisbull
Support monorepos like TurboRepo.OpenIssue

https://github.com/antfu/eslint-config/blob/20dd434ad89d6994fcd114b362bf0b8b16de68df/src/configs/react.ts#L106 Issue is that NextJS isn't detected when using a monorepo. I think local-pkg doesn't recognize that I have "next" in my ./apps/web/package.json so eslint is throwing errors for

chrisbull · 1mo ago

Recent fixes

View closed PRs →
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 · 5d ago
Yuliang-Lee
docs: add type aware rules overrides example codeMergedPR

🔗 Linked issue 🧭 Context 文档缺少 type aware rule 的覆盖写法,几乎是要看源码才知道如何覆盖 📚 Description 在 overrides 示例里增加这部分的例子

Yuliang-Lee · 2w ago
oliver139
Fail to be inspected with `@eslint/config-inspector` v3ClosedIssue

Describe the bug has just released new major version 16 hours ago and I found that I am not able to inspect this config with it. Things that I tried in a new created js project directory: 1. Tried v6 v7 v8 v9 of with v3, all failed ❌ 2. Tried v8 v9 of with v2, no problem ✅ 3. Tried a simple config with , no problem ✅ Therefore, I think the problem comes from here instead? For case 1 which having a false result, The short message from the inspector said: ConfigError: Config (unnamed): Unexpected key "_operations" found. Reproduction https://codesandbox.io/p/devbox/n6ngyt System Info Used Package Manager pnpm 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!)

oliver139 · 1mo ago
Structured data for AI agents

Repository: antfu/eslint-config. Description: Anthony's ESLint config preset Stars: 6218, Forks: 574. 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.1.0 (1w ago). Open PRs: 4, open issues: 48. Last activity: 5d 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