A lot of JS tools now will just take a js file that exports a configuration object (`.prettierrc.js`, `.eslintrc.js`, `.babelrc.js`). I find it very sensible.
- Allows code reuse.
- Allows configuration to be as dynamic as you want.
- Can use environment variables.
I suppose there are some cases where you can't trust the user in this way (running configuration code), but I think in a lot of cases you can, and it's generally more convenient.
- Allows code reuse.
- Allows configuration to be as dynamic as you want.
- Can use environment variables.
I suppose there are some cases where you can't trust the user in this way (running configuration code), but I think in a lot of cases you can, and it's generally more convenient.