ionic-team / ionic-team/ionic-cli

Eslint and Vite errors after scaffolding new react project

Offen
#5,015 1 Kommentar 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
triage
Vorherrschende Sprache
TypeScript
Sterne
2k
Forks
682
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

**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)

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.