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

FR: introduce allowLineSeperatedGroups option on sort-keys #2212

Open
carsoli opened this issue Jun 12, 2023 · 1 comment
Open

FR: introduce allowLineSeperatedGroups option on sort-keys #2212

carsoli opened this issue Jun 12, 2023 · 1 comment

Comments

@carsoli
Copy link

carsoli commented Jun 12, 2023

What rule do you want to change? sort-keys

Does this change cause the rule to produce more or fewer warnings? fewer

How will the change be implemented? (New option, new default behavior, etc.)? new option

Please provide some example code that this change will affect:

export default defineComponent({
  setup() {
    return {
      // feature 1
      a: 'wow',
      b: 'wow',

      // feature 2
      a2: 'wow',
      b2: 'wow',
    }
  }
})

What does the rule currently do for this code? it forces a2 to come after a

What will the rule do after it's changed? it allows a2 since there is a newline above

Additional context

See ESLint: https://eslint.org/docs/latest/rules/sort-keys#allowlineseparatedgroups

@FloEdelmann
Copy link
Member

Makes sense. Pull requests welcome!

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

No branches or pull requests

2 participants