File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
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 ;
You can’t perform that action at this time.
0 commit comments