From d355f7f8f4474b5f00f4e70318a8efc3eefa6784 Mon Sep 17 00:00:00 2001 From: Nikita Baksalyar Date: Sun, 6 Sep 2020 08:51:38 +0100 Subject: [PATCH] Docs: Provide install commands for Yarn 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.