ionic-team / ionic-team/ionic-cli
Eslint and Vite errors after scaffolding new react project
- 主要言語
- TypeScript
- スター
- 2k
- フォーク
- 682
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
**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)
コントリビューションガイド
調査の方向性
Reproduce the issue with `ionic start`, choosing React with the side menu, then inspect the generated `.eslintrc.js`, `vite.config`, and TSX files. Compare the generated configuration with the default Vite React app and verify that the reported ESLint, ESM, and TypeScript errors no longer occur.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- eslint, react, typescript, vite
- 領域
- cli, frontend, tooling
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100