Skip to content

[Refactor] Standardize ReScript Naming Conventions #362

@manideepk90

Description

@manideepk90

Ensure all ReScript modules follow community naming conventions:

  • PascalCase for modules and types
  • camelCase for functions and variables
  • SCREAMING_SNAKE_CASE for constants

Current violations found:

  1. Type names using lowercase (should be PascalCase)

File: src/types/LoggerTypes.res:1
type logType = DEBUG | INFO | ERROR | WARNING
Should be:
type LogType = DEBUG | INFO | ERROR | WARNING

File: src/types/LoggerTypes.res:2
type logCategory = API | USER_ERROR | USER_EVENT | MERCHANT_EVENT
Should be:
type LogCategory = API | USER_ERROR | USER_EVENT | MERCHANT_EVENT

File: src/types/LoggerTypes.res:3
type logComponent = MOBILE
Should be:
type LogComponent = MOBILE

  1. Functions using snake_case (should be camelCase)

File: src/hooks/ThemebasedStyle.res
let status_color = {
Should be:
let statusColor = {

File: src/icons/Icon.res
let google_pay = <svg...
Should be:
let googlePay = <svg...

Files to check and fix:

  • src/types/LoggerTypes.res - Multiple type names
  • src/types/SamsungPayType.res - Type names like payment3DS,
    addressType
  • src/hooks/ThemebasedStyle.res - Function status_color
  • src/icons/Icon.res - Function google_pay

Acceptance Criteria:

  • All type names use PascalCase
  • All function and variable names use camelCase
  • Constants use SCREAMING_SNAKE_CASE (if any exist)
  • Code compiles successfully after changes
  • All tests pass
  • NO flows should be effected

Metadata

Metadata

Assignees

Labels

good first issueGood for newcomershacktoberfestIssues that are up for grabs for hacktoberfest participants

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions