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.
Hi!
I added an option to define the max length of the component's attributes.
I added tests for that.
The default stays the same 80 chars.
In the nuxt config, add this option:
I named the option
maxAttributesLength
but in fact, it's the length of the line, which include the name of the component and the decoration:Maybe we could found a better name for this. Naming is hard.
I didn't set this option in the experimental feature because it's a very small change...
Also, during development, maybe I found a possible issue that already exists before this merge request.
When this length is exceeded (default: 80), the attributes are converted to yaml format.
That's the point. But the
fmAttributes
are not properly filled and remains empty. You can see it in the snapshot.This is not the case when we directly provide the component yaml props.
But if the length is exceeded, we are now in yaml style, so I think the
fmAttributes
should have the props.It needs review because I don't know if it's the normal behavior...