Skip to content

Commit

Permalink
docs: include npm install instructions in getting started (#2120)
Browse files Browse the repository at this point in the history
  • Loading branch information
Robbie-Cook committed May 30, 2020
1 parent 407bfa1 commit dc061ed
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/getting-started/linting/README.md
Expand Up @@ -10,6 +10,12 @@ First step is to make sure you've got the required packages installed:
$ yarn add -D eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin
```

or with NPM:

```bash
$ npm i --save=dev eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin
```

## Configuration

Next, create a `.eslintrc.js` config file in the root of your project, and populate it with the following:
Expand Down Expand Up @@ -72,6 +78,12 @@ With that configured, open a terminal to the root of your project, and run the f
$ yarn eslint . --ext .js,.jsx,.ts,.tsx
```

or with NPM:

```bash
$ npx eslint . --ext .js,.jsx,.ts,.tsx
```

That's it - ESLint will lint all `.js`, `.jsx`, `.ts`, and `.tsx` files within the current folder, and will output the results to your terminal.

You can also get results in realtime inside most IDEs via a plugin - just search your IDE's extension store.
Expand Down

0 comments on commit dc061ed

Please sign in to comment.