Skip to content

Latest commit

 

History

History
59 lines (53 loc) · 2.4 KB

README.md

File metadata and controls

59 lines (53 loc) · 2.4 KB

Guideline how to implement solution for JS tasks

Follow the next steps when solving JS tasks on Github

Prepare the project

  1. Fork the repo (Github repository)
  2. Clone the forked repo
    git clone the-link-from-your-forked-repo
    
    • You can get the link by clicking the Clone or download button in your repo
  3. Open the project folder in your IDE
  4. Open a terminal in the project folder
  5. Create a branch for the solution and switch on it
    git checkout -b develop
    
    • You can use any other name instead of develop
  6. Run npm install (or just npm i) to install the dependencies

Implement the solution

  1. Implement the solution within a function in src/<task_name>.js Where to write a solution
  2. Run npm run test (or just npm test) to check if your solution is correct
    • If at least one test fails fix the solution and check again.
  3. Run npm run lint to see if your code follows the best code style practices
    • If you see some errors fix them and check again
  4. Add files to index
    git add src/<task_name>.js
    
  5. Save the solution
    git commit -m 'Solution'
    
    • code style is automatically checked again when you commit the code
    • Fix all the errors before committing again
  6. Push the solution to the repo
    git push origin develop
    
    • If you created another branch (not develop) use its name instead
    • The tests are run again before the push to ensure the solution still works
    • Fix all the test and commit before pushing again

Create a Pull Request (PR)

  1. Open your repo on Github and create a Pull Request (PR) New PR button
  2. Select your branch in the dropdown Create PR button
  3. Verify the PR details and code (scroll down to see it) and confirm Create PR confirmation

If a mentor requested changes on your PR

  1. Repeat Implement the solution section
  2. PR is updated automatically after a push to your branch on Github

After updating your PR - click on re-request button at PR page IF YOU NEED ADDITIONAL REVIEW OF YOUR CODE. Image of re-request button