lasselupe33 / eslint-plugin-comment-length

MIT License
13 stars 3 forks source link

feat: Add logicalWrap option #8

Closed CreativeTechGuy closed 11 months ago

CreativeTechGuy commented 12 months ago

This is my attempt at implementing #7. Feel free to edit this if I haven't done something to your liking. But hopefully you like the overall vision of this change! :)

lasselupe33 commented 11 months ago

Hi again @CreativeTechGuy,

Thank you for your contribution! :)

I've just went through your PR and made several fixes which will be merged to master. See #7 for additional context.

To enable and try out logicalWrap you need to enable it in your ESLint configuration file and upgrade eslint-plugin-comment-length to at least v1.5.0.

{
  "rules": {
    // ...,
    "comment-length/limit-single-line-comments": ["warn", {
      "logicalWrap": true
    }],
    "comment-length/limit-multi-line-comments": ["warn", {
      "logicalWrap": true
    }],
  }
}

For your information I've reverted the following: