Skip to content

Push branch with codebase for code review#1

Open
eddubbs wants to merge 1 commit intomasterfrom
code-review
Open

Push branch with codebase for code review#1
eddubbs wants to merge 1 commit intomasterfrom
code-review

Conversation

@eddubbs
Copy link
Owner

@eddubbs eddubbs commented Oct 19, 2018

Do code review for this PR

@eddubbs eddubbs self-assigned this Oct 19, 2018
Copy link
Owner Author

@eddubbs eddubbs left a comment

Choose a reason for hiding this comment

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

I would click (x)Request Changes, but cant request changes over my own code.
I leave it as a comment.

@@ -0,0 +1,29 @@
import './assets/scss/app.scss';
import $ from 'cash-dom';

Copy link
Owner Author

Choose a reason for hiding this comment

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

Two newlines, expected 1

})

})

Copy link
Owner Author

Choose a reason for hiding this comment

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

Newline


}

update_profile() {
Copy link
Owner Author

Choose a reason for hiding this comment

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

camelCase instead of snake_case. Be consistent with your code

Copy link
Owner Author

Choose a reason for hiding this comment

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

try to avoid this, it can be misleading,
move this function onto initializeApp() block or make it static

initializeApp() {
let self = this;

$('.load-username').on('click', function (e) {
Copy link
Owner Author

Choose a reason for hiding this comment

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

e variable is not used in further implementation, should be ommited

let self = this;

$('.load-username').on('click', function (e) {
let userName = $('.username.input').val();
Copy link
Owner Author

Choose a reason for hiding this comment

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

Username is property of App, so it would be nice to set this property by Object library.
Object.defineProperty(self, "username", {}) and attach getter with validation into it

@@ -0,0 +1,6 @@
import styles from './assets/scss/app.scss';
Copy link
Owner Author

Choose a reason for hiding this comment

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

in webpack config you deliver /\.s?css$/,, this is redundant

const extractPlugin = new ExtractTextPlugin({filename: './assets/css/app.css'});

const config = {

Copy link
Owner Author

Choose a reason for hiding this comment

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

nl

const config = {

context: path.resolve(__dirname, 'src'),

Copy link
Owner Author

Choose a reason for hiding this comment

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

I'm sceptic about this newline:
If there is ruleset, that after every webpack config key there is a newline, than ommit this, but imho it's redundant.
I'll leave it for discussion, and wont write comment in each key


module: {
rules: [

Copy link
Owner Author

Choose a reason for hiding this comment

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

nl

test: /\.(woff|woff2|eot|ttf|otf)$/,
use: ['file-loader']
}

Copy link
Owner Author

Choose a reason for hiding this comment

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

newline

@eddubbs eddubbs mentioned this pull request Oct 19, 2018
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.

1 participant