stkb / Rewrap

Rewrap extension for VSCode and Visual Studio
https://marketplace.visualstudio.com/items/stkb.rewrap
Other
506 stars 62 forks source link

Feature request: (Dart) preserve linter 'ignore:' lines #385

Open jibbers42 opened 12 months ago

jibbers42 commented 12 months ago

Specific to Dart, I'd like a feature to preserve lint ignore lines such as:

// My really good reason that is either very short or wraps just a bit to
// the next line.
// ignore: unused_local_variable
const lonelyVar = 1;

Wrapped at 80 we get the following and the ignore no longer works.

// My really good reason that is either very short or wraps just a bit to
// the next line. ignore: unused_local_variable
const lonelyVar = 1;

I realize I can use a blank line as a workaround, but would prefer this feature. I also don't prefer the 2 empty spaces technique since so much tooling will autotrim it away depending on tool config.