Skip to content
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

Support eslint 8.x #1067

Closed
Neirda24 opened this issue Dec 16, 2021 · 2 comments
Closed

Support eslint 8.x #1067

Neirda24 opened this issue Dec 16, 2021 · 2 comments

Comments

@Neirda24
Copy link

Hi!

I'm trying to use eslint >= 8 in order to have the private methods/properties syntax considered valid (using the babel configuration is such a pain to make it work...) Although it seems that the CLIEngine was removed and thus creating a bug when running encore.
See here for the post about CLIEngine: https://eslint.org/docs/8.0.0/user-guide/migrating-to-8.0.0#remove-cliengine
This is the error I get :

$ yarn watch
yarn run v1.22.15
$ encore dev --watch
Running webpack ...

  TypeError: eslint.CLIEngine is not a constructor

  - eslint.js:33 Object.getOptions
    [html]/[@symfony]/webpack-encore/lib/loaders/eslint.js:33:24

  - config-generator.js:408 ConfigGenerator.buildRulesConfig
    [html]/[@symfony]/webpack-encore/lib/config-generator.js:408:43

  - config-generator.js:79 ConfigGenerator.getWebpackConfig
    [html]/[@symfony]/webpack-encore/lib/config-generator.js:79:29

  - config-generator.js:626 module.exports
    [html]/[@symfony]/webpack-encore/lib/config-generator.js:626:22

  - index.js:1634 Encore.getWebpackConfig
    [html]/[@symfony]/webpack-encore/index.js:1634:16

  - EncoreProxy.js:51 Proxy.minDistance
    [html]/[@symfony]/webpack-encore/lib/EncoreProxy.js:51:53

  - webpack.config.js:31 Object.<anonymous>
    /var/www/html/webpack.config.js:31:25

  - loader:1101 Module._compile
    node:internal/modules/cjs/loader:1101:14

  - loader:1153 Object.Module._extensions..js
    node:internal/modules/cjs/loader:1153:10

  - loader:981 Module.load
    node:internal/modules/cjs/loader:981:32


error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Maybe there is something I'm missing? Thanks for your replies.

@Kocal
Copy link
Member

Kocal commented Dec 16, 2021

Hi, we need #985 to be merged for adding ESLint 8 support.

@Neirda24
Copy link
Author

Nice thank you @Kocal and good work !

@stof stof closed this as completed Jul 7, 2022
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

3 participants