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

1.0.0 #72

Merged
merged 8 commits into from
Feb 24, 2018
Merged

1.0.0 #72

merged 8 commits into from
Feb 24, 2018

Conversation

karellm
Copy link
Member

@karellm karellm commented Jan 26, 2018

Roadmap for the release:

Roadmap post release:

Other

@immortal-tofu
Copy link
Contributor

Since you rewrite many things, take a look at prettier. It's a great tool to clean up code. Just add .prettierrc and use their binary or VSCode/Atom plugin.

@karellm
Copy link
Member Author

karellm commented Jan 31, 2018

@birdy- thanks I will definitely look at it. My code style changed quite a bit in the last 4 years, every time I had to maintain that code base was an humbling moment 😄 The new structure will hopefully make that a lot more pleasant.

As to opinionated code styles, they make sense until they don't and then get in the way. That said I definitely should configure a linter of sort for collaborators to know what rules to follow.

This was referenced Feb 2, 2018
@tkrotoff
Copy link

tkrotoff commented Feb 5, 2018

I have a suggestion: generating JS files (e.g locales/fr/translation.js). We would then have comments:

{
  // Extracted from file src/utils/Colors.js
  "Red": "Rouge",
  "Orange": "Orange",
  "Yellow": "Jaune",
  "Green": "Vert",
  "Blue": "Bleu",
  "Indigo": "Indigo",
  "Violet": "Violet",

  // Extracted from file src/utils/Languages.js
  "English": "Anglais",
  "French": "Français",

  // Extracted from file src/SignUpForm.js
  "First Name": "Prénom",
  "Last Name": "Nom de famille",
  "Email": "Email"
}

It's nice for the translator to have the "context", like gettext's PO files:

#: lib/error.c:116
msgid "Unknown system error"
msgstr "Error desconegut del sistema"

@karellm
Copy link
Member Author

karellm commented Feb 5, 2018

@tkrotoff My understanding is that #55 would address that. Is there something more you'd want?

@tkrotoff
Copy link

tkrotoff commented Feb 5, 2018

@karellm thx for the link. #55 proposes to use JSON, that's better than my proposition that relies on JS comments: you can then easily extract paths with a tool if needed.

@immortal-tofu
Copy link
Contributor

Prettier will format code with few option (max length of a line, simple/double quote, ...). It's great because you don't have to do it manually.
Prettier is not a eslint --fix because it won't change anything in your code. It means, if you use a let instead of a const or do some useless import, it won't change it.
So prettier is not "enough", you have to use a lint. Since airbnb-eslint is not "compatible" with prettier out of the box, you can extend your rules with airbnb and prettier to solve incompatibilities. https://github.com/prettier/prettier-eslint

If you need help or you want me to setup it, I can do it.

@karellm
Copy link
Member Author

karellm commented Feb 23, 2018

It's almost there. 1.0.0-beta1 is coming very soon!

@karellm karellm mentioned this pull request Feb 24, 2018
@karellm
Copy link
Member Author

karellm commented Feb 24, 2018

@birdy- I won'd use prettier because it transforms:

if() {
}
else {
}

into

if() {
} else {
}

which makes absolutely no sense to me.

@karellm karellm merged commit 69292ca into master Feb 24, 2018
@karellm karellm deleted the 1.0.0 branch February 24, 2018 19:22
@immortal-tofu
Copy link
Contributor

immortal-tofu commented Feb 25, 2018

By far the biggest reason for adopting Prettier is to stop all the on-going debates over styles.

:D

@karellm
Copy link
Member Author

karellm commented Feb 25, 2018

Well there is something more important than rigidity. It's consistency, readability and actual productivity while coding. Prettier doesn't score well in the last 2 for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants