How to configure package.json to run eslint script

后端 未结 4 1265
借酒劲吻你
借酒劲吻你 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:52

    eslint . --ext .js to lint files with the .js extension.

    The . targets files in the current directory and all subdirectories.

    To include other file extensions, eslint . --ext .js,.jsx or eslint . --ext .js --ext .jsx.

    The eslint documentation covers this option.

提交回复
热议问题