Skip to content

Commit 2c0cd92

Browse files
authored
docs: refactor as per PR comments
1 parent a8c4f3a commit 2c0cd92

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

docs/user-guide/index.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,26 @@ export default [
4747

4848
See [the rule list](../rules/index.md) to get the `configs` & `rules` that this plugin provides.
4949

50+
#### Bundle Configurations (`eslint.config.js`)
51+
52+
This plugin provides some predefined configs.
53+
You can use the following configs by adding them to `eslint.config.js`.
54+
(All flat configs in this plugin are provided as arrays, so spread syntax is required when combining them with other configs.)
55+
56+
- `*.configs["flat/base"]` ... Settings and rules to enable correct ESLint parsing.
57+
- Configurations for using Vue.js 3.x:
58+
- `*.configs["flat/essential"]` ... `base`, plus rules to prevent errors or unintended behavior.
59+
- `*.configs["flat/strongly-recommended"]` ... Above, plus rules to considerably improve code readability and/or dev experience.
60+
- `*.configs["flat/recommended"]` ... Above, plus rules to enforce subjective community defaults to ensure consistency.
61+
- Configurations for using Vue.js 2.x:
62+
- `*.configs["flat/vue2-essential"]` ... `base`, plus rules to prevent errors or unintended behavior.
63+
- `*.configs["flat/vue2-strongly-recommended"]` ... Above, plus rules to considerably improve code readability and/or dev experience.
64+
- `*.configs["flat/vue2-recommended"]` ... Above, plus rules to enforce subjective community defaults to ensure consistency
65+
66+
:::warning Reporting rules
67+
By default, all rules from **base** and **essential** categories report ESLint errors. Other rules - because they're not covering potential bugs in the application - report warnings. What does it mean? By default - nothing, but if you want - you can set up a threshold and break the build after a certain amount of warnings, instead of any. More information [here](https://eslint.org/docs/user-guide/command-line-interface#handling-warnings).
68+
:::
69+
5070
#### Example configuration with [typescript-eslint](https://typescript-eslint.io/) and [Prettier](https://prettier.io/)
5171

5272
```bash
@@ -85,26 +105,6 @@ export default tseslint.config(
85105
);
86106
```
87107

88-
#### Bundle Configurations (`eslint.config.js`)
89-
90-
This plugin provides some predefined configs.
91-
You can use the following configs by adding them to `eslint.config.js`.
92-
(All flat configs in this plugin are provided as arrays, so spread syntax is required when combining them with other configs.)
93-
94-
- `*.configs["flat/base"]` ... Settings and rules to enable correct ESLint parsing.
95-
- Configurations for using Vue.js 3.x:
96-
- `*.configs["flat/essential"]` ... `base`, plus rules to prevent errors or unintended behavior.
97-
- `*.configs["flat/strongly-recommended"]` ... Above, plus rules to considerably improve code readability and/or dev experience.
98-
- `*.configs["flat/recommended"]` ... Above, plus rules to enforce subjective community defaults to ensure consistency.
99-
- Configurations for using Vue.js 2.x:
100-
- `*.configs["flat/vue2-essential"]` ... `base`, plus rules to prevent errors or unintended behavior.
101-
- `*.configs["flat/vue2-strongly-recommended"]` ... Above, plus rules to considerably improve code readability and/or dev experience.
102-
- `*.configs["flat/vue2-recommended"]` ... Above, plus rules to enforce subjective community defaults to ensure consistency
103-
104-
:::warning Reporting rules
105-
By default, all rules from **base** and **essential** categories report ESLint errors. Other rules - because they're not covering potential bugs in the application - report warnings. What does it mean? By default - nothing, but if you want - you can set up a threshold and break the build after a certain amount of warnings, instead of any. More information [here](https://eslint.org/docs/user-guide/command-line-interface#handling-warnings).
106-
:::
107-
108108
### Configuration (`.eslintrc`)
109109

110110
Use `.eslintrc.*` file to configure rules in ESLint < v9. See also: <https://eslint.org/docs/latest/use/configure/>.

0 commit comments

Comments
 (0)