How should I store use the config from .js or .json?

Is there a significant difference/advantage of how to store and upload it using the config project is just a JSON file or as a module of JS?
June 8th 19 at 17:18
2 answers
June 8th 19 at 17:20
If stored in js - there is a temptation to execute some code. That can lead to the fact that part of the logic is in the config file...

Although recently I tend to yaml - annie_Pagac commented on June 8th 19 at 17:23
June 8th 19 at 17:22
According to the situation.
If the config is 100% static, JSON.
If in config it is necessary to dynamically change the values, then of course JS.

Find more questions by tags JavaScript