-
Notifications
You must be signed in to change notification settings - Fork 343
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
lint: fix issues #547
Comments
It would be nice to have a parent issue in a higher-level repository — or a Slack thread[1, 2] — to discuss this with the other project teams so all we follow the same conventions. In our case, the specifics probably boil down to these three points:
|
@0x2b3bfa0 of course but this issue is also the issue where to review what we are going to do once we agree. |
2 & 3. AFAIK everyone's agreed on camelCase. I'll fix the linter issues. I think we can discuss 1. TS vs JS in a separate issue if needed |
btw this yargs/yargs#1679 is annoyingly not fixed |
This comment has been minimized.
This comment has been minimized.
By the way: do we agree on the definition of camel case? 😉 |
Yes, but beware that the example table is not complete (e.g. it doesn't properly show rule 3b with a |
Renaming should be as easy (or as difficult) as taking a look to this list and applying the conversion rules above. npx grasp --only-matching --no-filename --no-line-number 'ident' **/* |
grep --invert-match '[A-Z]' | grep '_' |
sort --unique Roughly like this: npx grasp --only-matching --no-filename --no-line-number 'ident' **/* |
grep '_' | grep -v '[A-Z]' | sort --unique |
while read identifier; do
echo "$identifier => $(sed --regexp-extended 's/_([a-z])/\U\1/g' <<< "$identifier")"
done |
No, it's a fair bit more involved than that but I'll open a PR soon. |
lol that's about style which isn't currently tested so for a different issue/PR. In any case it's also self-inconsistent:
Rule 4 can get lost because it's not always (2) within reason. |
I open this issue to discuss CML's coding convention change and tasks needed to perform such change.
@0x2b3bfa0 @casperdcl @shcheklein
The text was updated successfully, but these errors were encountered: