Sometimes there are questions with answers that are answered and actually work. The problem with a lot of them is a bad code style. Use case:
- User A Creates a question to something
TypeScript
-related. In fact the question is more a pattern thing and not syntax related. - User B provides an answer with a working solution but poor code style (no return type definition or bad typing in general). This answer gets accepted and upvoted multiple times (because well, it works!).
- User C answers the same question three days later with a different, also working and properly typed solution. Although this answer will be on top, nobody looks at it because the accepted answer is the other one.
I could imagine two cases: People can flag accepted answers as "working but improvable". These will flow into a new review queue which will provide the functionality to edit the answer with proper code style. If a question has multiple answers with the "wrong" one marked as accepted, users could flag both to say "answer b should be marked accepted instead of answer a".
A quite different approach would be the following: Users don't have to improve and verify the quality of answers because linters are available (based on question tags, another possible problem source) and enforced in the answer editor.
Possible problems with such a feature: Code style is still a bit subjective, so in a few cases the improvement could worsen the quality. Maybe Stack Overflow could implement linters in the review queue editor.