Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Update: separate eslint --init #79
Update: separate eslint --init #79
Changes from 9 commits
a8643eb
9cf6509
f8fe40b
343fe2c
9fb62dd
3f5dd6a
15f573d
e171d38
346a6af
3eeb2fe
bdc12aa
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we just show the message and let the user run the command manually?
One of the obstacles for supporting yarn in
eslint --init
(eslint/eslint#13756) was a scenario where the config initialization reinstalls local eslint, and then yarn intentionally breaks the whole process.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 good point! will update later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's wait for more opinions first. @nzakas, @btmills what do you think about this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't that issue only apply when using
yarn
? If we runnpm init @eslint/config
, aren't we okay?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will be an issue when users are using some different package managers than npm(yarn/pnpm/...).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that also works. though I think better to recommend yarn users run
yarn create @eslint/config
. :)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eslint/create-config
willrequire()
local ESLint to format the.eslintrc.js
config file. Since yarn 2 doesn't createnode_modules
, I think that@eslint/create-config
when run throughnpm init
won't be able torequire()
any locally installed packages.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To add to my previous comment,
eslint --init
doesn't officially support yarn yet, butyarn eslint --init
currently works fine when provided answers don't require installing dependencies. I'd expect the formatting step to fail when user runsyarn eslint --init
and then we runnpm init @eslint/config
as a child process.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that we are in final commenting and there’s a lot of “I think” comments that are best answered by implementing the package and testing it, I move that we approve this RFC and hold further speculation until there is a prototype to play with.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. We'll certainly publish the new package first, and then we can experiment.