Chore/149490791/remove redundant packages by codejockie · Pull Request #22 · codejockie/document-manager · GitHub
Skip to content

Chore/149490791/remove redundant packages#22

Merged
codejockie merged 2 commits into
masterfrom
chore/149490791/remove-useless-packages
Jul 27, 2017
Merged

Chore/149490791/remove redundant packages#22
codejockie merged 2 commits into
masterfrom
chore/149490791/remove-useless-packages

Conversation

@codejockie

@codejockie codejockie commented Jul 26, 2017

Copy link
Copy Markdown
Owner

#149490791 remove redundant packages

#### What does this PR do?
#### This PR removes unused packages and useless import statements

#### Description of Tasks to be completed
#### None

#### How should this be manually tested?
#### None

#### Any background context you want to provide?
#### No

#### What are the relevant pivotal tracker stories?
#### Remove Redundant Packages and Imports

#### Screenshots (if appropriate)
#### None

#### Questions:
#### None

install moment

Start #149490791
uninstall unused packages
edit users update route
edit documents get all route

Finishes #149490791

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unable to resolve path to module 'chai' import/no-unresolved
Missing file extension for "chai" import/extensions

@@ -1,5 +1,4 @@
import chai, { expect } from 'chai';
import chaiHttp from 'chai-http';
import { expect } from 'chai';

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unable to resolve path to module 'chai' import/no-unresolved
Missing file extension for "chai" import/extensions

@@ -1,5 +1,4 @@
import chai, { expect } from 'chai';
import chaiHttp from 'chai-http';
import { expect } from 'chai';

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unable to resolve path to module 'chai' import/no-unresolved
Missing file extension for "chai" import/extensions

Comment thread server/routes/users.js
import express from 'express';
import _ from 'lodash';
import { hashPassword, isAdmin, isUser } from '../helpers/helper';
import { formatDate, hashPassword, isAdmin, isUser } from '../helpers/helper';

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unable to resolve path to module '../helpers/helper' import/no-unresolved
Missing file extension for "../helpers/helper" import/extensions

@@ -1,5 +1,5 @@
import express from 'express';
import { isAdmin, isUser } from '../helpers/helper';
import { formatDate, isAdmin, isUser } from '../helpers/helper';

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unable to resolve path to module '../helpers/helper' import/no-unresolved
Missing file extension for "../helpers/helper" import/extensions

Comment thread server/helpers/helper.js
@@ -1,13 +1,38 @@
import bcrypt from 'bcryptjs';
import moment from 'moment';

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unable to resolve path to module 'moment' import/no-unresolved
Missing file extension for "moment" import/extensions

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.3%) to 86.97% when pulling 5883c70 on chore/149490791/remove-useless-packages into da4e429 on master.

@BolajiOlajide

Copy link
Copy Markdown

Your PR name is somehow. 🤣
Try Chore/149490791/remove redundant packages. No package is useless lol

Comment thread README.md
+ Delete documents, users
+ Update documents, users

## Endpoints

@BolajiOlajide BolajiOlajide Jul 26, 2017

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any reason you removed this, I think it's important because how do I know what routes are available and the HTTP method to use.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a documentation available at root of the url @ http://cjdocs.herokuapp.com

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I wanted to contribute to your project, I'd be hurt if I didn't see it in your README. The README is like a developers go-to source for information about a project. The more descriptive, the better.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, but the feedback a friend got during his defense said to remove it. That was why I removed it.

Comment thread server/helpers/helper.js

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any reason you're not complying with ES6 standard here. You could easily export const formatDate = (date) => { here.

Just a thought.

@codejockie codejockie Jul 26, 2017

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm following the Airbnb style guide, which say prefer normal function for things like that

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you share a link to where you found that, will love to see how they put it.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's from ESLint, but I can check for it. Encountered it when I was working on a React app in CP1

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel you are safer using arrow functions instead.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's just a suggestion though.

@codejockie codejockie changed the title Chore/149490791/remove useless packages Chore/149490791/remove redundant packages Jul 26, 2017
@codejockie codejockie merged commit ab5731b into master Jul 27, 2017
@codejockie codejockie deleted the chore/149490791/remove-useless-packages branch May 18, 2018 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants