Id. Code. Judi. Cond. 4.5
Comment
[1] In campaigns for nonjudicial elective public office, candidates may make pledges, promises, or commitments related to positions they would take and ways they would act if elected to office. Although appropriate in nonjudicial campaigns, this manner of campaigning is inconsistent with the role of a judge, who must remain fair and impartial to all who come before him or her. The potential for misuse of the judicial office, and the political promises that the judge would be compelled to make in the course of campaigning for nonjudicial elective office, together dictate that a judge who wishes to run for such an office must resign upon becoming a candidate.
[2] The "resign to run" rule set forth in paragraph (A) ensures that a judge cannot use the judicial office to promote his or her candidacy, and prevents post-campaign retaliation from the judge in the event the judge is defeated in the election. When a judge is seeking appointive nonjudicial office, however, the dangers are not sufficient to warrant imposing the "resign to run" rule.