Skip to content

Commit

Permalink
add examples
Browse files Browse the repository at this point in the history
  • Loading branch information
bpmutter committed Dec 1, 2022
1 parent 468bbb3 commit 9e99d10
Showing 1 changed file with 23 additions and 7 deletions.
30 changes: 23 additions & 7 deletions docs/src/user-guide/getting-started.md
Expand Up @@ -110,18 +110,34 @@ Before you begin, you must have a `package.json` file already. If you don't, mak

1. Add an `.eslintrc` file in one of the [supported configuration file formats](./configuring/configuration-files#configuration-file-formats).

TODO: add example shell commands for this

1. Add configuration to the `.eslintrc` file. Refer to the [Configuring ESLint documentation](./configuring/) to learn how ot add rules, environments, custom configurations, plugins, and more.

TODO: show a sample configuration file using .js extension
```shell
# Create JavaScript configuration file
touch .eslintrc.js
```

1. Add configuration to the `.eslintrc` file. Refer to the [Configuring ESLint documentation](./configuring/) to learn how to add rules, environments, custom configurations, plugins, and more.

```js
// .eslintrc.js example
module.exports = {
"env": {
"browser": true,
"es2021": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
}
```

1. Lint code using the ESLint CLI:

```sh
npm run eslint <Your file or directory>
npm run eslint project-dir/ file1.js
# OR
npx eslint <Your file or directory>
npx eslint project-dir/ file1.js

```

Expand Down

0 comments on commit 9e99d10

Please sign in to comment.