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
More documentation on conflicting fixes #13721
Comments
Thanks for the issue! I think I agree that we should specify this. It's an important detail for cases like #13706 and the
Would appreciate more opinions on this. Specifying these details might disallow further optimizations, like the one we made in #8035. On the other hand, rule developers should be aware of how this works when writing tests with overlapping ranges.
Make sense to document this. |
Maybe I misunderstood the proposal for |
Yes. If two of my rules produce fixes that conflict, then I'd like to know which one is applied. I know that right now it's going to be the left-most fix after being sorted by this function but that very specific implementation detail probably shouldn't make it into the public doc. Explicitly stating that it's undefined behaviour in that context should suffice. |
Unfortunately, it looks like there wasn't enough interest from the team Thanks for contributing to ESLint and we appreciate your understanding. |
Reopening, as it seems useful to clarify this in the docs. |
About |
Hi! Are we still interested to solve this issue? |
The additional changes as currently described sound reasonable to me. Like others, I'd prefer to leave 2 as undefined behavior to avoid committing ourselves to a particular implementation. |
Provide additional documentation on conflicting fixes. Fixes eslint#13721
Marked as accepted since we have 3 👍🏻 |
* docs: Conflicting fixes Provide additional documentation on conflicting fixes. Fixes #13721 * Update docs/src/developer-guide/working-with-rules.md Co-authored-by: Nicholas C. Zakas <nicholas@humanwhocodes.com> Co-authored-by: Nicholas C. Zakas <nicholas@humanwhocodes.com>
The developer documentation about rules (
docs/developer-guide/working-with-rules.md
) doesn't contain enough information about rules. This is a followup to eslint/archive-website#791.The following questions should be answered:
A: "Conflicting fixes are fixes that would be applied to the same part of a string. So if two fixes want to modify characters 0 through 5, only one will be applied."
A: Fixes are not guaranteed to be applied. ESLint may choose to apply or not to apply any fix.
A: No.
Are you willing to submit a pull request to implement this change?
No. I'm not good at writing technical documentation.
The text was updated successfully, but these errors were encountered: