The North Carolina bill that converts elections for local judicial elections from non-partisan to partisan elections, also changes the deadline for all independent candidates (for all office, even President) from June to April. The two subjects of whether judicial elections should be partisan, and what the deadline should be for independent candidates for all office, are not really related to each other. But it is common for legislatures to alter two different subjects in a single bill.
It is not known what caused the legislature to change the petition deadline for independent candidates. However, the deadline change would be held unconstitutional, because in 1980 a U.S. District Court struck down North Carolina’s independent petition deadline for independent candidates. By coincidence, the deadline struck down in 1980 was April 25, and under the current HB 100, the 2018 deadline for independent candidates would also be April 25. The 1980 decision was Greaves v North Carolina State Board of Elections, 508 F Supp 78 (e.d.).
April petition deadlines for independent candidates for president are clearly unconstitutional under Anderson v Celebrezze. Other states in which April petition deadlines (for independent candidates or new parties) have been declared unconstitutional are Alabama, Arkansas, Maine, Missouri, Nevada, New Jersey, New Mexico, Pennsylvania, Tennessee, and Utah.
The North Carolina bill, HB 100, can be read here. It has already passed the legislature. The Governor may veto it, but the legislature has enough Republicans in both houses to override his veto. The date of the 2018 primary is May 8.