Anthony Fu's opinionated ESLint plugin providing rules like consistent-chaining, consistent-list-newline, top-level-function, and no-top-level-await. Current stable version is 3.2.2, released under MIT license. v3.0.0 dropped CJS support (ESM-only). Designed for use with antfu/eslint-config. Active development with frequent releases. Ships TypeScript types. Peer dependency on eslint.
npm install eslint-plugin-antfuVerified import paths — ran on the pinned version, not inferred.
Shows how to import the plugin and apply its recommended config along with custom rule options in flat ESLint config.
Use ESM imports: import antfu from 'eslint-plugin-antfu'.
Use 'allowLeadingPropertyAccess' instead of deprecated 'allowFirstPropertyAccess'.
Use antfu/eslint-config as base or carefully merge configs.
Switch to ESM imports or downgrade to v2.x.
Ensure your ESLint config uses flat config format: export default [antfu.configs.recommended].
Replace 'allowFirstPropertyAccess' with 'allowLeadingPropertyAccess'.
No dependency data recorded yet.