Replies: 5 comments 7 replies
-
In one of my projects, years ago, I added support for a |
Beta Was this translation helpful? Give feedback.
-
Have you considered
|
Beta Was this translation helpful? Give feedback.
-
I'm delayed, but I suggest Reasons: 1. Files with a dot prefix in the name: They are treated as hidden files on Linux (and maybe Mac)
This is one of the reasons why the Vite team didn't accept this .config/ proposal.
2.
|
Beta Was this translation helpful? Give feedback.
-
As other already pointed out, why no plural? Like you wouldn't use |
Beta Was this translation helpful? Give feedback.
-
I think the use of the Developer Habits & FamiliarityEven though we might usually associate Established Legacy and Tooling (in JS/TS)For years, tools like cosmiconfig have embraced the .config directory approach, creating a long legacy within the JavaScript/TypeScript world. This historical support means that many projects—and by extension, developers—are already familiar with and expect that configuration can reside in this directory.
My personal opinionI believe standardization is important and I do consider I totally understand the perspectives being shared here—especially from folks coming from other language ecosystems where config structures might be opinionated differently. Historically the JS/TS ecosystem is by far the most config and tooling heavy—for better or worse—which is why I'm giving their existing conventions a lot of weight. I fully agree |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Note
Here are some alternative ideas for the config directory name collected from several places.
See previous efforts and current tools for other relevant dicussions.
.config/
(current proposal)Config directory indicates it holds the configuration files by their name and is a refactored part of the common
.config
suffix in current config file names.It is prefixed with a dot
.
so that it will be sorted as the first directory and more clearly separated from the rest of the project, reducing more noise. Also is consistent with XDG's~/.config
directory..conf/
Before writing this proposal I had been thinking of
.conf/
as a shorter alternative. As a drawback, this name is less readable..meta/
@barelyreaper suggested in a tweet to use
.meta/
since most of the (current) config files have.config
in their name and with a more generic place like.meta/
we can put other kinds of dotfiles such asprettierignore
in it.config/
@nainemom @pawamoy suggested using the
config
directory instead of.config
so that it won't be hidden in Unix tools. (#1, #13)package.json
@jullerino suggested in a tweet to prefer
package.json
that is also useful for monorepos. @remcohaszing has some interesting points why this might not always work.Beta Was this translation helpful? Give feedback.
All reactions