Closed TorinAsakura closed 1 year ago
Уточните, пожалуйста. Блок Расскажите как вы это себе видите подразумевает письменные ответы по таскам?
Уточните, пожалуйста. Блок Расскажите как вы это себе видите подразумевает письменные ответы по таскам?
Нет. Закончил пункт, сделал коммит, поставил галочку, прикрепив ссылку на коммит. Общее ревью принято писать в пулл реквеста.
Прошу помощи.
Вот я клонировал репозиторий себе, создал ветку, перешел в неё. Далее нужно какие-нибудь yarn
команды вводить?
пишу yarn install
выдаёт ошибку:
/home/mirved64/Desktop/Web/Mirved64.github.io/.yarn/releases/yarn-0.0.1-git.20230217.hash-56aa982.cjs:1326
if ((a ?? (a = l), r != null && (await this.chmodPromise(l, r)), n != null))
^
SyntaxError: Unexpected token '?'
at wrapSafe (internal/modules/cjs/loader.js:915:16)
at Module._compile (internal/modules/cjs/loader.js:963:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
at internal/main/run_main_module.js:17:47
или нужно создать директорию и в ней создавать файлы и работать?
@Mirved64 Ничего не нужно. Выполняй последовательно задание. Не забегай вперёд.
Прошу помощи.
После удачного yarn install
при компиляции файла ts вылезает ошибка:
index.ts:12:35 - error TS2550: Property 'find' does not exist on type 'IUserInfo[]'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.
12 const existUser = credentials.find(
Как задать более свежую версию es? или дело в другом?
Прошу помощи.
При вводе yarn lint
в логах выскакивают ошибки:
➤ YN0000: │ typescript-auth/index.ts:31:5
➤ YN0000: │
➤ YN0000: │ Error: Unexpected console statement. no-console
➤ YN0000: │
➤ YN0000: │ 29 | userIsAuth = { isAuth: true, user: activeUser };
➤ YN0000: │ 30 |
➤ YN0000: │ > 31 | console.log(`You are welcome, ${username}!`);
➤ YN0000: │ | ^
➤ YN0000: │ 32 | } catch (error) {
➤ YN0000: │ 33 | if (error instanceof Error) {
➤ YN0000: │ 34 | console.log(error.message);
➤ YN0000: │
на каждый console.log
.
Как это поправить?
@Mirved64 Ошибки линтера можно игнорировать если они нужны в работе в данный момент через / eslint-disable next-line /
Научитесь читать ошибки и разбираться с их содержимым через гуглёж, это нормальная практика. Если ты всякий раз будешь стопориться - ты не сможешь работать.
@Mirved64 Ошибки линтера можно игнорировать если они нужны в работе в данный момент через / eslint-disable next-line /
Научитесь читать ошибки и разбираться с их содержимым через гуглёж, это нормальная практика. Если ты всякий раз будешь стопориться - ты не сможешь работать.
Гугл на мой вопрос:
Прошу помощи.
После удачного
yarn install
при компиляции файла ts вылезает ошибка:index.ts:12:35 - error TS2550: Property 'find' does not exist on type 'IUserInfo[]'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later. 12 const existUser = credentials.find(
Как задать более свежую версию es? или дело в другом?
Дал ответ, что в файле tsconfig.json
нужно внести:
{
"compilerOptions": {
...
"target": "ES2019",
"module": "ESNext",
"moduleResolution": "node"
}
}
В репозитории я не нашел файл tsconfig.json
, поэтому попросил помощи.
@Mirved64 Ошибки линтера можно игнорировать если они нужны в работе в данный момент через / eslint-disable next-line /
Благодарю, буду знать.
@Mirved64 Ээээ, ну нет файла - создай, в чём проблемы-то?
@Mirved64 Ээээ, ну нет файла - создай, в чём проблемы-то?
Пока еще нет опыта. Исправлю. Благодарю!
Прошу помощи с yarn
.
Совсем запутался как работать с yarn
.
Клонирую репозиторий себе, создаю ветку от мастера, дальше работаю в ней.
Сразу настраиваю пакеты, чтобы yarn lint
работал:
Надо понизить версии eslint до следующих:
- eslint: 8.18
- @types/eslint: 8
Для этого ввожу в консоль команду: yarn add --dev eslint@8.18.0
Получаю такие логи:
❯ yarn --dev add eslint@8.18.0
➤ YN0000: ┌ Resolution step
➤ YN0002: │ @atls/config-jest@npm:0.0.5 doesn't provide jest (pafefc), requested by ts-jest
➤ YN0002: │ @atls/config-jest@npm:0.0.5 doesn't provide typescript (p8a67a), requested by ts-jest
➤ YN0002: │ @atls/webpack-proto-imports-loader@npm:0.0.9 doesn't provide webpack (p6860c), requested by file-loader
➤ YN0060: │ @yarnpkg/plugin-interactive-tools@npm:4.0.0-rc.43 [8a4b7] provides react (p66a4e) with version 16.14.0, which doesn't satisfy what ink and some of its descendants request
➤ YN0060: │ @yarnpkg/plugin-version@npm:4.0.0-rc.43 [8a4b7] provides react (peea85) with version 16.14.0, which doesn't satisfy what ink and some of its descendants request
➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code
➤ YN0000: └ Completed in 2s 308ms
➤ YN0000: ┌ Fetch step
➤ YN0019: │ typescript-patch-66db3462d6-3d1b044496.zip appears to be unused - removing
➤ YN0019: │ v8-to-istanbul-npm-9.0.0-bd125c4318-d8ed2c39ba.zip appears to be unused - removing
➤ YN0019: │ write-file-atomic-npm-4.0.1-96ec744721-8f78023253.zip appears to be unused - removing
➤ YN0019: │ yargs-parser-npm-20.2.9-a1d19e598d-8bb69015f2.zip appears to be unused - removing
➤ YN0019: │ yup-npm-0.32.11-dbaff8ca9c-43a16786b4.zip appears to be unused - removing
➤ YN0000: └ Completed in 1s 339ms
➤ YN0000: ┌ Link step
➤ YN0000: │ ESM support for PnP uses the experimental loader API and is therefore experimental
➤ YN0000: └ Completed in 0s 440ms
➤ YN0000: **Done with warnings** in 4s 207ms
Далее ввожу в консоль команду: yarn remove @types/eslint
Получаю такие логи:
➤ YN0000: ┌ Resolution step
➤ YN0002: │ @atls/config-jest@npm:0.0.5 doesn't provide jest (pafefc), requested by ts-jest
➤ YN0002: │ @atls/config-jest@npm:0.0.5 doesn't provide typescript (p8a67a), requested by ts-jest
➤ YN0002: │ @atls/webpack-proto-imports-loader@npm:0.0.9 doesn't provide webpack (p6860c), requested by file-loader
➤ YN0060: │ @yarnpkg/plugin-interactive-tools@npm:4.0.0-rc.43 [8a4b7] provides react (p66a4e) with version 16.14.0, which doesn't satisfy what ink and some of its descendants request
➤ YN0060: │ @yarnpkg/plugin-version@npm:4.0.0-rc.43 [8a4b7] provides react (peea85) with version 16.14.0, which doesn't satisfy what ink and some of its descendants request
➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code
➤ YN0000: └ Completed in 0s 272ms
➤ YN0000: ┌ Fetch step
➤ YN0019: │ @types-eslint-npm-8.37.0-1f765f44f3-06d3b3fba1.zip appears to be unused - removing
➤ YN0000: └ Completed in 0s 229ms
➤ YN0000: ┌ Link step
➤ YN0000: │ ESM support for PnP uses the experimental loader API and is therefore experimental
➤ YN0000: └ Completed
➤ YN0000: Done with warnings in 0s 714ms
Далее ввожу в консоль команду: yarn add --dev @types/eslint@8
Получаю такие логи:
➤ YN0000: ┌ Resolution step
➤ YN0002: │ @atls/config-jest@npm:0.0.5 doesn't provide jest (pafefc), requested by ts-jest
➤ YN0002: │ @atls/config-jest@npm:0.0.5 doesn't provide typescript (p8a67a), requested by ts-jest
➤ YN0002: │ @atls/webpack-proto-imports-loader@npm:0.0.9 doesn't provide webpack (p6860c), requested by file-loader
➤ YN0060: │ @yarnpkg/plugin-interactive-tools@npm:4.0.0-rc.43 [8a4b7] provides react (p66a4e) with version 16.14.0, which doesn't satisfy what ink and some of its descendants request
➤ YN0060: │ @yarnpkg/plugin-version@npm:4.0.0-rc.43 [8a4b7] provides react (peea85) with version 16.14.0, which doesn't satisfy what ink and some of its descendants request
➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code
➤ YN0000: └ Completed in 1s 105ms
➤ YN0000: ┌ Fetch step
➤ YN0013: │ @types/eslint@npm:8.37.0 can't be found in the cache and will be fetched from the remote registry
➤ YN0000: └ Completed in 0s 238ms
➤ YN0000: ┌ Link step
➤ YN0000: │ ESM support for PnP uses the experimental loader API and is therefore experimental
➤ YN0000: └ Completed
➤ YN0000: Done with warnings in 1s 552ms
Из-за чего процессы заканчиваются с ворнингами? Так же быть не должно, процесс должен закончится без них.
И ещё, у меня почему-то изменения в папке .yarn/cache учитываются гитом, хотя папка указана в гитигноре. Так быть ведь не должно?
Посмотрел описание ошибок YN0002
, YN0060
, YN0013
на сайте yarn, не понимаю как их исправить.
Прошу помощи с
yarn
. Совсем запутался как работать сyarn
.Клонирую репозиторий себе, создаю ветку от мастера, дальше работаю в ней.
Сразу настраиваю пакеты, чтобы
yarn lint
работал:Надо понизить версии eslint до следующих:
- eslint: 8.18
- @types/eslint: 8
Для этого ввожу в консоль команду:
yarn add --dev eslint@8.18.0
Получаю такие логи:❯ yarn --dev add eslint@8.18.0 ➤ YN0000: ┌ Resolution step ➤ YN0002: │ @atls/config-jest@npm:0.0.5 doesn't provide jest (pafefc), requested by ts-jest ➤ YN0002: │ @atls/config-jest@npm:0.0.5 doesn't provide typescript (p8a67a), requested by ts-jest ➤ YN0002: │ @atls/webpack-proto-imports-loader@npm:0.0.9 doesn't provide webpack (p6860c), requested by file-loader ➤ YN0060: │ @yarnpkg/plugin-interactive-tools@npm:4.0.0-rc.43 [8a4b7] provides react (p66a4e) with version 16.14.0, which doesn't satisfy what ink and some of its descendants request ➤ YN0060: │ @yarnpkg/plugin-version@npm:4.0.0-rc.43 [8a4b7] provides react (peea85) with version 16.14.0, which doesn't satisfy what ink and some of its descendants request ➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code ➤ YN0000: └ Completed in 2s 308ms ➤ YN0000: ┌ Fetch step ➤ YN0019: │ typescript-patch-66db3462d6-3d1b044496.zip appears to be unused - removing ➤ YN0019: │ v8-to-istanbul-npm-9.0.0-bd125c4318-d8ed2c39ba.zip appears to be unused - removing ➤ YN0019: │ write-file-atomic-npm-4.0.1-96ec744721-8f78023253.zip appears to be unused - removing ➤ YN0019: │ yargs-parser-npm-20.2.9-a1d19e598d-8bb69015f2.zip appears to be unused - removing ➤ YN0019: │ yup-npm-0.32.11-dbaff8ca9c-43a16786b4.zip appears to be unused - removing ➤ YN0000: └ Completed in 1s 339ms ➤ YN0000: ┌ Link step ➤ YN0000: │ ESM support for PnP uses the experimental loader API and is therefore experimental ➤ YN0000: └ Completed in 0s 440ms ➤ YN0000: **Done with warnings** in 4s 207ms
Далее ввожу в консоль команду:
yarn remove @types/eslint
Получаю такие логи:➤ YN0000: ┌ Resolution step ➤ YN0002: │ @atls/config-jest@npm:0.0.5 doesn't provide jest (pafefc), requested by ts-jest ➤ YN0002: │ @atls/config-jest@npm:0.0.5 doesn't provide typescript (p8a67a), requested by ts-jest ➤ YN0002: │ @atls/webpack-proto-imports-loader@npm:0.0.9 doesn't provide webpack (p6860c), requested by file-loader ➤ YN0060: │ @yarnpkg/plugin-interactive-tools@npm:4.0.0-rc.43 [8a4b7] provides react (p66a4e) with version 16.14.0, which doesn't satisfy what ink and some of its descendants request ➤ YN0060: │ @yarnpkg/plugin-version@npm:4.0.0-rc.43 [8a4b7] provides react (peea85) with version 16.14.0, which doesn't satisfy what ink and some of its descendants request ➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code ➤ YN0000: └ Completed in 0s 272ms ➤ YN0000: ┌ Fetch step ➤ YN0019: │ @types-eslint-npm-8.37.0-1f765f44f3-06d3b3fba1.zip appears to be unused - removing ➤ YN0000: └ Completed in 0s 229ms ➤ YN0000: ┌ Link step ➤ YN0000: │ ESM support for PnP uses the experimental loader API and is therefore experimental ➤ YN0000: └ Completed ➤ YN0000: Done with warnings in 0s 714ms
Далее ввожу в консоль команду:
yarn add --dev @types/eslint@8
Получаю такие логи:➤ YN0000: ┌ Resolution step ➤ YN0002: │ @atls/config-jest@npm:0.0.5 doesn't provide jest (pafefc), requested by ts-jest ➤ YN0002: │ @atls/config-jest@npm:0.0.5 doesn't provide typescript (p8a67a), requested by ts-jest ➤ YN0002: │ @atls/webpack-proto-imports-loader@npm:0.0.9 doesn't provide webpack (p6860c), requested by file-loader ➤ YN0060: │ @yarnpkg/plugin-interactive-tools@npm:4.0.0-rc.43 [8a4b7] provides react (p66a4e) with version 16.14.0, which doesn't satisfy what ink and some of its descendants request ➤ YN0060: │ @yarnpkg/plugin-version@npm:4.0.0-rc.43 [8a4b7] provides react (peea85) with version 16.14.0, which doesn't satisfy what ink and some of its descendants request ➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code ➤ YN0000: └ Completed in 1s 105ms ➤ YN0000: ┌ Fetch step ➤ YN0013: │ @types/eslint@npm:8.37.0 can't be found in the cache and will be fetched from the remote registry ➤ YN0000: └ Completed in 0s 238ms ➤ YN0000: ┌ Link step ➤ YN0000: │ ESM support for PnP uses the experimental loader API and is therefore experimental ➤ YN0000: └ Completed ➤ YN0000: Done with warnings in 1s 552ms
Из-за чего процессы заканчиваются с ворнингами? Так же быть не должно, процесс должен закончится без них.
ворнинги это нормальное поведение, кто тебе сказал, что их не должно быть? Вот если была бы ошибка - тогда да. Не понимаю зачем ты удаляешь типы, а потом снова их устанавливаешь? Что ты вообще делаешь? А главное зачем ты это делаешь?
И ещё, у меня почему-то изменения в папке .yarn/cache учитываются гитом, хотя папка указана в гитигноре. Так быть ведь не должно?
Посмотрел описание ошибок
YN0002
,YN0060
,YN0013
на сайте yarn, не понимаю как их исправить.
папка yarn всегда должна быть в гите, читай интродакшен второго ярна
Прошу помощи с
yarn
. Совсем запутался как работать сyarn
. Клонирую репозиторий себе, создаю ветку от мастера, дальше работаю в ней. Сразу настраиваю пакеты, чтобыyarn lint
работал:Надо понизить версии eslint до следующих:
- eslint: 8.18
- @types/eslint: 8
Для этого ввожу в консоль команду:
yarn add --dev eslint@8.18.0
Получаю такие логи:❯ yarn --dev add eslint@8.18.0 ➤ YN0000: ┌ Resolution step ➤ YN0002: │ @atls/config-jest@npm:0.0.5 doesn't provide jest (pafefc), requested by ts-jest ➤ YN0002: │ @atls/config-jest@npm:0.0.5 doesn't provide typescript (p8a67a), requested by ts-jest ➤ YN0002: │ @atls/webpack-proto-imports-loader@npm:0.0.9 doesn't provide webpack (p6860c), requested by file-loader ➤ YN0060: │ @yarnpkg/plugin-interactive-tools@npm:4.0.0-rc.43 [8a4b7] provides react (p66a4e) with version 16.14.0, which doesn't satisfy what ink and some of its descendants request ➤ YN0060: │ @yarnpkg/plugin-version@npm:4.0.0-rc.43 [8a4b7] provides react (peea85) with version 16.14.0, which doesn't satisfy what ink and some of its descendants request ➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code ➤ YN0000: └ Completed in 2s 308ms ➤ YN0000: ┌ Fetch step ➤ YN0019: │ typescript-patch-66db3462d6-3d1b044496.zip appears to be unused - removing ➤ YN0019: │ v8-to-istanbul-npm-9.0.0-bd125c4318-d8ed2c39ba.zip appears to be unused - removing ➤ YN0019: │ write-file-atomic-npm-4.0.1-96ec744721-8f78023253.zip appears to be unused - removing ➤ YN0019: │ yargs-parser-npm-20.2.9-a1d19e598d-8bb69015f2.zip appears to be unused - removing ➤ YN0019: │ yup-npm-0.32.11-dbaff8ca9c-43a16786b4.zip appears to be unused - removing ➤ YN0000: └ Completed in 1s 339ms ➤ YN0000: ┌ Link step ➤ YN0000: │ ESM support for PnP uses the experimental loader API and is therefore experimental ➤ YN0000: └ Completed in 0s 440ms ➤ YN0000: **Done with warnings** in 4s 207ms
Далее ввожу в консоль команду:
yarn remove @types/eslint
Получаю такие логи:➤ YN0000: ┌ Resolution step ➤ YN0002: │ @atls/config-jest@npm:0.0.5 doesn't provide jest (pafefc), requested by ts-jest ➤ YN0002: │ @atls/config-jest@npm:0.0.5 doesn't provide typescript (p8a67a), requested by ts-jest ➤ YN0002: │ @atls/webpack-proto-imports-loader@npm:0.0.9 doesn't provide webpack (p6860c), requested by file-loader ➤ YN0060: │ @yarnpkg/plugin-interactive-tools@npm:4.0.0-rc.43 [8a4b7] provides react (p66a4e) with version 16.14.0, which doesn't satisfy what ink and some of its descendants request ➤ YN0060: │ @yarnpkg/plugin-version@npm:4.0.0-rc.43 [8a4b7] provides react (peea85) with version 16.14.0, which doesn't satisfy what ink and some of its descendants request ➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code ➤ YN0000: └ Completed in 0s 272ms ➤ YN0000: ┌ Fetch step ➤ YN0019: │ @types-eslint-npm-8.37.0-1f765f44f3-06d3b3fba1.zip appears to be unused - removing ➤ YN0000: └ Completed in 0s 229ms ➤ YN0000: ┌ Link step ➤ YN0000: │ ESM support for PnP uses the experimental loader API and is therefore experimental ➤ YN0000: └ Completed ➤ YN0000: Done with warnings in 0s 714ms
Далее ввожу в консоль команду:
yarn add --dev @types/eslint@8
Получаю такие логи:➤ YN0000: ┌ Resolution step ➤ YN0002: │ @atls/config-jest@npm:0.0.5 doesn't provide jest (pafefc), requested by ts-jest ➤ YN0002: │ @atls/config-jest@npm:0.0.5 doesn't provide typescript (p8a67a), requested by ts-jest ➤ YN0002: │ @atls/webpack-proto-imports-loader@npm:0.0.9 doesn't provide webpack (p6860c), requested by file-loader ➤ YN0060: │ @yarnpkg/plugin-interactive-tools@npm:4.0.0-rc.43 [8a4b7] provides react (p66a4e) with version 16.14.0, which doesn't satisfy what ink and some of its descendants request ➤ YN0060: │ @yarnpkg/plugin-version@npm:4.0.0-rc.43 [8a4b7] provides react (peea85) with version 16.14.0, which doesn't satisfy what ink and some of its descendants request ➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code ➤ YN0000: └ Completed in 1s 105ms ➤ YN0000: ┌ Fetch step ➤ YN0013: │ @types/eslint@npm:8.37.0 can't be found in the cache and will be fetched from the remote registry ➤ YN0000: └ Completed in 0s 238ms ➤ YN0000: ┌ Link step ➤ YN0000: │ ESM support for PnP uses the experimental loader API and is therefore experimental ➤ YN0000: └ Completed ➤ YN0000: Done with warnings in 1s 552ms
Из-за чего процессы заканчиваются с ворнингами? Так же быть не должно, процесс должен закончится без них.
ворнинги это нормальное поведение, кто тебе сказал, что их не должно быть? Вот если была бы ошибка - тогда да. Не понимаю зачем ты удаляешь типы, а потом снова их устанавливаешь? Что ты вообще делаешь? А главное зачем ты это делаешь?
Удалял тип, а потом его ставил я потому, что у меня не менялась версия типа без удаления.
Я пытаюсь изменить версию eslint
как рекомендовали тут https://github.com/atls-academy/jumpeebunee.github.io/issues/3#issuecomment-1551189652 , чтобы проверять код с помощью команды yarn lint
.
Прошу помощи с
yarn
. Совсем запутался как работать сyarn
. Клонирую репозиторий себе, создаю ветку от мастера, дальше работаю в ней. Сразу настраиваю пакеты, чтобыyarn lint
работал:Надо понизить версии eslint до следующих:
- eslint: 8.18
- @types/eslint: 8
Для этого ввожу в консоль команду:
yarn add --dev eslint@8.18.0
Получаю такие логи:❯ yarn --dev add eslint@8.18.0 ➤ YN0000: ┌ Resolution step ➤ YN0002: │ @atls/config-jest@npm:0.0.5 doesn't provide jest (pafefc), requested by ts-jest ➤ YN0002: │ @atls/config-jest@npm:0.0.5 doesn't provide typescript (p8a67a), requested by ts-jest ➤ YN0002: │ @atls/webpack-proto-imports-loader@npm:0.0.9 doesn't provide webpack (p6860c), requested by file-loader ➤ YN0060: │ @yarnpkg/plugin-interactive-tools@npm:4.0.0-rc.43 [8a4b7] provides react (p66a4e) with version 16.14.0, which doesn't satisfy what ink and some of its descendants request ➤ YN0060: │ @yarnpkg/plugin-version@npm:4.0.0-rc.43 [8a4b7] provides react (peea85) with version 16.14.0, which doesn't satisfy what ink and some of its descendants request ➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code ➤ YN0000: └ Completed in 2s 308ms ➤ YN0000: ┌ Fetch step ➤ YN0019: │ typescript-patch-66db3462d6-3d1b044496.zip appears to be unused - removing ➤ YN0019: │ v8-to-istanbul-npm-9.0.0-bd125c4318-d8ed2c39ba.zip appears to be unused - removing ➤ YN0019: │ write-file-atomic-npm-4.0.1-96ec744721-8f78023253.zip appears to be unused - removing ➤ YN0019: │ yargs-parser-npm-20.2.9-a1d19e598d-8bb69015f2.zip appears to be unused - removing ➤ YN0019: │ yup-npm-0.32.11-dbaff8ca9c-43a16786b4.zip appears to be unused - removing ➤ YN0000: └ Completed in 1s 339ms ➤ YN0000: ┌ Link step ➤ YN0000: │ ESM support for PnP uses the experimental loader API and is therefore experimental ➤ YN0000: └ Completed in 0s 440ms ➤ YN0000: **Done with warnings** in 4s 207ms
Далее ввожу в консоль команду:
yarn remove @types/eslint
Получаю такие логи:➤ YN0000: ┌ Resolution step ➤ YN0002: │ @atls/config-jest@npm:0.0.5 doesn't provide jest (pafefc), requested by ts-jest ➤ YN0002: │ @atls/config-jest@npm:0.0.5 doesn't provide typescript (p8a67a), requested by ts-jest ➤ YN0002: │ @atls/webpack-proto-imports-loader@npm:0.0.9 doesn't provide webpack (p6860c), requested by file-loader ➤ YN0060: │ @yarnpkg/plugin-interactive-tools@npm:4.0.0-rc.43 [8a4b7] provides react (p66a4e) with version 16.14.0, which doesn't satisfy what ink and some of its descendants request ➤ YN0060: │ @yarnpkg/plugin-version@npm:4.0.0-rc.43 [8a4b7] provides react (peea85) with version 16.14.0, which doesn't satisfy what ink and some of its descendants request ➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code ➤ YN0000: └ Completed in 0s 272ms ➤ YN0000: ┌ Fetch step ➤ YN0019: │ @types-eslint-npm-8.37.0-1f765f44f3-06d3b3fba1.zip appears to be unused - removing ➤ YN0000: └ Completed in 0s 229ms ➤ YN0000: ┌ Link step ➤ YN0000: │ ESM support for PnP uses the experimental loader API and is therefore experimental ➤ YN0000: └ Completed ➤ YN0000: Done with warnings in 0s 714ms
Далее ввожу в консоль команду:
yarn add --dev @types/eslint@8
Получаю такие логи:➤ YN0000: ┌ Resolution step ➤ YN0002: │ @atls/config-jest@npm:0.0.5 doesn't provide jest (pafefc), requested by ts-jest ➤ YN0002: │ @atls/config-jest@npm:0.0.5 doesn't provide typescript (p8a67a), requested by ts-jest ➤ YN0002: │ @atls/webpack-proto-imports-loader@npm:0.0.9 doesn't provide webpack (p6860c), requested by file-loader ➤ YN0060: │ @yarnpkg/plugin-interactive-tools@npm:4.0.0-rc.43 [8a4b7] provides react (p66a4e) with version 16.14.0, which doesn't satisfy what ink and some of its descendants request ➤ YN0060: │ @yarnpkg/plugin-version@npm:4.0.0-rc.43 [8a4b7] provides react (peea85) with version 16.14.0, which doesn't satisfy what ink and some of its descendants request ➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code ➤ YN0000: └ Completed in 1s 105ms ➤ YN0000: ┌ Fetch step ➤ YN0013: │ @types/eslint@npm:8.37.0 can't be found in the cache and will be fetched from the remote registry ➤ YN0000: └ Completed in 0s 238ms ➤ YN0000: ┌ Link step ➤ YN0000: │ ESM support for PnP uses the experimental loader API and is therefore experimental ➤ YN0000: └ Completed ➤ YN0000: Done with warnings in 1s 552ms
Из-за чего процессы заканчиваются с ворнингами? Так же быть не должно, процесс должен закончится без них.
ворнинги это нормальное поведение, кто тебе сказал, что их не должно быть? Вот если была бы ошибка - тогда да. Не понимаю зачем ты удаляешь типы, а потом снова их устанавливаешь? Что ты вообще делаешь? А главное зачем ты это делаешь?
Извините что так жестко туплю. Для меня это всё новое и тяжело осваивается, но я знаю, что получится и я справлюсь. Просто нужно время
С чем связан запрос на фичу?
Ознакомиться с азами работы с языками программирования на примере TypeScript, научиться покрывать простые кейсы по автоматизации задач с помощью ЯП и выполнить задание
Расскажите как вы это себе видите
План
[x] Переменные и типы данных
[x] Структуры данных
[x] Условия
[x] Циклы
[x] Функции
[x] Работа с ошибками
[x] База Advanced JS API (методы массивов)
Задание
Необходимо реализовать простой механизм авторизации. Должны быть удовлетворены следующие требования:
[x] Должны присутствовать функции для регистрации:
login(username, password)
- входlogout()
- выходregister(username, password)
- регистрацияwhoami()
- получение авторизованного на данный момент пользователя (сессии)[x] При регистрации должна быть проверка: логин должен быть не короче 5 символов, пароль должен быть не короче 6. Если условие не выполняется - выбрасывать ошибку
[x] Должна быть возможность хранить креды (
credentials
) для нескольких пользователей[x] При попытке сделать логаут без активной сессии - должна выбрасываться ошибка
[x] При попытке сделать
whoami
без активной сессии - выбрасывать ошибку[x] При удачном вызове
whoami
в консоли должен быть вывод логина пользователя, который авторизован в данный момент[x] При попытке сделать регистрацию/логин в момент, когда уже есть активная сессия - выбрасывать ошибку
[x] Все данные должны быть типизированы: аргументы функций, используемые переменные, возвращаемые функциями значения
Требования к обработке ошибок:
Ошибки (и код в целом) не должны содержать символов кириллицы, при этом в некоторых ошибках должны использоваться шаблонные строки. Пример:
User with login Dassfgfd not found
Password for user Johnathan is incorrect
Требования к оформлению задания
Задание должно быть выполнено в отдельной ветке. К этой ветке должен быть создан pull request. Если pull request еще не готов к мержу в мастер - он должен быть помечен как draft. Код должен удовлетворять проверкам lint и typecheck (
yarn lint
,yarn typecheck
)Приложите пример реализаций
No response