Skip to content

Commit 889f7f1

Browse files
committed
wip: address comments
1 parent 17a83c5 commit 889f7f1

File tree

3 files changed

+24
-21
lines changed

3 files changed

+24
-21
lines changed

docs/src/extend/ways-to-extend.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ This page explains the ways to extend ESLint, and how these extensions all fit t
1515

1616
Plugins let you add your own ESLint custom rules and custom processors to a project. You can publish a plugin as an npm module.
1717

18-
Plugins are useful because your project may require some ESLint configuration that isn't included in the core `eslint` package. For example, if you're using a frontend JavaScript library like React or framework like Vue, these tools have some features that require custom rules outside the scope of the ESLint core rules.
18+
Plugins are useful because your project may require some ESLint configuration that isn't included in the core `eslint` package. For example, if you're using a frontend JavaScript library like [React](https://react.dev/) or framework like [Vue](https://vuejs.org/), these tools have some features that require custom rules outside the scope of the ESLint core rules.
1919

2020
Often a plugin is paired with a configuration for ESLint that applies a set of features from the plugin to a project. You can include configurations in a plugin as well.
2121

@@ -35,15 +35,15 @@ ESLint shareable configs are pre-defined configurations for ESLint that you can
3535

3636
You can either publish a shareable config independently or as part of a plugin.
3737

38-
For example, a popular shareable config is [eslint-config-airbnb](https://www.npmjs.com/package/eslint-config-airbnb), which contains a variety of rules in addition to some [parser options](../use/configure/language-options#specifying-parser-options). This is a set of rules for ESLint that is designed to match the style guide used by the [Airbnb JavaScript style guide](https://github.com/airbnb/javascript). By using the `eslint-config-airbnb` shareable config, you can automatically enforce the Airbnb style guide in your project without having to manually configure each rule.
38+
For example, a popular shareable config is [`eslint-config-airbnb`](https://www.npmjs.com/package/eslint-config-airbnb), which contains a variety of rules in addition to some [parser options](../use/configure/language-options#specifying-parser-options). This is a set of rules for ESLint that is designed to match the style guide used by the [Airbnb JavaScript style guide](https://github.com/airbnb/javascript). By using the `eslint-config-airbnb` shareable config, you can automatically enforce the Airbnb style guide in your project without having to manually configure each rule.
3939

40-
To learn more about creating a shareable config, refer to [Share Configuration](shareable-configs).
40+
To learn more about creating a shareable config, refer to [Share Configurations](shareable-configs).
4141

4242
## Custom Formatters
4343

4444
Custom formatters take ESLint linting results and output the results in a format that you define. Custom formatters let you display linting results in a format that best fits your needs, whether that's in a specific file format, a certain display style, or a format optimized for a particular tool. You only need to create a custom formatter if the [built-in formatters](../use/formatters/) don't serve your use case.
4545

46-
For example, the custom formatter [eslint-formatter-gitlab](https://www.npmjs.com/package/eslint-formatter-gitlab) can be used to display ESLint results in GitLab code quality reports.
46+
For example, the custom formatter [eslint-formatter-gitlab](https://www.npmjs.com/package/eslint-formatter-gitlab) can be used to display ESLint results in [GitLab](https://about.gitlab.com/) code quality reports.
4747

4848
To learn more about creating a custom formatter, refer to [Custom Formatters](custom-formatters).
4949

docs/src/integrate/nodejs-api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ While ESLint is designed to be run on the command line, it's possible to use ESL
1515

1616
The `ESLint` class is the primary class to use in Node.js applications.
1717

18-
This class depends on the Node.js `fs` module and the file system, so you cannot use it in browsers. If you want to lint code on browsers, use the [Linter](#linter) class instead.
18+
This class depends on the Node.js [`fs`](https://nodejs.org/api/fs.html) module and the file system, so you cannot use it in browsers. If you want to lint code on browsers, use the [`Linter`](#linter) class instead.
1919

2020
Here's a simple example of using the `ESLint` class:
2121

@@ -68,7 +68,7 @@ const { ESLint } = require("eslint");
6868
});
6969
```
7070

71-
And here is an example of using the `ESLint` class with `lintText` API:
71+
And here is an example of using the `ESLint` class with [`lintText`](#-eslintlinttextcode-options) API:
7272

7373
```js
7474
const { ESLint } = require("eslint");

templates/formatter-examples.md.ejs

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ edit_link: https://github.com/eslint/eslint/edit/main/templates/formatter-exampl
1010

1111
ESLint comes with several built-in formatters to control the appearance of the linting results, and supports third-party formatters as well.
1212

13-
You can specify a formatter using the `--format` or `-f` flag in the CLI. For example, `--format json` uses the `json` formatter.
13+
You can specify a formatter using the [`--format`](../command-line-interface#-f---format) or [`-f`](../command-line-interface#-f---format) flag in the CLI. For example, `--format json` uses the `json` formatter.
1414

1515
The built-in formatter options are:
1616

@@ -20,7 +20,7 @@ The built-in formatter options are:
2020

2121
## Example Source
2222

23-
Examples of each formatter were created from linting `fullOfProblems.js` using the `.eslintrc.json` configuration shown below.
23+
Examples of each formatter were created from linting `fullOfProblems.js` using the `eslint.config.js` configuration shown below.
2424

2525
`fullOfProblems.js`:
2626

@@ -34,19 +34,22 @@ function addOne(i) {
3434
};
3535
```
3636

37-
`.eslintrc.json`:
38-
39-
```json
40-
{
41-
"extends": "eslint:recommended",
42-
"rules": {
43-
"consistent-return": 2,
44-
"indent" : [1, 4],
45-
"no-else-return" : 1,
46-
"semi" : [1, "always"],
47-
"space-unary-ops" : 2
48-
}
49-
}
37+
`eslint.config.js`:
38+
39+
```js
40+
import { defineConfig } from "eslint/config";
41+
42+
export default defineConfig([
43+
{
44+
rules: {
45+
"consistent-return": 2,
46+
"indent" : [1, 4],
47+
"no-else-return" : 1,
48+
"semi" : [1, "always"],
49+
"space-unary-ops" : 2
50+
}
51+
}
52+
]);
5053
```
5154

5255
Tests the formatters with the CLI:

0 commit comments

Comments
 (0)