MartinP460 / react-denmark-map

Customizable plug-and-play map of Denmark for visual presentation🗺️
https://react-denmark-map.vercel.app/
MIT License
21 stars 4 forks source link

[V2] Exclusively use camel case in `Area` type #18

Closed MartinP460 closed 8 months ago

MartinP460 commented 11 months ago

⚠️ Important: This issue is part of the version 2.0 release. Make sure to read the v2 contributing guidelines. Checkout from the v2 branch when creating the branch and open a PR towards this branch. ⚠️

Description

The fields in the different Area types use snake case (snake_case):

export type Area = {
  id: string
  name: string
  asciiName: string
  display_name: string // here
  d: string
  en_term?: string // here
  region?: Omit<RegionType, 'd'>
  code?: string
  altD?: string
}

This is inconsistent and so we would like to use camel case (camelCase) instead.

Proposed solution

Rename the fields in Area to use camelCase and also correct these fields in the areas/[area]/data.ts files that contain data on each visualization of the map. CMD+D and/or "search-and-replace" will be your best friend here because some of the data arrays are quite long. Also update the documentation (README.md).