Replies: 1 comment 1 reply
-
Thanks for the suggestion. I don't think we can add these rules to ruff today. They're too opinionated, without a clear value added. We may be able to add them once we finished #1774 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
There is a very nice eslint plugin called "eslint-plugin-perfectionist", which has an equally nice docs here: https://perfectionist.dev/
I would like to suggest including equivalent functionality in ruff.
Obviously the import sorting is already taken over by isort, but the main benefit of this plugin is in the way it automatically arranges objects keys, destructuring assignments, invocations of builtins such as
String.includes
etc.One place I always use IDE plugins to sort (alphabetically) keys is for explicit function kwargs in python.
E.g.
I will manually ensure is:
This is just a silly example, obviously there are many use cases that will benefit from being sorted automatically according to a scheme, to ensure codebase consistency and minimize nitpicking changes by enforcing conventions.
Beta Was this translation helpful? Give feedback.
All reactions