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

Fix: create .eslintrc.cjs for module type #14304

Merged
merged 7 commits into from May 6, 2021
Merged

Fix: create .eslintrc.cjs for module type #14304

merged 7 commits into from May 6, 2021

Conversation

snitin315
Copy link
Contributor

@snitin315 snitin315 commented Apr 9, 2021

Prerequisites checklist

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

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

What changes did you make? (Give an overview)

Fixes #14137

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

NO

@eslint-github-bot eslint-github-bot bot added the triage An ESLint team member will look at this issue soon label Apr 9, 2021
@snitin315 snitin315 marked this pull request as ready for review April 9, 2021 03:24
lib/init/config-initializer.js Outdated Show resolved Hide resolved
Copy link
Member

@aladdin-add aladdin-add left a comment

Choose a reason for hiding this comment

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

can you add some tests to confirm the issue to be fixed? thanks!

@snitin315
Copy link
Contributor Author

I see there is no integration test for the whole workflow of --init. Should I add one?

@aladdin-add
Copy link
Member

👍 good to have!

@mdjermanovic mdjermanovic added accepted There is consensus among the team that this change meets the criteria for inclusion bug ESLint is working incorrectly cli Relates to ESLint's command-line interface and removed triage An ESLint team member will look at this issue soon labels Apr 19, 2021
lib/init/config-initializer.js Outdated Show resolved Hide resolved
@snitin315
Copy link
Contributor Author

@aladdin-add @mdjermanovic I have added some test cases.

Copy link
Member

@aladdin-add aladdin-add 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! 💯

Copy link
Member

@btmills btmills 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 for adding the non-.cjs tests as part of this!

lib/init/config-initializer.js Outdated Show resolved Hide resolved
tests/lib/init/config-initializer.js Outdated Show resolved Hide resolved
tests/lib/init/config-initializer.js Outdated Show resolved Hide resolved
@snitin315
Copy link
Contributor Author

@mdjermanovic Thanks for reviewing, I have applied your feedback. Please take a look again.

@nzakas
Copy link
Member

nzakas commented May 4, 2021

@mdjermanovic can you take another look at this?

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.

@snitin315 sorry for the delay! Looks great, I left some small suggestions about tests.

tests/lib/init/config-initializer.js Outdated Show resolved Hide resolved
tests/lib/init/config-initializer.js Outdated Show resolved Hide resolved
tests/lib/init/config-initializer.js Outdated Show resolved Hide resolved
tests/lib/init/config-initializer.js Show resolved Hide resolved
@snitin315
Copy link
Contributor Author

@mdjermanovic All done 🚀

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.

Thanks @snitin315, LGTM!

nzakas
nzakas approved these changes May 6, 2021
Copy link
Member

@nzakas nzakas left a comment

Choose a reason for hiding this comment

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

Nice work!

@nzakas nzakas merged commit ee3a3ea into eslint:master May 6, 2021
14 checks passed
@snitin315 snitin315 deleted the fix/init branch May 6, 2021 00:58
@dotansimha dotansimha mentioned this pull request Jun 20, 2021
10 tasks
@eslint-github-bot eslint-github-bot bot locked and limited conversation to collaborators Nov 3, 2021
@eslint-github-bot eslint-github-bot bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Nov 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion bug ESLint is working incorrectly cli Relates to ESLint's command-line interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ESLint fails with ESM and JS eslintrc
5 participants