Skip to content

Commit 3fc4fa4

Browse files
authored
Docs: update configuring links (#14038)
* Docs: update configuring links * fix link * update link in CLI --env docs
1 parent 8561c21 commit 3fc4fa4

9 files changed

Lines changed: 23 additions & 26 deletions

File tree

docs/developer-guide/working-with-plugins.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ overrides:
136136
processor: a-plugin/markdown
137137
```
138138

139-
See [Specifying Processor](../user-guide/configuring.md#specifying-processor) for details.
139+
See [Specifying Processor](../user-guide/configuring/plugins.md#specifying-processor) for details.
140140

141141
#### File Extension-named Processor
142142

@@ -197,7 +197,7 @@ If the example plugin above were called `eslint-plugin-myPlugin`, the `myConfig`
197197
198198
```
199199
200-
**Note:** Please note that configuration will not enable any of the plugin's rules by default, and instead should be treated as a standalone config. This means that you must specify your plugin name in the `plugins` array as well as any rules you want to enable that are part of the plugin. Any plugin rules must be prefixed with the short or long plugin name. See [Configuring Plugins](../user-guide/configuring.md#configuring-plugins) for more information.
200+
**Note:** Please note that configuration will not enable any of the plugin's rules by default, and instead should be treated as a standalone config. This means that you must specify your plugin name in the `plugins` array as well as any rules you want to enable that are part of the plugin. Any plugin rules must be prefixed with the short or long plugin name. See [Configuring Plugins](../user-guide/configuring/plugins.md#configuring-plugins) for more information.
201201

202202
### Peer Dependency
203203

docs/developer-guide/working-with-rules-deprecated.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ module.exports.schema = []; // no options
3232

3333
## Rule Basics
3434

35-
`schema` (array) specifies the [options](#options-schemas) so ESLint can prevent invalid [rule configurations](../user-guide/configuring.md#configuring-rules)
35+
`schema` (array) specifies the [options](#options-schemas) so ESLint can prevent invalid [rule configurations](../user-guide/configuring/rules.md#configuring-rules)
3636

3737
`create` (function) returns an object with methods that ESLint calls to "visit" nodes while traversing the abstract syntax tree (AST as defined by [ESTree](https://github.com/estree/estree)) of JavaScript code:
3838

@@ -72,7 +72,7 @@ module.exports = function(context) {
7272

7373
The `context` object contains additional functionality that is helpful for rules to do their jobs. As the name implies, the `context` object contains information that is relevant to the context of the rule. The `context` object has the following properties:
7474

75-
* `parserOptions` - the parser options configured for this run (more details [here](../user-guide/configuring.md#specifying-parser-options)).
75+
* `parserOptions` - the parser options configured for this run (more details [here](../user-guide/configuring/language-options.md#specifying-parser-options)).
7676
* `id` - the rule ID.
7777
* `options` - an array of rule options.
7878
* `settings` - the `settings` from configuration.
@@ -476,7 +476,7 @@ valid: [
476476
]
477477
```
478478

479-
The options available and the expected syntax for `parserOptions` is the same as those used in [configuration](../user-guide/configuring.md#specifying-parser-options).
479+
The options available and the expected syntax for `parserOptions` is the same as those used in [configuration](../user-guide/configuring/language-options.md#specifying-parser-options).
480480

481481
### Write Several Tests
482482

@@ -571,5 +571,5 @@ The thing that makes ESLint different from other linters is the ability to defin
571571
Runtime rules are written in the same format as all other rules. Create your rule as you would any other and then follow these steps:
572572

573573
1. Place all of your runtime rules in the same directory (i.e., `eslint_rules`).
574-
2. Create a [configuration file](../user-guide/configuring.md) and specify your rule ID error level under the `rules` key. Your rule will not run unless it has a value of `1` or `2` in the configuration file.
574+
2. Create a [configuration file](../user-guide/configuring/) and specify your rule ID error level under the `rules` key. Your rule will not run unless it has a value of `1` or `2` in the configuration file.
575575
3. Run the [command line interface](../user-guide/command-line-interface.md) using the `--rulesdir` option to specify the location of your runtime rules.

docs/developer-guide/working-with-rules.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ The source file for a rule exports an object with the following properties.
6060

6161
* `description` (string) provides the short description of the rule in the [rules index](../rules/)
6262
* `category` (string) specifies the heading under which the rule is listed in the [rules index](../rules/)
63-
* `recommended` (boolean) is whether the `"extends": "eslint:recommended"` property in a [configuration file](../user-guide/configuring.md#extending-configuration-files) enables the rule
63+
* `recommended` (boolean) is whether the `"extends": "eslint:recommended"` property in a [configuration file](../user-guide/configuring/configuration-files.md#extending-configuration-files) enables the rule
6464
* `url` (string) specifies the URL at which the full documentation can be accessed
6565
* `suggestion` (boolean) specifies whether rules can return suggestions (defaults to false if omitted)
6666

@@ -70,7 +70,7 @@ The source file for a rule exports an object with the following properties.
7070

7171
**Important:** the `fixable` property is mandatory for fixable rules. If this property isn't specified, ESLint will throw an error whenever the rule attempts to produce a fix. Omit the `fixable` property if the rule is not fixable.
7272

73-
* `schema` (array) specifies the [options](#options-schemas) so ESLint can prevent invalid [rule configurations](../user-guide/configuring.md#configuring-rules)
73+
* `schema` (array) specifies the [options](#options-schemas) so ESLint can prevent invalid [rule configurations](../user-guide/configuring/rules.md#configuring-rules)
7474

7575
* `deprecated` (boolean) indicates whether the rule has been deprecated. You may omit the `deprecated` property if the rule has not been deprecated.
7676

@@ -117,10 +117,10 @@ module.exports = {
117117

118118
The `context` object contains additional functionality that is helpful for rules to do their jobs. As the name implies, the `context` object contains information that is relevant to the context of the rule. The `context` object has the following properties:
119119

120-
* `parserOptions` - the parser options configured for this run (more details [here](../user-guide/configuring.md#specifying-parser-options)).
120+
* `parserOptions` - the parser options configured for this run (more details [here](../user-guide/configuring/language-options.md#specifying-parser-options)).
121121
* `id` - the rule ID.
122-
* `options` - an array of the [configured options](/docs/user-guide/configuring.md#configuring-rules) for this rule. This array does not include the rule severity. For more information, see [here](#contextoptions).
123-
* `settings` - the [shared settings](/docs/user-guide/configuring.md#adding-shared-settings) from configuration.
122+
* `options` - an array of the [configured options](/docs/user-guide/configuring/rules.md#configuring-rules) for this rule. This array does not include the rule severity. For more information, see [here](#contextoptions).
123+
* `settings` - the [shared settings](/docs/user-guide/configuring/configuration-files.md#adding-shared-settings) from configuration.
124124
* `parserPath` - the name of the `parser` from configuration.
125125
* `parserServices` - an object containing parser-provided services for rules. The default parser does not provide any services. However, if a rule is intended to be used with a custom parser, it could use `parserServices` to access anything provided by that parser. (For example, a TypeScript parser could provide the ability to get the computed type of a given node.)
126126

@@ -737,5 +737,5 @@ The thing that makes ESLint different from other linters is the ability to defin
737737
Runtime rules are written in the same format as all other rules. Create your rule as you would any other and then follow these steps:
738738

739739
1. Place all of your runtime rules in the same directory (e.g., `eslint_rules`).
740-
2. Create a [configuration file](../user-guide/configuring.md) and specify your rule ID error level under the `rules` key. Your rule will not run unless it has a value of `"warn"` or `"error"` in the configuration file.
740+
2. Create a [configuration file](../user-guide/configuring/) and specify your rule ID error level under the `rules` key. Your rule will not run unless it has a value of `"warn"` or `"error"` in the configuration file.
741741
3. Run the [command line interface](../user-guide/command-line-interface.md) using the `--rulesdir` option to specify the location of your runtime rules.

docs/rules/no-undef.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ if(typeof a === "string"){}
6868

6969
## Environments
7070

71-
For convenience, ESLint provides shortcuts that pre-define global variables exposed by popular libraries and runtime environments. This rule supports these environments, as listed in [Specifying Environments](../user-guide/configuring.md#specifying-environments). A few examples are given below.
71+
For convenience, ESLint provides shortcuts that pre-define global variables exposed by popular libraries and runtime environments. This rule supports these environments, as listed in [Specifying Environments](../user-guide/configuring/language-options.md#specifying-environments). A few examples are given below.
7272

7373
### browser
7474

docs/rules/strict.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ In **ECMAScript** modules, which always have strict mode semantics, the directiv
4242

4343
This rule requires or disallows strict mode directives.
4444

45-
This rule disallows strict mode directives, no matter which option is specified, if ESLint configuration specifies either of the following as [parser options](/docs/user-guide/configuring.md#specifying-parser-options):
45+
This rule disallows strict mode directives, no matter which option is specified, if ESLint configuration specifies either of the following as [parser options](/docs/user-guide/configuring/language-options.md#specifying-parser-options):
4646

4747
* `"sourceType": "module"` that is, files are **ECMAScript** modules
4848
* `"impliedStrict": true` property in the `ecmaFeatures` object
@@ -66,8 +66,8 @@ This rule has a string option:
6666

6767
The `"safe"` option corresponds to the `"global"` option if ESLint considers a file to be a **Node.js** or **CommonJS** module because the configuration specifies either of the following:
6868

69-
* `node` or `commonjs` [environments](/docs/user-guide/configuring.md#specifying-environments)
70-
* `"globalReturn": true` property in the `ecmaFeatures` object of [parser options](/docs/user-guide/configuring.md#specifying-parser-options)
69+
* `node` or `commonjs` [environments](/docs/user-guide/configuring/language-options.md#specifying-environments)
70+
* `"globalReturn": true` property in the `ecmaFeatures` object of [parser options](/docs/user-guide/configuring/language-options.md#specifying-parser-options)
7171

7272
Otherwise the `"safe"` option corresponds to the `"function"` option. Note that if `"globalReturn": false` is explicitly specified in the configuration, the `"safe"` option will correspond to the `"function"` option regardless of the specified environment.
7373

@@ -269,4 +269,4 @@ function foo() {
269269

270270
## When Not To Use It
271271

272-
In a codebase that has both strict and non-strict code, either turn this rule off, or [selectively disable it](/docs/user-guide/configuring.md) where necessary. For example, functions referencing `arguments.callee` are invalid in strict mode. A [full list of strict mode differences](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode/Transitioning_to_strict_mode#Differences_from_non-strict_to_strict) is available on MDN.
272+
In a codebase that has both strict and non-strict code, either turn this rule off, or [selectively disable it](/docs/user-guide/configuring/rules.md#disabling-rules) where necessary. For example, functions referencing `arguments.callee` are invalid in strict mode. A [full list of strict mode differences](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode/Transitioning_to_strict_mode#Differences_from_non-strict_to_strict) is available on MDN.

docs/rules/yield-star-spacing.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44

55
This rule enforces spacing around the `*` in `yield*` expressions.
66

7-
To use this rule you either need to [use the `es6` environment](../user-guide/configuring.md#specifying-environments) or
8-
[set `ecmaVersion` to `6` in `parserOptions`](../user-guide/configuring.md#specifying-parser-options).
9-
107
## Options
118

129
The rule takes one option, an object, which has two keys `before` and `after` having boolean values `true` or `false`.

docs/user-guide/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Want to skip ahead and just start using ESLint? This section gives a high-level
1010

1111
ESLint has a lot of rules that you can configure to fine-tune it to your project. This section is an exhaustive list of every rule and link to each rule's documentation.
1212

13-
## [Configuring](configuring.md)
13+
## [Configuring](configuring/)
1414

1515
Once you've got ESLint running, you'll probably want to adjust the configuration to better suit your project. This section explains all the different ways you can configure ESLint.
1616

docs/user-guide/command-line-interface.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ If `.eslintrc.*` and/or `package.json` files are also used for configuration (i.
118118

119119
#### `--env`
120120

121-
This option enables specific environments. Details about the global variables defined by each environment are available on the [configuration](configuring.md) documentation. This option only enables environments; it does not disable environments set in other configuration files. To specify multiple environments, separate them using commas, or use the option multiple times.
121+
This option enables specific environments. Details about the global variables defined by each environment are available on the [Specifying Environments](configuring/language-options.md#specifying-environments) documentation. This option only enables environments; it does not disable environments set in other configuration files. To specify multiple environments, separate them using commas, or use the option multiple times.
122122

123123
Examples:
124124

@@ -275,7 +275,7 @@ Example:
275275

276276
#### `--ignore-pattern`
277277

278-
This option allows you to specify patterns of files to ignore (in addition to those in `.eslintignore`). You can repeat the option to provide multiple patterns. The supported syntax is the same as for `.eslintignore` [files](./configuring.md#.eslintignore), which use the same patterns as the `.gitignore` [specification](https://git-scm.com/docs/gitignore). You should quote your patterns in order to avoid shell interpretation of glob patterns.
278+
This option allows you to specify patterns of files to ignore (in addition to those in `.eslintignore`). You can repeat the option to provide multiple patterns. The supported syntax is the same as for `.eslintignore` [files](configuring/ignoring-code.md#the-eslintignore-file), which use the same patterns as the `.gitignore` [specification](https://git-scm.com/docs/gitignore). You should quote your patterns in order to avoid shell interpretation of glob patterns.
279279

280280
Example:
281281

@@ -483,7 +483,7 @@ ESLint supports `.eslintignore` files to exclude files from the linting process
483483
temp.js
484484
**/vendor/*.js
485485

486-
A more detailed breakdown of supported patterns and directories ESLint ignores by default can be found in [Configuring ESLint](configuring.md#ignoring-files-and-directories).
486+
A more detailed breakdown of supported patterns and directories ESLint ignores by default can be found in [Ignoring Code](configuring/ignoring-code.md).
487487

488488
## Exit codes
489489

docs/user-guide/getting-started.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ The names `"semi"` and `"quotes"` are the names of [rules](/docs/rules) in ESLin
6565
* `"warn"` or `1` - turn the rule on as a warning (doesn't affect exit code)
6666
* `"error"` or `2` - turn the rule on as an error (exit code will be 1)
6767

68-
The three error levels allow you fine-grained control over how ESLint applies rules (for more configuration options and details, see the [configuration docs](configuring.md)).
68+
The three error levels allow you fine-grained control over how ESLint applies rules (for more configuration options and details, see the [configuration docs](configuring/)).
6969

7070
Your `.eslintrc.{js,yml,json}` configuration file will also include the line:
7171

@@ -81,7 +81,7 @@ Because of this line, all of the rules marked "(recommended)" on the [rules page
8181

8282
## Next Steps
8383

84-
* Learn about [advanced configuration](configuring.md) of ESLint.
84+
* Learn about [advanced configuration](configuring/) of ESLint.
8585
* Get familiar with the [command line options](command-line-interface.md).
8686
* Explore [ESLint integrations](integrations.md) into other tools like editors, build systems, and more.
8787
* Can't find just the right rule? Make your own [custom rule](/docs/developer-guide/working-with-rules.md).

0 commit comments

Comments
 (0)