Skip to content

Implement Flat Config #13481

Open
Open

Description

This issue describes the implementation plan for eslint/rfcs#9, which will take place in several phases:

Phase 1: Extract current config system

  • Create new GitHub repository (eslint/eslintrc)
  • Copyeslintrc source files and tests into new GitHub repository
  • Create Jenkins release job for @eslint/eslintrc
  • Publish @eslint/eslintrc to npm
  • Update ESLint to use @eslint/eslintrc
  • Remove in-memory filesystem from tests
  • Update CLIEngine to use CascadingConfigArrayFactory from @eslint/eslintrc

Phase 2: Implement flat config with eslintrc compatibility

Phase 3: Compatibility testing

Phase 4: General availability (v9.0.0)

  • Write blog post about flat config format
  • Output warning when people use eslintrc files
  • Switch documentation so eslint.config.js is the default and recommended format (link to legacy eslintrc docs from the same page)
  • Switch Linter to use flat config by default
  • Switch documentation for shareable configs to flat config format (links to legacy docs included)
  • Switch documentation for plugins to flat config format (links to legacy docs included)
  • Omiting any file/dir positional parameter to CLI does not give an error #14308
  • Rename ESLint class to LegacyESLint and rename FlatESLint to ESLint
  • Delete RuleTester class and rename FlatRuleTester to RuleTester
  • Update api.js to export new values for ESLint and RuleTester
  • Switch shouldUseFlatConfig() to return true except if ESLINT_USE_FLAT_CONFIG is false.
  • Release ESLint with GA flat config

Phase 5: Remove eslintrc (v10.0.0)

  • Remove old CLI flags
  • Remove context.parserPath, context.parserOptions, context.globals in Linter
  • Remove configType constructor option for Linter; throw error if found.
  • Report an error when eslint-env config comment is used
  • Remove eslintrc support
  • Remove eslintrc documentation
  • Delete FlatESLint class
  • Delete LegacyESLint class
  • Switch shouldUseFlatConfig() to always return true
  • Release ESLint without eslintrc 🎉
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

acceptedThere is consensus among the team that this change meets the criteria for inclusionbreakingThis change is backwards-incompatiblecoreRelates to ESLint's core APIs and featuresfeatureThis change adds a new feature to ESLint

Type

No type

Projects

  • Status

    Implementing
  • Status

    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions