Closed rtritto closed 2 months ago
Fixed changing import from default to named:
import { plugin as vike } from 'vike/plugin'
Same issue with vike-solid/config
(esModuleInterop: false
, missing default export) and vike-node/plugin
FYI @brillout
Maybe it can be fixed moving the declare ...
before the export default ...
I cannot reproduce:
~/tmp/template-vike-solid-daisyui (master|u+1) pnpm exec eslint .
🌼 daisyUI 4.12.10
├─ ✔︎ 1 theme added https://daisyui.com/docs/themes
╰─ ❤︎ Support daisyUI project: https://opencollective.com/daisyui
🌼 daisyUI 4.12.10
├─ ✔︎ 1 theme added https://daisyui.com/docs/themes
╰─ ★ Star daisyUI on GitHub https://github.com/saadeghi/daisyui
Note that I'm using pnpm instead of yarn: https://github.com/brillout/template-vike-solid-daisyui. Can you reproduce when using pnpm instead of yarn?
Fixed changing import from default to named:
import { plugin as vike } from 'vike/plugin'
Same issue with
vike-solid/config
(esModuleInterop: false
, missing default export) andvike-node/plugin
FYI @brillout
Sorry, on main branch, I changed the code with the naming import. The issue will apper changing with the default import (you can try changing the code):
vite.config.ts
-import { plugin as vike } from 'vike/plugin' // OK ESLint
+import vike from 'vike/plugin' // KO ESLint
Edit: Same issue using pnpm on your fork.
I could reproduce indeed and updated my fork.
Seems to be a ESLint quirk? Closing as I don't see this to be a Vike bug, but I'm open for a workaround.
Fix pre-released as 0.4.193-commit-c1d490a
.
Description
Using ESLint with
eslint-import-resolver-typescript
(under the hood eslint-import-resolver-node), the ruleimport/default
ofeslint-import-resolver-node
fails withvike/plugin
import.Code
.eslintrc.yml
tsconfig.json Note: compilerOptions.esModuleInterop is true
vite.config.ts
Output
In VSCode, opening the reference of
vike/plugin
(/vike/dist/esm/node/plugin/index.d.ts), I got:vite.config.ts
Reproduction
git clone https://github.com/rtritto/template-vike-solid-daisyui.git
cd template-vike-solid-daisyui
yarn
yarn eslint .