Dusty Pomerleau on Nostr: Prettier accepts config files in TOML, which I prefer, but I have a line in my (JS) ...
Prettier accepts config files in TOML, which I prefer, but I have a line in my (JS) config that I can’t seem to translate:
`overrides: [{ files: "*.md", options: { tabWidth: 2 } }],`
In JS, overrides is an array of objects, so I assume the TOML equivalent would be an array of tables (`[[overrides]]`), but if each override table is a value, what is the key? In JS the objects in the array are just anonymous. Prettier docs don't give any examples of this pattern in TOML.
#prettier #TOML
`overrides: [{ files: "*.md", options: { tabWidth: 2 } }],`
In JS, overrides is an array of objects, so I assume the TOML equivalent would be an array of tables (`[[overrides]]`), but if each override table is a value, what is the key? In JS the objects in the array are just anonymous. Prettier docs don't give any examples of this pattern in TOML.
#prettier #TOML