30

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

enter image description here

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

Is there anyway that to avoid this ?

joshperry
  • 41,167
  • 16
  • 88
  • 103
Dzung Nguyen
  • 9,152
  • 14
  • 65
  • 104
  • @romainl it's only about your workflow and how you think about it. There are many people create question and end up answering their own because no one knows answer. – Dzung Nguyen Aug 16 '13 at 12:52
  • 1
    Some people ask questions, do their research and come back with an answer (often an obvious one) and that's fine. Some people just post the question *and* the answer at the same time, like you did, and that's not fine, IMO. Especially when the question *and* the answer are so poorly written (bad syntax, no background, no reference). It's just stretching the concept of "question/answer" a little bit too much. But the boss says it's OK so it might be OK. – romainl Aug 16 '13 at 13:13
  • 1
    @romainl thanks for your comment. Can you help me pointing out why it's bad syntax and how can I improve it ? – Dzung Nguyen Aug 16 '13 at 13:16
  • 1
    The question and the answer both sound like you are talking to yourself. Add some background and code sample, explain why it's bad that an HTML linter points out HTML errors, and so on. – romainl Aug 16 '13 at 13:21
  • 15
    anyone who uses either vim or angular knows a) what this is about and b) why its a problem. I found the question and answer helpful, and don't appreciate the self-appointed SO-police trying to squash content like this – Matt Briggs Nov 11 '13 at 18:37

2 Answers2

38

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

Add to your 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.

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-'
\]
joshperry
  • 41,167
  • 16
  • 88
  • 103
Dzung Nguyen
  • 9,152
  • 14
  • 65
  • 104
  • 8
    It was probably worth mentioning the source conversation https://github.com/scrooloose/syntastic/issues/612#issuecomment-19456342 – Keith Smiley Sep 06 '13 at 18:24
2

Add a data prefix, it's html5 too:

data-ng-model=...
mins
  • 6,478
  • 12
  • 56
  • 75
XAVIER
  • 25
  • 2