Skip to content

docs: include npm install instructions in getting started #2120

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 30, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions docs/getting-started/linting/README.md
Original file line number Diff line number Diff line change
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