A measurement of time-dependent CP violation in the decays of B^{0} and B[over ¯]^{0} mesons to the final states J/ψ(→μ^{+}μ^{-})K_{S}^{0}, ψ(2S)(→μ^{+}μ^{-})K_{S}^{0} and J/ψ(→e^{+}e^{-})K_{S}^{0} with K_{S}^{0}→π^{+}π^{-} is presented. The data correspond to an integrated luminosity of 6 fb^{-1} collected at a center-of-mass energy of sqrt[s]=13 TeV with the LHCb detector. The CP-violation parameters are measured to be S_{ψK_{S}^{0}}=0.717±0.013(stat)±0.008(syst) and C_{ψK_{S}^{0}}=0.008±0.012(stat)±0.003(syst). This measurement of S_{ψK_{S}^{0}} represents the most precise single measurement of the CKM angle β to date and is more precise than the current world average. In addition, measurements of the CP-violation parameters of the individual channels are reported and a combination with the LHCb Run 1 measurements is performed.