Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

eslint-config-bevry

bevry3.4kArtistic-2.06.1.2

Intelligent, self-configuring ESLint configuration that automatically analyzes your project structure, dependencies, and metadata to apply optimal linting rules for JavaScript, TypeScript, React, Node.js, and more.

babel, bevry, editions, es5, eslint, eslint-config, eslintconfig, esnext, export-default, flow, flow-type, flowtype, jsx, lint, node, prettier, tsx

readme

eslint-config-bevry

Status of the GitHub Workflow: bevry NPM version NPM downloads
GitHub Sponsors donate button ThanksDev donate button Liberapay donate button Buy Me A Coffee donate button Open Collective donate button crypto donate button PayPal donate button
Discord server badge Twitch community badge

Bevry's ESLint configuration is an intelligent, self-configuring system that automatically analyzes your project and adapts ESLint configuration accordingly. It performs comprehensive project analysis to detect your development environment and applies the optimal ESLint setup.

🚀 For the ultimate zero-configuration experience: Use Boundation - Bevry's automatic scaffolding and upgrading tool. When your project is scaffolded and managed by Boundation, nearly everything (including ESLint, TypeScript, testing, documentation, CI/CD, and more) is automatically configured and maintained using Bevry's battle-tested best practices. Simply run npx boundation in your project directory for complete project setup and ongoing maintenance.

🔍 Intelligent Project Analysis

  • Boundation Ecosystem (optional): Complete automation via interactive Q&A system. When using Boundation, virtually all project metadata (editions, dependencies, keywords, browser fields, TypeScript/Babel/React setup, etc.) is automatically injected and managed, eliminating the need for manual configuration of the elements below.
  • Editions Integration (optional): When present, analyzes your package.json editions to extract syntax, module system, and target environment information
  • Dependency Detection: Scans dependencies and devDependencies to automatically enable relevant plugins and configurations
  • Package.json Analysis: Examines keywords, browser field, and other metadata to determine your project's target environment
  • ECMAScript Version Intelligence: Dynamically detects and configures for your specific ECMAScript target (ES5, ES2015, ES2017, ES2020, ES2021+)
    • Automatically disables incompatible rules for older targets
    • Configures appropriate globals and language features
    • Adjusts rule severity based on target capabilities

⚙️ Adaptive Configuration

  • ESLint Foundation: Extends ESLint's recommended configuration from @eslint/js as the baseline for all linting rules.
  • Module System Detection: Automatically configures for ES modules or CommonJS based on your project structure
    • Enables eslint-plugin-import with appropriate module validation
    • Configures TypeScript-aware import rules when applicable
  • Environment-Specific Setup: Intelligently configures globals and rules for detected environments:
    • Node.js: Configures eslint-plugin-n with module-aware or script-aware settings
    • Browser: Applies browser globals and environment-specific rules
    • Web Workers: Configures worker and service worker globals
  • Framework Integration: Automatically detects and configures framework-specific linting:
  • Language Support: Comprehensive language tooling integration:
  • Documentation Standards: Automatic JSDoc validation with eslint-plugin-jsdoc, TypeScript-aware when applicable
  • Code Formatting: Intelligent Prettier integration via eslint-config-prettier with comprehensive stylistic rule management:
    • Prettier-Compatible Rules: Special rules that can coexist with Prettier (marked as specialRule rather than disabled)
    • Legacy Stylistic Rules: Non-Prettier rules managed by ESLint Stylistic for comprehensive code consistency
    • Smart Conflict Resolution: Automatic detection and resolution of formatting conflicts between ESLint and Prettier

📋 Comprehensive Rule Set

The configuration includes 120+ carefully curated ESLint rules designed to enforce best practices and coding conventions battle-tested by Bevry across 200+ packages and 20 years of JavaScript development.

Zero-Conflict Architecture: Takes great care to ensure zero conflicts between custom rules and plugin configurations. Each rule override is intentional and documented, preventing configurations from inadvertently disabling important plugin-provided rules.

Battle-Tested Standards: These conventions have evolved through maintaining hundreds of open source projects, from simple utilities to complex applications, ensuring they work reliably across diverse JavaScript environments and use cases.

All rules automatically adapt based on your detected environment, target ECMAScript version, and enabled features.

Benefits

  • 🚀 Zero Configuration: Works out-of-the-box with intelligent project detection
  • 📦 Dependency-Free: No need to install or manage individual ESLint plugins
  • 🔧 Self-Maintaining: Configuration updates automatically with your project changes
  • ⚡ Performance Optimized: Only loads and configures plugins you actually need
  • 🛡️ Battle-Tested: Used across Bevry's ecosystem of 200+ open source projects

