Skip to content

Change introduced in #732 is causing issues when eslintrc location is customized #789

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
rrajkomar opened this issue Jun 12, 2020 · 1 comment

Comments

@rrajkomar
Copy link

rrajkomar commented Jun 12, 2020

Prior to the change intordiced in #732 (ESLint 5), one could pass an options array parameters (configFile) to configure the eslintrc file location.

With this change, that configuration (moved from enableEslintLoader to configureLoaderRule in the process) does not work anymore unless another eslintrc file is located at the default location.

This is because this blocks throws an Error :

try {
            if (typeof engine.getConfigForFile === 'function') {
                logger.debug('Checking ESLint 6+ configuration...');
                engine.getConfigForFile('webpack.config.js');
            } else {
                logger.debug('Checking ESLint 5 configuration...');
                engine.config.getConfigHierarchy(webpackConfig.runtimeConfig.context);
            }
        } catch (e) {
            if (isMissingConfigError(e)) {
[...]

before the custom configuration is applied:

return applyOptionsCallback(webpackConfig.eslintLoaderOptionsCallback, eslintLoaderOptions);

Can the custom configuration not be applied before said test ?

@Kocal
Copy link
Member

Kocal commented Aug 30, 2024

Closing, as ESLint integration has been removed in #1309 for the next major version of Encore (5).

@Kocal Kocal closed this as completed Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants