Coder Social home page Coder Social logo

rule proposal: promise plugin about eslint-config HOT 8 OPEN

gabro avatar gabro commented on August 25, 2024 2
rule proposal: promise plugin

from eslint-config.

Comments (8)

ascariandrea avatar ascariandrea commented on August 25, 2024 4

Do we agree in adding this with default settings?

from eslint-config.

FrancescoCioria avatar FrancescoCioria commented on August 25, 2024

Interesting! I don't have (yet?) an opinion about each rule/case, but in general I have the feeling that some of them would be useful immediately.

If more people find this promising I think we should test each rule and report here the current amount of "errors" we have in QIA/AlinIQ

from eslint-config.

gabro avatar gabro commented on August 25, 2024

👍 ok for me, wanna list the ones you would include?

from eslint-config.

ascariandrea avatar ascariandrea commented on August 25, 2024

As most of the time those rules are already shared, but not enforced, so my personal list would be

Simple and efficient

"promise/always-return": 2

Never saw in our code, anyway enforce it could be helpful

"promise/no-return-wrap": 2,

Not really useful (should we check param names for all lambdas we have)?

"promise/param-names": 0,

I ofter personally omit the catch part of a promise cause I'm confident errors will never happen 🙈

"promise/catch-or-return": 2

"In an ES5 environment, ..." we (buildo) are never in an "ES5 environment" nowadays

"promise/no-native": 0,

from eslint-config.

giogonzo avatar giogonzo commented on August 25, 2024

Not really useful (should we check param names for all lambdas we have)?

no but this one is a very special one ( a "revealing constructor" one https://blog.domenic.me/the-revealing-constructor-pattern/ , lol btw :P )

so I'm in favor of keeping the resolve and reject names consistent

from eslint-config.

gabro avatar gabro commented on August 25, 2024

What @ascariandrea proposes is all 👍 for me, with the exception of param-names for which I agree with @giogonzo

from eslint-config.

giogonzo avatar giogonzo commented on August 25, 2024

(keeping param-names I think we end up in the default setting for this rule)

from eslint-config.

gabro avatar gabro commented on August 25, 2024

Full force ahead! ✌️ But please make sure to fix projects before merging

from eslint-config.

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.