Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#13: lodash and classnames should be deps, not devDeps (closes #13) #14

Merged
merged 4 commits into from
Mar 23, 2017

Conversation

FrancescoCioria
Copy link
Contributor

@FrancescoCioria FrancescoCioria commented Mar 23, 2017

Closes #13

Test Plan

tests performed

  • clean install + start -> demo works
    image

tests not performed (domain coverage)

At times not everything can be tested, and writing what hasn't been tested is just as important as writing what has been tested.

An example of partial test is a field displaying 4 possible values. If 3 values are tested, with screenshots, and 1 is not, then it should be mentioned here.}

Verified

This commit was signed with the committer’s verified signature.
b-zee Benno

Verified

This commit was signed with the committer’s verified signature.
b-zee Benno
@@ -1,7 +1,7 @@
var path = require('path');
var webpack = require('webpack');
var webpackBase = require('./webpack.base');
var assign = require('lodash/object').assign;
var assign = require('lodash.assign');
Copy link
Member

Choose a reason for hiding this comment

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

do you even need this with node 6?

Copy link
Member

Choose a reason for hiding this comment

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

rephrased: can't you just use Object.assign?

Copy link
Contributor Author

@FrancescoCioria FrancescoCioria Mar 23, 2017

Choose a reason for hiding this comment

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

I don't need neither, I'm already refactoring these files in pure ES6 in a different branch (so ... instead of assign) :)

Copy link
Member

Choose a reason for hiding this comment

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

even better!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

mmm I think I'll do in this PR... a bit dirty but it's ok

Copy link
Member

Choose a reason for hiding this comment

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

👍

package.json Outdated
"dependencies": {},
"dependencies": {
"classnames": "^2.2.5",
"lodash.omit": "^4.5.0"
Copy link
Member

@gabro gabro Mar 23, 2017

Choose a reason for hiding this comment

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

I know these dependencies are tiny, but you can probably remove both with

- const props = omit(this.props, ['children', 'ready', 'firstLaunchOnly', 'type']);
+ const { children, ready, firstLaunchOnly, type, ...props } = this.props;

and simply joining strings instead of using classnames (which doesn't seem to be used in any interesting way)

Copy link
Member

Choose a reason for hiding this comment

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

No dependencies is better than 2 dependencies 🎉

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, why not 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

const { children, ready, firstLaunchOnly, type, ...props } = this.props;

actually this is not ok as eslint would complain... I'll keep omit for now (as we're doing for every other component for this same stupid reason...)

Copy link
Member

Choose a reason for hiding this comment

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

Oh, right. Well, we may consider https://www.npmjs.com/package/eslint-plugin-no-unused-vars-rest, but that's probably out of scope...

Verified

This commit was signed with the committer’s verified signature.
b-zee Benno

Verified

This commit was signed with the committer’s verified signature.
b-zee Benno
@FrancescoCioria FrancescoCioria requested a review from gabro March 23, 2017 15:29
@gabro gabro merged commit c86f568 into master Mar 23, 2017
@nemobot
Copy link

nemobot commented Mar 23, 2017

@nemobot nemobot removed the in review label Mar 23, 2017
@gabro gabro deleted the 13-lodash_and_classnames_should branch March 23, 2017 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants