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

eslint config requires "requireConfigFile: false" #1082

Open
hueniverse opened this issue Dec 30, 2024 · 0 comments
Open

eslint config requires "requireConfigFile: false" #1082

hueniverse opened this issue Dec 30, 2024 · 0 comments
Labels
support Questions, discussions, and general support

Comments

@hueniverse
Copy link
Contributor

hueniverse commented Dec 30, 2024

Runtime

node.js

Runtime version

22.12.0

Module version

26.0.0

Used with

No response

Any other relevant information

After upgrading to eslint 9 and lab 26, coverage failed with:

Cannot read properties of undefined (reading 'includes')
TypeError: Cannot read properties of undefined (reading 'includes')
    at validateResolvedConfig (/project/node_modules/@babel/eslint-parser/lib/worker/configuration.cjs:53:37)
    at Object.normalizeBabelParseConfigSync (/project/node_modules/@babel/eslint-parser/lib/worker/configuration.cjs:88:10)
    at Function.handleMessage (/project/node_modules/@babel/eslint-parser/lib/worker/handle-message.cjs:26:48)
    at LocalClient.<anonymous> (/project/node_modules/@babel/eslint-parser/lib/client.cjs:98:79)
    at LocalClient.maybeParse (/project/node_modules/@babel/eslint-parser/lib/client.cjs:52:47)
    at parse (/project/node_modules/@babel/eslint-parser/lib/parse.cjs:28:14)
    at Object.parse (/project/node_modules/@babel/eslint-parser/lib/index.cjs:19:10)
    at Object.internals.instrument (/project/node_modules/@hapi/lab/lib/modules/coverage.js:326:31)
    at Object.require.extensions.<computed> [as .ts] (/project/node_modules/@hapi/lab/lib/modules/coverage.js:116:59)

Which is resolved by adding requireConfigFile to the eslint config:

    languageOptions: {
      parser: tseslint.parser,
      parserOptions: { requireConfigFile: false },
    },

I am using eslint.config.mjs in case that matters.

Was this expected? Is there a better solution? Should this be added to lab itself?

Thanks!

@hueniverse hueniverse added the support Questions, discussions, and general support label Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support Questions, discussions, and general support
Projects
None yet
Development

No branches or pull requests

1 participant