- Read the PR description
- Read through all the changes, considering the following questions.
- Is there anything you can praise about this PR? Start with praise.
- Are variable names brief but descriptive?
- Are new/changed functions no longer than a paragraph?
- Do all function parameters have default values where appropriate?
- Is the code clear and clean? (see Robert C. Martin's Clean Code)
- Is there enough documentation?
- Does the programming style meet the requirements of the repository (PEP8 for python, google for c++, etc.)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// useDebounce.js | |
import { useEffect } from 'react' | |
import useTimeout from './useTimeout' | |
const useDebounce = (callback, delay, dependencies) => { | |
const { reset, clear } = useTimeout(callback, delay) | |
useEffect(reset, [...dependencies, reset]) | |
useEffect(clear, []) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* eslint-disable @typescript-eslint/no-unused-vars */ | |
import { VuexModule, Module, Action, Mutation } from 'vuex-module-decorators'; | |
import { $axios } from '@/utils/api'; | |
import { store } from '@/store/store'; | |
import { deepCopy, getErrorData } from '@/utils/functions'; | |
import { API_PATH, CONTENT_TYPE_HEADER } from '@/constants/apiConstants'; | |
import { | |
UserDictionary, | |
GetUserDictionariesResponse, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Helper | |
# Getting Page Posts | |
def get_page_posts | |
check_fb_plugin_installed = ActiveRecord::Base.connection.data_source_exists? 'plugins_facebook_sns' | |
fb_plugin = current_site.plugins.where(slug: 'facebook_sn') | |
status = fb_plugin[0]['status'].to_i | |
return false if !check_fb_plugin_installed | |
return false if !fb_plugin.present? | |
return false if status == 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import axios from 'axios' | |
import { getField, updateField } from 'vuex-map-fields' | |
import moment from 'moment' | |
import _ from 'lodash' | |
function formatDate(date) { | |
// 15 Feb 2018 | |
if (date){ | |
let year = moment(date).format('YYYY') | |
let day = moment(date).format('D') |