Filer Project, Release 0.1
The main purpose of Release 0.1 was to get familiar working with GitHub and using Git commands. We were contributing to the Filer web filesystem project refactoring the code to use "let" or "const" instead of "var" for creating variables and constants.
Both "let" and "const" are block-scoped and preferred over "var". The only difference between them is that "const" values can't be reassigned. So unless your variable is going to change you should always use const.
Adding Git Bash editor to VS code:
Both "let" and "const" are block-scoped and preferred over "var". The only difference between them is that "const" values can't be reassigned. So unless your variable is going to change you should always use const.
Strict Mode in JavaScript
In order to activate strict mode you should add "use strict" directive on top of your code. The benefits of this mode are the following:
- eliminates some silent errors (throws errors instead)
- helps to write a secure JS code
- disables confusing features
Not Allowed in Strict Mode
- Use undeclared variables/objects
- Delete a variable/function
- Duplicate a parameter name
- Octal numeric literals
- Read-only/get-only properties
Adding Git Bash editor to VS code:
I'm using Visual Studio Code as a tool for a source code editing. Find it really helpful to add Git Bash to the VS code integrated terminal, so here are steps to do that:
- To open the terminal in VS code: press and hold Ctrl + `
- Ctrl + Shift + P- to open the command palette
- Type - Select Default Shell
- Select Git Bash
- Git Bash should be added to your VS internal terminal
Process
- Fork a project on GitHub
- Create a new issue
- Clone forked repo to create a local copy
- Add a remote named "upstream"
- Create a branch for your issue using "git checkout -b" command
- npm install
- npm test
- Make changes in your branch
- nmp test
- Use "git add" to stage changes
- Use "git commit -m" to commit changes with a short description
- Use "git push origin
" to push your changes to a remote branch - Create a pull request
Code Reviews
In order to review someone else's pull request, I picked one that was open, reading its description, checking for any other comments and making sure that the changes had passed all automated tests. Next, I clicked "Commits" to review all changes made by the author and created a comment spotting that some parts of the code might require small fixes
Links
2. Pull-request: https://github.com/filerjs/filer/pull/704
3. Reviewed pr: https://github.com/filerjs/filer/pull/694
Comments
Post a Comment