Skip to content

Commit

Permalink
chore(website): consistent .mdx file naming (#6325)
Browse files Browse the repository at this point in the history
* chore(website): consistent .mdx file naming

* Ran Prettier

* .md/s/x

* Post merge fixups

* Ignore warnonunsupportedtypescriptversion

* Fix Versioning merge conflicts
  • Loading branch information
JoshuaKGoldberg committed Jan 31, 2023
1 parent 99c091e commit 2c61bdb
Show file tree
Hide file tree
Showing 23 changed files with 43 additions and 27 deletions.
1 change: 1 addition & 0 deletions .cspell.json
Expand Up @@ -121,6 +121,7 @@
"unoptimized",
"unprefixed",
"upsert",
"warnonunsupportedtypescriptversion",
"Zacher"
],
"overrides": [
Expand Down
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Expand Up @@ -8,7 +8,7 @@ Otherwise we may not be able to review your PR.

- [ ] Addresses an existing open issue: fixes #000
- [ ] That issue was marked as [accepting prs](https://github.com/typescript-eslint/typescript-eslint/issues?q=is%3Aopen+is%3Aissue+label%3A%22accepting+prs%22)
- [ ] Steps in [CONTRIBUTING.md](https://github.com/typescript-eslint/typescript-eslint/blob/main/CONTRIBUTING.md) were taken
- [ ] Steps in [Contributing](https://typescript-eslint.io/contributing) were taken

## Overview

Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions docs/Getting_Started.md → docs/Getting_Started.mdx
Expand Up @@ -73,6 +73,6 @@ ESLint will lint all TypeScript compatible files within the current folder, and

## Next Steps

We provide a plethora of powerful rules that utilize the power of TypeScript's type information. [Visit the next page for a setup guide](./linting/Typed_Linting.md 'Visit the next page for a typed rules setup guide').
We provide a plethora of powerful rules that utilize the power of TypeScript's type information. [Visit the next page for a setup guide](./linting/Typed_Linting.mdx 'Visit the next page for a typed rules setup guide').

If you're having problems getting this working, please have a look at our [Troubleshooting & FAQs](./linting/Troubleshooting.md).
If you're having problems getting this working, please have a look at our [Troubleshooting & FAQs](./linting/Troubleshooting.mdx).
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/architecture/ESLint_Plugin.mdx
Expand Up @@ -8,7 +8,7 @@ sidebar_label: eslint-plugin
> The TypeScript plugin for ESLint. ✨
:::info
See [Getting Started](../Getting_Started.md) for documentation on how to lint your TypeScript code with ESLint.
See [Getting Started](../Getting_Started.mdx) for documentation on how to lint your TypeScript code with ESLint.
:::

`@typescript-eslint/eslint-plugin` is an ESLint plugin used to load in custom rules and rule configurations lists from typescript-eslint.
Expand Down
4 changes: 2 additions & 2 deletions docs/architecture/ESLint_Plugin_TSLint.mdx
Expand Up @@ -8,8 +8,8 @@ sidebar_label: eslint-plugin-tslint
> ESLint plugin that allows running TSLint rules within ESLint to help you migrate from TSLint to ESLint. ✨
:::caution
Per [What About TSLint?](../linting/troubleshooting/TSLint.md), we highly recommend migrating off TSLint.
See [Getting Started](../Getting_Started.md) for documentation on how to lint your TypeScript code with ESLint.
Per [What About TSLint?](../linting/troubleshooting/TSLint.mdx), we highly recommend migrating off TSLint.
See [Getting Started](../Getting_Started.mdx) for documentation on how to lint your TypeScript code with ESLint.
:::

## Installation
Expand Down
2 changes: 1 addition & 1 deletion docs/linting/CONFIGURATIONS.mdx
Expand Up @@ -18,7 +18,7 @@ Most projects should extend from at least one of:
- [`strict`](#strict): Additional strict rules that can also catch bugs but are more opinionated than recommended rules.

:::tip
We recommend most projects use [`recommended-requiring-type-checking`](#recommended-requiring-type-checking) (which requires [typed linting](./Typed_Linting.md)).
We recommend most projects use [`recommended-requiring-type-checking`](#recommended-requiring-type-checking) (which requires [typed linting](./Typed_Linting.mdx)).
:::

:::note
Expand Down
Expand Up @@ -35,11 +35,11 @@ If you don't find an existing extension rule, or the extension rule doesn't work
- If you **do not** want to lint the file:
- Use [one of the options ESLint offers](https://eslint.org/docs/latest/user-guide/configuring/ignoring-code) to ignore files, namely a `.eslintignore` file, or `ignorePatterns` config.
- If you **do** want to lint the file:
- If you **do not** want to lint the file with [type-aware linting](./Typed_Linting.md):
- If you **do not** want to lint the file with [type-aware linting](./Typed_Linting.mdx):
- Use [ESLint's `overrides` configuration](https://eslint.org/docs/latest/user-guide/configuring/configuration-files#configuration-based-on-glob-patterns) to configure the file to not be parsed with type information.
- A popular setup is to omit the above additions from top-level configuration and only apply them to TypeScript files via an override.
- Alternatively, you can add `parserOptions: { project: null }` to an override for the files you wish to exclude. Note that `{ project: undefined }` will not work.
- If you **do** want to lint the file with [type-aware linting](./Typed_Linting.md):
- If you **do** want to lint the file with [type-aware linting](./Typed_Linting.mdx):
- 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/blob/main/tsconfig.eslint.json)
Expand All @@ -64,7 +64,7 @@ For example, many projects have files like:

In that case, viewing the `.eslintrc.cjs` in an IDE with the ESLint extension will show the error notice that the file couldn't be linted because it isn't included in `tsconfig.json`.

See our docs on [type aware linting](./Typed_Linting.md) for more information.
See our docs on [type aware linting](./Typed_Linting.mdx) for more information.

## I get errors telling me "The file must be included in at least one of the projects provided"

Expand Down
Expand Up @@ -30,7 +30,7 @@ In more detail:

- `plugin:@typescript-eslint/recommended-requiring-type-checking` is another [recommended configuration](./CONFIGURATIONS.mdx) we provide. This one contains recommended rules that additionally require type information.
- `parserOptions.project` tells our parser the relative path where your project's `tsconfig.json` is.
- If your project is a multi-package monorepo, see [our docs on configuring a monorepo](./typed-linting/Monorepos.md).
- If your project is a multi-package monorepo, see [our docs on configuring a monorepo](./typed-linting/Monorepos.mdx).
- `parserOptions.tsconfigRootDir` tells our parser the absolute path of your project's root directory (see [Parser#tsconfigRootDir](../architecture/Parser.mdx#tsconfigRootDir)).

With that done, run the same lint command you ran before.
Expand All @@ -53,8 +53,8 @@ This means that generally they usually only run a complete lint before a push, o
### I get errors telling me "The file must be included in at least one of the projects provided"

You're using an outdated version of `@typescript-eslint/parser`.
Update to the latest version to see a more informative version of this error message, explained in our [Troubleshooting and FAQs page](./Troubleshooting.md#i-get-errors-telling-me-eslint-was-configured-to-run--however-that-tsconfig-does-not--none-of-those-tsconfigs-include-this-file).
Update to the latest version to see a more informative version of this error message, explained in our [Troubleshooting and FAQs page](./Troubleshooting.mdx#i-get-errors-telling-me-eslint-was-configured-to-run--however-that-tsconfig-does-not--none-of-those-tsconfigs-include-this-file).

## Troubleshooting

If you're having problems getting this working, please have a look at our [Troubleshooting and FAQs page](./Troubleshooting.md).
If you're having problems getting this working, please have a look at our [Troubleshooting and FAQs page](./Troubleshooting.mdx).
File renamed without changes.
4 changes: 2 additions & 2 deletions docs/linting/troubleshooting/Performance.md
Expand Up @@ -3,7 +3,7 @@ id: performance-troubleshooting
title: Performance Troubleshooting
---

As mentioned in the [type-aware linting doc](../Typed_Linting.md), if you're using type-aware linting, your lint times should be roughly the same as your build times.
As mentioned in the [type-aware linting doc](../Typed_Linting.mdx), if you're using type-aware linting, your lint times should be roughly the same as your build times.

If you're experiencing times much slower than that, then there are a few common culprits.

Expand Down Expand Up @@ -53,7 +53,7 @@ Across a large codebase, these can add up, and severely impact performance.

We recommend not using this rule, and instead using a tool like [`prettier`](https://www.npmjs.com/package/prettier) to enforce a standardized formatting.

See our [documentation on formatting](./Formatting.md) for more information.
See our [documentation on formatting](./Formatting.mdx) for more information.

## `eslint-plugin-prettier`

Expand Down
File renamed without changes.
Expand Up @@ -38,7 +38,7 @@ Be sure to update your `.eslintrc.js` to point at this new config file.

## One `tsconfig.json` per package (and an optional one in the root)

The `parserOptions.project` option introduced in [Linting with Type Information](../Typed_Linting.md) accepts an array of relative paths.
The `parserOptions.project` option introduced in [Linting with Type Information](../Typed_Linting.mdx) accepts an array of relative paths.
Paths may be provided as [Node globs](https://github.com/isaacs/node-glob/blob/f5a57d3d6e19b324522a3fa5bdd5075fd1aa79d1/README.md#glob-primer).
For each file being linted, the first matching project path will be used as its backing TSConfig.

Expand Down Expand Up @@ -104,4 +104,4 @@ As an interim workaround, consider one of the following:

## Troubleshooting

If you're having problems getting this working, please have a look at our [Troubleshooting FAQ](../Troubleshooting.md).
If you're having problems getting this working, please have a look at our [Troubleshooting FAQ](../Troubleshooting.mdx).
Expand Up @@ -31,7 +31,12 @@ You can call it _blurple_ if you want.

Our logo is also a halfway between [ESLint's logo](https://en.wikipedia.org/wiki/ESLint#/media/File:ESLint_logo.svg) and [TypeScript's logo](https://en.wikipedia.org/wiki/TypeScript#/media/File:Typescript.svg):

<img alt="typescript-eslint logo" src="/img/logo.svg" height="128px" width="128px" />
<img
alt="typescript-eslint logo"
src="/img/logo.svg"
height="128px"
width="128px"
/>

- [Logo PNG download](/img/logo.png)
- [Logo SVG download](/img/logo.svg)
2 changes: 1 addition & 1 deletion docs/maintenance/ISSUES.md → docs/maintenance/Issues.mdx
Expand Up @@ -105,7 +105,7 @@ We avoid features that:
- Are only relevant for a minority of users, as they aren't likely worth the maintenance burden
- Aren't TypeScript-specific (e.g. should be in ESLint core instead)
- Are only relevant with specific userland frameworks or libraries, such as Jest or React
- Are for "formatting" functionality (we [strongly recommend users use a separate dedicated formatter](../linting/troubleshooting/Formatting.md))
- Are for "formatting" functionality (we [strongly recommend users use a separate dedicated formatter](../linting/troubleshooting/Formatting.mdx))

#### ✨ Rule Enhancements

Expand Down
File renamed without changes.
File renamed without changes.
14 changes: 12 additions & 2 deletions docs/maintenance/Versioning.md → docs/maintenance/Versioning.mdx
Expand Up @@ -14,11 +14,21 @@ Additionally, we promote to the `latest` tag on NPM once per week, **on Mondays

The latest version under the `latest` tag is:

<a href="https://www.npmjs.com/package/@typescript-eslint/parser"><img src="https://img.shields.io/npm/v/@typescript-eslint/parser/latest.svg?style=flat-square" alt="NPM Version" /></a>
<a href="https://www.npmjs.com/package/@typescript-eslint/parser">
<img
src="https://img.shields.io/npm/v/@typescript-eslint/parser/latest.svg?style=flat-square"
alt="NPM Version"
/>
</a>

The latest version under the `canary` tag **(latest commit to `main`)** is:

<a href="https://www.npmjs.com/package/@typescript-eslint/parser"><img src="https://img.shields.io/npm/v/@typescript-eslint/parser/canary.svg?style=flat-square" alt="NPM Version" /></a>
<a href="https://www.npmjs.com/package/@typescript-eslint/parser">
<img
src="https://img.shields.io/npm/v/@typescript-eslint/parser/canary.svg?style=flat-square"
alt="NPM Version"
/>
</a>

:::note
The only exception to the automated publishes described above is when we are in the final phases of creating the next major version of the libraries - e.g. going from `1.x.x` to `2.x.x`.
Expand Down
10 changes: 5 additions & 5 deletions docs/maintenance/versioning/dependant-version-upgrades.mdx
Expand Up @@ -21,7 +21,7 @@ Whenever you discover any new areas of work that are blocked by dropping an old
1. Upgrade the root `package.json` `devDependency` to the latest ESLint
1. Add the new major version to the explicit `peerDependency` versions
1. Check [`eslint-visitor-keys`](https://www.npmjs.com/package/eslint-visitor-keys) for a new version to be upgraded to as well.
1. Update [Versioning > ESLint](../Versioning.md#eslint)
1. Update [Versioning > ESLint](../Versioning.mdx#eslint)

### Removing Support for an Old ESLint Version

Expand All @@ -32,7 +32,7 @@ Whenever you discover any new areas of work that are blocked by dropping an old
- `/eslint.*5/i`
- `/todo.*eslint.*5/i`
- `/todo.*eslint/i`
1. Update [Versioning > ESLint](../Versioning.md#eslint)
1. Update [Versioning > ESLint](../Versioning.mdx#eslint)

See [chore: drop support for ESLint v6](https://github.com/typescript-eslint/typescript-eslint/pull/5972) for reference.

Expand Down Expand Up @@ -88,8 +88,8 @@ We generally start the process of supporting a new TypeScript version just after
- In the root `package.json`, change the `devDependency` on `typescript` to `~X.Y.3`
- Rename and update `patches/typescript*` to the new TypeScript version
- Any other changes made necessary due to changes in TypeScript between the RC version and stable version
- Update the supported version range in [Versioning](../Versioning.md)
1. Update [Versioning > TypeScript](../Versioning.md#typescript)
- Update the supported version range in [Versioning](../Versioning.mdx)
1. Update [Versioning > TypeScript](../Versioning.mdx#typescript)
1. Send a PR that updates this documentation page to point to your newer issues and PRs
- Also update any of these steps if you go with a different process

Expand All @@ -108,7 +108,7 @@ A single PR can remove support for old TypeScript versions as a breaking change:
1. Update the root `package.json` `devDependency`
1. Update the `SUPPORTED_TYPESCRIPT_VERSIONS` constant in `warnAboutTSVersion.ts`
1. Update the `versions` constant in `version-check.ts`
1. Update [Versioning > TypeScript](../Versioning.md#typescript)
1. Update [Versioning > TypeScript](../Versioning.mdx#typescript)
1. Search for source code comments (excluding `CHANGELOG.md` files) that mention a now-unsupported version of TypeScript.
- For example, to remove support for v4.3, searches might include:
- `4.3`
Expand Down
2 changes: 1 addition & 1 deletion packages/experimental-utils/README.md
Expand Up @@ -19,4 +19,4 @@ You should switch to importing from that non-experimental package instead.
## Contributing

[See the contributing guide here](../../CONTRIBUTING.md)
[See the contributing guide here](https://typescript-eslint.io).

0 comments on commit 2c61bdb

Please sign in to comment.