Closed stevenzeck closed 5 years ago
Could the two options be combined into one? E.g. use_beautifier_config
whose value could be false
(use Unibeautify's settings), true
(use beautifier's own config from the default place) or a string (use beautifier's own config from that filename)? 🤔
What's the general opinion on options whose values can have more than one datatype?
@Glavin001 thoughts on @lassik comment? Should be simple:
const resolveConfigPath:
| string
| undefined = typeof beautifierOptions.prefer_beautifier_config === "string"
? beautifierOptions.prefer_beautifier_config
: filePath;
Good idea. 👍
The docs will need to be updated https://unibeautify.com/docs/options-for-beautifiers
@Glavin001 pushed.
Closes #221.
This pull request adds a new option in Unibeautify's config:
beautifier_config_path
. If this there andprefer_beautifier_config
is true, it will use that config file instead of letting the Unibeautify beautifier find the file on its own.