How to configure package.json to run eslint script

后端 未结 4 1192
借酒劲吻你
借酒劲吻你 2021-02-01 00:10

So I am using eslint as a linter for my react project and I would like it to check all of my .js files.

I am able to do this through the script:

<         


        
4条回答
  •  攒了一身酷
    2021-02-01 00:50

    I'm not sure if the accepted answer is outdated, but by looking at the docs,

    By default, it uses .js as the only file extension.

    Also, according to a member's comment on the project's Github, using . equals running in all subdirectories. It seems to me that running eslint . should suffice (though it doesn't cover the new ES Module .mjs files).

提交回复
热议问题