Skip to content

Push branch with codebase for code review#1

Open
eddubbs wants to merge 1 commit into
masterfrom
code-review
Open

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

Conversation

@eddubbs
Copy link
Copy Markdown
Owner

@eddubbs eddubbs commented Oct 19, 2018

Do code review for this PR

@eddubbs eddubbs self-assigned this Oct 19, 2018
Copy link
Copy Markdown
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.

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

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.

Two newlines, expected 1

Comment thread src/app.js
})

})

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.

Newline

Comment thread src/app.js

}

update_profile() {
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.

camelCase instead of snake_case. Be consistent with your code

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.

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

Comment thread src/app.js
initializeApp() {
let self = this;

$('.load-username').on('click', function (e) {
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.

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

Comment thread src/app.js
let self = this;

$('.load-username').on('click', function (e) {
let userName = $('.username.input').val();
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.

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

Comment thread src/index.js
@@ -0,0 +1,6 @@
import styles from './assets/scss/app.scss';
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.

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

Comment thread webpack.config.js
const extractPlugin = new ExtractTextPlugin({filename: './assets/css/app.css'});

const config = {

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.

nl

Comment thread webpack.config.js
const config = {

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

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 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

Comment thread webpack.config.js

module: {
rules: [

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.

nl

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

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.

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