Skip to content

Commit b6e6b17

Browse files
committed
bug #1175 Delay force sync until needed (wesoledi, weaverryan)
This PR was merged into the main branch. Discussion ---------- Delay force sync until needed Hi! This finishes #1155. Cheers! Commits ------- ca95954 moving most require back to the top 530eed5 2022-08-15 - move const def under main condition - do not init if not nessesary
2 parents bf51541 + ca95954 commit b6e6b17

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/plugins/eslint.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
'use strict';
1111

1212
const forceSync = require('sync-rpc');
13-
const hasEslintConfiguration = forceSync(require.resolve('../utils/has-eslint-configuration'));
1413
const WebpackConfig = require('../WebpackConfig'); //eslint-disable-line no-unused-vars
1514
const applyOptionsCallback = require('../utils/apply-options-callback');
1615
const pluginFeatures = require('../features');
@@ -25,6 +24,8 @@ const babelLoaderUtil = require('../loaders/babel');
2524
*/
2625
module.exports = function(plugins, webpackConfig) {
2726
if (webpackConfig.useEslintPlugin) {
27+
const hasEslintConfiguration = forceSync(require.resolve('../utils/has-eslint-configuration'));
28+
2829
pluginFeatures.ensurePackagesExistAndAreCorrectVersion('eslint_plugin');
2930

3031
if (!hasEslintConfiguration(webpackConfig)) {

0 commit comments

Comments
 (0)