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

chore: upgrade babel and webpack eslint dependencies #91

Conversation

emyarod
Copy link
Member

@emyarod emyarod commented Feb 1, 2022

Related Ticket(s)

#52

the now deprecated `eslint-loader` errors out when starting the webpack dev server with `eslint` v8.x
Html Webpack Plugin:
  Error: Child compilation failed:
  Module build failed (from ./node_modules/eslint-loader/dist/cjs.js):
  TypeError: Cannot read property 'getFormatter' of undefined
  
  - getOptions.js:52 getFormatter
    [carbon-for-ibm-dotcom-web-components-template]/[eslint-loader]/dist/getOptions    .js:52:20
  
  - getOptions.js:30 getOptions
    [carbon-for-ibm-dotcom-web-components-template]/[eslint-loader]/dist/getOptions    .js:30:23
  
  
  - TypeError: Cannot read property 'getFormatter' of undefined
  
  - ModuleBuildError: Module build failed (from ./node_modules/eslint-loader/dist/c    js.js):
  
  - TypeError: Cannot read property 'getFormatter' of undefined
  
  - getOptions.js:52 getFormatter
    [carbon-for-ibm-dotcom-web-components-template]/[eslint-loader]/dist/getOptions    .js:52:20
  
  - getOptions.js:30 getOptions
    [carbon-for-ibm-dotcom-web-components-template]/[eslint-loader]/dist/getOptions    .js:30:23
  
  - index.js:17 Object.loader
    [carbon-for-ibm-dotcom-web-components-template]/[eslint-loader]/dist/index.js:1    7:43
  
  - NormalModule.js:316 
    [carbon-for-ibm-dotcom-web-components-template]/[webpack]/lib/NormalModule.js:3    16:20
  
  - LoaderRunner.js:367 
    [carbon-for-ibm-dotcom-web-components-template]/[loader-runner]/lib/LoaderRunne    r.js:367:11
  
  - LoaderRunner.js:233 
    [carbon-for-ibm-dotcom-web-components-template]/[loader-runner]/lib/LoaderRunne    r.js:233:18
  
  - LoaderRunner.js:143 runSyncOrAsync
    [carbon-for-ibm-dotcom-web-components-template]/[loader-runner]/lib/LoaderRunne    r.js:143:3
  
  - LoaderRunner.js:232 iterateNormalLoaders
    [carbon-for-ibm-dotcom-web-components-template]/[loader-runner]/lib/LoaderRunne    r.js:232:2
  
  - LoaderRunner.js:205 Array.
    [carbon-for-ibm-dotcom-web-components-template]/[loader-runner]/lib/LoaderRunne    r.js:205:4
  
  - CachedInputFileSystem.js:55 Storage.finished
    [carbon-for-ibm-dotcom-web-components-template]/[enhanced-resolve]/lib/CachedIn    putFileSystem.js:55:16
  
  - CachedInputFileSystem.js:91 
    [carbon-for-ibm-dotcom-web-components-template]/[enhanced-resolve]/lib/CachedIn    putFileSystem.js:91:9
  
  - graceful-fs.js:123 
    [carbon-for-ibm-dotcom-web-components-template]/[graceful-fs]/graceful-fs.js:12    3:16
  
  - read_file_context.js:71 FSReqCallback.readFileAfterClose [as oncomplete]
    internal/fs/read_file_context.js:71:3
  
  - child-compiler.js:131 
    [carbon-for-ibm-dotcom-web-components-template]/[html-webpack-plugin]/lib/child    -compiler.js:131:18
  
  - Compiler.js:343 
    [carbon-for-ibm-dotcom-web-components-template]/[webpack]/lib/Compiler.js:343:1    1
  
  - Compiler.js:681 
    [carbon-for-ibm-dotcom-web-components-template]/[webpack]/lib/Compiler.js:681:1    5
  
  
  - Hook.js:154 AsyncSeriesHook.lazyCompileHook
    [carbon-for-ibm-dotcom-web-components-template]/[tapable]/lib/Hook.js:154:20
  
  - Compiler.js:678 
    [carbon-for-ibm-dotcom-web-components-template]/[webpack]/lib/Compiler.js:678:3    1
  
  
  - Hook.js:154 AsyncSeriesHook.lazyCompileHook
    [carbon-for-ibm-dotcom-web-components-template]/[tapable]/lib/Hook.js:154:20
  
  - Compilation.js:1423 
    [carbon-for-ibm-dotcom-web-components-template]/[webpack]/lib/Compilation.js:14    23:35
  
  
  - Hook.js:154 AsyncSeriesHook.lazyCompileHook
    [carbon-for-ibm-dotcom-web-components-template]/[tapable]/lib/Hook.js:154:20
  
  - Compilation.js:1414 
    [carbon-for-ibm-dotcom-web-components-template]/[webpack]/lib/Compilation.js:14    14:32
  
  
  - Hook.js:154 AsyncSeriesHook.lazyCompileHook
    [carbon-for-ibm-dotcom-web-components-template]/[tapable]/lib/Hook.js:154:20
  
  - Compilation.js:1409 
    [carbon-for-ibm-dotcom-web-components-template]/[webpack]/lib/Compilation.js:14    09:36

Description

This PR upgrades eslint related dependencies for webpack and babel so that the eslint version can remain on v8.x without breaking the dev server

Changelog

Changed

  • replace deprecated eslint-loader with eslint-webpack-plugin
  • replace deprecated babel-eslint-parser with @babel/eslint-parser

@emyarod emyarod requested a review from a team as a code owner February 1, 2022 22:56
@emyarod emyarod changed the title chore: upgrade babel and eslint dependencies chore: upgrade babel and webpack eslint dependencies Feb 1, 2022
@emyarod emyarod self-assigned this Feb 1, 2022
@ibmdotcom-bot
Copy link
Contributor

Copy link
Member

@kennylam kennylam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks @emyarod!

Copy link
Contributor

@IgnacioBecerra IgnacioBecerra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@emyarod Thanks!

@emyarod emyarod merged commit 3f2d9da into carbon-design-system:main Feb 1, 2022
@emyarod emyarod deleted the chore/upgrade-babel-and-eslint-dependencies branch February 1, 2022 23:14
kodiakhq bot pushed a commit to carbon-design-system/carbon-for-ibm-dotcom-web-components-test that referenced this pull request Feb 3, 2022
### Related Ticket(s)

#109

### Description

Replace `eslint` dependencies with latest. Based on changes made in carbon-design-system/carbon-for-ibm-dotcom-web-components-template#91.

### Changelog

**Changed**

- replace `eslint-loader` with `eslint-webpack-plugin`
- replace `babel-eslint` parser with `@babel/eslint-parser`
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

Successfully merging this pull request may close these issues.

4 participants