וַיַּעַבְד֤וּ הָעָם֙ אֶת־יְהוָ֔ה כֹּ֖ל יְמֵ֣י יְהוֹשֻׁ֑עַ וְכֹ֣ל ׀ יְמֵ֣י הַזְּקֵנִ֗ים אֲשֶׁ֨ר הֶאֱרִ֤יכוּ יָמִים֙ אַחֲרֵ֣י יְהוֹשׁ֔וּעַ אֲשֶׁ֣ר רָא֗וּ אֵ֣ת כָּל־מַעֲשֵׂ֤ה יְהוָה֙ הַגָּד֔וֹל אֲשֶׁ֥ר עָשָׂ֖ה לְיִשְׂרָאֵֽל׃
And the people served the LORD all the days of Joshua, and all the days of the elders that outlived Joshua, who had seen all the great work of the LORD, that He had wrought for Israel.
Tosefta Sotah
As long as Joshua and the Elders were alive, there did not exist among the Children of Israel anyone who called upon [idols], and idol worshippers never did damage to the Israelites, as it is said (Judges 2:7), "And the people served God all the days of Joshua and all the days of the Elders who continued living after Joshua." Once Joshua and the Elders died, what does it say, but (Judges 3:8), "And the Children of Israel served Cushan-Rishataim [the King of Aram] for eight years." Why was his name "Rishataim" (literally, "twice evil")? Because he performed two evil deeds. First, he subjugated Israel, and second, he desecrated his oath (see Sanh. 105a:8).