From 7c0bf2ca92d83125a1fa000c9c4250bae6b4fc21 Mon Sep 17 00:00:00 2001 From: eyal0803 Date: Wed, 16 Jan 2019 17:32:30 +0200 Subject: [PATCH] Docs: Add `npx` usage to Getting Started guide (#11249) * Docs: Add `npx` usage to Getting Started guide `npx` is a shorter alternative to navigating to the executable found in `node_modules/.bin` * Docs: Add caveats of using `npx` * Docs: Use a suggested alternative phrasing --- 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 4b98eb075f3..2e6e6617a51 100644 --- a/docs/user-guide/getting-started.md +++ b/docs/user-guide/getting-started.md @@ -37,6 +37,14 @@ After that, you can run ESLint in your project's root directory like this: $ ./node_modules/.bin/eslint yourfile.js ``` +Instead of navigating to `./node_modules/.bin/` you may also use `npx` to run `eslint`: + +``` +$ npx eslint +``` + +**Note:** If ESLint wasn't manually installed (via `npm`), `npx` will install `eslint` to a temporary directory and execute it. + Any plugins or shareable configs that you use must also be installed locally to work with a locally-installed ESLint. ### Global Installation and Usage