From a2763e74093987730158e58eb68f02565c09f842 Mon Sep 17 00:00:00 2001 From: Bryan Lee <38807139+liby@users.noreply.github.com> Date: Mon, 24 Jul 2023 23:33:43 +0800 Subject: [PATCH] fix: eliminate the error that occurs when enabling eslint-plugin-markdown in the project --- 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`