Skip to content

Rule Change: make sort-keys rule fixable #122

@danbeam

Description

@danbeam

What rule do you want to change?

sort-keys

What change do you want to make?

Implement autofix

How do you think the change should be implemented?

A new default behavior

Example code

{
  "b": true,
  "a": false
}

should have an error if json/sort-keys is on and if --fix is passed should be:

{
  "a": false,
  "b": true
}

after

What does the rule currently do for this code?

What is says on the tin, it's just not fixable.

What will the rule do after it's changed?

Update the source code in place to be sorted.

Participation

  • I am willing to submit a pull request to implement this change.

Additional comments

I might be able to squeak out a PR but it may not be soon.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Ready to Implement

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions