-
Notifications
You must be signed in to change notification settings - Fork 0
separate components to folders and start fixing coding style #5
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
Conversation
| @@ -0,0 +1,3 @@ | |||
| /node_modules | |||
| /dist | |||
| /app/utils/BFS.js No newline at end of file | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 | |||
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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", | |||
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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", { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent indentation
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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", | |||
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Over chat then
|
Very nice progress. Next time don't merge, but assign me so we can discuss changes. |
The current commit achieved the following: