You should file as a nonresident of New Jersey if you made money in New Jersey during 2018 and you maintain your legal residence in another state or country. You may also be considered a nonresident for income tax purposes if you were domiciled in New Jersey and you meet all three of the following conditions:
1) You didn't maintain a permanent home in New Jersey; AND
2) You maintained a permanent home outside of New Jersey; AND
3) You didn't spend more than 30 days in New Jersey.