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

MD007 when MD010 disabled #1010

Open
Malix-Labs opened this issue Oct 17, 2023 · 5 comments
Open

MD007 when MD010 disabled #1010

Malix-Labs opened this issue Oct 17, 2023 · 5 comments

Comments

@Malix-Labs
Copy link

Malix-Labs commented Oct 17, 2023

Fix

Subject

MD007 when MD010 disabled

Object

When MD010 is disabled (hard tabs use case), it should be:

  • MD007.indent = 1 and MD007.start_indent = 1 by default
  • Formatting to tabs instead of spaces
@Malix-Labs Malix-Labs changed the title Fix: MD007: hard tabs use case Fix: MD007 disabled consequences Oct 17, 2023
@Malix-Labs Malix-Labs changed the title Fix: MD007 disabled consequences Fix: MD007 Disabled Consequences Oct 17, 2023
@DavidAnson
Copy link
Owner

Just because tabs are allowed in a project does not mean they will/should be used for lists. Although I think that could be specified via a parameter to the rule.

@DavidAnson DavidAnson changed the title Fix: MD007 Disabled Consequences MD007: Consider adding parameter to opt into requiring hard tabs for list indent Oct 17, 2023
@Malix-Labs
Copy link
Author

Malix-Labs commented Oct 17, 2023

  • Comment Reply from @DavidAnson:

    because tabs are allowed in a project does not mean they will/should be used for lists

    Disagree
    It's a convention to normalize the indentation style project-wise
    If MD010 is disabled, it means that the project is enforcing a tab style indentation
    Tab style indentation => 1 tab / indentation

@Malix-Labs Malix-Labs changed the title MD007: Consider adding parameter to opt into requiring hard tabs for list indent MD007 when MD010 disabled Oct 17, 2023
@DavidAnson
Copy link
Owner

With very few exceptions, rules do not change their behavior based on how other rules are configured. This project prefers spaces and provides rule MD010 to help enforce that. Disabling MD010 does not introduce a requirement to use tabs. As the specification outlines, the behavior of tab stops is not always intuitive (https://spec.commonmark.org/0.30/#tabs).

It sounds like adding the parameter I propose above would satisfy your scenario.

@Malix-Labs
Copy link
Author

Malix-Labs commented Oct 17, 2023

  • Comment Reply from @DavidAnson:

    Disabling MD010 does not introduce a requirement to use tabs

    Do you mean that disabling MD010 does remove the requirement to not use hard tabs, rather that induce the requirement to use tabs?

  • Comment Reply from @DavidAnson:

    It sounds like adding the parameter I propose above would satisfy your scenario.

    If previous point is true, then agreed

@DavidAnson
Copy link
Owner

Correct: MD010 will warn about tabs when it is enabled, but will do nothing when it is disabled.

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

No branches or pull requests

2 participants