Skip to content

FR: introduce allowLineSeperatedGroups option on sort-keys #2212

Open
@carsoli

Description

@carsoli

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions