-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Standardize file naming #4969
Comments
I want to use camelCase for functions, dashes for folders and Capitalized for classes. I'll send a tshirt to the person that makes this happen. |
+1 to @cpojer's suggestion. I think it matches the "standard" at the industry. |
For the reference: #3771 |
I'll take a look on this |
@mjesun Can I take up this issue |
@ajomadlabs maybe you can sync with @slootzky? There are a lot of files, so you can maybe split; but I'd rather double-check before getting the work done twice 🙂 |
@ajomadlabs @mjesun sorry for not being responsive , well I actually did all the necessary changes (I believe) but then had to work on something else and didn't have the chance to start testing all. @ajomadlabs, if I see I'm still not getting to this tomorrow, I will update here. |
Hey @ajomadlabs @mjesun , |
@slootzky so can I take up this |
Thanks @ajomadlabs! Let me know if you need any help with something 🙂 |
Is this issue sufficiently spec'ed out? I'm unclear. The above comment suggest to use camelCase and CapitalizeCase, but the linked issues suggest everything be underscore case... So is the final recommendation:
This might be something to document in the contributing guidelines under Code Conventions. |
Yes; how should we name things has always been a complex topic in Jest. I'm sorry if we created more confusion linking the other task, but I think it was necessary to keep proper track of everything 🙂 I think @cpojer's comment regarding I 100% agree with your suggestion of adding this to the code conventions; since we're the first ones (at Facebook) to consistently break them. Let's fully clarify here before proceeding. |
Hey everyone! I’d love to stop bikeshedding about this and just revert to standard Facebook practice:
Let me know if anyone has any other questions for this one but I don’t think it’s ambiguous :) |
I’ll take a stab at this tomorrow. What does “done” look like? Tests passing as before? Anything else? |
@jamischarles
Also, maybe let's do it incrementally package-by-package (or a few if they're small), as this affects whole codebase and will basically make every existing PR affected. |
We have an eslint rule for filename, is it possible to maintain that with different styles of names? https://github.com/facebook/jest/blob/19376c1e1e8a77717fbb7a216df92087eddbd277/.eslintrc.js#L171 |
SGTM |
Here's the first big PR for this. I did this one manually, just to get a feel for it. Here's a check list to keep track of what still needs to be converted:
|
Only one done |
Anything left to do in this issue? |
@atiqueansari1987 yes there is quite a bit of work left. You could either start with the task to rename file names under |
I suggest renaming folders as a separate task / PR than renaming files. Just renaming the folders was enough work that it warranted its own PR. Up to you though. |
Thanks for the info. I will try to submit a PR this weekend. |
I would love to help with that. If there is still work left to do, can someone point me to a place where work should be done? |
I will pick up |
<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. The two fields below are mandatory. --> <!-- Please remember to update CHANGELOG.md in the root of the project if you have not done so. --> ## Summary This is part of #4969. It standardizes file names in packages/jest-watcher under Facebook naming conventions. ## Test plan Running `yarn run clean-all` followed by `yarn` and `yarn test` is not completely clean on my machine, but it yields the same results in this branch and `master`
@betalantz are you still interested in converting files assigned to you? @andrearosr need any help with jest-watcher? :) |
Yes, I'm available to work on this. I'll follow the assignments above, unless they've been assigned elsewhere. |
Hello! 🖐 First-time-contributor here. If there are any packages or folders remaining I can help take on a few. |
@GGonryun feel free to take over |
Hey there! I hadn't seen the other messages to this thread, I did |
picked up |
Hello, I also want to make my first contribution can I work on this issue? |
Hi, first-timer here! If there's room for another I'd love the opportunity to work on this issue. Please let me know. |
This issue is stale because it has been open for 1 year with no activity. Remove stale label or comment or this will be closed in 30 days. |
This issue was closed because it has been stalled for 7 days with no activity. Please open a new issue if the issue is still relevant, linking to this one. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
File naming conventions in Jest can be improved. A good example is the
integration_tests
folder. We have:auto-clear-mocks
clear_cache
testNamePattern
timer-resetMocks
stack_trace_no_captureStackTrace
regex-(char-in-path
I understand that some of the camel cased ones reference actual method names, like
captureStackTrace
, but I think we could do it better. This is absolutely not top-priority, but I just wanted to add a task to it because it feels there's room for improvement.The text was updated successfully, but these errors were encountered: