You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/developer-guide/working-with-plugins.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -136,7 +136,7 @@ overrides:
136
136
processor: a-plugin/markdown
137
137
```
138
138
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.
140
140
141
141
#### File Extension-named Processor
142
142
@@ -197,7 +197,7 @@ If the example plugin above were called `eslint-plugin-myPlugin`, the `myConfig`
197
197
198
198
```
199
199
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.
Copy file name to clipboardExpand all lines: docs/developer-guide/working-with-rules-deprecated.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,7 @@ module.exports.schema = []; // no options
32
32
33
33
## Rule Basics
34
34
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)
36
36
37
37
`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:
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:
74
74
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)).
76
76
*`id` - the rule ID.
77
77
*`options` - an array of rule options.
78
78
*`settings` - the `settings` from configuration.
@@ -476,7 +476,7 @@ valid: [
476
476
]
477
477
```
478
478
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).
480
480
481
481
### Write Several Tests
482
482
@@ -571,5 +571,5 @@ The thing that makes ESLint different from other linters is the ability to defin
571
571
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:
572
572
573
573
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.
575
575
3. Run the [command line interface](../user-guide/command-line-interface.md) using the `--rulesdir` option to specify the location of your runtime rules.
Copy file name to clipboardExpand all lines: docs/developer-guide/working-with-rules.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,7 +60,7 @@ The source file for a rule exports an object with the following properties.
60
60
61
61
*`description` (string) provides the short description of the rule in the [rules index](../rules/)
62
62
*`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
64
64
*`url` (string) specifies the URL at which the full documentation can be accessed
65
65
*`suggestion` (boolean) specifies whether rules can return suggestions (defaults to false if omitted)
66
66
@@ -70,7 +70,7 @@ The source file for a rule exports an object with the following properties.
70
70
71
71
**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.
72
72
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)
74
74
75
75
*`deprecated` (boolean) indicates whether the rule has been deprecated. You may omit the `deprecated` property if the rule has not been deprecated.
76
76
@@ -117,10 +117,10 @@ module.exports = {
117
117
118
118
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:
119
119
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)).
121
121
*`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.
124
124
*`parserPath` - the name of the `parser` from configuration.
125
125
*`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.)
126
126
@@ -737,5 +737,5 @@ The thing that makes ESLint different from other linters is the ability to defin
737
737
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:
738
738
739
739
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.
741
741
3. Run the [command line interface](../user-guide/command-line-interface.md) using the `--rulesdir` option to specify the location of your runtime rules.
Copy file name to clipboardExpand all lines: docs/rules/no-undef.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,7 +68,7 @@ if(typeof a === "string"){}
68
68
69
69
## Environments
70
70
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.
Copy file name to clipboardExpand all lines: docs/rules/strict.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,7 @@ In **ECMAScript** modules, which always have strict mode semantics, the directiv
42
42
43
43
This rule requires or disallows strict mode directives.
44
44
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):
46
46
47
47
*`"sourceType": "module"` that is, files are **ECMAScript** modules
48
48
*`"impliedStrict": true` property in the `ecmaFeatures` object
@@ -66,8 +66,8 @@ This rule has a string option:
66
66
67
67
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:
68
68
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)
71
71
72
72
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.
73
73
@@ -269,4 +269,4 @@ function foo() {
269
269
270
270
## When Not To Use It
271
271
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.
Copy file name to clipboardExpand all lines: docs/user-guide/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ Want to skip ahead and just start using ESLint? This section gives a high-level
10
10
11
11
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.
12
12
13
-
## [Configuring](configuring.md)
13
+
## [Configuring](configuring/)
14
14
15
15
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.
Copy file name to clipboardExpand all lines: docs/user-guide/command-line-interface.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -118,7 +118,7 @@ If `.eslintrc.*` and/or `package.json` files are also used for configuration (i.
118
118
119
119
#### `--env`
120
120
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.
122
122
123
123
Examples:
124
124
@@ -275,7 +275,7 @@ Example:
275
275
276
276
#### `--ignore-pattern`
277
277
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.
279
279
280
280
Example:
281
281
@@ -483,7 +483,7 @@ ESLint supports `.eslintignore` files to exclude files from the linting process
483
483
temp.js
484
484
**/vendor/*.js
485
485
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).
Copy file name to clipboardExpand all lines: docs/user-guide/getting-started.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,7 +65,7 @@ The names `"semi"` and `"quotes"` are the names of [rules](/docs/rules) in ESLin
65
65
*`"warn"` or `1` - turn the rule on as a warning (doesn't affect exit code)
66
66
*`"error"` or `2` - turn the rule on as an error (exit code will be 1)
67
67
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/)).
69
69
70
70
Your `.eslintrc.{js,yml,json}` configuration file will also include the line:
71
71
@@ -81,7 +81,7 @@ Because of this line, all of the rules marked "(recommended)" on the [rules page
81
81
82
82
## Next Steps
83
83
84
-
* Learn about [advanced configuration](configuring.md) of ESLint.
84
+
* Learn about [advanced configuration](configuring/) of ESLint.
85
85
* Get familiar with the [command line options](command-line-interface.md).
86
86
* Explore [ESLint integrations](integrations.md) into other tools like editors, build systems, and more.
87
87
* Can't find just the right rule? Make your own [custom rule](/docs/developer-guide/working-with-rules.md).
0 commit comments