Code Monkey home page Code Monkey logo

Comments (3)

kentcdodds avatar kentcdodds commented on May 17, 2024 1

Happy to accept a pull request 😄

from prettier-eslint.

kentcdodds avatar kentcdodds commented on May 17, 2024

Thanks for the detailed issue! It's unlikely I'll have time to dedicate to hunting down the core issue. If you could do a little more digging and propose a solution that would be helpful. Thanks!

from prettier-eslint.

cspanring avatar cspanring commented on May 17, 2024

The short answer is, that this issue can be resolved by changing the line https://github.com/prettier/prettier-eslint/blob/master/src/utils.js#L211 with

const [, {arrays = '', objects = '', functions = ''} = {}] = objectConfig

...giving the destructured object a default value. (made that change but the jest --coverage kept failing and I'm not familiar with the underlying test suites and how to quickly fix the coverage test, but happy to dig through that if you have a few pointers).

The larger question is about error handling. I got here from this issue: prettier/prettier-atom#231 (comment) , an atom-plugin. prettier-eslint was throwing an error that bubbled through the plugin and was a little bit hard to decipher. Part of the problem being a missing stack trace in the recent versions of Atom and/or the plugin.

What do you think about an error handling system that produces slightly more verbose or even "human readable" messages (e.g. especially useful for Atom users)?

from prettier-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.