Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optional object comma #23

Open
elsassph opened this issue Jul 16, 2020 · 2 comments
Open

Optional object comma #23

elsassph opened this issue Jul 16, 2020 · 2 comments

Comments

@elsassph
Copy link

data = {
  a: "a"
  b: function()
     print "b"
  end function
  c: 42
}

There could be an option to add/remove commas in multiline object declarations.

@TwitchBronBron
Copy link
Member

TwitchBronBron commented Aug 6, 2023

eslint has a good list of various rules to enforce this behavior. Perhaps we can use it as inspiration for the names of the property and options for this feature.

https://eslint.org/docs/latest/rules/comma-dangle

@TwitchBronBron
Copy link
Member

I think we could call the new option aaCommaStyle, and it could have options like:

  • 'trailing-required'
  • 'no-trailing'
  • 'unchanged'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants