There are no real hard and fast rules, as to be able to "answer" everything you asked about really depends on the specific scenarios (i.e. the question where the potentially bad answer is).
If someone asks a very basic question, then a one line answer or answer with code only is probably acceptable.
A question may be asking for a code fix "what's wrong with this" and then code only answer might be a decent one.
Additional information may be useful, helpful, or not necessary - again, depending on the question.
As per my understanding, the following are "not an answer" (because those should be an comment)
One line answers
One line does not equal "not an answer".
Not an answer is when, really quite simply, it did not answer the question within the scope that would resolve the question, or very least steer towards the answer with helpful info relevant to the question.
Often one line is not a good answer, but depends on the question.
Q. "How do I start PHP sessions?"
What else do you want? (Note: Example is only for the point here - is a bad example in the real world as this should be flagged to be closed/duplicated and no answers should be given)
Question asked in answer ( like have you tried this?)
If there is a question only then it should be a comment, or new question, depending on if it's relevant to the original question or not.
If, however, there is also a suggestion present that can be classed as an answer, then a question in an answer is fine as it may also help lead to the answer. Even if not for one person but for another if their issue is slightly different.
"This is the answer you need"... "Have you also tried this/heard of this/know this approach exists.."
Only link answers (like you can find here...)
There's a debate over this on MSO.
My logic is: link only answers shouldn't be allowed, as even if the linked resource provides a perfect answer, the answer should be on this site, not another one.
What if the other site or resource linked to goes down, is deleted, changed and becomes a poor answer, etc.
The answer text should be here on Stack. Links should only be used as a secondary resource to the answer itself, even if the answer is only the text from the link destination copied/pasted to Stack (and declared as such).
Reference to another similar answers.
This is likely not an answer, as it's effectively declaring "this question is a duplicate".
I state likely as sometimes there's a rogue scenario, but I cannot think of one that would allow this sort of answer)
It should be flagged as such rather than an answer, and the answer (which declares this is a dupe) should be downvoted for not flagging the question as dupe instead.
Even copy/pasting the other answer to the new question is bad. If the other answer is valid and acceptable for the new question, then it is simply a dupe.
If the other answer is only similar, and so not a dupe, then linking to the other answer as an additional resource is fine, but only alongside a valid answer to the question.
the following are "low quality answer"...(I always prefer to edit this
kind of answers or questions)
Question with typo or grammatical mistakes
Logic not explained behind answer, only code
Formatting not correct
Some argue grammar doesn't matter, as long as it answered the question.
However, I don't find an answer to be that good if I'm distracted from my reading/learning about a resolve due to bad spelling/grammar, or struggle to decipher the text when reading it because it's incoherent or badly worded.
When someone asks a question, while they may not be struggling per se, they do have a problem, so need clear cut responses. They don't need their problems to be expanded in another direction.
Logic not being explained is again dependant upon the question and answer. Maybe it's a complex scenario and some notes and details would be required for the OP and other visitors to grasp the explanation being made.
Maybe it is a simple resolve and adding logic would only benefit a handful of users (i.e. very little understanding of the subject matter).
Formatting is along side grammar/spelling issues. It's distracting and especially with code, as a user is trying to grasp the solution to their issue, and is struggling due to code layout being confusing/difficult to read.
There are many many things that can be wrong with an answer that doesn't stop it from being a legitimate answer, even a valuable one.
However, a great answer will nearly always have well explained details, formatted code, good grammar, potentially links, etc.
If an answer doesn't need all of that, then it likely wasn't a question that could warrant a great answer.
This sort of behaviour is why we have downvotes and comments, and edit.
I prefer to edit if simple issues, such as grammar/spelling, or something obvious. If there's something wrong with the way the answer was explained, then I tend to comment so the answerer can correct it in their own words (I might have missed the point they were making, etc).