telling a kid "I'm not gonna tell your parents (XYZ)"
and
telling a kid "Don't tell your parents (XYZ)"
The former, while potentially objectionable, is also useful in being a trustworthy adult who is NOT a parent. Something that's badly needed, especially in the lives of older kids.
The latter is a huge red flag chock full of grooming 101. Using it is an indication that one should neither be around children nor wield any manner of civic power whatsoever.