我怎么能忽略角方向线错误与Vim和syntastic

时间:2021-07-26 10:09:55

It's confusing when Syntastic's lint tools keep warning me when I use proprietary html attributes, especially so when using Angular directives.

当我使用专有的html属性时,Syntastic的lint工具一直警告我,这让我很困惑,尤其是在使用角度指示时。

我怎么能忽略角方向线错误与Vim和syntastic

This quite quickly drowns out actual errors in my html, decreases the value of the linter errors, and adds visual noise.

这很快就会淹没html中的实际错误,减少linter错误的值,并增加视觉噪声。

Is there anyway that to avoid this ?

有什么可以避免的吗?

2 个解决方案

#1


38  

I asked this exact question about tidy errors in VIM on Syntastic's issue tracker.

我问了这个关于Syntastic问题跟踪器上VIM中整洁错误的问题。

Add to your vimrc:

添加到您的vimrc:

let g:syntastic_html_tidy_ignore_errors=['proprietary attribute "ng-']

This will get rid of errors for any attributes prepended with ng-, leaving errors for all other proprietary attributes.

这将消除任何带有ng格式的属性的错误,为所有其他专有属性留下错误。

If you have a namespace prefix for your own directives, you can add it to this list as well.

如果您自己的指令有一个名称空间前缀,您也可以将它添加到这个列表中。

let g:syntastic_html_tidy_ignore_errors=[
    \'proprietary attribute "ng-',
    \'proprietary attribute "pdk-'
\]

#2


2  

Add a data prefix, it's html5 too:

添加一个数据前缀,它也是html5:

data-ng-model=...

#1


38  

I asked this exact question about tidy errors in VIM on Syntastic's issue tracker.

我问了这个关于Syntastic问题跟踪器上VIM中整洁错误的问题。

Add to your vimrc:

添加到您的vimrc:

let g:syntastic_html_tidy_ignore_errors=['proprietary attribute "ng-']

This will get rid of errors for any attributes prepended with ng-, leaving errors for all other proprietary attributes.

这将消除任何带有ng格式的属性的错误,为所有其他专有属性留下错误。

If you have a namespace prefix for your own directives, you can add it to this list as well.

如果您自己的指令有一个名称空间前缀,您也可以将它添加到这个列表中。

let g:syntastic_html_tidy_ignore_errors=[
    \'proprietary attribute "ng-',
    \'proprietary attribute "pdk-'
\]

#2


2  

Add a data prefix, it's html5 too:

添加一个数据前缀,它也是html5:

data-ng-model=...