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

JSON file typings #224

Merged
merged 2 commits into from
Sep 5, 2024
Merged

Conversation

n-d-r-d-g
Copy link
Member

Hi @MrSunshyne,

@k3ii assisted me in generating a .ts file for featured-issues.json so we can extract the literal types from it.

What do you think about converting all the other .json files in the same directory to .ts as well?

P.S. There are some .js files as well in the directory. I think we need to convert them to .json & .ts as well.

@MrSunshyne
Copy link
Member

Yes, anything .js can be .json + .ts

would improve the DX a great deal!

you can test if this break anything by building the website using pnpm nuxt generate

@n-d-r-d-g
Copy link
Member Author

@MrSunshyne alright, @k3ii thought of splitting .json & .ts files in separate directories and creating a script to convert .json to .ts.

@k3ii All .json files in the data directory contain arrays, except for photos-raw.json. This one needs to be converted slightly differently. We can look into this together.

@k3ii
Copy link
Contributor

k3ii commented Sep 5, 2024

@MrSunshyne alright, @k3ii thought of splitting .json & .ts files in separate directories and creating a script to convert .json to .ts.

@k3ii All .json files in the data directory contain arrays, except for photos-raw.json. This one needs to be converted slightly differently. We can look into this together.

@n-d-r-d-g do we do the work in this PR or we get this one merge and work on another PR?

@n-d-r-d-g
Copy link
Member Author

@MrSunshyne alright, @k3ii thought of splitting .json & .ts files in separate directories and creating a script to convert .json to .ts.
@k3ii All .json files in the data directory contain arrays, except for photos-raw.json. This one needs to be converted slightly differently. We can look into this together.

@n-d-r-d-g do we do the work in this PR or we get this one merge and work on another PR?

@k3ii Yeah maybe it's a better idea to merge this one then. Let's work on another PR for the other changes.

@MrSunshyne could you please merge this one? We'll get rid of the unmaintainable code in the next PR.

@MrSunshyne MrSunshyne merged commit 088a0b4 into Front-End-Coders-Mauritius:main Sep 5, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants