Skip to content

refactor: extract options-normalizer/validator#5020

Merged
ikatyang merged 3 commits intoprettier:masterfrom
ikatyang:refactor/vnopts
Aug 31, 2018
Merged

refactor: extract options-normalizer/validator#5020
ikatyang merged 3 commits intoprettier:masterfrom
ikatyang:refactor/vnopts

Conversation

@ikatyang
Copy link
Copy Markdown
Member

  • I’ve added tests to confirm my change works.
  • (If changing the API or CLI) I’ve documented the changes I’ve made (in the docs/ directory)
  • I’ve read the contributing guidelines.


exports[`throw error with invalid config option (trailingComma) (stderr) 1`] = `
"[error] Invalid \`\\"trailingComma\\"\` value. Expected \\"all\\", \\"es5\\" or \\"none\\", but received \`\\"wow\\"\`.
"[error] Invalid trailingComma value. Expected \\"all\\", \\"es5\\" or \\"none\\", but received \\"wow\\".
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image


exports[`deprecated option values are warned (stderr) 1`] = `
"[warn] \`--trailing-comma\` without an argument is deprecated. Prettier now treats it as \`--trailing-comma=es5\`.
"[warn] --trailing-comma without an argument is deprecated, now treats it as --trailing-comma=es5.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"now treats it" without a subject isn't valid; maybe we should say "this is treated as"? It's passive voice but... I think it's clearer

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about we now treat it as ...?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perfect 👍

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May I do a drive-by interjection about comma splices? That should be "... deprecated; we now treat it as", rather than separated by a semicolon.

@hawkrives
Copy link
Copy Markdown
Contributor

Thanks @ikatyang!

@ikatyang ikatyang merged commit 49e2f77 into prettier:master Aug 31, 2018
@ikatyang ikatyang deleted the refactor/vnopts branch August 31, 2018 03:26
@ikatyang ikatyang added this to the 1.15 milestone Oct 25, 2018
@lock lock Bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Jan 23, 2019
@lock lock Bot locked as resolved and limited conversation to collaborators Jan 23, 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.

3 participants