Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
2 tasks done
mfisher87 opened this issue Jul 15, 2024 · 4 comments
Open
2 tasks done

Comments

@mfisher87
Copy link

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

  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
@fi3ework
Copy link
Owner

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

@mfisher87
Copy link
Author

mfisher87 commented Jul 15, 2024

Hey, thanks for taking a look at my issue! I'm on [email protected], [email protected], and [email protected]

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
Copy link

SPAHI4 commented Aug 12, 2024

same for me for a year

@Titoubiz
Copy link

I had the same issue (eslint run only once at startup) but apparently not for the same reason, I just mention it if it can help someone:
Don't forget the directory in the lintCommand attribute (in my case lintCommand: "eslint ." instead of lintCommand: "eslint").

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants