Closed
Description
Does this issue occur when all extensions are disabled?: Yes
- VS Code Version: 1.68.1
- OS Version: Ubuntu 22.04
NOTE: I couldn't find this option in VSCode Insiders! (Maybe it is removed)
Hi. When I refactor a callback in my JSX, which does something rather complicated, one of my comments are removed.
Code example:
//@ts-nocheck
/* eslint-disable */
export default function Something() {
return (
<SomeComponent
aCallbackThatProducesAReactNode={() => {
// this comment will be kept intact
const someProps = {
prop1: props.props1, // BUT THIS COMMENT WILL BE REMOVED :(
prop2: props.props2 // this comment will be kept intact too
};
return <SomeOtherComponent {...someProps} />;
}}
/>
);
}
Try refactoring the whole callback into a function in module scope.
As you see one of my comments are removed.
Thanks.