• Stars
    star
    511
  • Rank 86,473 (Top 2 %)
  • Language
  • Created 9 months ago
  • Updated 9 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

๐Ÿ“ A proposal for the .config/ directory.

๐Ÿ“ config directory proposal

A proposal for the .config/ directory.

Motivation

The number of configs in projects is growing every day, and there is no convention to organize them!

The lack of a conventional place to organize configuration files led tools to often prefer to use top-level configuration files suffixed with .config or rc.

This makes things harder than they should be:

  • For developers to quickly get started and understand a new codebase
  • For repository maintainers, to manage config files
  • For tools to distinguish config files
  • For library authors to decide on where to store or load configs

Goal

This proposal aims to introduce a new conventional place for storing configuration files and motivate different tools to support it as a new alternative standard while allowing top-level conventions the same as before.

Discussions

Note

More discussions related to this proposal, are moved under the Discussions section.

.config/ directory

When the .config/ directory exists, tools read the config files inside this directory.

Usually, tools should use <dir>/.config/[name].[ext] for file name convention.

Nesting

As the size of the configuration increases, managing them all in a single configuration will be harder. Tools can optionally support .config/[name]/ to allow nesting.

In the case of monorepo when users need to specify multiple files of the same config, the config files can be nested into /<path>/.config directory and based on the tool requirements either merged with mono repo's /.config or not.

Conventions

While this proposal does not enforce the naming convention of files inside this dir, it provides some recommendations and best practices.

Specify tool name

Tool or framework names should be explicitly clear in configuration file names to avoid conflicting tools with each other and also make it clear for users what config is for what.

โœ… .config/toolname.js

โŒ .config/app.js

Avoid the .config and .conf suffix

Since the .config directory name is already clear it is holding configuration files, the .config suffix is not needed and shall be avoided.

โœ… .config/toolname.js

โŒ .config/toolconf.js

โŒ .config/toolname.config.js

Note

To make the migration to the .config directory process easier and keep the existing file name conventions, tools might allow this suffix as an alternative.

Specify format with extension

Config files without clear extensions are harder to be parsed. Both by IDEs and other tools and also for end-users to understand.

โœ… .config/toolname.toml

โŒ .config/toolname

โŒ .config/toolrc

Note

This proposal discourages using the rc format because the syntax interpretation is ambiguous.

Lower-case

Using case-sensitive configuration file names can introduce cross-platform support issues. It is highly recommended to only use lowercase naming.

โœ… .config/toolname.toml

โŒ .config/toolName

Note

This proposal recommends using the kebab case if the tool name is too long tool-name.json instead of a camel case like tool_name.json to preserve consistency in this directory.

Exceptional files

There are config/dot files that are common and unlikely to be nestable. These are excluded from the scope of this proposal:

  • .env
  • .gitignore

Next steps

This is a big ecosystem issue and unless we push to unblock it, nothing will happen! The goal of this proposal is to make a centralized effort and discussion forum for tool authors to contribute.

  • Make a tracker DB of tools with known configuration files and their status with this proposal
  • Open individual issue trackers to each tool and invite them to collaborate
  • Provide a preset configuration to use VSCode File Nesting with the .config/ directory

More Repositories

1

clippyjs

Add Clippy or his friends to any website for instant nostalgia
JavaScript
323
star
2

tired-maintainer

๐Ÿ—’๏ธ Notes from a tired maintainer
278
star
3

nuxt-build-cache

โ–ฃ Speed up your Nuxt builds up to 2x [experimental]
TypeScript
150
star
4

nuxt-chat

A simple chat app made with Nuxt, Nitro Tasks, Databases and Websockets!
TypeScript
118
star
5

nuxt-on-the-edge

Vue
99
star
6

nuxt-shiki

๐ŸŽจ Nuxt + Shiki syntax highlighter
TypeScript
75
star
7

github-is-blocked-in-iran

GithubUserContent Is Blocked In Iran!
72
star
8

tslite

๐ŸชถTypescript but %60 smaller
TypeScript
70
star
9

h3-on-edge

โšก๏ธ Edge workers with straming powered by unjs/h3
TypeScript
52
star
10

warning.wtf

โš ๏ธ why all these warnings? โš ๏ธ
TypeScript
52
star
11

shiki-es

Standalone build of shiki fully compatible with all ESM environments.
TypeScript
48
star
12

nuxt-swr-cache

JavaScript
47
star
13

nuxt-twind

โšก๏ธ Integrate Nuxt with Twind, The smallest, fastest, most feature complete tailwind-in-js solution in existence!
TypeScript
42
star
14

space-invaders

๐Ÿ‘พ Space Invaders game in single (~4KB Gzipped) JavaScript file!
TypeScript
41
star
15

nuxt-on-pi

Vue
39
star
16

nitro-cloudflare-dev

POC module to enable access to the Cloudflare runtime bindings in development server of Nitro and Nuxt
TypeScript
32
star
17

nuxt-plesk-example

Vue
30
star
18

yarnpm

๐Ÿ”ฎ Transform NPM To Yarn!
JavaScript
28
star
19

osticket-docker

osTicket Docker Image (unofficial)
PHP
24
star
20

nuxt-tailwindcss4

Experimental integration with Nuxt + Tailwind CSS v4.0
TypeScript
24
star
21

