Skip to content

Latest commit

 

History

History
22 lines (14 loc) · 737 Bytes

configuration-files.md

File metadata and controls

22 lines (14 loc) · 737 Bytes

Configuration Files

Decision

Prefer config files over package.json.

Use JSON or YAML file extensions where supported. Prefer JSON over YAML. Prefer .yaml over .yml.

Rationale

IDEs often support schema validation of config files. Individual config files improve discoverability and avoids cluttering package.json.

Providing a file extension allows config files to be formatted without having to whitelist and map files to a parser.

JSON should be preferred over YAML unless comments are required. JSON is more prescriptive and provides less room for error.

.yaml is the official extension recommended by YAML. .yml is an 8.3 filename.