Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
When I used prettier to format the code, I found that the
components.d.ts
file automatically generated byunplugin-vue-components
was formatted, but the top of the file was written to prohibit eslint and prettier .After testing, I found that
/* eslint-disable */
is effective, but/* prettier-ignore */
does not.BUG reproduction:
Before prettier formatting:
After prettier formatting:
You can see that single quotes have changed to double quotes, proving that
/* prettier-ignore */
has no effectThen I checked the git history and found the changes proposed by this PR: #597
The original intention of this change is to prevent
eslint
andprettier
from formatting the entire file, not just theexport {}
line.So I added the last line
/* prettier-ignore */
in the relevant code, this will ensure that the whole file will not be formatted and will not affect the functionality of other commentsLinked Issues
Additional context