Skip to content

Commit

Permalink
Docs: Clean up Getting Started Guide (#12544)
Browse files Browse the repository at this point in the history
  • Loading branch information
nzakas authored and kaicataldo committed Nov 8, 2019
1 parent 575a98d commit 0286b57
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions docs/user-guide/getting-started.md
Expand Up @@ -6,31 +6,30 @@ ESLint is a tool for identifying and reporting on patterns found in ECMAScript/J
* ESLint uses an AST to evaluate patterns in code.
* ESLint is completely pluggable, every single rule is a plugin and you can add more at runtime.

## Getting Started Tutorial

<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/hppJw2REb8g?rel=0" frameborder="0" allowfullscreen></iframe>
*Why ESLint* @0:00, *Installing and using ESLint* @2:20. <a href="https://www.pluralsight.com/courses/eslint-better-code-quality?utm_source=eslint-dot-org&utm_medium=video&utm_campaign=authordemo" target="_blank">Full ESLint Course at Pluralsight</a>

## Installation and Usage

Prerequisites: [Node.js](https://nodejs.org/en/) (`^8.10.0`, `^10.13.0`, or `>=11.10.1`) built with SSL support. (If you are using an official Node.js distribution, SSL is always built in.)

You can install ESLint using npm:
You can install ESLint using npm or yarn:

```
$ npm install eslint --save-dev
npm install eslint --save-dev
# or
yarn add eslint --dev
```

You should then set up a configuration file:

```
$ ./node_modules/.bin/eslint --init
$ npx eslint --init
```

After that, you can run ESLint on any file or directory like this:

```
$ ./node_modules/.bin/eslint yourfile.js
$ npx 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.
Expand Down Expand Up @@ -61,7 +60,9 @@ The three error levels allow you fine-grained control over how ESLint applies ru
Your `.eslintrc` configuration file will also include the line:

```json
{
"extends": "eslint:recommended"
}
```

Because of this line, all of the rules marked "(recommended)" on the [rules page](/docs/rules) will be turned on. Alternatively, you can use configurations that others have created by searching for "eslint-config" on [npmjs.com](https://www.npmjs.com/search?q=eslint-config). ESLint will not lint your code unless you extend from a shared configuration or explicitly turn rules on in your configuration.
Expand Down

0 comments on commit 0286b57

Please sign in to comment.