“No ESLint configuration found” error

后端 未结 11 2215
故里飘歌
故里飘歌 2021-02-01 16:03

Recently, we\'ve upgraded to ESLint 3.0.0 and started to receive the following message running the grunt eslint task:

> $ grunt eslint
Running \"         


        
11条回答
  •  温柔的废话
    2021-02-01 16:16

    Just follow the steps
    1.create eslint config file name eslintrc.json
    2.place the code as given below

    gulp.src(jsFiles)
            // eslint() attaches the lint output to the "eslint" property
            // of the file object so it can be used by other modules.
            .pipe(eslint({configFile: 'eslintrc.json'}))
            // eslint.format() outputs the lint results to the console.
            // Alternatively use eslint.formatEach() (see Docs).
            .pipe(eslint.format())
            // To have the process exit with an error code (1) on
            // lint error, return the stream and pipe to failAfterError last.
            .pipe(eslint.failAfterError());
    

提交回复
热议问题