Skip to content

Commit

Permalink
docs: change some absolute links to relative (#15970)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdjermanovic committed Jun 9, 2022
1 parent f31216a commit 21d6479
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion docs/src/rules/no-undef.md
Expand Up @@ -16,7 +16,7 @@ This rule can help you locate potential ReferenceErrors resulting from misspelli

## Rule Details

Any reference to an undeclared variable causes a warning, unless the variable is explicitly mentioned in a `/*global ...*/` comment, or specified in the [`globals` key in the configuration file](https://eslint.org/docs/user-guide/configuring#specifying-globals). A common use case for these is if you intentionally use globals that are defined elsewhere (e.g. in a script sourced from HTML).
Any reference to an undeclared variable causes a warning, unless the variable is explicitly mentioned in a `/*global ...*/` comment, or specified in the [`globals` key in the configuration file](../user-guide/configuring/language-options#using-configuration-files-1). A common use case for these is if you intentionally use globals that are defined elsewhere (e.g. in a script sourced from HTML).

Examples of **incorrect** code for this rule:

Expand Down
2 changes: 1 addition & 1 deletion docs/src/user-guide/command-line-interface.md
Expand Up @@ -10,7 +10,7 @@ eleventyNavigation:

---

ESLint requires Node.js for installation. Follow the instructions in the [Getting Started Guide](https://eslint.org/docs/user-guide/getting-started) to install ESLint.
ESLint requires Node.js for installation. Follow the instructions in the [Getting Started Guide](getting-started) to install ESLint.

Most users use [`npx`](https://docs.npmjs.com/cli/v8/commands/npx) to run ESLint on the command line like this:

Expand Down
2 changes: 1 addition & 1 deletion docs/src/user-guide/configuring/ignoring-code.md
Expand Up @@ -50,7 +50,7 @@ When ESLint is run, it looks in the current working directory to find an `.eslin
Globs are matched using [node-ignore](https://github.com/kaelzhang/node-ignore), so a number of features are available:

* Lines beginning with `#` are treated as comments and do not affect the ignore patterns.
* Paths are relative to the current working directory. This is also true of paths passed in via the `--ignore-pattern` [command](https://eslint.org/docs/user-guide/command-line-interface#--ignore-pattern).
* Paths are relative to the current working directory. This is also true of paths passed in via the `--ignore-pattern` [command](../command-line-interface#--ignore-pattern).
* Lines preceded by `!` are negated patterns that re-include a pattern that was ignored by an earlier pattern.
* Ignore patterns behave according to the `.gitignore` [specification](https://git-scm.com/docs/gitignore).

Expand Down
2 changes: 1 addition & 1 deletion docs/src/user-guide/configuring/index.md
Expand Up @@ -13,7 +13,7 @@ eleventyNavigation:
ESLint is designed to be flexible and configurable for your use case. You can turn off every rule and run only with basic syntax validation or mix and match the bundled rules and your custom rules to fit the needs of your project. There are two primary ways to configure ESLint:

1. **Configuration Comments** - use JavaScript comments to embed configuration information directly into a file.
1. **Configuration Files** - use a JavaScript, JSON, or YAML file to specify configuration information for an entire directory and all of its subdirectories. This can be in the form of a [`.eslintrc.*`](./configuration-files#configuration-file-formats) file or an `eslintConfig` field in a [`package.json`](https://docs.npmjs.com/files/package.json) file, both of which ESLint will look for and read automatically, or you can specify a configuration file on the [command line](https://eslint.org/docs/user-guide/command-line-interface).
1. **Configuration Files** - use a JavaScript, JSON, or YAML file to specify configuration information for an entire directory and all of its subdirectories. This can be in the form of a [`.eslintrc.*`](./configuration-files#configuration-file-formats) file or an `eslintConfig` field in a [`package.json`](https://docs.npmjs.com/files/package.json) file, both of which ESLint will look for and read automatically, or you can specify a configuration file on the [command line](../command-line-interface).

Here are some of the options that you can configure in ESLint:

Expand Down
2 changes: 1 addition & 1 deletion docs/src/user-guide/configuring/language-options.md
Expand Up @@ -53,7 +53,7 @@ An environment provides predefined global variables. The available environments

These environments are not mutually exclusive, so you can define more than one at a time.

Environments can be specified inside of a file, in configuration files or using the `--env` [command line](https://eslint.org/docs/user-guide/command-line-interface) flag.
Environments can be specified inside of a file, in configuration files or using the `--env` [command line](../command-line-interface) flag.

### Using configuration comments

Expand Down
2 changes: 1 addition & 1 deletion docs/src/user-guide/configuring/plugins.md
Expand Up @@ -19,7 +19,7 @@ eleventyNavigation:
By default, ESLint uses [Espree](https://github.com/eslint/espree) as its parser. You can optionally specify that a different parser should be used in your configuration file so long as the parser meets the following requirements:

1. It must be a Node module loadable from the config file where the parser is used. Usually, this means you should install the parser package separately using npm.
1. It must conform to the [parser interface](https://eslint.org/docs/developer-guide/working-with-custom-parsers).
1. It must conform to the [parser interface](../../developer-guide/working-with-custom-parsers).

Note that even with these compatibilities, there are no guarantees that an external parser will work correctly with ESLint and ESLint will not fix bugs related to incompatibilities with other parsers.

Expand Down
16 changes: 8 additions & 8 deletions docs/src/user-guide/configuring/rules.md
Expand Up @@ -29,7 +29,7 @@ To configure rules inside of a file using configuration comments, use a comment
/* eslint eqeqeq: "off", curly: "error" */
```

In this example, [`eqeqeq`](https://eslint.org/docs/rules/eqeqeq) is turned off and [`curly`](https://eslint.org/docs/rules/curly) is turned on as an error. You can also use the numeric equivalent for the rule severity:
In this example, [`eqeqeq`](../../rules/eqeqeq) is turned off and [`curly`](../../rules/curly) is turned on as an error. You can also use the numeric equivalent for the rule severity:

```js
/* eslint eqeqeq: 0, curly: 2 */
Expand All @@ -43,7 +43,7 @@ If a rule has additional options, you can specify them using array literal synta
/* eslint quotes: ["error", "double"], curly: 2 */
```

This comment specifies the "double" option for the [`quotes`](https://eslint.org/docs/rules/quotes) rule. The first item in the array is always the rule severity (number or string).
This comment specifies the "double" option for the [`quotes`](../../rules/quotes) rule. The first item in the array is always the rule severity (number or string).

Configuration comments can include descriptions to explain why the comment is necessary. The description must occur after the configuration and is separated from the configuration by two or more consecutive `-` characters. For example:

Expand Down Expand Up @@ -221,10 +221,10 @@ alert('foo'); /* eslint-disable-line no-alert, quotes, semi */
/* eslint-disable-next-line no-alert, quotes, semi */
alert('foo');

/* eslint-disable-next-line
no-alert,
quotes,
semi
/* eslint-disable-next-line
no-alert,
quotes,
semi
*/
alert('foo');
```
Expand Down Expand Up @@ -280,7 +280,7 @@ To disable all inline config comments, use the `noInlineConfig` setting. For exa
}
```

This setting is similar to [--no-inline-config](https://eslint.org/docs/user-guide/command-line-interface#--no-inline-config) CLI option.
This setting is similar to [--no-inline-config](../command-line-interface#--no-inline-config) CLI option.

#### Report unused `eslint-disable` comments

Expand All @@ -293,4 +293,4 @@ To report unused `eslint-disable` comments, use the `reportUnusedDisableDirectiv
}
```

This setting is similar to [--report-unused-disable-directives](https://eslint.org/docs/user-guide/command-line-interface#--report-unused-disable-directives) CLI option, but doesn't fail linting (reports as `"warn"` severity).
This setting is similar to [--report-unused-disable-directives](../command-line-interface#--report-unused-disable-directives) CLI option, but doesn't fail linting (reports as `"warn"` severity).

0 comments on commit 21d6479

Please sign in to comment.