-
Notifications
You must be signed in to change notification settings - Fork 4
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
LINT-53(HOTFIX): PublicAPI for {segment}.* files #54
Conversation
Вроде как работает и тесты не обвалилсь =) |
rules/public-api/index.js
Outdated
@@ -1,6 +1,6 @@ | |||
const { layersLib } = require("../../utils"); | |||
|
|||
const FS_SEGMENTS_REG = layersLib.FS_SEGMENTS.join("|"); | |||
const FS_SEGMENTS_REG = layersLib.FS_SEGMENTS.map(seg => `${seg}*`).join("|"); |
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.
issue:
Контр пример
model // Pass (valid)
model.ts // Pass (valid)
models.ts // Pass (invalid)
model-data.ts // Pass (invalid)
Тож самое и с другими сегментами можно провернуть)
suggestion:
Кажется, нужно более явно указать, чтобы точка была 🤔
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.
Точняк!
rules/public-api/index.js
Outdated
@@ -1,6 +1,6 @@ | |||
const { layersLib } = require("../../utils"); | |||
|
|||
const FS_SEGMENTS_REG = layersLib.FS_SEGMENTS.join("|"); | |||
const FS_SEGMENTS_REG = layersLib.FS_SEGMENTS.map(seg => `${seg}*`).join("|"); |
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.
nitpick:
Ну и если по-хорошему, то как-то эту багу в тестах тоже отобразить бы - чтоб не воспроизводилась больше)
Мб прям явно в импортах написать тип "ui.tsx"
Description
В регулярке добавлена проверка для {segment}.* файлов.
Reference
#53