Skip to content

Commit

Permalink
Merge pull request #95 from Short-Tracker/refactor/jsx-single-quote
Browse files Browse the repository at this point in the history
refactor(components): jsx single quote prettier rule
  • Loading branch information
udartapkom authored Jan 29, 2024
2 parents 9b53012 + fce9391 commit 8c2e063
Show file tree
Hide file tree
Showing 58 changed files with 403 additions and 380 deletions.
1 change: 1 addition & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"singleQuote": true,
"printWidth": 90,
"useTabs": false,
"jsxSingleQuote": true,
"tabWidth": 2,
"endOfLine": "lf"
}
20 changes: 10 additions & 10 deletions src/components/App/App.module.scss
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
.App {
justify-content: center;
display: flex;
flex-direction: column;
align-items: center;
max-width: 1440px;
min-width: 320px;
box-sizing: border-box;
margin: 0 auto;
text-rendering: optimizeLegibility;
}
justify-content: center;
display: flex;
flex-direction: column;
align-items: center;
max-width: 1440px;
min-width: 320px;
box-sizing: border-box;
margin: 0 auto;
text-rendering: optimizeLegibility;
}
8 changes: 4 additions & 4 deletions src/components/App/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ const App = () => {
return (
<div className={styles.App}>
<Routes>
<Route path="/" element={<Login />} />
<Route element={<PrivateRoute path="/" />}>
<Route element={<Main />} path="/main" />
<Route path='/' element={<Login />} />
<Route element={<PrivateRoute path='/' />}>
<Route element={<Main />} path='/main' />
</Route>
<Route path="/error" element={<Error />} />
<Route path='/error' element={<Error />} />
</Routes>
<Toaster />
<Popup onClose={closeModalState} isOpen={createTaskModal}>
Expand Down
4 changes: 2 additions & 2 deletions src/components/Calendar/Calendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const Calendar: FC<TProps> = (props) => {
<ReactСalendar {...props} onChange={onChange} value={value} locale={ru.code} />
<div className={styles.buttonWrapper}>
<UniversalButton
type="submit"
type='submit'
onClick={() => handleSubmit(formattedValue)}
fontSize={12}
width={248}
Expand All @@ -42,7 +42,7 @@ const Calendar: FC<TProps> = (props) => {
</UniversalButton>
<UniversalButton
onClick={handleClose}
type="button"
type='button'
fontSize={12}
width={248}
isFilled={false}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
@use '../../../globalStyles/variables.scss' as v;
@use '../../../globalStyles/mixins.scss' as m;
.AuthorizationForm {
max-width: 320px;
max-height: 285px;
max-width: 320px;
max-height: 285px;
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
background-color: v.$white-color;
border-radius: 12px;
margin-top: 60px;

&__container {
padding: 32px 32px 12px 32px;
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
background-color: v.$white-color;
border-radius: 12px;
margin-top: 60px;

&__container{
padding: 32px 32px 12px 32px;
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
}
&__question {
@include m.LinkS;
margin-bottom: 28px;
color: v.$name-task;
text-decoration: none;
}
&__marginAfterButton {
margin-bottom: 32px;
}
}
&__question {
@include m.LinkS;
margin-bottom: 28px;
color: v.$name-task;
text-decoration: none;
}
&__marginAfterButton {
margin-bottom: 32px;
}
}
8 changes: 4 additions & 4 deletions src/components/Forms/AuthorizationForm/AuthorizationForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ const AuthorizationForm = () => {
return (
<form className={styles.AuthorizationForm} onSubmit={onSubmitLogin}>
<div className={styles.AuthorizationForm__container}>
<EmailInput id="email" name="email" onChange={handleChange} />
<PasswordInput id="password" name="password" onChange={handleChange} />
<EmailInput id='email' name='email' onChange={handleChange} />
<PasswordInput id='password' name='password' onChange={handleChange} />
</div>
<NavLink to="pass" className={styles.AuthorizationForm__question}>
<NavLink to='pass' className={styles.AuthorizationForm__question}>
Забыли пароль?
</NavLink>
<div className={styles.AuthorizationForm__marginAfterButton}>
<UniversalButton type="submit">Войти</UniversalButton>
<UniversalButton type='submit'>Войти</UniversalButton>
</div>
</form>
);
Expand Down
4 changes: 2 additions & 2 deletions src/components/GroupTasks/GroupTasks.module.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
.groupTasks {
border-radius: 8px;
border: 1px solid #DCE4F3;
border: 1px solid #dce4f3;
}

.header {
width: 256px;
display: flex;
background-color:#DCE4F3;
background-color: #dce4f3;
display: flex;
justify-content: center;
align-items: center;
Expand Down
2 changes: 1 addition & 1 deletion src/components/GroupTasks/GroupTasks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const GroupTasks = () => {
return (
<div
className={styles.groupTasks}
role="button"
role='button'
tabIndex={0}
onClick={handleToggleCollapse}
onKeyDown={handleKeyDown}
Expand Down
10 changes: 5 additions & 5 deletions src/components/Header/HeaderEmployer/HeaderEmployer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,30 +16,30 @@ const HeaderEmployer: FC = () => {
<div className={styles.container}>
<div className={styles.user}>
<button className={styles.user_button}>
<img className={styles.user_photo} src={avatar} alt="Аватар пользователя" />
<img className={styles.user_photo} src={avatar} alt='Аватар пользователя' />
<h1 className={styles.user_name}>Маша Васильева</h1>
</button>
</div>

<ul className={styles.linkWrapper}>
<li className={styles.navLi}>
<Link className={handleClassName('/objectives')} to="/objectives">
<Link className={handleClassName('/objectives')} to='/objectives'>
Поставленные задачи
</Link>
</li>
<li className={styles.navLi}>
<Link className={handleClassName('/tasks')} to="/tasks">
<Link className={handleClassName('/tasks')} to='/tasks'>
Мои Задачи
</Link>
</li>
<li className={styles.navLi}>
<Link className={handleClassName('/requests')} to="/requests">
<Link className={handleClassName('/requests')} to='/requests'>
Запросы
<span className={styles.count}>3</span>
</Link>
</li>
<li className={styles.navLi}>
<Link className={handleClassName('/archive')} to="/archive">
<Link className={handleClassName('/archive')} to='/archive'>
Архив
</Link>
</li>
Expand Down
10 changes: 5 additions & 5 deletions src/components/Logo/Logo.module.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.Logo {
width: 88px;
height: 88px;
margin-top: 40px;
margin-left: 40px;
}
width: 88px;
height: 88px;
margin-top: 40px;
margin-left: 40px;
}
2 changes: 1 addition & 1 deletion src/components/Logo/Logo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import styles from './Logo.module.scss';
const Logo = () => {
return (
<div className={styles.Logo}>
<img src={logo} alt="Логотип" />
<img src={logo} alt='Логотип' />
</div>
);
};
Expand Down
10 changes: 4 additions & 6 deletions src/components/Popup/CreateTask/CreateTask.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
margin-top: 24px;
margin-bottom: 16px;
&__button {
background: v.$white-color;;
background: v.$white-color;
border: none;
border-radius: 8px;
width: 100%;
Expand Down Expand Up @@ -55,7 +55,7 @@
}
&__mesh {
display: grid;
grid-template-columns:repeat(2, 1fr);
grid-template-columns: repeat(2, 1fr);
grid-gap: 4px;
}
&__label {
Expand Down Expand Up @@ -129,10 +129,10 @@
padding: 8px 16px;
text-align: start;
@include m.BodyLarge;
color: #2C2B2B;
color: #2c2b2b;

&::placeholder {
color: v.$disabled-color;
color: v.$disabled-color;
}
}
&__open {
Expand Down Expand Up @@ -190,5 +190,3 @@
}
}
}


18 changes: 9 additions & 9 deletions src/components/Popup/CreateTask/CreateTask.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const CreateTask = () => {
className={`${styles.checkboxes__container} ${
!showCheckboxesMenu && styles.checkboxes__show
}`}
id="checkboxes"
id='checkboxes'
>
<div className={styles.checkboxes__mesh}>
{users.map((item, index) => (
Expand All @@ -93,7 +93,7 @@ const CreateTask = () => {
</div>
<div className={styles.textarea__container}>
<UniversalTextarea
label="Содержание задачи"
label='Содержание задачи'
value={textareaValue}
onChange={setTextareaValue}
/>
Expand Down Expand Up @@ -122,25 +122,25 @@ const CreateTask = () => {
</div>
<div className={styles.timeContainer}>
<p className={styles.form__label}>Время (по МСК)</p>
<input className={styles.time} placeholder="--/--" />
<input className={styles.time} placeholder='--/--' />
</div>
</div>
<div className={styles.linkInput}>
<UniversalInput id="task" label="Ссылка (необязательное поле)" />
<UniversalInput id='task' label='Ссылка (необязательное поле)' />
</div>
<div className={styles.button}>
<UniversalButton
width="250px"
height="40px"
type="submit"
width='250px'
height='40px'
type='submit'
className={styles.button__button}
disabled={!checkboxValues || !textareaValue || !dateValue}
>
Создать
</UniversalButton>
<UniversalButton
width="250px"
height="40px"
width='250px'
height='40px'
onClick={closeModalState}
isFilled={false}
className={styles.button__button}
Expand Down
4 changes: 2 additions & 2 deletions src/components/Popup/Popup.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
width: 100%;
height: 100%;
background-color: rgba(20, 20, 20, 0.2);
opacity: .5;
opacity: 0.5;
}

&__container {
Expand All @@ -31,7 +31,7 @@
padding: 25px;
border-radius: 10px;
box-shadow: 0 4px 24px 0 rgba(0, 0, 0, 0.08);
background: #F6F7FB;
background: #f6f7fb;
z-index: 99;
}
}
2 changes: 1 addition & 1 deletion src/components/Popup/PopupWrapper/PopupWrapper.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
width: 100%;
height: 100%;
background: v.$black-color;
opacity: .5;
opacity: 0.5;
}
}
6 changes: 3 additions & 3 deletions src/components/Search/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ const Search = () => {
<form className={styles.search} onSubmit={handleSubmit}>
<input
className={styles.search__find}
placeholder="Ключевые слова, #, дата создания"
placeholder='Ключевые слова, #, дата создания'
/>
<SearchButtons type="submit" src={searchIcon} position="search" />
<SearchButtons type='submit' src={searchIcon} position='search' />
</form>
<SearchButtons type="button" src={filterIcon} position="filter" />
<SearchButtons type='button' src={filterIcon} position='filter' />
</>
);
};
Expand Down
Loading

0 comments on commit 8c2e063

Please sign in to comment.