-
Notifications
You must be signed in to change notification settings - Fork 185
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
tech: add plugin eslint-plugin-jsdoc
to check jsdocs require
#8387
base: master
Are you sure you want to change the base?
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
size-limit report 📦
|
e2e tests |
👀 Docs deployed
Commit ffad473 |
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.
💪
Не везде я уверен на счёт правок в словах, но оставил чтобы ещё над формулировкой подумать. Но это всё nit.
packages/vkui/src/components/PanelHeaderContext/PanelHeaderContext.tsx
Outdated
Show resolved
Hide resolved
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.
💅
Мейби |
А в рамках этого |
expanded: boolean; | ||
/** | ||
* Колбэк для изменения состояния аккордеона |
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.
Вопрос на обсуждение - насколько уместно называть это "колбэк", все-таки это больше разговорный термин? Мейби "обработчик"? Функция-обработчик?
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.
Прошелся везде, где нашел "колбэк", "коллбэк", "callback" и заменио на обработчик
* Режим отображения компонента: | ||
* | ||
* - `"sheet"`: отображение снизу экрана, подходит для мобильных устройств | ||
* - `"menu"`: отображение в виде поповера, относительно якорного элемента |
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.
"попап", "поповер" тоже сомнения, что звучит понятно. Всплывающее окно (элемент)?
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.
Везде, где нашел "попап", "поповер" и заменил на Всплывающее окно (элемент
isCancelItem: boolean; | ||
}) => (event: React.MouseEvent) => void; | ||
|
||
export type ActionSheetContextType<T extends Element = Element> = { | ||
/** | ||
* Обработчик клика по элементу |
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.
Здесь и в остальных случаях слово "клик", возможно, нужно заменить на "нажатие"?
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.
Заменил везде "клик" на "нажатие"
immediateAction: ActionType<T> | undefined; | ||
/** | ||
* Флаг, указывающий нужно ли автоматически закрывать ActionSheet |
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.
* Флаг, указывающий нужно ли автоматически закрывать ActionSheet | |
* Флаг, указывающий, нужно ли автоматически закрывать ActionSheet |
Или перефразировать?
selectable?: boolean; | ||
/** | ||
* Отключает элемент |
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.
Тут непонятно назначение. Чуть выше для Accordion
описывался как "Блокировка взаимодействия с компонентом". Возможно, следует выбрать какое-то одно описание и везде его придерживаться.
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.
Прошелся по свойствам, и так где есть свойство disabled
поменял описание на "Блокировка взаимодействия с компонентом"
@@ -1,4 +1,5 @@ | |||
'use client'; | |||
/* eslint-disable jsdoc/require-jsdoc */ |
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.
А почему тут игнор? На самом деле здесь из jsdoc ниже нужно у свойств убрать все @ignore
и заменить более-менее понятным описанием
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.
Убрал тут игноры и добавил описаний
…ove descriptions of props
Добавил правило, которое проверяет наличие точки в конце jsdoc и заглавную букву в начале jsdoc |
Описание
Сейчас у многих свойств компонентов нет описания. Из-за этого в доке у этих свойств тоже нет описания. Нужно добавить описания так, где это нужно.
Изменения
eslint
плагин eslint-plugin-jsdoc и настроил его, так чтобы он ругался на отсутствие jsdoc у свойств в типах и интерфейсах в папкеsrc/components
.Release notes