fi3ework / vite-plugin-checker

💬 Vite plugin that provide checks of TypeScript, ESLint, vue-tsc, Stylelint and more.
https://vite-plugin-checker.netlify.app
MIT License
976 stars 84 forks source link

When using ESLint and TypeScript checkers together, ESLint checker only runs at startup #373

Open mfisher87 opened 2 months ago

mfisher87 commented 2 months ago

Describe the bug

When I start up my Vite dev server, ESLint and TypeScript both run.

When I change a file after this point, only TypeScript runs. It runs twice on each file change. My logs look like this:

  VITE v5.3.3  ready in 423 ms

  ➜  Local:   http://localhost:5173/
  ➜  Network: http://172.21.0.2:5173/

[TypeScript] Found 0 errors. Watching for file changes.
[ESLint] Found 0 error and 0 warning
4:24:43 PM [vite] hmr update /src/Map.tsx

[TypeScript] Found 0 errors. Watching for file changes.

[TypeScript] Found 0 errors. Watching for file changes.
4:25:00 PM [vite] hmr update /src/Map.tsx

[TypeScript] Found 0 errors. Watching for file changes.

[TypeScript] Found 0 errors. Watching for file changes.
4:25:04 PM [vite] hmr update /src/Map.tsx

[TypeScript] Found 0 errors. Watching for file changes.

[TypeScript] Found 0 errors. Watching for file changes.

Reproduction

My config:

    checker({
      typescript: {buildMode: true},
      eslint: {
        lintCommand: 'eslint . --ext ts,tsx --report-unused-disable-directives',
      },
    }),

I believe this is all that's needed to reproduce the behavior!

Expected behavior

ESLint and Typescript checkers run once each on every change

System Info

System:
    OS: Linux 6.8 Debian GNU/Linux 12 (bookworm) 12 (bookworm)
    CPU: (16) x64 AMD Ryzen 7 5800X3D 8-Core Processor
    Memory: 12.98 GB / 31.26 GB
    Container: Yes
    Shell: 5.2.15 - /bin/bash
  Binaries:
    Node: 22.4.1 - /usr/local/bin/node
    Yarn: 1.22.22 - /usr/local/bin/yarn
    npm: 10.8.1 - /usr/local/bin/npm
  npmPackages:
    vite-plugin-checker: ^0.7.2 => 0.7.2

Additional context

No response

Validations

fi3ework commented 2 months ago

What's the version of typescript and eslint in your project?

mfisher87 commented 2 months ago

Hey, thanks for taking a look at my issue! I'm on typescript@5.5.3, eslint@8.57.0, and vite@5.3.3

This is the project in which I'm experiencing the symptoms (on the map branch): https://github.com/nsidc/aross-stations-ui Let me know if I haven't provided enough info, I'll be happy to work on a more complete reproduction.

SPAHI4 commented 1 month ago

same for me for a year