Skip to content

Sonar: long-tail TypeScript smells (~600 issues across 50+ rules) #48

@sirdeggen

Description

@sirdeggen

Tracking issue for #38.

Remaining low-volume rules (each <30 issues), totaling ~600 across the repo. Mostly minor stylistic / consistency issues.

Examples:

  • typescript:S6551 (16) — Should not stringify primitives implicitly
  • typescript:S7723 (11) — Use Object.hasOwn over Object.prototype.hasOwnProperty.call
  • typescript:S4623 (8) — Don't pass undefined to optional parameters
  • typescript:S4782 (7) — Property type unions should not contain undefined
  • typescript:S6647 (3) — Empty constructors are redundant
  • typescript:S3863 (4) — Modules should not have multiple imports
  • typescript:S2004 (3) — Functions should not be nested too deeply
  • typescript:S6353 (3) — Concise character class syntax
  • typescript:S3735 (2) — void should not be used as a value
  • typescript:S6819 (2) — Don't use semantic tags as div replacements
  • typescript:S6842 (2) — Use the role attribute appropriately
  • typescript:S3516 (2) — Functions returning the same value (already addressed locally)
  • docker:S7031 (1) — Specify a tag for base images
  • ... and ~40 more.

Suggested approach

Pull the full list from SonarCloud UI (Issues tab, group by rule) and assign per-rule to whoever's most familiar with the affected area. Most are 1-3 lines each.

Reproduce

curl -s -u "$SONAR_TOKEN:" \
  "https://sonarcloud.io/api/issues/search?componentKeys=bsv-blockchain_ts-stack&resolved=false&ps=500" \
  | jq -r '.issues[] | "\(.rule)\t\(.component):\(.line)\t\(.message)"'

Refs: #38

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions