-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Open
Labels
acceptedThere is consensus among the team that this change meets the criteria for inclusionThere is consensus among the team that this change meets the criteria for inclusionbreakingThis change is backwards-incompatibleThis change is backwards-incompatiblecoreRelates to ESLint's core APIs and featuresRelates to ESLint's core APIs and features
Description
This issue describes the implementation plan for eslint/rfcs#99, which will take place in several phases:
Phase 1: Implement external changes
- Allow for custom node type keys estools/esquery#139
- External class resolve estools/esquery#140
- Update
eslint-scope
ScopeManager
to exposeisNodejsScope()
as public method
Phase 2: Implement backward-compatible changes
- Implement
SourceCode#getInlineConfig()
- Implement
SourceCode#getDisableDirectives()
- Implement
SourceCode#traverse()
- Copy
context.getAncestors()
toSourceCode
feat: Move getDeclaredVariables and getAncestors to SourceCode #17059 - Copy
context.getDeclaredVariables()
toSourceCode
feat: Move getDeclaredVariables and getAncestors to SourceCode #17059 - Copy
context.getScope()
toSourceCode
feat: Copy getScope() to SourceCode #17004 - Copy
context.markVariableAsUsed()
toSourceCode
feat: ImplementSourceCode#markVariableAsUsed()
#17086 - Copy
parserServices
toSourceCode
feat: MoveparserServices
toSourceCode
#17311 - Create
context.cwd
to replacecontext.getCwd()
feat: addcwd
to rule context #17106 - Create
context.sourceCode
to replacecontext.getSourceCode()
feat: addsourceCode
property to the rule context #17107 - Create
context.filename
to replacecontext.getFilename()
feat: addfilename
to the rule context #17108 - Create
context.physicalFilename
to replacecontext.getPhysicalFilename()
feat: addphysicalFilename
property to the rule context #17111 - Blog post encouraging people to switch to the new APIs
Phase 4: Deprecation of old APIs (v8.0.0)
- Update
RuleTester
to warn aboutcontext.getAncestors()
- Update
RuleTester
to warn aboutcontext.getDeclaredVariables()
- Update
RuleTester
to warn aboutcontext.getScope()
- Update
RuleTester
to warn aboutcontext.parserServices
- Update
RuleTester
to warn aboutcontext.getCwd()
- Update
RuleTester
to warn aboutcontext.getSourceCode()
- Update
RuleTester
to warn aboutcontext.getFilename()
- Update
RuleTester
to warn aboutcontext.getPhysicalFilename()
Phase 5: Removal of old APIs (v9.0.0)
- Remove
context.getAncestors()
- Remove
context.getDeclaredVariables()
- Remove
context.getScope()
- Remove
context.markVariableAsUsed()
- Remove
context.parserServices
Phase 6: Create JS language object
- Create JS language object with
parse()
andcreateSourceCode()
- Update flat config to have
language
option (also update default config to use JS language object) - Update
Linter
to call language object for parsing (fallback to JS language for eslintrc) - Update
Linter
to useSourceCode#getInlineConfig()
- Update
Linter
to useSourceCode#getDisableDirectives()
- Update
Linter
to useSourceCode#traverse()
Phase 7: Create @eslint/json
package
- Publish
@eslint/json
Phase 8: Create @eslint/markdown
package
Phase 9: Ecosystem Updates
- Document how to create languages
- Update
@types/eslint
with language type definitions - Publish Code Explorer
- Publish blog post announcing Markdown/JSON and Code Explorer
Phase 10: Removal of old APIs (v10.0.0)
- Remove
context.getCwd()
- Remove
context.getSourceCode()
- Remove
context.getFilename()
- Remove
context.getPhysicalFilename()
Metadata
Metadata
Assignees
Labels
acceptedThere is consensus among the team that this change meets the criteria for inclusionThere is consensus among the team that this change meets the criteria for inclusionbreakingThis change is backwards-incompatibleThis change is backwards-incompatiblecoreRelates to ESLint's core APIs and featuresRelates to ESLint's core APIs and features