What does it mean for a novel to be of high quality? It's not easy to define and it's somewhat subjective, but equally there are definitely things that are not acceptable.
Some things that can help move towards higher quality code: - avoid duplicated code - especially when it's similar but subtly different - variable names that mean something useful - lower code nesting - shorter functions - fewer parameters
Many of these things are focused on improving how understandable / maintainable the code is.
But, as for novels, there aren't just rules you can follow blindly.
Perhaps this helps: https://garywoodfine.com/what-is-clean-code/