-
Notifications
You must be signed in to change notification settings - Fork 3.5k
result #3745
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
base: master
Are you sure you want to change the base?
result #3745
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| import React from 'react'; | ||
| import { Person } from './components/Person/Person'; | ||
| import './App.scss'; | ||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Violates checklist item #2: ternary operands should be on separate lines. Format as: |
||
| export const misha = { | ||
|
|
@@ -25,21 +26,8 @@ export const alex = { | |
|
|
||
| export const App = () => ( | ||
| <div className="App"> | ||
| <section className="Person"> | ||
| <h2 className="Person__name">My name is Misha</h2> | ||
| <p className="Person__age">I am 37</p> | ||
| <p className="Person__partner">Natasha is my wife</p> | ||
| </section> | ||
|
|
||
| <section className="Person"> | ||
| <h2 className="Person__name">My name is Olya</h2> | ||
| <p className="Person__partner">Maksym is my husband</p> | ||
| </section> | ||
|
|
||
| <section className="Person"> | ||
| <h2 className="Person__name">My name is Alex</h2> | ||
| <p className="Person__age">I am 25</p> | ||
| <p className="Person__partner">I am not married</p> | ||
| </section> | ||
| <Person person={misha} /> | ||
| <Person person={olya} /> | ||
| <Person person={alex} /> | ||
| </div> | ||
| ); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,21 @@ | ||
| // export const Person = ({ person }) => (); | ||
| import React from 'react'; | ||
|
|
||
| export const Person = ({ person }) => { | ||
| const partnerRole = person.sex === 'm' ? 'wife' : 'husband'; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Violates CHECKLIST ITEM #2 - ternary operands should be on separate lines for readability. Format as: const partnerRole = person.sex === 'm'
? 'wife'
: 'husband'; |
||
|
|
||
| return ( | ||
| <div className="Person"> | ||
| <h2 className="Person__name">My name is {person.name}</h2> | ||
|
|
||
| {person.age && <p className="Person__age">I am {person.age}</p>} | ||
|
|
||
| {person.isMarried ? ( | ||
| <p className="Person__partner"> | ||
| {person.partnerName} is my {partnerRole} | ||
| </p> | ||
| ) : ( | ||
| <p className="Person__partner">I am not married</p> | ||
| )} | ||
| </div> | ||
| ); | ||
| }; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| /* eslint-disable import/named */ | ||
| import { mount } from '@cypress/react18'; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Import mismatch: App.jsx uses default import |
||
| import { Person } from './Person'; | ||
|
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Checklist item #2 violation: The ternary operator operands should be on separate lines. Format as: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This ternary operator matches the BAD EXAMPLE pattern from [CHECKLIST ITEM #2]. Format operands on separate lines: const partnerRole = person.sex === 'm'
? 'wife'
: 'husband'; |
||
|
|
||
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 violates checklist item #2: ternary operator operands should be on separate lines. Format it as: