From a8d423b18c8a92496ce32ad243f882c4924c6fd6 Mon Sep 17 00:00:00 2001 From: Jimmy Gaussen Date: Thu, 10 Jan 2019 15:06:41 +0100 Subject: [PATCH] docs: remove redundant "./" from relative links (#5741) Fixes #5740 fixed with `sed -i "s#(\./#(#" docs/*.md website/versioned_docs/version-stable/*.md` --- docs/api.md | 2 +- docs/cli.md | 6 +++--- docs/options.md | 4 ++-- docs/plugins.md | 6 +++--- website/versioned_docs/version-stable/api.md | 2 +- website/versioned_docs/version-stable/cli.md | 2 +- website/versioned_docs/version-stable/options.md | 2 +- website/versioned_docs/version-stable/plugins.md | 6 +++--- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/docs/api.md b/docs/api.md index 6705dc3d3..249d59882 100644 --- a/docs/api.md +++ b/docs/api.md @@ -86,7 +86,7 @@ As you repeatedly call `resolveConfig`, the file system structure will be cached Setting `options.ignorePath` (`string`) and `options.withNodeModules` (`boolean`) influence the value of `ignored` (`false` by default). -Providing [plugin](./plugins.md) paths in `options.plugins` (`string[]`) helps extract `inferredParser` for files that are not supported by Prettier core. +Providing [plugin](plugins.md) paths in `options.plugins` (`string[]`) helps extract `inferredParser` for files that are not supported by Prettier core. Use `prettier.getFileInfo.sync(filePath [, options])` if you'd like to use sync version. diff --git a/docs/cli.md b/docs/cli.md index 341174754..0bcc63dca 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -51,7 +51,7 @@ Human-friendly status messages help project contributors react on possible probl To minimise the number of times `prettier --check` finds unformatted files, you may be interested in configuring a [pre-commit hook](precommit.md) in your repo. Applying this practice will minimise the number of times the CI fails because of code formatting problems. -If you need to pipe the list of unformatted files to another command, you can use [`--list-different`](./cli.md#list-different) flag instead of `--check`. +If you need to pipe the list of unformatted files to another command, you can use [`--list-different`](cli.md#list-different) flag instead of `--check`. ## `--debug-check` @@ -104,7 +104,7 @@ Another useful flag is `--list-different` (or `-l`) which prints the filenames o prettier --single-quote --list-different "src/**/*.js" ``` -You can also use [`--check`](./cli.md#check) flag, which works the same way as `--list-different`, but also prints a human-friendly summary message to stdout. +You can also use [`--check`](cli.md#check) flag, which works the same way as `--list-different`, but also prints a human-friendly summary message to stdout. ## `--no-config` @@ -130,7 +130,7 @@ This option adds support to editor integrations where users define their default ## `--no-editorconfig` -Don't take .editorconfig into account when parsing configuration. See the [`prettier.resolveConfig` docs](./api.md) for details. +Don't take .editorconfig into account when parsing configuration. See the [`prettier.resolveConfig` docs](api.md) for details. ## `--with-node-modules` diff --git a/docs/options.md b/docs/options.md index 3db4e59ac..4fc6c0340 100644 --- a/docs/options.md +++ b/docs/options.md @@ -310,8 +310,8 @@ Doing so produces a large `git diff`, and if it get unnoticed during code review If you want to make sure that your git repository only contains Linux-style line endings in files covered by Prettier: 1. Set `endOfLine` option to `lf` -1. Configure [a pre-commit hook](./precommit.md) that will run Prettier -1. Configure Prettier to run in your CI pipeline using [`--check` flag](./cli.md#check) +1. Configure [a pre-commit hook](precommit.md) that will run Prettier +1. Configure Prettier to run in your CI pipeline using [`--check` flag](cli.md#check) 1. Ask Windows users to run `git config core.autocrlf false` before working on your repo so that git did not convert `LF` to `CRLF` on checkout. Alternatively, you can add `* text=auto eol=lf` to the repo's `.gitattributes` file to achieve this. diff --git a/docs/plugins.md b/docs/plugins.md index 7d7065dbf..4d424aa86 100644 --- a/docs/plugins.md +++ b/docs/plugins.md @@ -15,7 +15,7 @@ Plugins are automatically loaded if you have them installed in the same `node_mo When plugins cannot be found automatically, you can load them with: -- The [CLI](./cli.md), via the `--plugin` and `--plugin-search-dir`: +- The [CLI](cli.md), via the `--plugin` and `--plugin-search-dir`: ```bash prettier --write main.foo --plugin-search-dir=./dir-with-plugins --plugin=./foo-plugin @@ -23,7 +23,7 @@ When plugins cannot be found automatically, you can load them with: > Tip: You can set `--plugin` or `--plugin-search-dir` options multiple times. -- Or the [API](./api.md), via the `plugins` and `pluginSearchDirs` options: +- Or the [API](api.md), via the `plugins` and `pluginSearchDirs` options: ```js prettier.format("code", { @@ -64,7 +64,7 @@ Prettier plugins are regular JavaScript modules with five exports: ### `languages` -Languages is an array of language definitions that your plugin will contribute to Prettier. It can include all of the fields specified in [`prettier.getSupportInfo()`](./api.md#prettiergetsupportinfo-version). +Languages is an array of language definitions that your plugin will contribute to Prettier. It can include all of the fields specified in [`prettier.getSupportInfo()`](api.md#prettiergetsupportinfo-version). It **must** include `name` and `parsers`. diff --git a/website/versioned_docs/version-stable/api.md b/website/versioned_docs/version-stable/api.md index 886e6662c..133a6d645 100644 --- a/website/versioned_docs/version-stable/api.md +++ b/website/versioned_docs/version-stable/api.md @@ -87,7 +87,7 @@ As you repeatedly call `resolveConfig`, the file system structure will be cached Setting `options.ignorePath` (`string`) and `options.withNodeModules` (`boolean`) influence the value of `ignored` (`false` by default). -Providing [plugin](./plugins.md) paths in `options.plugins` (`string[]`) helps extract `inferredParser` for files that are not supported by Prettier core. +Providing [plugin](plugins.md) paths in `options.plugins` (`string[]`) helps extract `inferredParser` for files that are not supported by Prettier core. Use `prettier.getFileInfo.sync(filePath [, options])` if you'd like to use sync version. diff --git a/website/versioned_docs/version-stable/cli.md b/website/versioned_docs/version-stable/cli.md index c5703eb0d..b3249f1d2 100644 --- a/website/versioned_docs/version-stable/cli.md +++ b/website/versioned_docs/version-stable/cli.md @@ -97,7 +97,7 @@ This option adds support to editor integrations where users define their default ## `--no-editorconfig` -Don't take .editorconfig into account when parsing configuration. See the [`prettier.resolveConfig` docs](./api.md) for details. +Don't take .editorconfig into account when parsing configuration. See the [`prettier.resolveConfig` docs](api.md) for details. ## `--with-node-modules` diff --git a/website/versioned_docs/version-stable/options.md b/website/versioned_docs/version-stable/options.md index 4947cfe78..8f61a4e9b 100644 --- a/website/versioned_docs/version-stable/options.md +++ b/website/versioned_docs/version-stable/options.md @@ -310,7 +310,7 @@ Doing so produces a large `git diff`, and if it get unnoticed during code review If you want to make sure that your git repository only contains Linux-style line endings in files covered by Prettier: 1. Set `endOfLine` option to `lf` -1. Configure [a pre-commit hook](./precommit.md) that will run Prettier +1. Configure [a pre-commit hook](precommit.md) that will run Prettier 1. Configure Prettier to run in your CI pipeline (e.g. using [`prettier-check` npm package](https://www.npmjs.com/package/prettier-check)) 1. Ask Windows users to run `git config core.autocrlf false` before working on your repo so that git did not convert `LF` to `CRLF` on checkout. Alternatively, you can add `* text=auto eol=lf` to the repo's `.gitattributes` file to achieve this. diff --git a/website/versioned_docs/version-stable/plugins.md b/website/versioned_docs/version-stable/plugins.md index 220383a44..45b368774 100644 --- a/website/versioned_docs/version-stable/plugins.md +++ b/website/versioned_docs/version-stable/plugins.md @@ -16,7 +16,7 @@ Plugins are automatically loaded if you have them installed in the same `node_mo When plugins cannot be found automatically, you can load them with: -- The [CLI](./cli.md), via the `--plugin` and `--plugin-search-dir`: +- The [CLI](cli.md), via the `--plugin` and `--plugin-search-dir`: ```bash prettier --write main.foo --plugin-search-dir=./dir-with-plugins --plugin=./foo-plugin @@ -24,7 +24,7 @@ When plugins cannot be found automatically, you can load them with: > Tip: You can set `--plugin` or `--plugin-search-dir` options multiple times. -- Or the [API](./api.md), via the `plugins` and `pluginSearchDirs` options: +- Or the [API](api.md), via the `plugins` and `pluginSearchDirs` options: ```js prettier.format("code", { @@ -64,7 +64,7 @@ Prettier plugins are regular JavaScript modules with five exports: ### `languages` -Languages is an array of language definitions that your plugin will contribute to Prettier. It can include all of the fields specified in [`prettier.getSupportInfo()`](./api.md#prettiergetsupportinfo-version). +Languages is an array of language definitions that your plugin will contribute to Prettier. It can include all of the fields specified in [`prettier.getSupportInfo()`](api.md#prettiergetsupportinfo-version). It **must** include `name` and `parsers`.