Skip to content

Commit

Permalink
docs(website): fix links between github, rules and docs (#4249)
Browse files Browse the repository at this point in the history
* docs(website): fix links between github, rules and docs

* docs(website): fix additional links on website
  • Loading branch information
armano2 committed Dec 15, 2021
1 parent 538bbcc commit 9213c6b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions docs/linting/README.md
Expand Up @@ -39,10 +39,10 @@ This is about the smallest config file we recommend. There's a lot more you can

Explaining the important bits:

- `parser: '@typescript-eslint/parser'` tells ESLint to use the parser package you installed ([`@typescript-eslint/parser`](../../../packages/parser)).
- `parser: '@typescript-eslint/parser'` tells ESLint to use the parser package you installed ([`@typescript-eslint/parser`](https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/parser)).
- This allows ESLint to understand TypeScript syntax.
- This is required, or else ESLint will throw errors as it tries to parse TypeScript code as if it were regular JavaScript.
- `plugins: ['@typescript-eslint']` tells ESLint to load the plugin package you installed ([`@typescript-eslint/eslint-plugin`](../../../packages/eslint-plugin)).
- `plugins: ['@typescript-eslint']` tells ESLint to load the plugin package you installed ([`@typescript-eslint/eslint-plugin`](https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin)).
- This allows you to use the rules within your codebase.
- `extends: [ ... ]` tells ESLint that your config extends the given configurations.
- `eslint:recommended` is ESLint's inbuilt "recommended" config - it turns on a small, sensible set of rules which lint for well-known best-practices.
Expand All @@ -66,7 +66,7 @@ dist

- You can read more about configuring ESLint [in their documentation on configuration](https://eslint.org/docs/user-guide/configuring).
- You can read more about the rules provided by ESLint [in their documentation on their rules](https://eslint.org/docs/rules/).
- You can read more about the rules provided by us in [our plugin documentation](../../../packages/eslint-plugin).
- You can read more about the rules provided by us in [our plugin documentation](https://typescript-eslint.io/rules/).

## Running ESLint

Expand Down Expand Up @@ -172,7 +172,7 @@ A typical plugin might be used like:

<!-- markdownlint-disable MD044 -->

Search ["eslint-plugin" on npm](https://www.npmjs.com/search?q=eslint-config) for more.
Search ["eslint-plugin" on npm](https://www.npmjs.com/search?q=eslint-plugin) for more.

## Troubleshooting

Expand Down
8 changes: 4 additions & 4 deletions docs/linting/TROUBLESHOOTING.md
Expand Up @@ -8,7 +8,7 @@ sidebar_label: Troubleshooting & FAQs

This happens because TypeScript adds new features that ESLint doesn't know about.

The first step is to [check our list of "extension" rules here](../../../packages/eslint-plugin/README.md#extension-rules).
The first step is to [check our list of "extension" rules here](https://typescript-eslint.io/rules/#extension-rules).
An extension rule is a rule which extends the base ESLint rules to support TypeScript syntax.
If you find it in there, give it a go to see if it works for you.
You can configure it by disabling the base rule, and turning on the extension rule.
Expand All @@ -24,10 +24,10 @@ Here's an example with the `semi` rule:
```

If you don't find an existing extension rule, or the extension rule doesn't work for your case, then you can go ahead and check our issues.
[The contributing guide outlines the best way to raise an issue](../../../CONTRIBUTING.md#raising-issues).
[The contributing guide outlines the best way to raise an issue](https://github.com/typescript-eslint/typescript-eslint/blob/main/CONTRIBUTING.md#raising-issues).

> We release a new version our tooling every week.
> _Please_ ensure that you [check our the latest list of "extension" rules](../../../packages/eslint-plugin/README.md#extension-rules) **_before_** filing an issue.
> _Please_ ensure that you [check our the latest list of "extension" rules](https://typescript-eslint.io/rules/#extension-rules) **_before_** filing an issue.
## I get errors telling me "The file must be included in at least one of the projects provided"

Expand Down Expand Up @@ -60,7 +60,7 @@ If you have some pure JavaScript code that you do not want to apply certain lint

Make sure that you have installed TypeScript locally i.e. by using `npm install typescript`, not `npm install -g typescript`,
or by using `yarn add typescript`, not `yarn global add typescript`.
See https://github.com/typescript-eslint/typescript-eslint/issues/2041 for more information.
See [#2041](https://github.com/typescript-eslint/typescript-eslint/issues/2041) for more information.

## How can I ban `<specific language feature>`?

Expand Down
4 changes: 2 additions & 2 deletions docs/linting/TYPED_LINTING.md
Expand Up @@ -63,8 +63,8 @@ Depending on what you want to achieve:
- If you **do** want to lint the file with [type-aware linting](./TYPED_LINTING.md):
- Check the `include` option of each of the tsconfigs that you provide to `parserOptions.project` - you must ensure that all files match an `include` glob, or else our tooling will not be able to find it.
- If your file shouldn't be a part of one of your existing tsconfigs (for example, it is a script/tool local to the repo), then consider creating a new tsconfig (we advise calling it `tsconfig.eslint.json`) in your project root which lists this file in its `include`. For an example of this, you can check out the configuration we use in this repo:
- [`tsconfig.eslint.json`](https://github.com/typescript-eslint/typescript-eslint/tsconfig.eslint.json)
- [`.eslintrc.js`](https://github.com/typescript-eslint/typescript-eslint/.eslintrc.js)
- [`tsconfig.eslint.json`](https://github.com/typescript-eslint/typescript-eslint/blob/main/tsconfig.eslint.json)
- [`.eslintrc.js`](https://github.com/typescript-eslint/typescript-eslint/blob/main/.eslintrc.js)

## Troubleshooting

Expand Down
4 changes: 2 additions & 2 deletions packages/eslint-plugin/docs/rules/README.md
Expand Up @@ -9,9 +9,9 @@ slug: /
`@typescript-eslint/eslint-plugin` comes with two rulesets you can extend from to pull in the recommended starting rules:

- `'plugin:@typescript-eslint/recommended'`: recommended rules for code correctness that you can drop in without additional configuration.
See [Linting](/docs/linting/linting) for more details.
See [Linting](https://typescript-eslint.io/docs/linting/linting) for more details.
- `'plugin:@typescript-eslint/recommended-requiring-type-checking'` additional recommended rules that require type information.
See [Linting](/docs/linting/type-linting) for more details.
See [Linting](https://typescript-eslint.io/docs/linting/type-linting) for more details.

## Supported Rules

Expand Down

0 comments on commit 9213c6b

Please sign in to comment.