Intellij idea Intellj重新格式化忽略了eslint diable注释,如何修复它?

Intellij idea Intellj重新格式化忽略了eslint diable注释,如何修复它?,intellij-idea,Intellij Idea,当我点击Intellj reformat时。重新格式化将按自己的方式进行格式化,并忽略eslint注释。 例如,我的项目中有以下代码。 我希望intellj可以跳过**/*eslint disable prettier/prettier*/**块中代码的重新格式化 但它不能与更漂亮的插件一起工作 我如何在intellj内部解决这个问题 root: $template( /* eslint-disable prettier/prettier */ '<div>' +

当我点击Intellj reformat时。重新格式化将按自己的方式进行格式化,并忽略eslint注释。 例如,我的项目中有以下代码。 我希望intellj可以跳过**/*eslint disable prettier/prettier*/**块中代码的重新格式化

但它不能与更漂亮的插件一起工作

我如何在intellj内部解决这个问题

root: $template(
    /* eslint-disable prettier/prettier */
    '<div>' +
        '<div class="checkbox-group" />' +
    '</div>'
    /* eslint-enable prettier/prettier */
)


root:$template(
/*eslint禁用更漂亮/更漂亮*/
'' +
'' +
''
/*eslint启用更漂亮/更漂亮*/
)
应用重新格式化后(这不是我需要的)

root:$template(
/*eslint禁用更漂亮/更漂亮*/
'' + '' + ''
/*eslint启用更漂亮/更漂亮*/
)

eslint disable
注释仅禁用eslint警告,它们与IDEA格式化程序无关。使用Prettier(或
eslint--fix
)重新格式化代码,或使用IDE自己的方式跳过重新格式化时的某些行,请参阅
eslint disable
注释仅禁用eslint警告,它们与IDEA格式化程序无关。请使用Prettier(或
eslint--fix
)重新格式化代码,或使用IDE自己的方式跳过重新格式化时的某些行,请参阅
root: $template(
    /* eslint-disable prettier/prettier */

    '<div>' + '<div class="checkbox-group" />' + '</div>'

    /* eslint-enable prettier/prettier */
)