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

Incompatible with eslint@9 #320

Open
2 tasks done
jeron-diovis opened this issue May 15, 2024 · 4 comments
Open
2 tasks done

Incompatible with eslint@9 #320

jeron-diovis opened this issue May 15, 2024 · 4 comments

Comments

@jeron-diovis
Copy link

Describe the bug

Build crashes when running with eslint@9 installed:

node:internal/event_target:1096
  process.nextTick(() => { throw err; });
                           ^
Error: Invalid Options:
- Unknown options: extensions, ignorePath, reportUnusedDisableDirectives, resolvePluginsRelativeTo, rulePaths, useEslintrc
- 'extensions' has been removed.
- 'resolvePluginsRelativeTo' has been removed.
- 'ignorePath' has been removed.
- 'rulePaths' has been removed. Please define your rules using plugins.
- 'reportUnusedDisableDirectives' has been removed. Please use the 'overrideConfig.linterOptions.reportUnusedDisableDirectives' option instead.
    at processOptions (/path/to/proj/node_modules/eslint/lib/eslint/eslint-helpers.js:839:15)
    at new ESLint (/path/to/proj/node_modules/eslint/lib/eslint/eslint.js:593:34)
    at Object.configureServer (file:///path/to/proj/node_modules/vite-plugin-checker/dist/esm/checkers/eslint/main.js:73:18)
    at MessagePort.<anonymous> (file:///path/to/proj/node_modules/vite-plugin-checker/dist/esm/worker.js:57:26)
    at [nodejs.internal.kHybridDispatch] (node:internal/event_target:822:20)
    at MessagePort.<anonymous> (node:internal/per_context/messageport:23:28) {
  code: 'ESLINT_INVALID_OPTIONS'
}

Node.js v21.7.2
error Command failed with exit code 1.

Reproduction

  1. yarn add -D eslint@^9
  2. Run vite with configured vite-plugin-checker

Expected behavior

Build should not crash when eslint@9 is installed.

System Info

System:
    OS: macOS 14.4
    CPU: (10) arm64 Apple M1 Pro
    Memory: 495.78 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 21.7.2 - /usr/local/bin/node
    Yarn: 1.22.17 - /usr/local/bin/yarn
    npm: 10.5.0 - /usr/local/bin/npm
    pnpm: 8.6.7 - /usr/local/bin/pnpm
    Watchman: 2024.01.22.00 - /usr/local/bin/watchman
  Browsers:
    Chrome: 124.0.6367.202
    Safari: 17.4
    Safari Technology Preview: 17.4

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.
@Pistil-Studio
Copy link

if you use FLAT CONFIG, specify to checker

plugins: [
    checker({
      eslint: {
        useFlatConfig: true, // for me this fix the problem
        lintCommand: "eslint 'src/scripts/**/*.ts'", 
      },
    }),
  ],

@vishal-kadmos
Copy link

useFlatConfig is not working for me. Still getting same error

checker({
        typescript: true,
        eslint: {
          useFlatConfig: true,
          lintCommand: 'eslint "./src/**/*.{ts,tsx}"',
        },
        overlay: {
          initialIsOpen: false,
        },
      }),

dependencies

"vite-plugin-checker": "^0.6.4",
"eslint": "^9.3.0",

@ilxqx
Copy link

ilxqx commented Jun 19, 2024

Same issue.

isamu added a commit to isamu/firebase-vue3-startup-kit that referenced this issue Jun 30, 2024
@tryforceful
Copy link

Try now using "vite-plugin-checker": "0.7.0"
@vishal-kadmos

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

5 participants