bodymoji

Draws an emoji on your face! Powered by Nuxt.js, Tensorflow.js and Posenet
JavaScript
22
star
22

dotfiles

Vim Script
15
star
23

cf-kv-exporter

โ˜๏ธ CLI to export a Cloudflare a KV Namespace
JavaScript
15
star
24

farsi.css

Persian Fonts For Web
CSS
12
star
25

custom-telegram-clients

Curated list of custom (and potentially malicious) telegram clients
11
star
26

mangler

A Ventrilo Compatible Client for Linux
C
10
star
27

nuxt-shiki-demo

Vue
8
star
28

diff2web

Online Diff Viewer
JavaScript
6
star
29

nuxt-express

Nuxt Express Starter Template
Vue
6
star
30

maxmind-databases

Maxmind / Geolite2 databases for node-maxmind
Shell
6
star
31

n10y

Converts internasionalization to i18n
JavaScript
6
star
32

exp-nux2-slim

JavaScript
6
star
33

nuxt-rewrite

JavaScript
5
star
34

http-proxy-java

Java
5
star
35

nuxt-tests

Nuxt 2/3/bridge Testing
TypeScript
5
star
36

gluu-docker

Gluu CE Docker Images
Shell
5
star
37

bpi-r4-openwrt

๐ŸŒ Banana Pi BPI-R4 OpenWrt Image
Shell
4
star
38

happy.js

Happy web framework based on Hapi + VueJS2 + Mongoose
JavaScript
4
star
39

mdx-module

Nuxt.js module for MDX
JavaScript
4
star
40

capnp-es

TypeScript implementation of the Cap'n Proto serialization. Up to %65 faster than `JSON.parse` even for simple payloads.
TypeScript
4
star
41

nuxt-remote-config-demo

Vue
4
star
42

nuxt-amplify

Nuxt + Amplify
Vue
4
star
43

subz-proxy

Subtitle APIs
JavaScript
4
star
44

nuxt-static-demo

full static build with cache
Vue
3
star
45

codesandbox-nuxt

Nuxt.js template for CodeSandbox (Archived)
Vue
3
star
46

loop.sh

AUT Portal Loop !
Shell
3
star
47

pi0.github.io

HTML
3
star
48

libvips

Shell
3
star
49

sichat

Simple Mock Chat API
JavaScript
3
star
50

telesi

Simple Telegram Clone
CSS
2
star
51

okauth

Auth System
JavaScript
2
star
52

chavosh-exam-importer

Chavosh Exam Importer Module
2
star
53

portalcheck

Python
2
star
54

nuxt-pnp-demo

https://github.com/nuxt/nuxt.js/pull/8389
Vue
2
star
55

data

2
star
56

laravel-elixirx

[DEPRECATED!] Elixir Helper For Those Who DO!
JavaScript
2
star
57

nuxt-benchmarks

๐Ÿ’จ Nuxt.js SSR performance Benchmarks
JavaScript
2
star
58

nuxt-i18n

HTML
2
star
59

httpinspector

HTTP Server Inspector
PHP
2
star
60

vue-router-repro

TypeScript
2
star
61

nuxt-use-motion

๐Ÿคน A Nuxt module putting your components in motion
TypeScript
2
star
62

simpiler

A simple c compiler for SPIM
C
2
star
63

jooche-web

PHP
2
star
64

ocrstream.js

Run OCR On Streams using pure js
JavaScript
2
star
65

nuxt-server-assets

TypeScript
2
star
66

pi0

2
star
67

js-mem-usage-exp

JavaScript
1
star
68

bun-on-pages

JavaScript
1
star
69

nitro-md4w

TypeScript
1
star
70

displaylink-mirror

easy mirror x11 to displaylink adapter
ApacheConf
1
star
71

webpackbar-clear-bug

JavaScript
1
star
72

laravel-auth

PHP
1
star
73

lsc-project

LDAP Synchronization Connector [SVN Mirror]
Java
1
star
74

nuxt-jest-regression

JavaScript
1
star
75

nuxt-swiper-demo

Vue
1
star
76

letsgo

Lets Learn Go :)
Go
1
star
77

MSP

Strategy game
Java
1
star
78

esm-module-field-bug

https://github.com/standard-things/esm/issues/627
JavaScript
1
star
79

nuxt-programatic-example

JavaScript
1
star
80

node

Node Lab
JavaScript
1
star
81

laravel-elixir-rtl

laravel-elixir-rtl
JavaScript
1
star
82

rollup-repro

JavaScript
1
star
83

nuxt-monorepo-repro

TypeScript
1
star
84

os-xv6-network

Automatically exported from code.google.com/p/os-xv6-network
C
1
star
85

vercel-edge-playground

JavaScript
1
star
86

telegram-bot-hosting

A python script to host telegram bots
1
star
87

nuxt3-fetch-error-repro

Vue
1
star
88

nuxt2-missing-payload

reproduction + workaround for auto reload on missing payload
JavaScript
1
star
89

nuxt-meta-iife-bug

JavaScript
1
star
90

node-frameworks-benchmark

Dummy benchmarks of nodejs frameworks using api-benchmark
JavaScript
1
star
91

pmaze

Maze generator and solver in cpp
C++
1
star