Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: JS support #57

Closed
MoOx opened this issue Aug 3, 2015 · 7 comments
Closed

Feature request: JS support #57

MoOx opened this issue Aug 3, 2015 · 7 comments

Comments

@MoOx
Copy link

MoOx commented Aug 3, 2015

That would be nice to support commonjs js.
Some library and modules might require a smart configuration that can involve regex for example (famous eg: webpack). That would be nice to have support for JS exported module too. Are you open to this enhancement?
I plan to use rc for cssnext and stylelint and it would be nice (especially for cssnext config that might require other modules/files).

@dominictarr
Copy link
Owner

I don't understand what you are asking for. do you want configuration as a js file?

@MoOx
Copy link
Author

MoOx commented Aug 3, 2015

Yeah.

// ...

// config
module.exports = {/*...*/}

@dominictarr
Copy link
Owner

I'm not adding any more parsers, and i think there are some good reasons not to use javascript as configuration. but if you really want to do that you can pass in your own parser as documented in the readme.

@panlina
Copy link

panlina commented May 6, 2019

Using js module as configuration file is desired in many cases and is quite common nowadays. I also hope it be supported.

@MoOx
Copy link
Author

MoOx commented May 6, 2019

You should have a look to https://github.com/davidtheclark/cosmiconfig

@panlina
Copy link

panlina commented May 6, 2019

Interesting. Thank you.

@dominictarr
Copy link
Owner

having a configuration file that is a turing complete language, with file system and network access, is a security vulnerability waiting to happen. rc will not be supporting that. if you really think you want that, fork or use a different module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants