File tree Expand file tree Collapse file tree 3 files changed +207
-91
lines changed Expand file tree Collapse file tree 3 files changed +207
-91
lines changed Original file line number Diff line number Diff line change 1212const WebpackConfig = require ( '../WebpackConfig' ) ; //eslint-disable-line no-unused-vars
1313const loaderFeatures = require ( '../features' ) ;
1414const applyOptionsCallback = require ( '../utils/apply-options-callback' ) ;
15+ const logger = require ( '../logger' ) ;
1516
1617function isMissingConfigError ( e ) {
1718 if ( ! e . message || ! e . message . includes ( 'No ESLint configuration found' ) ) {
@@ -35,7 +36,13 @@ module.exports = {
3536 } ) ;
3637
3738 try {
38- engine . config . getConfigHierarchy ( webpackConfig . runtimeConfig . context ) ;
39+ if ( typeof engine . getConfigForFile === 'function' ) {
40+ logger . debug ( 'Checking ESLint 6+ configuration...' ) ;
41+ engine . getConfigForFile ( 'webpack.config.js' ) ;
42+ } else {
43+ logger . debug ( 'Checking ESLint 5 configuration...' ) ;
44+ engine . config . getConfigHierarchy ( webpackConfig . runtimeConfig . context ) ;
45+ }
3946 } catch ( e ) {
4047 if ( isMissingConfigError ( e ) ) {
4148 const chalk = require ( 'chalk' ) . default ;
Original file line number Diff line number Diff line change 6666 "chai-fs" : " ^1.0.0" ,
6767 "chai-subset" : " ^1.6.0" ,
6868 "core-js" : " ^3.0.0" ,
69- "eslint" : " ^5.15.2" ,
69+ "eslint" : " ^5.15.2 || ^6.0.0 " ,
7070 "eslint-loader" : " ^2.1.2" ,
7171 "eslint-plugin-header" : " ^1.0.0" ,
7272 "eslint-plugin-import" : " ^2.8.0" ,
You can’t perform that action at this time.
0 commit comments