DavidAnson / markdownlint

A Node.js style checker and lint tool for Markdown/CommonMark files.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Commit f272517 is a breaking change to 0.33.0 (Update MD024/no-duplicate-heading to remove duplicate parameter allow…)

svew opened this issue · comments

This change removed allow_different_nesting as an allowed parameter of MD024.

This is a logic change that not only deprecates allow_different_nesting, but also changes the underlying logic. This has recently caused issues for our team as we had our configuration set to:

MD024:
  siblings_only: false
  allow_different_nesting: true

This logic change breaks backwards compatibility, and as such should institute a semver major version change.

The behaviour should be patched on existing 0.x.x releases, and either be reverted on main or induce a major version change.

I'm sorry for the inconvenience, but the change you link to does not represent a change of behavior for the rule, merely the removal of one of two redundant names for a parameter. The remaining parameter name behaves the same as it did before the change. Your scenario should work the same as before once you set siblings_only to true.

For what it's worth, semantic versioning rule 7 (that you link to) does not apply here. Rule number 4 is the relevant one and allows changes such as this one.

I definitely do not agree that this doesn't represent a breaking change in behaviour. If in 0.32.0, I have a perfectly valid configuration file and everything works fine, but upon upgrading to 0.33.0, suddenly markdownlint starts erroring on docs that it previously didn't, how could that be anything other than a change in behaviour?

However, as you mentioned (and as I forgot 🤦), 0.x.x is an experimental version and doesn't guarentee stable API, so I'll close this ticket and freeze our version of markdownlint that we use.