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

docs: Update getting-started.md #16164

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/src/user-guide/getting-started.md
Expand Up @@ -24,6 +24,10 @@ You can install and configure ESLint using this command:

```shell
npm init @eslint/config

# or

yarn dlx @eslint/create-config
Comment on lines +27 to +30
Copy link
Member

Choose a reason for hiding this comment

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

This was intentional we didn't want to add all package managers for initializing the config. #16084 (comment)

Copy link
Author

Choose a reason for hiding this comment

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

Then we should probably remove the yarn command here too:

After that, you can run ESLint on any file or directory like this:
```shell
npx eslint yourfile.js
# or
yarn run eslint yourfile.js
```

Copy link
Member

Choose a reason for hiding this comment

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

Yea good catch, may be we can remove it. But would like to hear from others as well :)

Copy link
Member

Choose a reason for hiding this comment

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

The installation case is different than the execution case. For installation, the command will ask if you want to install using npm, yarn, pnpm, etc. so it doesn’t really matter how you run it. I think for executing eslint it make sense to also mention yarn.

```

**Note:** `npm init @eslint/config` assumes you have a `package.json` file already. If you don't, make sure to run `npm init` or `yarn init` beforehand.
Expand Down