Why does JSHint throw a warning if I am using const?

后端 未结 17 2985
眼角桃花
眼角桃花 2020-12-12 08:18

This is the error I get when using const:



        
17条回答
  •  情歌与酒
    2020-12-12 09:07

    May 2020 Here's a simple solution i found and it will resolve for all of my projects ,on windows if your project is somewhere inside c: directory , create new file .jshintrc and save it in C directory open this .jshintrc file and write { "esversion": 6} and that's it. the warnings should go away , same will work in d directory

    yes you can also enable this setting for the specific project only by same creating a .jshintrc file in your project's root and adding { "esversion": 6}

提交回复
热议问题