diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index 0f04f92d..a03225c1 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -40,8 +40,8 @@ function sidebar() { { text: 'TypeScript', link: '/checkers/typescript' }, { text: 'vue-tsc', link: '/checkers/vue-tsc' }, { text: 'ESLint', link: '/checkers/eslint' }, - { text: 'VLS', link: '/checkers/vls' }, { text: 'Stylelint', link: '/checkers/stylelint' }, + { text: 'VLS', link: '/checkers/vls' }, ], }, { @@ -52,7 +52,7 @@ function sidebar() { { text: 'FAQs', collapsible: true, - items: [{ text: 'Troubleshooting ', link: '/faq/troubleshooting' }], + items: [{ text: 'Integration', link: '/faq/integration' }], }, ] } diff --git a/docs/checkers/eslint.md b/docs/checkers/eslint.md index d5046a02..0871ae35 100644 --- a/docs/checkers/eslint.md +++ b/docs/checkers/eslint.md @@ -4,14 +4,15 @@ 1. Make sure [eslint](https://www.npmjs.com/package/eslint) and related plugins for your `eslintrc` are installed as peer dependencies. -::: warning -**(Optional but highly recommended)** Install `optionator@^0.9.1` with your package manager. It's needed because of ESLint dependents on it. It's probably working fine even it's not installed as it's accessed as a phantom dependency. But when you set `hoist=false` of pnpm. It won't be accessible anymore without explicit installation. - -::: + ::: warning + **(Optional but highly recommended)** Install `optionator@^0.9.1` with your package manager. It's needed because of ESLint dependents on it. It's probably working fine even it's not installed as it's accessed as a phantom dependency. But when you set `hoist=false` of pnpm. It won't be accessible anymore without explicit installation. + ::: 2. Add `eslint` field to plugin config and `options.eslint.lintCommand` is required. The `lintCommand` is the same as the lint command of your project. The default root of the command uses Vite's [root](https://vitejs.dev/config/#root). + :::tip Do not add `--fix` to the lint command since the plugin is only aiming at check issues. + ::: ```js // e.g. diff --git a/docs/checkers/overview.md b/docs/checkers/overview.md index 78835454..0f38f1d9 100644 --- a/docs/checkers/overview.md +++ b/docs/checkers/overview.md @@ -1,10 +1,11 @@ # Checkers overview -vite-plugin-checkers provide built-in checkers. For now, it provides [TypeScript](/checkers/typescript), [ESLint](/checkers/eslint), [vue-tsc](/checkers/vue-tsc), [VLS](/checkers/vls), [Stylelint](/checkers/stylelint). +vite-plugin-checkers provide built-in checkers. For now, it supports [TypeScript](/checkers/typescript), [ESLint](/checkers/eslint), [vue-tsc](/checkers/vue-tsc), [VLS](/checkers/vls), [Stylelint](/checkers/stylelint). ## How to add a checker -- Set to `true` to use a checker with its default value (except ESLint and Stylelint). -- Leave the field blank or `false` to disable the checker. -- Make sure to install the peer dependencies indicated of each checker. +- Set the checker property to `true` to use a checker with its default value (except ESLint and Stylelint). +- Leave the field blank or `false` will not use the checker. +- Make sure to install the peer dependencies that checker relies on (documented on each checker's page if needed). - Checker can be enabled with an advanced object config. +- Use [config](/configuration/config) to control the common behaviors settings of checkers. diff --git a/docs/checkers/stylelint.md b/docs/checkers/stylelint.md index 4f081d66..52bb0217 100644 --- a/docs/checkers/stylelint.md +++ b/docs/checkers/stylelint.md @@ -4,14 +4,15 @@ 1. Make sure [stylelint](https://www.npmjs.com/package/stylelint) and related plugins for your `stylelintrc` are installed as peer dependencies. -::: warning -**(Optional but highly recommended)** Install `meow@^9.0.0` with your package manager. It's needed because of Stylelint dependents on it. It's probably working fine even it's not installed as it's accessed as a phantom dependency. But when you set `hoist=false` of pnpm. It won't be accessible anymore without explicit installation. - -::: + ::: warning + **(Optional but highly recommended)** Install `meow@^9.0.0` with your package manager. It's needed because of Stylelint dependents on it. It's probably working fine even it's not installed as it's accessed as a phantom dependency. But when you set `hoist=false` of pnpm. It won't be accessible anymore without explicit installation.\ + ::: 2. Add `stylelint` field to plugin config and `options.stylelint.lintCommand` is required. The `lintCommand` is the same as the lint command of your project. The default root of the command uses Vite's [root](https://vitejs.dev/config/#root). + :::tip Do not add `--fix` to the lint command since the plugin is only aiming at check issues. + ::: ```js // e.g. diff --git a/docs/checkers/typescript.md b/docs/checkers/typescript.md index 0410a025..bd860940 100644 --- a/docs/checkers/typescript.md +++ b/docs/checkers/typescript.md @@ -8,11 +8,11 @@ You can use TypeScript checker for vanilla TypeScript project or React project. 2. Add `typescript` field to plugin config. -```js -export default { - plugins: [checker({ typescript: true /** or an object config */ })], -} -``` + ```js + export default { + plugins: [checker({ typescript: true /** or an object config */ })], + } + ``` ## Configuration diff --git a/docs/checkers/vls.md b/docs/checkers/vls.md index 55cd7c13..251c7490 100644 --- a/docs/checkers/vls.md +++ b/docs/checkers/vls.md @@ -30,16 +30,21 @@ See [`initParams.ts`](https://github.com/fi3ework/vite-plugin-checker/blob/8fc5d For example, to performing checking only the `