Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add loadESLint() API method for v9 #18097

Merged
merged 3 commits into from Feb 9, 2024
Merged

feat: Add loadESLint() API method for v9 #18097

merged 3 commits into from Feb 9, 2024

Conversation

nzakas
Copy link
Member

@nzakas nzakas commented Feb 9, 2024

Prerequisites checklist

What is the purpose of this pull request? (put an "X" next to an item)

[ ] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofix to a rule
[ ] Add a CLI option
[x] Add something to the core
[ ] Other, please explain:

What changes did you make? (Give an overview)

  • Added the loadESLint() method to the public API.
  • Added configType to both ESLint and LegacyESLint.
  • Added tests for all of the above.
  • Added docs to the Node.js API document.

refs #18075
closes #18088

Is there anything you'd like reviewers to focus on?

@nzakas nzakas requested a review from a team as a code owner February 9, 2024 00:01
@eslint-github-bot eslint-github-bot bot added the feature This change adds a new feature to ESLint label Feb 9, 2024
Copy link

netlify bot commented Feb 9, 2024

Deploy Preview for docs-eslint canceled.

Name Link
🔨 Latest commit 046892e
🔍 Latest deploy log https://app.netlify.com/sites/docs-eslint/deploys/65c6712d1484410008358546

@snitin315 snitin315 mentioned this pull request Feb 9, 2024
1 task
Comment on lines +63 to +65
it("should return ESLint when useFlatConfig is not provided", async () => {
assert.strictEqual(await api.loadESLint(), api.ESLint);
});
Copy link
Contributor

@snitin315 snitin315 Feb 9, 2024

Choose a reason for hiding this comment

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

Can we add a similar test case for LegacyESLint here as well?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yup!

@snitin315 snitin315 added the accepted There is consensus among the team that this change meets the criteria for inclusion label Feb 9, 2024
Copy link
Member

@mdjermanovic mdjermanovic left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@mdjermanovic mdjermanovic merged commit 53f0f47 into main Feb 9, 2024
18 checks passed
@mdjermanovic mdjermanovic deleted the load-eslint branch February 9, 2024 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion feature This change adds a new feature to ESLint
Projects
Status: Complete
Development

Successfully merging this pull request may close these issues.

None yet

3 participants