How to configure package.json to run eslint script

后端 未结 4 1194
借酒劲吻你
借酒劲吻你 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 01:10

    eslint "**/*.js" to run on all js files in all the folders recursively (in the current folder)

    You can also do: AnyFolder/**/*.js

    And to ignore a folder: eslint "**/*.js" --ignore-pattern node_modules/

    Know more at eslint/command-line-interface

提交回复
热议问题