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

#10005 update babel configuration #10006

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

offtherailz
Copy link
Member

@offtherailz offtherailz commented Mar 1, 2024

Description

Note: in order to make this PR build correctly, we need to publish eslint node lib. I didn't do it yet.

As explained in 10005 updating babel needs to update eslint too, and this causes several lint error because of old bugs of eslint not revealing the failing parts.

Here I attach the full set of errors.

eslint-errors.txt

The errors can be divided in 2 macro-blocks:

  • PropTypes used but not defined (>300 errors)
  • Other errors (mostly save-state in componentDidMount )

For this reason I propose the following:

  • Modify the eslint rules to :
    • remove the rule that fixes prop-types
    • Remove error of order in class components methods (we are not creating new class components anymore)
    • Disable errors for the remaining lines via comment

We can evaluate to re-introduce the rule of proptypes later and fix the pending eslint errors disabled, but this way we guarantee:

  • Update and future updatability
  • functionalities to be preserved
  • future check of rules that was previously fixes.

Please check if the PR fulfills these requirements

What kind of change does this PR introduce? (check one with "x", remove the others)

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe: Dependency update

Issue

What is the current behavior?

Fix #10005

What is the new behavior?
Babel updated. Eslint rule catch now finds errors that was not visible before.

Breaking change

Does this PR introduce a breaking change? (check one with "x", remove the other)

  • Yes, and I documented them in migration notes
  • No

Other useful information

I also fixes some require/exports to avoid some lint errors too.

I noticed babel plugin plugin-proposal-class-properties is deprecated and we should use plugin-transform-class-properties instead.
I didn't do this update in this PR, concentrating the effort to a working solution.

@offtherailz offtherailz added this to the 2024.01.00 milestone Mar 1, 2024
@offtherailz offtherailz self-assigned this Mar 1, 2024
@offtherailz offtherailz marked this pull request as draft March 1, 2024 10:08
@tdipisa tdipisa modified the milestones: 2024.01.00, 2024.02.00 Mar 4, 2024
@tdipisa
Copy link
Member

tdipisa commented Mar 4, 2024

@offtherailz we are too close to 2024.01.00 so the plan would be to include this to the next major 2024.02. Let's update this PR and merge on master early after 2024.01 is delivered

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update babel and eslint
2 participants