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

IBX-8365: Use babel to automatic refactor frontend code #7

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

GrabowskiM
Copy link

🎫 Issue IBX-8365

TODO:

  • Update readme (some config has changed, some parts aren't clear), but it can be done little later
  • Maybe some tests?

Description:

For QA:

Documentation:


module.exports = function (api) {
const modifyPlugins = getModifyMethod('plugins');

Copy link

Choose a reason for hiding this comment

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

Suggested change

@@ -0,0 +1,193 @@
# How to run
Copy link

Choose a reason for hiding this comment

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

doc-team proof read?

Copy link
Author

Choose a reason for hiding this comment

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

Not yet, as stated in PR's TODO it has to be adjusted a little, but I'd rather do it after CR of rest in case of you find some glaring error. :)

`--cwd` argument should point to directory where JS transform module is installed (for example `./vendor/ibexa/rector/js`).

## Customizable variables
### REMOVEEZ_CONFIG
Copy link

Choose a reason for hiding this comment

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

Suggested change
### REMOVEEZ_CONFIG
### REMOVE_EZ_CONFIG

?

```
{
"ibexa-rename-string-values": {
"ezform-error": "ibexaform-error",
Copy link

Choose a reason for hiding this comment

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

Suggested change
"ezform-error": "ibexaform-error",
"ezform-error": "ibexa-form-error",

?

Copy link
Author

Choose a reason for hiding this comment

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

Probably classes at both sides are wrong and there should be ez-form-error as well, whoops
Unless it's something that came from form-builder, need to recheck

traverse(moduleConfig, path.node.name, (oldValue, newValue) => {
const newIdentifier = path.node.name.replace(oldValue, newValue);

path.node.name = t.toIdentifier(newIdentifier);

Choose a reason for hiding this comment

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

maybe we should use a different variable name than just t?

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.

3 participants