Skip to content

feat: support external options#3775

Merged
ikatyang merged 74 commits intoprettier:masterfrom
ikatyang:feat/external-options
Jan 27, 2018
Merged

feat: support external options#3775
ikatyang merged 74 commits intoprettier:masterfrom
ikatyang:feat/external-options

Conversation

@ikatyang
Copy link
Copy Markdown
Member

@ikatyang ikatyang commented Jan 20, 2018

Fixes #3615

  • a lot of refactoring (actually most of them are just moved/extracted).
  • remove PRETTIER_LOG_LEVEL environment variable, the logger is not global now.
  • add a showInternal option for supportInfo, which is a filter for cliSomething used in CLI.
    • centralize infos
  • support usage prettier --plugin foo-plugin --help.
  • support detailed usage prettier --plugin foo-plugin --help foo-option.
  • support external options from CLI prettier --plugin foo-plugin --foo-option.
  • support external options from config file.
    • .prettierrc: { "plugins": ["foo-plugin"], "fooOption": "bar" }
  • does not support external plugins from config file but want to pass its options to CLI, vice versa.
    • .prettierrc: { "plugins": ["foo-plugin"] } + CLI: prettier --foo-option

@azz
Copy link
Copy Markdown
Member

azz commented Jan 20, 2018

That looks a lot better to me.

@ikatyang
Copy link
Copy Markdown
Member Author

Any further comments?

@ikatyang ikatyang merged commit 84c6036 into prettier:master Jan 27, 2018
@ikatyang ikatyang deleted the feat/external-options branch January 27, 2018 16:24
@lock lock Bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Jan 18, 2019
@lock lock Bot locked as resolved and limited conversation to collaborators Jan 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants