Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eslint and Vite errors after scaffolding new react project #5015

Open
s4ff0x opened this issue Jun 3, 2023 · 0 comments · May be fixed by ionic-team/starters#1786
Open

Eslint and Vite errors after scaffolding new react project #5015

s4ff0x opened this issue Jun 3, 2023 · 0 comments · May be fixed by ionic-team/starters#1786
Labels

Comments

@s4ff0x
Copy link

s4ff0x commented Jun 3, 2023

Description:

After creating new project using ionic-cli some error messages were discovered

  1. Error [ERR_REQUIRE_ESM]: Cannot read config file: //.eslintrc.js
  2. TS2345: Argument of type '{ plugins: PluginOption[][]; test: { globals: boolean; environment: string; setupFiles: string; }; }' is not assignable to parameter of type 'UserConfigExport'.
  3. ESLint: Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

Steps to Reproduce:
ionic start -> choose react with side menu -> check tsx files and vite.config

Possible solutions

  1. rename .eslintrc.js to .eslintrc.cjs
  2. take eslint config and eslint plugins from default vite react app (yarn create vite)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant