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

Suggestions for revamping / updating the project #176

Open
danilofuchs opened this issue May 27, 2020 · 4 comments
Open

Suggestions for revamping / updating the project #176

danilofuchs opened this issue May 27, 2020 · 4 comments

Comments

@danilofuchs
Copy link
Contributor

danilofuchs commented May 27, 2020

While working on #175, I came across some thoughts.

This project is now 5 years old, and the last revision of jshint rules was 4 years ago. The JS ecosystem evolved a lot over these years and some new, powerful tooling, is available to us:

  • ES6 (ES2015). Although this project supports Node 8+, we don't make much use of amazing features, such as let, const, arrow functions, Array.prototype.map, etc. (chore: Drop Node 8, include Node 14 #178)
  • ESLint. Recently gained way more traction and has more rulesets than JSHint (chore: Add ESLint and Prettier configs #179)
  • Prettier. Currently, formatting rules are not well enforced by JSHint. Using a prettier config, we would be sure there are no unnecessary diffs in PRs (chore: Add ESLint and Prettier configs #179)
  • Typescript. The benefits are easy to see. This project is very simple and could be easily ported over
  • npm-run-all. We don't need to manage a Makefile if everything is easily manageable inside package.json

These are just suggestions of ways we can update this project for 2020 grade. I suggest we take a look at TSDX, as it bundles all of these configuration steps into a neat CLI.

I would love to contribute into evolving this project!

@michaelwittig
Copy link
Owner

First, thanks for your recent contribution @danilofuchs

I admit that I don't invest a lot of time in this project besides merging PRs. If you are interested in evolving this project I'm more than happy :)

  • ES6: I Agree. I think we can even drop node 8 support since it's no longer maintained?
  • ESLint: I agree.
  • Prettier: I haven't used prettier. I don't have any opinion here. Let's follow your lead.
  • Typescript: Same as Prettier.
  • npm-run-all: I agree.

@danilofuchs
Copy link
Contributor Author

Nice! I will write some PRs. Tell me what you think about it.

@KingDarBoja
Copy link
Contributor

I like the idea of switching into TypeScript, which isn't too hard with the current codebase.

Also the library could support ISO 3166-2, which handles countries subdivisions. These should come as well from official sources besides Wikipedia as I have done in a similar library for Nim lang.

Cheers!

@jcalfee
Copy link

jcalfee commented Apr 17, 2023

I apologize, I don't see it. What is the best way to import one language (like i18n-iso-countries/langs/en.json) using es6 and an import statement? I don't have a custom json loader. Seams like the package should export the language in a way that we can import it without having to pull out the json. Thank you..

.. and by loading only the language(s) that are required.

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

No branches or pull requests

4 participants