Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix eexMultilineNoParens option #98

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kelostrada
Copy link

If you try to add this option to .prettierrc.js then it blows up:

formatted_views/multiline.html.eex/bin/sh: --no-parens=${eexFormatterOptions.join(", ")}: bad substitution

[error] formatted_views/multiline.html.eex: Error: Command failed: /Users/bartosz/Projects/prettier-plugin-eex/prettier_eex_formatter_release CiAgbGlua190bygKICAgIGE6ICJiIiwKICAgIGM6ICJlIgogICk= IHNlbGVjdCBmLCA6bmFtZSwgWwogICAgICB7Om9wdGlvbiwgOnZhbHVlfQogICAgXQ== --line-length=98 --no-parens=${eexFormatterOptions.join(", ")}
[error] /bin/sh: --no-parens=${eexFormatterOptions.join(", ")}: bad substitution
[error] 
[error]     at checkExecSyncError (child_process.js:635:11)
[error]     at execSync (child_process.js:671:15)
[error]     at formatEex (/Users/bartosz/Projects/prettier-plugin-eex/lib/formatter.js:35:5)
[error]     at Object.print (/Users/bartosz/Projects/prettier-plugin-eex/lib/printers.js:23:27)
[error]     at callPluginPrintFunction (/Users/bartosz/Projects/prettier-plugin-eex/node_modules/prettier/index.js:14718:18)
[error]     at /Users/bartosz/Projects/prettier-plugin-eex/node_modules/prettier/index.js:14649:47
[error]     at Object.printComments (/Users/bartosz/Projects/prettier-plugin-eex/node_modules/prettier/index.js:14305:19)
[error]     at printGenerically (/Users/bartosz/Projects/prettier-plugin-eex/node_modules/prettier/index.js:14649:22)
[error]     at printAstToDoc (/Users/bartosz/Projects/prettier-plugin-eex/node_modules/prettier/index.js:14659:13)
[error]     at coreFormat (/Users/bartosz/Projects/prettier-plugin-eex/node_modules/prettier/index.js:14910:15)

This PR fixes the issue and add a small test case for this (just in elixir E2E, couldn't to find any test cases in JS for this...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant