Skip to content

chore: Enable and lint-fix TiCS CS rules MAASENG-4719 #5689

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

Conversation

abuyukyi101198
Copy link
Contributor

@abuyukyi101198 abuyukyi101198 commented Apr 24, 2025

Done

  • Added a "lint-fix" script in package.json
  • Moved workflow to a Canonical-hosted runner
  • Added a file list generation step
  • Fixed the following rule violations:
    • array-type
    • consistent-indexed-object-style
    • dot-notation
    • no-duplicate-type-constituents
    • no-explicit-any
    • no-for-in-array
    • no-import-type-side-effects
    • no-unnecessary-type-arguments
    • no-unused-expressions
    • prefer-includes
    • prefer-reduce-type-parameter
    • prefer-regexp-exec
    • restrict-plus-operands
    • sort-type-constituents
    • no-confusing-void-expression
    • (partial) explicit-module-boundary-types

Fixes

Closes:

#5679

Resolves:

MAASENG-4719
MAASENG-4550

Works for:

MAASENG-4548

Notes

  1. Due to the minor changes in many files, reviewing this PR commit-by-commit changes may be easier.
  2. TiCS workflow cannot be run for pull requests in the current security configuration, as secrets are exposed when run on forked repositories. There are ways around it, like requiring contributor approval to run the workflow in the main repository, but they should be discussed.

@webteam-app
Copy link

@abuyukyi101198 abuyukyi101198 force-pushed the chore-tics-coding-standards-MAASENG-4719 branch from 1088213 to dbf8067 Compare April 24, 2025 11:22
# Conflicts:
#	src/app/Routes.test.tsx
#	src/app/base/components/AppSideNavigation/AppSideNavigation.test.tsx
#	src/app/base/components/TagSelector/TagSelector.tsx
#	src/app/base/hooks/base.test.tsx
#	src/app/controllers/components/ControllerForms/ControllerForms.tsx
#	src/app/controllers/views/ControllerList/ControllerList.test.tsx
#	src/app/devices/components/DeviceHeaderForms/DeviceHeaderForms.tsx
#	src/app/devices/components/DeviceNetworkForms/DeviceNetworkForms.tsx
#	src/app/domains/components/DomainForm/DomainForm.tsx
#	src/app/kvm/views/LXDClusterDetails/LXDClusterDetailsRedirect/LXDClusterDetailsRedirect.test.tsx
#	src/app/machines/components/MachineForms/MachineForms.tsx
#	src/app/machines/views/Machines.test.tsx
#	src/app/preferences/views/SSLKeys/AddSSLKey/AddSSLKey.tsx
#	src/app/preferences/views/SSLKeys/DeleteSSLKey/DeleteSSLKey.tsx
#	src/app/subnets/views/SubnetDetails/SubnetActionForms/components/DeleteSubnet/DeleteSubnet.test.tsx
#	src/app/tags/views/TagUpdate/TagUpdate.test.tsx
@abuyukyi101198 abuyukyi101198 marked this pull request as ready for review April 28, 2025 12:20
Copy link
Contributor

@ndv99 ndv99 left a comment

Choose a reason for hiding this comment

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

LGTM as long as you leave a comment with your explanation for the commented-out rules 👍

@abuyukyi101198 abuyukyi101198 merged commit b6c7ae5 into canonical:main Apr 29, 2025
8 checks passed
@abuyukyi101198 abuyukyi101198 deleted the chore-tics-coding-standards-MAASENG-4719 branch April 29, 2025 15:12
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.

3 participants