File tree 3 files changed +207
-91
lines changed
3 files changed +207
-91
lines changed Original file line number Diff line number Diff line change 12
12
const WebpackConfig = require ( '../WebpackConfig' ) ; //eslint-disable-line no-unused-vars
13
13
const loaderFeatures = require ( '../features' ) ;
14
14
const applyOptionsCallback = require ( '../utils/apply-options-callback' ) ;
15
+ const logger = require ( '../logger' ) ;
15
16
16
17
function isMissingConfigError ( e ) {
17
18
if ( ! e . message || ! e . message . includes ( 'No ESLint configuration found' ) ) {
@@ -35,7 +36,13 @@ module.exports = {
35
36
} ) ;
36
37
37
38
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
+ }
39
46
} catch ( e ) {
40
47
if ( isMissingConfigError ( e ) ) {
41
48
const chalk = require ( 'chalk' ) . default ;
Original file line number Diff line number Diff line change 66
66
"chai-fs" : " ^1.0.0" ,
67
67
"chai-subset" : " ^1.6.0" ,
68
68
"core-js" : " ^3.0.0" ,
69
- "eslint" : " ^5.15.2" ,
69
+ "eslint" : " ^5.15.2 || ^6.0.0 " ,
70
70
"eslint-loader" : " ^2.1.2" ,
71
71
"eslint-plugin-header" : " ^1.0.0" ,
72
72
"eslint-plugin-import" : " ^2.8.0" ,
You can’t perform that action at this time.
0 commit comments