eslint / eslint

Find and fix problems in your JavaScript code.
https://eslint.org
MIT License
24.97k stars 4.51k forks source link

Implement Language Plugins #16999

Open nzakas opened 1 year ago

nzakas commented 1 year ago

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

Phase 1: Implement external changes

Phase 2: Implement backward-compatible changes

Phase 4: Deprecation of old APIs (v8.0.0)

Phase 5: Removal of old APIs (v9.0.0)

Phase 6: Create JS language object

Phase 7: Create @eslint/json package

Phase 8: Create @eslint/markdown package

Phase 9: Ecosystem Updates

Phase 10: Removal of old APIs (v10.0.0)

snitin315 commented 1 year ago

I can also help with phase 2, I can start with Copy context.markVariableAsUsed() to SourceCode. @nzakas Let me know if that's ok.

nzakas commented 1 year ago

@snitin315 markVariableAsUsed() is a bit complicated, so I'd prefer to keep that one. If you could do the next few items (cwd, sourceCode, filename, and physicalFilename) that would be a huge help.

amareshsm commented 1 year ago

@nzakas I can also help with some items (any of CWD, sourceCode, filename, and physicalFilename) if possible. Can you pls give some context?

nzakas commented 1 year ago

@amareshsm if you'd like to take a look at those four, this is the part of the code involved: https://github.com/eslint/eslint/blob/9d1b8fc60cc31f12618e58c10a2669506b7ce9bf/lib/linter/linter.js#L979-L1000

Basically, we want to create properties where there are currently methods, and then update all of the rules to use the properties instead of the methods.

ollie-iterators commented 1 year ago

Phase 1 is finished!!!

ollie-iterators commented 1 year ago

With https://github.com/eslint/eslint/pull/17086 merged, Copy context.markVariableAsUsed() to SourceCode should be checked off

mdjermanovic commented 1 year ago

I'll work on parserServices.

ollie-iterators commented 1 year ago

With https://github.com/eslint/eslint/pull/17107 merged, Create context.sourceCode to replace context.getSourceCode() should be checked off

nzakas commented 1 year ago

@ollie-iterators it seems like you enjoy tracking our tasks, do you have any interest in becoming more involved with the project?

nzakas commented 1 year ago

I'm working on getInlineConfig next.

Edit: Okay, this is a lot more complicated than I realized initially. This may take a while and require some design changes.

ollie-iterators commented 1 year ago

@ollie-iterators it seems like you enjoy tracking our tasks, do you have any interest in becoming more involved with the project?

I haven't thought about that. I might be interested in that.

nzakas commented 1 year ago

@ollie-iterators cool. If you want to discuss, swing by Discord and we'd be happy to chat.

mdjermanovic commented 1 year ago
  • Copy parserServices to SourceCode

I'm working on this now.

parserServices actually already exists on SourceCode, so the task is only to update documentation and tests.