Skip to content

Commit

Permalink
docs: use @eslint/create-config latest
Browse files Browse the repository at this point in the history
refs: #18369, #18361,
  • Loading branch information
aladdin-add committed Apr 21, 2024
1 parent b78d831 commit 1993cdb
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Prerequisites: [Node.js](https://nodejs.org/) (`^18.18.0`, `^20.9.0`, or `>=21.1
You can install and configure ESLint using this command:

```shell
npm init @eslint/config
npm init @eslint/config@latest
```

After that, you can run ESLint on any file or directory like this:
Expand Down
2 changes: 1 addition & 1 deletion bin/eslint.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ ${getErrorMessage(error)}`;

const spawn = require("cross-spawn");

spawn.sync("npm", ["init", "@eslint/config"], { encoding: "utf8", stdio: "inherit" });
spawn.sync("npm", ["init", "@eslint/config@latest"], { encoding: "utf8", stdio: "inherit" });
return;
}

Expand Down
4 changes: 2 additions & 2 deletions docs/src/use/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ To use ESLint, you must have [Node.js](https://nodejs.org/en/) (`^18.18.0`, `^20
You can install and configure ESLint using this command:

```shell
npm init @eslint/config
npm init @eslint/config@latest
```

If you want to use a specific shareable config that is hosted on npm, you can use the `--config` option and specify the package name:
Expand All @@ -30,7 +30,7 @@ If you want to use a specific shareable config that is hosted on npm, you can us
# use `eslint-config-standard` shared config

# npm 7+
npm init @eslint/config -- --config eslint-config-standard
npm init @eslint/config@latest -- --config eslint-config-standard

```

Expand Down
2 changes: 1 addition & 1 deletion messages/no-config-found.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = function(it) {
return `
ESLint couldn't find a configuration file. To set up a configuration file for this project, please run:
npm init @eslint/config
npm init @eslint/config@latest
ESLint looked for configuration files in ${directoryPath} and its ancestors. If it found none, it then looked in your home directory.
Expand Down

0 comments on commit 1993cdb

Please sign in to comment.