Quinoline and isoquinoline react with electrophiles through the benzene ring (carbocycle), due to its higher electronic richness, compared to the pyridine ring. The most favored positions are 5 and 8.
The explanation that positions 5 and 8 are more favorable than 6 and 7 lies in the stability of the cationic intermediate formed.
Intermediate with two canonical structures that delocalize the charge. I do not represent the structures that break the aromaticity of the pyridine ring.
This last intermediate has only one structure, being therefore less stable.
With isoquinoline the results are similar.