Usage

Use boundation to automate installation and maintenance, making the rest of this usage section unnecessary.

Otherwise, to proceed and maintain manually, first install it and ESLint:

npm install --save-dev eslint eslint-config-bevry

💡 Zero Plugin Management: With eslint-config-bevry, there's no need to manually install or configure any ESLint plugins (eslint-plugin-react, typescript-eslint, eslint-plugin-import, etc.). The configuration automatically includes and configures all necessary plugins based on your project's detected features, saving you from dependency management complexity.

Then add eslint.config.js file to your project root:

import { defineConfig } from 'eslint/config'
import eslintBevry from 'eslint-config-bevry'
export default defineConfig(eslintBevry)

Advanced Configuration

eslint-config-bevry supports customization through your package.json or programmatically:

Default Files and Ignores

Default Files: When no files are specified, eslint-config-bevry automatically includes:

  • If Editions are detected: {sourceEdition.directory}/**/*.{js,cjs,mjs,jsx,mjsx,ts,cts,mts,tsx,mtsx}
  • Otherwise: **/*.{js,cjs,mjs,jsx,mjsx,ts,cts,mts,tsx,mtsx}

Default Ignores: Always includes these patterns (your custom ignores are appended):

  • **/*.d.ts - TypeScript declaration files
  • **/vendor/ - Third-party vendor directories
  • **/node_modules/ - Node.js dependencies

Customization Options

Via package.json:

{
    "eslintConfig": {
        "files": [
            // Replaces the configuration from `eslint-config-bevry`
            "source/**/*.{js,ts}"
        ],
        "ignores": [
            // Appends to the configuration from `eslint-config-bevry`
            "dist/",
            "*.config.js"
        ],
        "rules": {
            // Overrides the configuration from `eslint-config-bevry`
            "no-console": "off"
        }
    }
}

Programmatic customization:

import { defineConfig } from 'eslint/config'
import eslintBevry from 'eslint-config-bevry'
export default defineConfig({
    extends: [eslintBevry],
    files: [
        // Replaces the configuration from `eslint-config-bevry`
        'source/**/*.{js,ts}',
    ],
    ignores: [
        // Appends to the configuration from `eslint-config-bevry`
        'dist/',
        '*.config.js',
    ],
    rules: {
        // Overrides the configuration from `eslint-config-bevry`
        'no-console': 'off',
    },
})

Running ESLint

Use ESLint as normal:

npx eslint --fix

Debugging and Inspection

To see, inspect, and debug the resultant configuration:

npx eslint --inspect-config

To validate your configuration is working correctly:

# Check specific files
npx eslint source/index.js --max-warnings 0

# See what files ESLint will process
npx eslint --dry-run

🔍 Troubleshooting: If you encounter unexpected behavior, the configuration adapts based on your package.json dependencies and metadata. Check that your project's dependencies, devDependencies, keywords, and editions accurately reflect your project setup.

History

Discover the release history by heading on over to the HISTORY.md file.

Backers

Code

Discover how to contribute via the CONTRIBUTING.md file.

Authors

Maintainers

Contributors

Finances

GitHub Sponsors donate button ThanksDev donate button Liberapay donate button Buy Me A Coffee donate button Open Collective donate button crypto donate button PayPal donate button

Sponsors

Donors

License

Unless stated otherwise all works are:

and licensed under:

changelog

History

v6.1.2 2025 August 8

v6.1.1 2025 August 8

v6.1.0 2025 August 8

v6.0.0 2025 August 6

  • Refer to to the README for new usage instructions.
  • BREAKING: Updated for ESLint v9, breaks compatibility with older ESLint versions
    • ESLint plugins and configs are now inlined - remove them from your devDependencies - you just need npm install --save-dev eslint eslint-config-bevry
    • File patterns and ignore patterns are now built-in - no manual configuration needed - you just need npx eslint --fix
    • Updated Node.js version requirement from >=6 to >=20 to align with current LTS versions and ecosystem requirements
    • Removed FlowType support as its conventions do not seem to be fully upgraded yet for ESLint v9
    • Disabled ESLint v9 deprecated stylistic rules as they have been dropped in for Prettier formatting
  • Documentation improvements:
    • Added comprehensive documentation links for all 180+ ESLint rules with validated URLs
    • Reorganized all rule sections alphabetically for better maintainability
    • Enhanced README with intelligent project analysis and Boundation ecosystem integration details
    • Added documentation for default file patterns and ignore filters
    • Updated package description to reflect the intelligent, adaptive configuration system
  • Internal modernization:
    • Migrated from CommonJS to ES modules ("type": "module" in package.json)
    • Restructured project with source files in source/ directory
    • Updated test infrastructure for modern ES module integration
  • Updated dependencies, base files, and editions using boundation
  • Thank you to the sponsors: Andrew Nesbitt, Divinci, Mr. Henry, Poonacha Medappa, Roboflow, Square

