remarkjs / remark-lint

plugins to check (lint) markdown code style
https://remark.js.org
MIT License
939 stars 129 forks source link

list-item-spacing can not be disabled #250

Closed Mister-Hope closed 3 years ago

Mister-Hope commented 3 years ago

Subject of the issue

list-item-spacing can not be disabled

First asked in #73 then resolved 😒

Your environment

yarn 1.22.5

Steps to reproduce

  "remarkConfig": {
    "plugins": [
      "frontmatter",
      [
        "footnotes",
        {
          "inlineNotes": true
        }
      ],
      "math",
      "preset-lint-consistent",
      "preset-lint-recommended",
      "preset-lint-markdown-style-guide",
      [
        "lint-maximum-line-length",
        false
      ],
      [
        "list-item-spacing",
        false
      ],
      [
        "lint-list-item-indent",
        "space"
      ]
    ]
  },

Expected behavior

list-item-spacing is diabled

Actual behavior

It is not


😒

wooorm commented 3 years ago

I can’t see this happening. Please reduce your dependencies down to just the stuff that matters (preset-lint-markdown-style-guide and list-item-spacing), and provide the markdown that results in this

Mister-Hope commented 3 years ago

So are you telling me that conflict between plugins are not bugs?

ChristianMurphy commented 3 years ago

@Mister-Hope conflicts between plugins can be a bug, but it's not clear that is what is happening here. Please produce a minimal reproducible example https://stackoverflow.com/help/minimal-reproducible-example to help clarify what is happening.

Mister-Hope commented 3 years ago

https://github.com/Mister-Hope/textlint-bug/runs/1294033484?check_suite_focus=true

https://github.com/Mister-Hope/textlint-bug

Is this enough?

wooorm commented 3 years ago

@Mister-Hope Thank you for that reproduction.

For a fix, you must use lint-list-item-spacing or remark-lint-list-item-spacing to turn rules off. Specifically:

      [
-       "list-item-spacing",
+       "lint-list-item-spacing",
        false
      ]

The prefix that you can omit is remark-, so spacing, item-spacing, or list-item-spacing don‘t work.