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(tests): Error: No parser could be inferred for file #41

Merged
merged 4 commits into from
Mar 19, 2022

Conversation

marianfoo
Copy link
Member

@marianfoo marianfoo commented Mar 19, 2022

PR was opened because of the error in the actions:
https://github.com/ui5-community/generator-ui5-project/runs/5611992482?check_suite_focus=true

Seems like @nicogeburek tried to fix it with this commit? cc61307

My solution was to add --ignore-unknown because of this entry:
https://github.com/prettier/prettier/blob/24d39a906834cf449304dc684b280a5ca9a0a6d7/website/blog/2020-08-24-2.1.0.md#added---ignore-unknownalias--u-flag-8829-by-fisker

Solution was wrong, reverted the old solution.
New solution:

Based on a old prettier issue (prettier/prettier#8056) i found this workaround: withastro/prettier-plugin-astro#97 (comment)

pass --plugin-search-dir=. to the prettier cli

This solution makes more sense because in the error log is:
Error: No parser could be inferred for file: uimodule/webapp/view/MainView.view.xml

So probably prettier does not find the prettier plugin @prettier/plugin-xml to parse xml.
With this solution prettier uses the plugin.

@marianfoo
Copy link
Member Author

CC @petermuessig

generators/app/index.js Outdated Show resolved Hide resolved
generators/app/index.js Show resolved Hide resolved
@marianfoo marianfoo changed the title fix(prettier): ignore unknown files in prettier fix(tests): Error: No parser could be inferred for file Mar 19, 2022
@petermuessig petermuessig merged commit 16565c5 into ui5-community:main Mar 19, 2022
@petermuessig
Copy link
Member

Merged, thanks @marianfoo

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.

2 participants