GithubHelp home page GithubHelp logo

Comments (7)

codeShaurya avatar codeShaurya commented on June 2, 2024

What will be the rules ??
Can I make new rules for this project? ?

from hapijs.com.

Marsup avatar Marsup commented on June 2, 2024

I see no reason to change for prettier, we already have the linter doing its job.

from hapijs.com.

Nargonath avatar Nargonath commented on June 2, 2024

I intended this issue more as a discussion in the first place to see if that's would be something people would accept to add in the project. My reasoning behind it was that lots of people now are using Prettier to autoformat their code through their IDE (including myself) and usually it modifies the current code base format (adding leading comma, line length and such) hence you have to deactivate it while working on the project which you sometimes forget to do. Adding prettier would guarantee we won't end up with different code format in PR (perhaps that's a non-existing problem) but I thought it would be nice to ease contributions.

IMHO linters and prettier can work hand-in-hand as they don't address the same problem the former works on code syntax while the latter is about code format.

from hapijs.com.

Marsup avatar Marsup commented on June 2, 2024

Your IDE is kind of your problem :) Can't your IDE remember that setting ?

Tests (aka CI) already run the linting, there's a command to automatically fix it as well. I don't see a compelling argument to replace that.

Also, considering the very limited set of options prettier has, good luck making it compatible with hapi's style guide.

from hapijs.com.

Nargonath avatar Nargonath commented on June 2, 2024

Yeah I can definitely set that setting.

Indeed doesn't seem like it would provide any value. I'll just close this issue.

from hapijs.com.

Marsup avatar Marsup commented on June 2, 2024

Yeah I can definitely set that setting.

You think prettier can follow our rules ?

from hapijs.com.

Nargonath avatar Nargonath commented on June 2, 2024

IIRC the project uses eslint. prettier and eslint are not mutually exclusive. We can use prettier-eslint which would allow us to leverage prettier advantages (format file format other than JS) and also follow the hapi styleguide for the JS. We would just need to disable the eslint rules that conflict with prettier settings such as: semi, comma-dangle and such.

from hapijs.com.

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.