From f1d07f112be96c64dfdaa154aa9ac81985b16238 Mon Sep 17 00:00:00 2001 From: Nikita Baksalyar Date: Sat, 12 Sep 2020 19:03:43 +0100 Subject: [PATCH] Docs: Provide install commands for Yarn (#13661) npx doesn't work properly with plugins installed with Yarn. --- docs/user-guide/getting-started.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/user-guide/getting-started.md b/docs/user-guide/getting-started.md index 8438d50af54..86bc23f5e7f 100644 --- a/docs/user-guide/getting-started.md +++ b/docs/user-guide/getting-started.md @@ -24,12 +24,20 @@ You should then set up a configuration file: ``` $ npx eslint --init + +# or + +$ yarn run eslint --init ``` After that, you can run ESLint on any file or directory like this: ``` $ npx eslint yourfile.js + +# or + +$ yarn run eslint yourfile.js ``` It is also possible to install ESLint globally rather than locally (using `npm install eslint --global`). However, this is not recommended, and any plugins or shareable configs that you use must be installed locally in either case.