House built 2017 under the 2011 NEC. The electrician came off the living room 15 amp afci breaker protected outlet. Well they ran 14-2 romex from receptacle added switch and ran to pool light transformer then changed to #12 wire in conduit to pool light j box. The pool light cord only has 2 wire no ground that's ok because Pentair makes a glow bright no metal fits in 2' pvc. My question is it legal to do this the code states and manufacturer #12 wire minimum I have never done a pool light without at least a #12 ground wire run to the pool light J box. Well I have not wired a pool for at least 10 years. It is difficult to keep up with all the code changes especially now led lighting is the thing. Funny because pool panel is next to transformer I would have just ran the 50ft of 12/2 to inside of house switch....