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

Process exit not honored when using multiple checkers #287

Open
2 tasks done
philipgriffin opened this issue Dec 11, 2023 · 2 comments
Open
2 tasks done

Process exit not honored when using multiple checkers #287

philipgriffin opened this issue Dec 11, 2023 · 2 comments

Comments

@philipgriffin
Copy link

philipgriffin commented Dec 11, 2023

Describe the bug

When using multiple checkers a build does not fail if errors are reported within a particular checker.

Reproduction

  1. Setup the vite.config.ts as follows:
export default defineConfig({
  plugins: [
    checker({
      typescript: true,
      eslint: {
        lintCommand: 'eslint "./src/**/*.{ts,tsx}"',
      },
    })
  ],
});
  1. Create an ESLint error in your application. Ensure there are no TS errors, only an ESLint error.

  2. Build your application

Expected behavior

The build should fail however, it succeeds.

System Info

System:
    OS: Windows 10 10.0.22621
    CPU: (16) x64 Intel(R) Core(TM) i9-10885H CPU @ 2.40GHz
    Memory: 44.77 GB / 63.75 GB
  Binaries:
    Node: 18.18.2 - C:\nodejs\node.EXE
    Yarn: 1.22.21 - C:\nodejs\yarn.CMD
    npm: 10.2.4 - C:\nodejs\npm.CMD
    pnpm: 8.12.0 - C:\nodejs\pnpm.CMD
  Browsers:
    Edge: Chromium (120.0.2210.61)
    Internet Explorer: 11.0.22621.1

Additional context

If you set the checker config typescript to false, the plugin will work as expected and cancel the build due to ESLint issues.

The issue is that multiple error codes are not being honoured, they are being ignored and the build is succeeding.

Validations

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

I have added a PR showing the offending code and a potential solution.
#288

@AaronPowell96
Copy link

We are also facing this issue.

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

2 participants