Coder Social home page Coder Social logo

Comments (6)

mdjermanovic avatar mdjermanovic commented on May 18, 2024

I can reproduce this. Any ideas how to fix it?

from eslint.

fasttime avatar fasttime commented on May 18, 2024

Any ideas how to fix it?

We could catch the error in entryFilter and rethrow it after doFsWalk. Or we could call fswalk.walk inside a promise executor (instead of wrapping it with util.promisify), so we could reject the promise when entryFilter throws an error.

Finally, we could open an issue at nodelib and ask them to handle errors in their filter callbacks, so we don't have to. Upgrading to @nodelib/fs.walk 2.0.0 didn't help, and I couldn't find a closed issue in their repo that matches our problem.

from eslint.

mdjermanovic avatar mdjermanovic commented on May 18, 2024

Finally, we could open an issue at nodelib and ask them to handle errors in their filter callbacks, so we don't have to. Upgrading to @nodelib/fs.walk 2.0.0 didn't help, and I couldn't find a closed issue in their repo that matches our problem.

This seems like the best solution, but it will probably take some time. Can you open an issue there?

Or we could call fswalk.walk inside a promise executor (instead of wrapping it with util.promisify), so we could reject the promise when entryFilter throws an error.

This would be the easiest solution for us at the moment, though I wouldn't expect it to work if util.promisify doesn't, but let's try it.

from eslint.

fasttime avatar fasttime commented on May 18, 2024

Thanks for the feedback @mdjermanovic.

Finally, we could open an issue at nodelib and ask them to handle errors in their filter callbacks, so we don't have to. Upgrading to @nodelib/fs.walk 2.0.0 didn't help, and I couldn't find a closed issue in their repo that matches our problem.

This seems like the best solution, but it will probably take some time. Can you open an issue there?

Sure!

Or we could call fswalk.walk inside a promise executor (instead of wrapping it with util.promisify), so we could reject the promise when entryFilter throws an error.

This would be the easiest solution for us at the moment, though I wouldn't expect it to work if util.promisify doesn't, but let's try it.

I can look into this and see what work works for us.

from eslint.

nzakas avatar nzakas commented on May 18, 2024

Issue: nodelib/nodelib#105

from eslint.

pumano avatar pumano commented on May 18, 2024

got same error when using nx and config contains:

 languageSettings: { parserOptions: { project: ["./tsconfig.*?.json"] } }

looks like schema does not contain that field and error handling processed incorrectly (as mentioned above)

console output:

node_modules/@nx/eslint/node_modules/@humanwhocodes/object-schema/src/object-schema.js:270
                      throw new UnexpectedKeyError(key);
                      ^
      
      UnexpectedKeyError: Unexpected key "languageSettings" found.

from eslint.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.