yeoman / configstore

Easily load and persist config without having to think about where and how
BSD 2-Clause "Simplified" License
868 stars 57 forks source link

Whether to use `configstore` or `<package name>` should be a *user* option #69

Closed OJFord closed 4 years ago

OJFord commented 4 years ago

It shouldn't be up to the package whether to store in ~/.config/configstore/ or in ~/.config/<pkgname>/, it should be up to the user.

Better: respect the XDG base directory specification, or do that and further add $<PKGNAME>_HOME env var option.

I came to this repo wondering where the hell ~/.config/configstore came from, because I haven't installed any 'configstore'. As #27 says, having some random secondary bucket for a select bunch of different program/package's configs is unconventional.

sindresorhus commented 4 years ago

This is too late to change now. Would be too much of a breaking change. However, we have an option to change the default now: https://github.com/yeoman/configstore#globalconfigpath

Also, the more modern alternative to configstore uses the correct location: https://github.com/sindresorhus/conf

Package consumers of configstore are free to support user-config to set the location, but this is not something we plan to support built-in.