Turning off eslint rule for a specific file

后端 未结 15 1468
后悔当初
后悔当初 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:35

    To temporarily disable rule warnings in your file, use block comments in the following format:

    /* eslint-disable */
    

    This will disable ESLint until the

    /* eslint-enable */
    

    comment is reached.

    You can read more about this topic here.

提交回复
热议问题