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

Add module alias for cleaner imports #825

Merged

Conversation

circlecube
Copy link
Member

Proposed changes

This adds an alias and updates import statements for any module-based components or methods.

Type of Change

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)

Checklist

  • I have read the CONTRIBUTING doc
  • Linting and tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

@circlecube circlecube self-assigned this Nov 29, 2023
Copy link

replay-io bot commented Nov 29, 2023

bluehost/bluehost-wordpress-plugin

StatusComplete ↗︎
Commit3a41562
Results
1 Failed
  • tests/cypress/integration/help.cy.js
28 Passed
  • tests/cypress/integration/home.cy.js
  • tests/cypress/integration/navigation.cy.js
  • tests/cypress/integration/settings.cy.js
  • tests/cypress/integration/version-check.cy.js
  • vendor/newfold-labs/wp-module-coming-soon/tests/cypress/integration/coming-soon.cy.js
  • vendor/newfold-labs/wp-module-ctb/tests/cypress/integration/ctb.cy.js
  • vendor/newfold-labs/wp-module-deactivation/tests/cypress/integration/deactivation-survey.cy.js
  • vendor/newfold-labs/wp-module-global-ctb/tests/cypress/integration/global-ctb.cy.js
  • vendor/newfold-labs/wp-module-marketplace/tests/cypress/integration/marketplace.cy.js
  • vendor/newfold-labs/wp-module-marketplace/tests/cypress/integration/premium-plugins-tab.cy.js
  • vendor/newfold-labs/wp-module-notifications/tests/cypress/integration/notifications.cy.js
  • vendor/newfold-labs/wp-module-onboarding/tests/cypress/integration/1-Initial-steps/branding.cy.js
  • vendor/newfold-labs/wp-module-onboarding/tests/cypress/integration/1-Initial-steps/whats-next.cy.js
  • vendor/newfold-labs/wp-module-onboarding/tests/cypress/integration/2-general-onboarding-flow/get-started-experience.cy.js
  • vendor/newfold-labs/wp-module-onboarding/tests/cypress/integration/2-general-onboarding-flow/get-started-welcome.cy.js
  • vendor/newfold-labs/wp-module-onboarding/tests/cypress/integration/2-general-onboarding-flow/sitetype-primary.cy.js
  • vendor/newfold-labs/wp-module-onboarding/tests/cypress/integration/2-general-onboarding-flow/sitetype-secondary.cy.js
  • vendor/newfold-labs/wp-module-onboarding/tests/cypress/integration/2-general-onboarding-flow/top-priority.cy.js
  • vendor/newfold-labs/wp-module-onboarding/tests/cypress/integration/3-ecommerce-onboarding-flow/address.cy.js
  • vendor/newfold-labs/wp-module-onboarding/tests/cypress/integration/3-ecommerce-onboarding-flow/get-started-experience.cy.js
  • vendor/newfold-labs/wp-module-onboarding/tests/cypress/integration/3-ecommerce-onboarding-flow/get-started-welcome.cy.js
  • vendor/newfold-labs/wp-module-onboarding/tests/cypress/integration/3-ecommerce-onboarding-flow/products.cy.js
  • vendor/newfold-labs/wp-module-onboarding/tests/cypress/integration/3-ecommerce-onboarding-flow/site-features.cy.js
  • vendor/newfold-labs/wp-module-onboarding/tests/cypress/integration/3-ecommerce-onboarding-flow/sitetype-primary.cy.js
  • vendor/newfold-labs/wp-module-onboarding/tests/cypress/integration/3-ecommerce-onboarding-flow/sitetype-secondary.cy.js
  • vendor/newfold-labs/wp-module-onboarding/tests/cypress/integration/sidebar.cy.js
  • vendor/newfold-labs/wp-module-performance/tests/cypress/integration/performance.cy.js
  • vendor/newfold-labs/wp-module-staging/tests/cypress/integration/staging.cy.js

@wpalani
Copy link
Member

wpalani commented Nov 29, 2023

I wonder if opening this PR on the Clean Up branch is better: https://github.com/bluehost/bluehost-wordpress-plugin/tree/update/react-app-cleanup since we are cleaning up the module imports there. Also, this might require some webpack/eslint config.

@wpscholar
Copy link
Member

@circlecube Personally, I'm a fan of the @modules syntax for a path alias. It makes it more obvious that it is an alias and less like someone accidentally capitalizing a part of the path.

@circlecube circlecube changed the base branch from develop to update/react-app-cleanup November 30, 2023 20:33
…eaner-imports

* update/react-app-cleanup:
  Fix minor ESLint issue after PR merge
  Translate strings
  Fix linting
  Update console ascii art
  Update eslint.yml
  Remove example page
  Add php dependencies to eslint action
  Move handlePageLoad function to react hook
  ESLint action
  Fix webinar banner component lint issue
  Other lint fixes
  Add `eslint` and lint js files

# Conflicts:
#	src/app/data/routes.js
#	webpack.config.js
Copy link

cypress bot commented Nov 30, 2023

1 flaky test on run #5477 ↗︎

0 237 57 0 Flakiness 1

Details:

lint update and add map for @modules alias
Project: Bluehost Brand Plugin Commit: 9ec77a5fcb
Status: Passed Duration: 18:26 💡
Started: Nov 30, 2023 9:00 PM Ended: Nov 30, 2023 9:18 PM
Flakiness  tests/cypress/integration/help.cy.js • 1 flaky test

View Output Video

Test Artifacts
Help Page > Is Accessible Screenshots Video

Review all test suite changes for PR #825 ↗︎

@wpscholar wpscholar merged commit 1e0d271 into update/react-app-cleanup Nov 30, 2023
3 of 4 checks passed
@wpalani wpalani mentioned this pull request Nov 30, 2023
8 tasks
@wpscholar wpscholar deleted the add/modules-alias-for-cleaner-imports branch November 30, 2023 21:56
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