Skip to content

Conversation

@OriLev
Copy link
Owner

@OriLev OriLev commented Jan 21, 2018

The current commit achieved the following:

  • Start usage of destructuring.
  • Separate the components of the app into separate folders
  • Start using ESLint and start applying the coding style of the 'Airbnb' rules set
  • Practice of 'git rebase' and 'git reflog'

@OriLev OriLev merged commit 23527f4 into master Jan 21, 2018
@@ -0,0 +1,3 @@
/node_modules
/dist
/app/utils/BFS.js No newline at end of file
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why?

Copy link
Owner Author

Choose a reason for hiding this comment

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

The BFS.js file caused too many errors/warnings and I wanted to address it separately

Copy link
Collaborator

@elektronik2k5 elektronik2k5 Jan 28, 2018

Choose a reason for hiding this comment

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

Next time disable in the problematic file. See how to disable files/directories/lines/blocks in eslint docs.
There's legitimate reasons to disable the linting on different resolutions and now that you lint, you should know how to disable the linter when you need to.
An ignore file is for permanently ignored files/directories - which isn't this case.

Copy link
Owner Author

Choose a reason for hiding this comment

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

done

@@ -0,0 +1,3 @@
/node_modules
Copy link
Collaborator

Choose a reason for hiding this comment

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

These are absolute paths. You need to use relative ones.

Copy link
Owner Author

Choose a reason for hiding this comment

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

done

@@ -0,0 +1,25 @@
module.exports = {
"extends": "airbnb",
Copy link
Collaborator

Choose a reason for hiding this comment

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

If you're using JS instead of JSON, don't quote the keys.

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 assume you don't mean the specific rule names (all those kebab case rule name are not happy without their quotes..), right?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Right, extends doesn't need quoting, but "react/jsx-uses-react" has to be quoted to be syntactically correct.

"no-tabs": "off",
"react/jsx-uses-react": 2,
"react/jsx-uses-vars": 2,
"comma-dangle": ["error", {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Inconsistent indentation

Copy link
Owner Author

Choose a reason for hiding this comment

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

done

"rules": {
"no-tabs": "off",
"react/jsx-uses-react": 2,
"react/jsx-uses-vars": 2,
Copy link
Collaborator

Choose a reason for hiding this comment

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

I always use words instead of numbers, so the reader doesn't need to guess what 2 is.

Copy link
Owner Author

Choose a reason for hiding this comment

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

good idea

if (point === endP) {
return true;
}
return false;
Copy link
Collaborator

Choose a reason for hiding this comment

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

const isEndPoint = (point) => point === endPoint

return false;
}
// tests if a certain point can be used (inside the board && allowed to be stepped in && was not visited)
const legalPoint = function (point) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

is

if (inField(point)) {
if (allowedStep(point)) {
if (!visited(point)) {
return true;
Copy link
Collaborator

Choose a reason for hiding this comment

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

return predicateOne(point) && predicateTwo(point) && predicateThree(point)

const pathExists = function () {
if (legalPoint(startP) && legalPoint(endP)) {
const testingQue = [ startP, ];
field[testingQue[0][0]][testingQue[0][1]].stepVisited = 0;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use destructuring to replace these numbers with something a human can understand.

@@ -5,22 +5,38 @@
"main": "index.js",
Copy link
Collaborator

Choose a reason for hiding this comment

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

This comment is about dist/index_bundle.js file: it should be git ignored. Not source code? Should not be versioned.

Copy link
Owner Author

Choose a reason for hiding this comment

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

sorry, didn't understand that one...

Copy link
Collaborator

Choose a reason for hiding this comment

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

Over chat then

@elektronik2k5
Copy link
Collaborator

Very nice progress. Next time don't merge, but assign me so we can discuss changes.

Repository owner deleted a comment from elektronik2k5 Jan 24, 2018
Repository owner deleted a comment from elektronik2k5 Jan 24, 2018
Repository owner deleted a comment from elektronik2k5 Jan 24, 2018
Repository owner deleted a comment from elektronik2k5 Jan 24, 2018
Repository owner deleted a comment from elektronik2k5 Jan 24, 2018
Repository owner deleted a comment from elektronik2k5 Jan 24, 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.

2 participants