ionic-team / ionic-team/ionic-cli

Eslint and Vite errors after scaffolding new react project

Đang mở
#5,015 1 bình luận 1 reaction 0 người được giao Xem trên GitHub
triage
Ngôn ngữ chính
TypeScript
Star
2k
Fork
682
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.