From 6251a666555a42ae518e76af6011e9cb091e3028 Mon Sep 17 00:00:00 2001 From: Bryan Lee <38807139+liby@users.noreply.github.com> Date: Tue, 25 Jul 2023 21:55:27 +0800 Subject: [PATCH] fix(template): eliminate the error that occurs when enabling eslint-plugin-markdown (#13942) --- packages/create-vite/template-react-ts/README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/create-vite/template-react-ts/README.md b/packages/create-vite/template-react-ts/README.md index 1ebe379f5f423c..0d6babeddbdbc9 100644 --- a/packages/create-vite/template-react-ts/README.md +++ b/packages/create-vite/template-react-ts/README.md @@ -14,12 +14,15 @@ If you are developing a production application, we recommend updating the config - Configure the top-level `parserOptions` property like this: ```js - parserOptions: { +export default { + // other rules... + parserOptions: { ecmaVersion: 'latest', sourceType: 'module', project: ['./tsconfig.json', './tsconfig.node.json'], tsconfigRootDir: __dirname, - }, + }, +} ``` - Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`