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

Extra spaces in array list when declared on single lines #209

Closed
mashware opened this issue Jan 25, 2023 · 3 comments · Fixed by #216
Closed

Extra spaces in array list when declared on single lines #209

mashware opened this issue Jan 25, 2023 · 3 comments · Fixed by #216
Labels
needs more info More info is needed to complete the issue

Comments

@mashware
Copy link

mashware commented Jan 25, 2023

Hello, when we have configured the spacing of 4 and we format a Yaml, extra spaces appear in the array listt, exactly 3 spaces:

    MyController:
        arguments:
            -   '@tactician_commandbus_default'
            -   '@tactician_commandbus_query'
            -   '@translator'
            -   '@logger'

I don't know if it is the desired behavior or if there is a way to define it to be with 1 spaces:

    MyController:
        arguments:
            - '@tactician_commandbus_default'
            - '@tactician_commandbus_query'
            - '@translator'
            - '@logger'

I don't know if it can be configured so that it doesn't do it in these cases

@ota-meshi
Copy link
Owner

Could you clarify your request?
What options do you want for which rule?

@ota-meshi ota-meshi added the needs more info More info is needed to complete the issue label Jan 25, 2023
@mashware
Copy link
Author

mashware commented Jan 25, 2023

In the first case that I have exposed, when we have configured the spacing to "yml/indent": ["error", 4] it is adding the 3 spaces, I am not sure if it works correctly, I think it should be 1 space only - '@tactician_commandbus_default', in any case, if not, an option would be nice to be able to declare how many spaces to put in single arrays, either in yml/indent or in a new rule.

The second case that I have exposed we forget, since this is if there is a way to put it in a line (I remove it from the main comment)

@ota-meshi

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs more info More info is needed to complete the issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants