readme files

This commit is contained in:
Primakov Alexandr Alexandrovich
2024-11-15 18:47:32 +03:00
parent 6b64d09397
commit 1d2802f113
17 changed files with 107 additions and 49 deletions

28
04_lint/Readme.md Normal file
View File

@@ -0,0 +1,28 @@
# Lint
Установите зависимости
```shell
npm ci
```
Запуустите команду проверки
```shell
npm run eslint
```
> Обратите внимание на ошибки в терминале
* Откройте файлы с ошибками и устраните их
> Обратите внимание что настройки eslint для javascript не всегда корректно работают с typeescript
![js eslint ignore problem](../assets/04.png)
> Поменяйте директиву на подходящую для **typeescript**
```
eslint-disable-next-line @typescript-eslint/no-unused-vars
```
> Ошибка ушла

View File

@@ -5,4 +5,5 @@ const summ = (a, b) => {
return a + b;
}
// eslint-disable-next-line no-unused-vars
const boysAndGirls = summ(boys, girls);

View File

@@ -3,7 +3,7 @@
"version": "1.0.0",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"lint": "eslint ."
},
"keywords": [],
"author": "",