Giter Club home page Giter Club logo

Comments (6)

lamont-granquist avatar lamont-granquist commented on May 27, 2024 1

There's also "prior art" for what happens with the choice of banning the trailing comma with JSON, and it makes JSON annoying to edit directly. JSON5 (http://json5.org/) updates the JSON spec to allow trailing commas among other extensions.

from cookstyle.

thommay avatar thommay commented on May 27, 2024

no, cookstyle is a set of choices that we've made for cookbook development.
You should not run both cookstyle and rubocop, because they make different choices.

from cookstyle.

lamont-granquist avatar lamont-granquist commented on May 27, 2024

dup of #21 as well.

not sure why this isn't totally obvious that this is the whole idea... README.md needs to be a little more brutally clear about the point?

from cookstyle.

pariminaresh avatar pariminaresh commented on May 27, 2024

@lamont-granquist @thommay thank you

Choosing cookstyle or rubocop (not both) is clear.In programming the reason behind the choice keeping a comma at the end of a hash which cookstyle suggests, is not clear.

from cookstyle.

thommay avatar thommay commented on May 27, 2024

The reasons for the trailing comma are twofold:

  • It makes adding lines, and moving lines, safe. You don't have to think about whether you added a trailing comma to the line you moved, or the line above the one you added, you just write the line and finish with a comma, always
  • it makes diffs easier to read, since you just see the line you added, not that line and the line before

from cookstyle.

lamont-granquist avatar lamont-granquist commented on May 27, 2024

There's also other differences like e.g. #18

from cookstyle.

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.