tools icon indicating copy to clipboard operation
tools copied to clipboard

📎Suppress code action: Retain whitespace

Open MichaReiser opened this issue 3 years ago • 1 comments

Description

Improve the suppress code action to retain the indent level:

function () {
	const  lineOfCode = node && node.loc ? node.loc.start.line : "";
}

// becomes
function () {
	// rome-ignore lint/style/useOptionalChain: suppressed 
const  lineOfCode = node && node.loc ? node.loc.start.line : "";
}

We should keep any leading whitespace before the token

MichaReiser avatar Dec 02 '22 14:12 MichaReiser

👋 @rome/staff please triage this issue by adding one of the following labels: S-Bug: confirmed, S-Planned , S-Wishlist or umbrella

github-actions[bot] avatar Dec 19 '22 12:12 github-actions[bot]