Turning off eslint rule for a specific file

后端 未结 15 1481
后悔当初
后悔当初 2020-11-30 17:26

Is it possible to turn off the eslint rule for the whole file? Something such as:

// eslint-disable-file no-use-before-define 

(Analogous t

15条回答
  •  星月不相逢
    2020-11-30 17:36

    /* eslint-disable */
    
    //suppress all warnings between comments
    alert('foo');
    
    /* eslint-enable */
    

    This will disable all eslint rules within the block.

提交回复
热议问题