feat: tidy config files
tidyrs::Settings holds each language's settings, Shared sets the choices they have in common, and tidyrs::format picks the language. Each language still formats on its own with its own settings. With the config feature, a Resolver reads the nearest tidy.json, tidy.jsonc or tidy.toml, and .editorconfig as Prettier reads it. A config sets shared options at the top and each language's own in its section, where the shared ones can be set again. The walk tells the resolver what config files each folder has, so resolving costs no extra file system calls. The CLI and the Node binding take the same option names as the config: width, indent, tabs, eol, whitespace, quote, ignore, and so on. The CLI adds --config, --no-config and --stdin-filepath, and reports syntax errors with their line and column.
Parent5fccf55
15 files changed+1226-344
StackedSplit