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
998 stars 87 forks source link

checker clears terminal on first load #283

Open gkiely opened 1 year ago

gkiely commented 1 year ago

Describe the bug

When enabling the checker plugin it clears the terminal, hiding the vite serve information.

Reproduction

import { defineConfig } from 'vite';

export default defineConfig({
  plugins: [
    checker({
      typescript: true,
    }),
  ],
});

Expected behavior

Should not clear the terminal

System Info

System:
    OS: macOS 12.7
    CPU: (10) arm64 Apple M1 Pro
    Memory: 4.44 GB / 32.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 20.2.0 - ~/.volta/tools/image/node/20.2.0/bin/node
    Yarn: 1.22.18 - ~/.volta/tools/image/yarn/1.22.18/bin/yarn
    npm: 9.6.6 - ~/.volta/tools/image/node/20.2.0/bin/npm
    Watchman: 2023.04.10.00 - /opt/homebrew/bin/watchman
  Browsers:
    Brave Browser: 114.1.52.129
    Chrome: 118.0.5993.117
    Edge: 118.0.2088.76
    Safari: 17.0
  npmPackages:
    vite-plugin-checker: ^0.6.2 => 0.6.2

Additional context

No response

Validations

hurrii commented 8 months ago

More to that, when there's an error and I save the file twice terminal clears

How to reproduce:

Also, very often terminal just gets cleared and becomes fully blank even though changes were made

This terminal bug makes the plugin almost entirely unusable and is the only reason why I use tsc over it

@fi3ework could you take a look?

cuberoot commented 5 months ago

You can add clearScreen: false, to your Vite config. This should probably be in the docs...

gkiely commented 5 months ago

@cuberoot I still want vite to clear the screen, I just want to avoid this plugin from doing it a second time and moving the ts/eslint info out of the terminal.