Giter VIP home page Giter VIP logo

Comments (7)

amilajack avatar amilajack commented on August 17, 2024

I think that would be a great idea. Unfortunately I've been really busy recently. I'd love contributions to add this :)

from eslint-plugin-flowtype-errors.

amilajack avatar amilajack commented on August 17, 2024

@jdmota Do you think you can look into this?

from eslint-plugin-flowtype-errors.

hexpunk avatar hexpunk commented on August 17, 2024

I can give it a shot if that's okay.

from eslint-plugin-flowtype-errors.

amilajack avatar amilajack commented on August 17, 2024

Of course!

from eslint-plugin-flowtype-errors.

hexpunk avatar hexpunk commented on August 17, 2024

I've started work on this feature this evening, but I do have a question. Should this just be handled like this or should this be opt-in or something?

Here are the options I'm thinking of.

  1. It just works as expected without any kind of modification to a user's eslint config.
  2. Warnings are ignored by default. In order to opt-in, you have to add a flowtype-errors/show-warnings rule to your eslint config. The advantage to this is that you could theoretically set warnings to appear as errors by setting this to 2/'error', or be ignored completely by setting it to 0/'off'. The disadvantage is that it makes this all more confusing. I mean, if you wanted the warnings to display as errors, why wouldn't you just set the message in question to warn in your .flowconfig?

I don't have any strong personal preference. I'd lean towards option 2 just to give users the option. I don't presume to know or anticipate every user's bizarre workflow. I'd really appreciate your input, @amilajack, what with it being your repo and all. 😉

from eslint-plugin-flowtype-errors.

hexpunk avatar hexpunk commented on August 17, 2024

I'm almost done with an implementation of option 2 from above. I think that's the way to go since eslint reports things as errors or warnings based on the settings the user has given for the rule. That's probably the most straight-forward way of doing this without rocking the eslint boat.

from eslint-plugin-flowtype-errors.

amilajack avatar amilajack commented on August 17, 2024

Option 2 is a good idea. Also make sure to update the docs in the readme and the changelog

from eslint-plugin-flowtype-errors.

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.