How can I use ESLint no-unused-vars for a block of code?

前端 未结 5 1980
野趣味
野趣味 2021-02-03 20:24

I need to disable some variable checks in ESLint.

Currently, I am using this code, but am not getting the desired result:



        
5条回答
  •  情歌与酒
    2021-02-03 21:17

    Alternatively, you can disable the rule for one line:

    // Based on your Typescript example
    
    export type Hey = { // eslint-disable-line no-unused-vars
      a: string,
      b: object
    }
    

提交回复
热议问题