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

Backport 'Use relative JS imports to allow overrides' to v0.28 #12265

Conversation

andreslucena
Copy link
Member

🎩 What? Why?

Backport #12211 to v0.28

♥️ Thank you!

* Add eslint-plugin-no-relative-import-paths package

* Add rootDir setting to eslint plugin to not add the module name in the path

The only problem is that this works in the decidim-core module, but in
others module we need to manually fix it.

As currently the automatic fix applies to:

- decidim-core: 40
- decidim-comments: 1
- rest of the modules: 0

I think we can live with this not-so-optimal solution.

* Run eslint with --fix

The command was

/home/apereira/Work/decidim/decidim/decidim-api/app/packs/entrypoints/decidim_api_graphiql.js
  82:3  error  ReactDOM.render is deprecated since React 18.0.0, use createRoot instead, see https://reactjs.org/link/switch-to-createroot  react/no-deprecated

✖ 1 problem (1 error, 0 warnings)

And ignoring the only offense from other module that isn't decidim-core.

* Manually fix relative import wrongly fixed by eslint

* Manually remove other relative imports not detected by the eslint plugin

* Rollback relative import in comments.component_for_testing.js
@andreslucena andreslucena added backport Pull Requests that are a backport for a fixed bug type: fix PRs that implement a fix for a bug labels Jan 8, 2024
@andreslucena
Copy link
Member Author

Only failing spec is the flaky from spec/system/admin_manages_organization_spec.rb, so this is ready to be reviewed

Copy link
Contributor

@alecslupu alecslupu left a comment

Choose a reason for hiding this comment

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

👍

@alecslupu alecslupu merged commit 9dea35e into release/0.28-stable Jan 11, 2024
106 of 108 checks passed
@alecslupu alecslupu deleted the backport/0.28/use-relative-js-imports-to-all-12211 branch January 11, 2024 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Pull Requests that are a backport for a fixed bug type: fix PRs that implement a fix for a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants