Homework 2. Interactive board#1
Open
ILyaCyclone wants to merge 9 commits into
Open
Conversation
Also small Cell ui tweaks.
So that Eslint is happy with config files.
1) npx mrm lint-staged 2) npx simple-git-hooks (lint-staged/lint-staged#958) 3) `git config core.hooksPath` should be empty or point to `.git/hooks/`. Otherwise call `git config --unset core.hooksPath` or `git config core.hooksPath .git/hooks/`.
vvscode
reviewed
Apr 1, 2021
| "pre-commit": "npx lint-staged" | ||
| }, | ||
| "lint-staged": { | ||
| "*.{js,jsx,ts,tsx,json}": "eslint --cache --fix" |
Owner
Author
There was a problem hiding this comment.
Eslint использует prettier, код форматируется согласно настройкам .prettierrc.
vvscode
reviewed
Apr 1, 2021
| "test": "npx jest && npx loki", | ||
| "jest": "jest", | ||
| "coverage": "jest --collect-coverage", | ||
| "lint": "npx eslint --ext .js,.jsx,.ts,.tsx,.json --fix ./", |
There was a problem hiding this comment.
тут npx не нужен (в других скриптах его у тебя нет)
vvscode
reviewed
Apr 1, 2021
| }) => { | ||
| return ( | ||
| <td | ||
| onClick={() => cellClicked(rowIndex, colIndex)} |
Owner
Author
There was a problem hiding this comment.
Василий, можешь дать более развёрнутый комментарий, пожалуйста? Не понимаю суть замечания.
Я бы мог переделать это в формате ниже, но особой разницы я не вижу.
const onClick = () => cellClicked(rowIndex, colIndex);
return (
<td onClick={onClick}
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Homework task 2
JSX как основа ReactJS. Functional components