X Tutup
Skip to content

Supports ESLint v8.#1317

Merged
dbaeumer merged 3 commits intomicrosoft:mainfrom
ota-meshi:eslint-v8
Aug 23, 2021
Merged

Supports ESLint v8.#1317
dbaeumer merged 3 commits intomicrosoft:mainfrom
ota-meshi:eslint-v8

Conversation

@ota-meshi
Copy link
Contributor

@ota-meshi ota-meshi commented Aug 15, 2021

This PR supports ESLint v8.
Specifically, change it to use the ESLint class instead of the removed CLIEngine.

However, for backward compatibility, if CLIEngine is present, use CLIEngine. See ESLintClassEmulator class.

I checked that this change works by making sure that the marker appears in each of the environments where eslint@8.0.0-beta.0, eslint@7.32.0, and eslint@6.8.0 are installed.

@dbaeumer
Copy link
Member

@ota-meshi thanks a lot for the PR. Will have a look this week. Saw that the first eslint 8.0.0 beta got released lately.

Copy link
Member

@dbaeumer dbaeumer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work. I would suggest we do the minor word tweak.

Then I will publish an new internal version of the plugin so that users can do some insider testing before we release a new version. Is this OK for you?

} else if (library.CLIEngine === undefined) {
} else if (library.CLIEngine === undefined && library.ESLint === undefined) {
settings.validate = Validate.off;
connection.console.error(`The eslint library loaded from ${libraryPath} doesn\'t export a CLIEngine. You need at least eslint@1.0.0`);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also mention ESLint class. Something like neither exports a CLIEngine nor an ESLint class

@ota-meshi
Copy link
Contributor Author

Thank you for the review! I changed the message.

Then I will publish an new internal version of the plugin so that users can do some insider testing before we release a new version. Is this OK for you?

It's OK with me!

@ota-meshi ota-meshi requested a review from dbaeumer August 20, 2021 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

X Tutup