-
-
Notifications
You must be signed in to change notification settings - Fork 681
--fix fails on custom options in order-in-components #523
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
Comments
More discovery: this seems to be related somehow to the property's nested sub properties. If // This will be sorted correctly in the component properties:
validations: {},
// This will be sorted correctly in the component properties:
validations: {
form: {
field1: { required },
field2: { required, required, required },
}
},
// This WILL NOT be sorted correctly in the component properties
validations: {
form: {
field1: { required },
field2: { required, between: between(0, 99) }, // this is the failure point
}
} |
I just confirmed it @bbugh I see this problem on my computer too. Will try to fix it soon |
Oh, sorry @bbugh I just realised - this is an intended behaviour. See #381 (comment) If you won't have side effects in properties they'll properly reorder, but if we're not 100% sure - we stop fixing the code, so that you can do it more carefully. |
@michalsnik thanks for the information, I saw that in the pull request. I don't understand how that matters for this. It's reordering the top level elements in the main object for readability, which doesn't care about how things are ordered. Is there some way to disable this extra strict mode or reduce the strictness? |
Tell us about your environment
Please show your full configuration:
What did you do? Please include the actual source code causing the issue.
When using the custom configuration, I would expect the following listing to be automatically organized, but it's not. All of the properties are organized, but my custom properties are ignored by
--fix
.What did you expect to happen?
The file should be automatically organized into this listing:
What actually happened? Please include the actual, raw output from ESLint.
When running without
--fix
, it appears like this:When running with
--fix
, it does not fix the properties.The file ends up looking like this, which is not the expected order at all:
This issue seems to be related to this pull request: #381
The text was updated successfully, but these errors were encountered: