[x] надо в проекте с валидацией сделать единообразное использование кавычек. Оставить только одинарные ('), а двойные (") убрать. Для этого eslint надо подкрутить еще, чтобы не давал. А то как то сильно разнородно выглядит
@LessThanValidation('age', "dog can't be owned by anyone longer than his age") - во втором случае нужно или экранировать ' или использовать наклонные кавычки (`), как для шаблонных строк.
[x] в кодосгенерированных файлах надо вверху выводить комментарий, из которого было бы понятно, что это автосгенерированный файл и там же инструкции, которые дизаблят проверку eslint в нем
[x] в кодосгенерированном в тесте файле, если payload будет пустым, то это же упадет:
[x] вынести из кодосгенерированного файла инициализацию конфигурации. Пусть в библиотеке будет метод инициализации, который надо будет выполнить при запуске приложения
[x] еще по методу dogValidator - давай его переделаем, чтобы первым параметром был объект типа Dog
а потом опциональный конфиг, а потом опциональный контекст, потому что 95% использования будет в режиме, когда передается только сам объект
[x] надо в проекте с валидацией сделать единообразное использование кавычек. Оставить только одинарные ('), а двойные (") убрать. Для этого eslint надо подкрутить еще, чтобы не давал. А то как то сильно разнородно выглядит @LessThanValidation('age', "dog can't be owned by anyone longer than his age") - во втором случае нужно или экранировать ' или использовать наклонные кавычки (`), как для шаблонных строк.
[x] в кодосгенерированных файлах надо вверху выводить комментарий, из которого было бы понятно, что это автосгенерированный файл и там же инструкции, которые дизаблят проверку eslint в нем
[x] в кодосгенерированном в тесте файле, если payload будет пустым, то это же упадет:
[x] вынести из кодосгенерированного файла инициализацию конфигурации. Пусть в библиотеке будет метод инициализации, который надо будет выполнить при запуске приложения
[x] еще по методу dogValidator - давай его переделаем, чтобы первым параметром был объект типа Dog а потом опциональный конфиг, а потом опциональный контекст, потому что 95% использования будет в режиме, когда передается только сам объект