eslint-plugin-vue icon indicating copy to clipboard operation
eslint-plugin-vue copied to clipboard

FR: introduce allowLineSeperatedGroups option on sort-keys

Open carsoli opened this issue 2 years ago • 1 comments

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

carsoli avatar Jun 12 '23 18:06 carsoli

Makes sense. Pull requests welcome!

FloEdelmann avatar Jun 12 '23 18:06 FloEdelmann