Open
Description
openedon Jul 10, 2020
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
) - Copy
eslintrc
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 useCascadingConfigArrayFactory
from@eslint/eslintrc
Phase 2: Implement flat config with eslintrc
compatibility
- Create the
FlatCompat
class ineslint/eslintrc
repository - Create
FlatConfigArray
to represent simple configs - Update
Linter
class to understandFlatConfigArray
objects - Ensure
Linter#defineRule
andLinter#definePlugin
throw errors when usingFlatConfigArray
- Add
context.languageOptions
in backwards-compatible way tocontext
inLinter
- Ensure
context.parserPath
still works inLinter
forFlatConfigArray
(for now) - Create
FlatRuleTester
to allow rule testing withFlatConfigArray
format - Create
FlatESLint
class to mirrorESLint
class but useeslint.config.js
instead - Change Request: Matching behavior in flat config #15661
- Change Request: Config base path in flat config #15683
- Overrides of ignore patterns #15687
- Implement caching
- Update
cli.js
to search foreslint.config.js
file and useFlatESLint
if found (ESLint
if not) - Ensure invalid CLI flags cause errors when using flat config (for example,
--resolve-plugins-relative-to
) - Switch
eslint/eslint
repo to use flat config - Document flat config
- Release ESLint with
eslintrc
compatibility - Bug: [new config system] Patterns cannot re-ignore #16416
- Bug: [new config system] Directories cannot be unignored #16415
- Bug: [new config system] Inconsistent behavior with ignored directory #16414
- Bug: [new config system] Files outside
cwd
were not found #16413 - Bug:
FlatESLint
getRulesMetaForResults
fails on anonymous files when optioncwd
is set #16410 - Bug:
FlatESLint
getRulesMetaForResults
fails on messages without aruleId
#16402 - Bug: [new config system]
baseConfig
option is unused inFlatESLint
#16341 - Bug: [new config system] Unexpected glob behavior in
FlatESLint
#16340 - Bug: [new config system] path to a directory can still lint files outside that directory #16299
- Bug: [new config system] unmatched individual patterns are not reported #16275
- Bug: [new config system] globs are ignoring dot files #16265
- Bug: [new config system]
.eslintignore
doesn't work like.gitignore
#16264 - Change Request: Specifying files and ignores for eslint:recommended/eslint:all #16537
- Bug: [flat config] Caching is not supported when parser is an object #16875
Phase 3: Compatibility testing
- Work with
typescript-eslint
to switch to new format and ensure it works correctly (pull request) - Work with
eslint-plugin-import
to switch to new format and ensure it works correctly (@mdjermanovic) [Fix] pass languageOptions through in child context import-js/eslint-plugin-import#2829 Support eslint flat config import-js/eslint-plugin-import#2873 - Work with
eslint-config-airbnb
to switch to new format and ensure it works correctly (@mdjermanovic) - Work with
eslint-config-standard
to switch to new format and ensure it works correctly (pull request] - Work with
eslint-plugin-n
to switch configs to new format and ensure it works correctly (@mdjermanovic) (pull request) - Work with
eslint-plugin-vue
to switch configs to new format and ensure it works correctly (pull request) - Work with
eslint-plugin-react
to switch configs to new format and ensure it works correctly (@mdjermanovic) (pull request) - Switch ESLint config to load external configs/plugins without
FlatCompat
- Release ESLint with extended compatibility
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 legacyeslintrc
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 toLegacyESLint
and renameFlatESLint
toESLint
- Delete
RuleTester
class and renameFlatRuleTester
toRuleTester
- Update
api.js
to export new values forESLint
andRuleTester
- Switch
shouldUseFlatConfig()
to returntrue
except ifESLINT_USE_FLAT_CONFIG
isfalse
. - Release ESLint with GA flat config
Phase 5: Remove eslintrc
(v10.0.0)
- Remove old CLI flags
- Remove
context.parserPath
,context.parserOptions
,context.globals
inLinter
- Remove
configType
constructor option forLinter
; 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 returntrue
- Release ESLint without
eslintrc
🎉
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment