Conversation
41ef2f1 to
751efda
Compare
149df46 to
2afb73b
Compare
2afb73b to
1178c03
Compare
|
Запушил с переименованием файлов, теперь если смотреть по коммитам, то можно смотреть только на изменения, а не на весь файл |
2d637b1 to
fda2f4b
Compare
fda2f4b to
a5f33b9
Compare
| var parser = root(section({ | ||
| system: section({ | ||
| parallelLimit: option({ | ||
| defaultValue: 0, |
There was a problem hiding this comment.
0 – не самый удачный пример дефолта. Кстати, в гермионе у этой опции дефолт Infinity.
| class UnknownKeysError extends Error { | ||
| constructor(keys) { | ||
| export class UnknownKeysError extends Error { | ||
| keys: Array<string>; |
|
|
||
| export interface Locator<Options> extends Node<Options> { | ||
| nested<Key extends keyof Options>(key: Key): Locator<Options[Key]>; | ||
| resetOption(newOption: Options): Locator<Options>; |
There was a problem hiding this comment.
Как-то не вяжется, что аргумент называется newOption, а тип Options – во множественном числе (как будто это массив).
| }, | ||
| "scripts": { | ||
| "build": "tsc --build", | ||
| "prepublishOnly": "npm run build", |
There was a problem hiding this comment.
Здесь тоже вопрос, почему prepublishOnly, а не prepack?
https://github.com/gemini-testing/hermione-storybook/blob/master/package.json#L16
|
Кстати, еще вопрос: а не надо переименовывать папку |
DudaGod
left a comment
There was a problem hiding this comment.
В PR "Rewrite package on typescript" ожидаешь увидеть полный переезд на TS. Но при этом тесты остались на js. И структура пакета отличается от привычной в TS. Давай это исправим.
| extends: ['gemini-testing', 'plugin:@typescript-eslint/recommended'], | ||
| parser: '@typescript-eslint/parser', | ||
| plugins: ['@typescript-eslint'], | ||
| root: true |
There was a problem hiding this comment.
Немного странная последовательность опций. Я бы в такой последовательности описывал - https://github.com/gemini-testing/hermione-storybook/blob/master/.eslintrc.js
| { | ||
| "extends": "@tsconfig/recommended/tsconfig.json", | ||
| "include": ["lib"], | ||
| "exclude": ["build", "test"], |
There was a problem hiding this comment.
Странный exclude. У тебя же эти папки в include не попадают вообще.
Ну и почему сразу не сделать по нормальному? Т.е. не переименовать lib в src и в этот же src положить тесты?
| "scripts": { | ||
| "build": "tsc --build", | ||
| "prepublishOnly": "npm run build", | ||
| "pretest": "npm run build", |
There was a problem hiding this comment.
Зачем на каждый test запускать сборку?
| @@ -0,0 +1,15 @@ | |||
| { | |||
| "extends": "@tsconfig/recommended/tsconfig.json", | |||
There was a problem hiding this comment.
А что ты используешь из этого конфига то? Кажется, что он вообще не нужен
| "compilerOptions": { | ||
| "target": "ES2019", | ||
| "outDir": "build", | ||
| "allowJs": true, |
There was a problem hiding this comment.
Ты же пакет переписал на ts. Зачем тут эта опция?
| "include": ["lib"], | ||
| "exclude": ["build", "test"], | ||
| "compilerOptions": { | ||
| "target": "ES2019", |
There was a problem hiding this comment.
А какие ты фичи юзаешь из es2019? Спрашиваю так как обычно используем es2017
| - '8' | ||
| script: | ||
| - npm build | ||
| - npm test |
There was a problem hiding this comment.
А здесь у тебя за счет pretest получится двойной запуск build скрипта.
| } | ||
|
|
||
| /* eslint-disable @typescript-eslint/no-explicit-any */ | ||
| export interface OptionParserConfig<Value, MappedValue, Result = any> { |
There was a problem hiding this comment.
Не понял а для чего ты тут столько any налупил? Давай хотя бы unknown юзать.
No description provided.