Skip to content

Fix error with eslint due to variable initialization before checking, eslint was set #1154

@wesoledi

Description

@wesoledi

In some projects, with symfony 6 with encore used, to work with sass+vue, without external eslint configuration, there may be error while building final dist/build files. The reason was, it could not init eslint, even it was disabled in webpack configuration (or more precisly: not enabled). Webpack-encore still wanted to run it, before checking if "useEslintPlugin" was set.

To fix this, I moved variable initialization to the block, after checking this variable, because it is used only inside if-block anyway. So there is no need to init these before.

Here is my compare: bc34f91

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions