#154672011 - feedback implementation - #86
Conversation
#152782762 review api endpoints and refactor where necessary - start implementing refactored API documentation
- code cleanup - add hound.yml file
…51251709 Cleanup
- refactore docs server host - check status codes - refactor function names to fit convention
(ch): server API review
implement code review feedback add faker for tests refactor up upvotes action refactor get all recipes and sort recipes route
(ch): refactor tests
Ch implement more feedback
- follow conventions in app setup test config for local and remote test global loader type for components
refactor client view recipe
feedback and initial frontend implementation
Finishes #151251426
…t-app-pagination #151251426 - User should be able to navigate the app using pagination
…-favorited-recipes #151246935 - User should be able to retrieve favorited recipes
…onventions and best practices Finishes #154322898
…pp-conventions #154322898 - refactor app conventions
- create production configuration for webpack - update app entry file to use production configuration - files refactoring
- add higher order component to catch errors - refactor files Finishes #154422313
| @@ -0,0 +1,27 @@ | |||
| import isEmpty from 'lodash/isEmpty'; | |||
There was a problem hiding this comment.
Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
| @@ -0,0 +1,154 @@ | |||
| import React, { Component } from 'react'; | |||
There was a problem hiding this comment.
Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
| @@ -0,0 +1,299 @@ | |||
| /* eslint-disable no-undef */ | |||
| import React from 'react'; | |||
There was a problem hiding this comment.
Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
| @@ -0,0 +1,24 @@ | |||
| import React from 'react'; | |||
There was a problem hiding this comment.
Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
| @@ -0,0 +1,188 @@ | |||
| // /* eslint-disable */ | |||
| import React from 'react'; | |||
There was a problem hiding this comment.
Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
| @@ -0,0 +1,43 @@ | |||
| import axios from 'axios'; | |||
There was a problem hiding this comment.
Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
| @@ -0,0 +1,30 @@ | |||
| import axios from 'axios'; | |||
There was a problem hiding this comment.
Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
| @@ -0,0 +1,37 @@ | |||
| import axios from 'axios'; | |||
There was a problem hiding this comment.
Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
| @@ -0,0 +1,55 @@ | |||
| import { batchActions } from 'redux-batched-actions'; | |||
There was a problem hiding this comment.
Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
| @@ -0,0 +1,30 @@ | |||
| import axios from 'axios'; | |||
There was a problem hiding this comment.
Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
1536ceb to
dab1219
Compare
| @@ -0,0 +1,25 @@ | |||
| import validator from 'validator'; | |||
There was a problem hiding this comment.
Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
| password: process.env.DB_PASSWORD, | ||
| database: process.env.DB_DATABASE_LOCAL_TEST, | ||
| host: process.env.DB_HOST, | ||
| port: process.env.DB_PORT, |
| username: process.env.DB_USERNAME, | ||
| password: process.env.DB_PASSWORD, | ||
| database: process.env.DB_DATABASE_LOCAL_TEST, | ||
| host: process.env.DB_HOST, |
| test_dev: { | ||
| username: process.env.DB_USERNAME, | ||
| password: process.env.DB_PASSWORD, | ||
| database: process.env.DB_DATABASE_LOCAL_TEST, |
| }, | ||
| test_dev: { | ||
| username: process.env.DB_USERNAME, | ||
| password: process.env.DB_PASSWORD, |
| @@ -1,76 +1,140 @@ | |||
| import jwtDecode from 'jwt-decode'; | |||
There was a problem hiding this comment.
Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
| @@ -0,0 +1,16 @@ | |||
| module.exports = { | |||
| @@ -0,0 +1,37 @@ | |||
| import validator from 'validator'; | |||
There was a problem hiding this comment.
Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
| @@ -0,0 +1,38 @@ | |||
| /* eslint-disable max-len */ | |||
| import expect from 'expect'; | |||
There was a problem hiding this comment.
Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
| @@ -0,0 +1,69 @@ | |||
| import React from 'react'; | |||
There was a problem hiding this comment.
Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
dab1219 to
a876603
Compare
| @@ -0,0 +1,37 @@ | |||
| import validator from 'validator'; | |||
There was a problem hiding this comment.
Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
| devtool: 'source-map', | ||
| entry: [path.join(__dirname, './client/index.js')], | ||
| output: { | ||
| path: path.join(__dirname, 'dist'), |
There was a problem hiding this comment.
'__dirname' is not defined no-undef
| module.exports = { | ||
|
|
||
| devtool: 'source-map', | ||
| entry: [path.join(__dirname, './client/index.js')], |
There was a problem hiding this comment.
'__dirname' is not defined no-undef
| } | ||
| }); | ||
|
|
||
| module.exports = { |
| const webpack = require('webpack'); | ||
| const HtmlWebpackPlugin = require('html-webpack-plugin'); | ||
| const CompressionPlugin = require('compression-webpack-plugin'); | ||
| const ExtractTextPlugin = require('extract-text-webpack-plugin'); |
| }; | ||
| }; | ||
|
|
||
| export default validateId; |
There was a problem hiding this comment.
Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
There was a problem hiding this comment.
Use Number.isNaN in stead of NaN (line 8)
| @@ -0,0 +1,63 @@ | |||
| import faker from 'faker'; | |||
There was a problem hiding this comment.
Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
| @@ -0,0 +1,260 @@ | |||
| import chai, { expect } from 'chai'; | |||
There was a problem hiding this comment.
Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
| @@ -0,0 +1,3 @@ | |||
| import './usersController.spec'; | |||
There was a problem hiding this comment.
Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
| @@ -0,0 +1,81 @@ | |||
| import chai, { expect } from 'chai'; | |||
There was a problem hiding this comment.
Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
a876603 to
31ceccc
Compare
| @@ -0,0 +1,52 @@ | |||
| import validator from 'validator'; | |||
There was a problem hiding this comment.
Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
| @@ -0,0 +1,82 @@ | |||
| /* eslint-disable react/jsx-filename-extension */ | |||
| import React from 'react'; | |||
There was a problem hiding this comment.
Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
31ceccc to
761882b
Compare
| @@ -0,0 +1,148 @@ | |||
| import React, { Component } from 'react'; | |||
There was a problem hiding this comment.
Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
| @@ -0,0 +1,140 @@ | |||
| import React from 'react'; | |||
There was a problem hiding this comment.
Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
segunolalive
left a comment
There was a problem hiding this comment.
Greate job.
See comments.
Also, when exporting singletons/bare-objects as in the case of your controllers, use Pascal case naming
| ] | ||
| ], | ||
| "plugins": ["transform-object-rest-spread", "emotion"] | ||
| } No newline at end of file |
There was a problem hiding this comment.
It's good practice to end files with a blank line.
Without a blank line at the end, a shell script might be unable to read the last line of code.
| @@ -1,2 +0,0 @@ | |||
| SECRET_TOKEN=supersecret | |||
| DB_URL=postgres://xouvfgrs:MIhorjtYuPrb4yJRSgwELbJPytZb0PJ_@elmer.db.elephantsql.com:5432/xouvfgrs No newline at end of file | |||
There was a problem hiding this comment.
Same as above. Fix all occurrences where the EOF empty line is missing
| <p align="center"> | ||
| <img src="https://travis-ci.org/fuchodeveloper/more-recipes.svg?branch=master" alt="travis ci build test badge" /> | ||
| <a href='https://coveralls.io/github/fuchodeveloper/more-recipes?branch=master'><img src='https://coveralls.io/repos/github/fuchodeveloper/more-recipes/badge.svg?branch=master' alt='Coverage Status' /></a> | ||
| <img src="https://travis-ci.org/fuchodeveloper/more-recipes.svg?branch=develop" alt="travis ci build test badge" /> |
There was a problem hiding this comment.
It's not advisable to use mark up in your markdown files. Change these to appropriate markdown syntax
| </p> | ||
|
|
||
| ## More-recipes | ||
| ## More-recipes |
There was a problem hiding this comment.
The first markdown tag should correspond to an h1 tag. That is, # and is preferably placed at the top of the file
| * @export setCurrentUserError | ||
| * @param {object} error - the error that occurred while signing up | ||
| * | ||
| * @returns {object} error - the error details from the server |
There was a problem hiding this comment.
You can only have one return value. You are using a wrong jsdoc syntax to document object property types.
Take a look at this
| import Adapter from 'enzyme-adapter-react-16'; | ||
| import expect from 'expect'; | ||
| import { LoginPage } from '../../../components/auth/LoginPage'; | ||
| // import mockLocalStorage from '../../__mocks__/mockLocalStorage'; |
| @@ -0,0 +1,64 @@ | |||
| 13:00:57.528 INFO - Selenium build info: version: '3.8.1', revision: '6e95a6684b' | |||
There was a problem hiding this comment.
this should not be in version control
| @@ -0,0 +1,25 @@ | |||
| <?xml version="1.0" encoding="UTF-8" ?> | |||
There was a problem hiding this comment.
This should not in version control
| ingredient: request.body.ingredient.trim().toLowerCase(), | ||
| recipeDirection: request.body.recipeDirection.trim().toLowerCase(), | ||
| recipeImage: request.body.recipeImage | ||
| name: request.body.name.trim().toLowerCase(), |
There was a problem hiding this comment.
Good place to use object destructuring syntax
| recipeDirection: body.recipeDirection.trim().toLowerCase(), | ||
| recipeImage: body.recipeImage | ||
| name: name ? name : recipe.name, | ||
| ingredients: ingredients ? ingredients : recipe.body, |
There was a problem hiding this comment.
you can use the logical OR operator here. ||
|
Fix Hound CI issues as well |
761882b to
8b436bc
Compare
| @@ -0,0 +1,171 @@ | |||
| import chai, { expect } from 'chai'; | |||
There was a problem hiding this comment.
Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
| @@ -0,0 +1,118 @@ | |||
| import chai, { expect } from 'chai'; | |||
There was a problem hiding this comment.
Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
8b436bc to
1443a9e
Compare
| @@ -0,0 +1,94 @@ | |||
| import chai, { expect } from 'chai'; | |||
There was a problem hiding this comment.
Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
| @@ -0,0 +1,177 @@ | |||
| import { mapKeys } from 'lodash'; | |||
There was a problem hiding this comment.
Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
| @@ -0,0 +1,326 @@ | |||
| /* eslint-disable no-undef */ | |||
| import React from 'react'; | |||
There was a problem hiding this comment.
Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
| @@ -0,0 +1,14 @@ | |||
| import { SET_FETCHING, UNSET_FETCHING } from '../action/types'; | |||
There was a problem hiding this comment.
Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
| @@ -0,0 +1,59 @@ | |||
| import React from 'react'; | |||
There was a problem hiding this comment.
Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
| @@ -0,0 +1,231 @@ | |||
| import React from 'react'; | |||
There was a problem hiding this comment.
Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
a334ae0 to
67d15bf
Compare
| @@ -0,0 +1,47 @@ | |||
| import expect from 'expect'; | |||
There was a problem hiding this comment.
Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
- refactor serverside files: usersController, favoritesController, votesController, recipesController - update users model file: changed recipes model coulmn names to singular names - update backend tests for: usersController, favoritesController, recipesController, votesController - update project JSDoc conventions - remove console logs and dev comments - changed votesController logic to make more readable - changed recipe placeholder image - added validations: for recipes, users - removed logged files - refactor config.js file to use environment variables - update codeclimate.yml file with new config - add parserOption to .eslintrc file - implement more feedback from fellow reviews
67d15bf to
3ebb38f
Compare
| @@ -0,0 +1,36 @@ | |||
| /* eslint-disable react/jsx-filename-extension */ | |||
| import React from 'react'; | |||
There was a problem hiding this comment.
Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
| @@ -0,0 +1,11 @@ | |||
| import expect from 'expect'; | |||
There was a problem hiding this comment.
Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
| @@ -0,0 +1,38 @@ | |||
| /* eslint-disable max-len */ | |||
| import expect from 'expect'; | |||
There was a problem hiding this comment.
Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
| @@ -0,0 +1,10 @@ | |||
| const localStorage = {}; | |||
|
|
|||
| export default { | |||
There was a problem hiding this comment.
Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
| @@ -0,0 +1,30 @@ | |||
| import { | |||
There was a problem hiding this comment.
Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
|
|
||
| }; | ||
|
|
||
| export default mockData; |
There was a problem hiding this comment.
Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
Description of Task to be completed?
How should this be manually tested?
git clone https://github.com/fuchodeveloper/more-recipes.git$ npm run start:devhttp://localhost:8000add recipepage from the navigation barAny background context you want to provide?
What are the relevant pivotal tracker stories?
Questions:
N/A