v5.5.0 2024 January 2

v5.4.0 2023 December 30

v5.3.0 2023 December 6

v5.2.0 2023 November 24

v5.1.0 2023 November 21

v5.0.0 2023 November 19

  • Updated dependencies, base files, and editions using boundation
  • Minimum required Node.js version changed from node: >=8 to node: >=6 adapting to ecosystem changes
  • Drop semver dependency for version-clean which is lightweight and with better ecosystem support

v4.0.0 2023 November 14

  • Updated dependencies, base files, and editions using boundation
  • Minimum required Node.js version changed from node: >=10 to node: >=8 adapting to ecosystem changes

v3.29.0 2023 November 4

  • Fixed ESNext source edition not setting the correct eslint ECMAScript version
  • Changed default ECMAScript version from 2019 to the latest ratified version

v3.28.0 2023 November 1

v3.27.0 2021 July 30

v3.26.0 2021 July 29

v3.25.0 2021 July 29

v3.24.0 2021 July 28

v3.23.0 2020 October 29

v3.22.0 2020 September 4

v3.21.0 2020 September 4

  • Disable no-use-before-define and no-redeclare within TypeScript projects, as Typescript handles these better than eslint does
  • Updated dependencies, base files, and editions using boundation

v3.20.0 2020 September 4

v3.19.0 2020 August 18

v3.18.0 2020 August 4

v3.17.0 2020 July 22

v3.16.0 2020 July 22

v3.15.0 2020 July 21

v3.14.0 2020 July 21

v3.13.0 2020 June 25

v3.12.0 2020 June 21

v3.11.0 2020 June 21

v3.10.0 2020 June 20

v3.9.0 2020 June 10

v3.8.0 2020 June 10

v3.7.0 2020 May 22

v3.6.0 2020 May 21

v3.5.0 2020 May 13

v3.4.0 2020 May 4

v3.3.0 2020 April 28

v3.2.0 2020 April 27

  • Set worker env if any of these keywords are present: worker, webworker, workers, webworkers

v3.1.0 2020 April 21

v3.0.0 2020 March 26

  • Updated dependencies, base files, and editions using boundation
  • Minimum required node version changed from node: >=8 to node: >=10 to keep up with mandatory ecosystem changes

v2.3.0 2019 December 9

v2.2.0 2019 December 1

v2.1.0 2019 December 1

v2.0.0 2019 December 1

  • Updated dependencies, base files, and editions using boundation
  • Minimum required node version changed from node: >=6 to node: >=8 to keep up with mandatory ecosystem changes

v1.3.0 2019 November 18

v1.2.1 2019 May 13

  • Change engines to be >=6
  • Update dependencies

v1.2.0 2019 January 26

  • Swap out support for the deprecated typescript eslint packages with the new packages that they recommend
    • typescript-eslint-parser to @typescript-eslint/parser
    • eslint-plugin-typescript to @typescript-eslint/eslint-plugin

v1.1.2 2019 January 2

  • Fixed dependencies that are github references preventing dependency detection from functioning correctly

v1.1.1 2019 January 1

  • Fixed Parsing error: Invalid ecmaVersion by defaulting ecmaVersion to 2019 instead of the dynamic next year, which is now 2020

v1.1.0 2018 December 31

Adapter changes:

  • TypeScript source type is no longer enforced to module, it is now detected based on the edition tags
  • Better detection of React and FlowType projects
  • Add support for React Hooks
  • Set the needed React plugin version configuration, based on the react version from your dependencies

Rule changes:

  • Change spaced-comment rule to support TypeScript /// directives

v1.0.2 2018 November 22

  • Included file extension in package.json:main

v1.0.1 2018 November 22

  • Updated description

v1.0.0 2018 November 22

  • Abstracted out from bevry/base
  • Added prettier integration