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

shareable config from an npm package #112

Closed
travi opened this issue Mar 18, 2018 · 7 comments
Closed

shareable config from an npm package #112

travi opened this issue Mar 18, 2018 · 7 comments

Comments

@travi
Copy link

travi commented Mar 18, 2018

if this is already supported, sorry for the noise, but from the docs and the code that i've looked through, it appears that the current shareable config capability assumes that the config file to be extended is a local file.

i'd like to put together an npm package that i use across my projects, but i'm just wanting to confirm support before i put in the effort. ideally, i'd love for support to follow the conventions that have emerged in projects like eslint, commitlint, semantic-release, and others where a package named <tool-name>-config-<config-name> could be extended by using "extends": "<config-name>". for a concrete example, i'd like to publish markdownlint-config-travi and use it in my .markdownlintrc as "extends": "travi"

is this possible today? if not, would it be an enhancement that you'd consider?

@travi travi mentioned this issue Mar 18, 2018
4 tasks
@DavidAnson
Copy link
Owner

This is not possible today, but makes sense to investigate. I haven’t decided if it belongs here or in the CLI project, so I will leave it here for now.

If you are impatient, you can probably approximate this today with a relative path into the config project in the node_modules folder.

For future reference: https://eslint.org/docs/developer-guide/shareable-configs

@travi
Copy link
Author

travi commented Mar 18, 2018

thanks for being open to considering it. i'm not incredibly impatient around this, but i wanted to at least get it on the radar. i might be able to find time to help out if you'd want a contribution for this.

@DavidAnson
Copy link
Owner

Cool. I just need to think about it first. Most of my time recently went towards adding custom rule support.

@travi
Copy link
Author

travi commented Apr 4, 2018

in case it is helpful, i've noticed several packages that i use are using cosmicconfig to handle pulling in config from various optional locations. i've also run across ex-config that is intended to work with cosmicconfig for extending other config.

@DavidAnson
Copy link
Owner

Appreciate it, I’ll look at this when the time comes!

@travi
Copy link
Author

travi commented Oct 24, 2018

my needs ended up becoming more complex, so i ended up switching to remark. i'll close since i wont need this anymore, but certainly feel free to reopen if you still think this will be useful for the project.

@travi travi closed this as completed Oct 24, 2018
@DavidAnson
Copy link
Owner

Okay, thanks. Glad you found something that suits your needs!

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

No branches or pull requests

2 participants