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

feat: [M3-8947] - Improve linter rules for naming convention #11337

Conversation

pmakode-akamai
Copy link
Contributor

@pmakode-akamai pmakode-akamai commented Nov 27, 2024

Description 📝

Follow up to the PR: #11330

Previously added camelcase rule in api-v4 and manager was causing thousands of warnings due to APIv4 property names in our codebase.

This PR Improves linter rules for naming convention - enforces rules for variables, functions, typeLike (class, enum, interface, typeAlias, typeParameter), and parameters, without the need to create any custom rules.

Changes 🔄

  • Enforce new linter rules (in api-v4 and manager package) for:
    • variable
    • function
    • parameter
    • typeLike

Target release date 🗓️

N/A

How to test 🧪

  • Ensure everything builds properly
  • Test rule against APIv4 package, factories, and mock data to ensure no false positives
  • Ensure any violations of the new rules trigger warnings/errors in your IDE
  • Ensure no related warnings due to APIv4 property names in our codebase
Author Checklists

As an Author, to speed up the review process, I considered 🤔

👀 Doing a self review
❔ Our contribution guidelines
🤏 Splitting feature into small PRs
➕ Adding a changeset
🧪 Providing/improving test coverage
🔐 Removing all sensitive information from the code and PR description
🚩 Using a feature flag to protect the release
👣 Providing comprehensive reproduction steps
📑 Providing or updating our documentation
🕛 Scheduling a pair reviewing session
📱 Providing mobile support
♿ Providing accessibility support


  • I have read and considered all applicable items listed above.

As an Author, before moving this PR from Draft to Open, I confirmed ✅

  • All unit tests are passing
  • TypeScript compilation succeeded without errors
  • Code passes all linting rules

@pmakode-akamai pmakode-akamai marked this pull request as ready for review November 27, 2024 13:31
@pmakode-akamai pmakode-akamai requested a review from a team as a code owner November 27, 2024 13:31
@pmakode-akamai pmakode-akamai requested review from hana-akamai and cpathipa and removed request for a team November 27, 2024 13:31
@linode-gh-bot
Copy link
Collaborator

Cloud Manager UI test results

🎉 455 passing tests on test run #3 ↗︎

❌ Failing✅ Passing↪️ Skipped🕐 Duration
0 Failing455 Passing2 Skipped93m 23s

Copy link
Contributor

@jaalah-akamai jaalah-akamai left a comment

Choose a reason for hiding this comment

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

This seems to be working much better for me

@jaalah-akamai jaalah-akamai added the Add'tl Approval Needed Waiting on another approval! label Nov 27, 2024
@cpathipa cpathipa requested review from hana-akamai and removed request for hana-akamai December 2, 2024 09:30
Copy link
Contributor

@cpathipa cpathipa left a comment

Choose a reason for hiding this comment

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

Naming convention linter rules are working as expected.

image

@pmakode-akamai pmakode-akamai added Approved Multiple approvals and ready to merge! and removed Add'tl Approval Needed Waiting on another approval! Ready for Review labels Dec 2, 2024
@pmakode-akamai pmakode-akamai merged commit 8611b57 into linode:develop Dec 2, 2024
23 checks passed
Copy link

cypress bot commented Dec 2, 2024

Cloud Manager E2E    Run #6901

Run Properties:  status check failed Failed #6901  •  git commit 8611b577d0: feat: [M3-8947] - Improve linter rules for naming convention (#11337)
Project Cloud Manager E2E
Branch Review develop
Run status status check failed Failed #6901
Run duration 33m 24s
Commit git commit 8611b577d0: feat: [M3-8947] - Improve linter rules for naming convention (#11337)
Committer Purvesh Makode
View all properties for this run ↗︎

Test results
Tests that failed  Failures 1
Tests that were flaky  Flaky 5
Tests that did not run due to a developer annotating a test with .skip  Pending 2
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 461
View all changes introduced in this branch ↗︎

Tests for review

Failed  cypress/e2e/core/linodes/rebuild-linode.spec.ts • 1 failed test

View Output Video

Test Artifacts
rebuild linode > rebuilds a linode from Account StackScript Screenshots Video
Flakiness  linodes/rebuild-linode.spec.ts • 2 flaky tests

View Output Video

Test Artifacts
rebuild linode > rebuilds a linode from Image Screenshots Video
rebuild linode > rebuilds a linode from Community StackScript Screenshots Video
Flakiness  linodes/clone-linode.spec.ts • 1 flaky test

View Output Video

Test Artifacts
clone linode > can clone a Linode from Linode details page Screenshots Video
Flakiness  linodes/update-linode-labels.spec.ts • 1 flaky test

View Output Video

Test Artifacts
update linode label > updates a linode label from the "Settings" tab Screenshots Video
Flakiness  account/service-transfer.spec.ts • 1 flaky test

View Output Video

Test Artifacts
Account service transfers > can initiate and cancel a service transfer Screenshots Video

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved Multiple approvals and ready to merge!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants