Skip to content

Commit e8fe7f0

Browse files
committed
style: исправление ошибок линтера
1 parent d7d7f51 commit e8fe7f0

File tree

11 files changed

+177
-147
lines changed

11 files changed

+177
-147
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# RSS агрегатор
2-
# RSS агрегатор
32

43
[![Actions Status](https://github.com/daria-z/frontend-project-11/actions/workflows/hexlet-check.yml/badge.svg)](https://github.com/daria-z/frontend-project-11/actions)
54
[![Maintainability](https://qlty.sh/badges/c844bad3-843c-45f0-818d-ce89db985001/maintainability.svg)](https://qlty.sh/gh/daria-z/projects/frontend-project-11)
65
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=daria-z_frontend-project-11&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=daria-z_frontend-project-11)
76

87
---
8+
99
## ℹ️ О приложении
1010

1111
Учебное приложение, созданное в рамках курса по фронтенд-разработке.
@@ -42,24 +42,26 @@
4242
- [Playwright](https://playwright.dev/) — e2e тестирование
4343
- [Yup](https://github.com/jquense/yup) — валидация форм
4444
- [Axios](https://axios-http.com/) — HTTP-клиент
45-
- [on-change](https://github.com/sindresorhus/on-change)наблюдение за изменениями состояния
45+
- [on-change](https://github.com/sindresorhus/on-change)состояние
4646
- [Bootstrap](https://getbootstrap.com/) — UI-компоненты
4747

48-
4948
---
5049

5150
## 🧪 Makefile команды
5251

53-
**Установка и разработка**
52+
### Установка и разработка
53+
5454
- `make install` — установка зависимостей
5555
- `make develop` — запуск dev-сервера
5656

57-
**Качество и проверка**
57+
### Качество и проверка
58+
5859
- `make lint` — линтинг кода
5960
- `make qlty-check` — проверка качества
6061
- `make qlty-metrics` — метрики кода
6162

62-
**Сборка и тесты**
63+
### Сборка и тесты
64+
6365
- `make build` — продакшн-сборка
6466
- `make test` — запуск e2e тестов
6567
- `make test-report` — отчёт по тестам
@@ -70,7 +72,6 @@
7072

7173
> Только ключевые части приложения, без вспомогательных файлов и конфигураций
7274
73-
7475
```text
7576
├── 📁 src/ # Исходный код приложения
7677
│ ├── 📁 js/
@@ -82,4 +83,3 @@
8283
├── 📁 test-data/ # End-to-End тесты (Playwright)
8384
├── 📝 index.html # Точка входа приложения и основная разметка
8485
```
85-

index.html

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,19 +111,27 @@ <h1 id="main-title" class="display-3 mb-0">RSS агрегатор</h1>
111111
<footer class="footer border-top py-3 mt-5 bg-light">
112112
<div class="container-xl">
113113
<div
114-
class="d-flex justify-content-center align-items-center gap-3 flex-wrap">
114+
class="d-flex justify-content-center align-items-center gap-3 flex-wrap"
115+
>
115116
<div class="text-center text-muted small">
116117
created by
117-
<a href="https://ru.hexlet.io/professions/frontend/projects/11"
118-
target="_blank" rel="noopener noreferrer">
118+
<a
119+
href="https://ru.hexlet.io/professions/frontend/projects/11"
120+
target="_blank"
121+
rel="noopener noreferrer"
122+
>
119123
Hexlet
120124
</a>
121125
</div>
122126
<div>
123-
<label for="languageSelectFooter"
124-
class="form-label visually-hidden">Выбор языка</label>
125-
<select class="form-select form-select-sm" id="languageSelectFooter"
126-
aria-label="Выбор языка">
127+
<label for="languageSelectFooter" class="form-label visually-hidden"
128+
>Выбор языка</label
129+
>
130+
<select
131+
class="form-select form-select-sm"
132+
id="languageSelectFooter"
133+
aria-label="Выбор языка"
134+
>
127135
<option value="ru">Русский</option>
128136
<option value="en">English</option>
129137
</select>

playwright.config.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,3 @@ export default defineConfig({
2020
},
2121
],
2222
});
23-
24-
25-

src/js/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export const initApp = () => {
3939
});
4040
});
4141

42-
langSwitcher.addEventListener('change', (e) => {
42+
langSwitcher.addEventListener("change", (e) => {
4343
model.lng.handle(e.target.value);
44-
})
44+
});
4545
};

src/js/model/feed.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ import { addNew } from "./post.js";
66
import { handle } from "./error.js";
77

88
export const fetchAndParse = (url) => {
9-
state.ui.status = 'pending';
9+
state.ui.status = "pending";
1010
return fetchRssData(url)
1111
.then((xmlString) => {
12-
state.ui.status = 'success';
12+
state.ui.status = "success";
1313
return parseRss(xmlString);
1414
})
1515
.catch((error) => {

src/js/model/form.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ const schema = yup
1010

1111
export const validateInput = () => {
1212
return schema
13-
.validate(state.form.inputValue)
14-
.then(() => {
15-
state.ui.status = "success";
13+
.validate(state.form.inputValue)
14+
.then(() => {
15+
state.ui.status = "success";
1616
return state.form.inputValue;
1717
})
1818
.catch((error) => {

src/js/model/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ export const model = {
1111
post,
1212
update,
1313
error,
14-
lng
14+
lng,
1515
};

src/js/model/update.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
import state from "../state.js";
22
import { fetchAndParse } from "./feed.js";
33
import { addNew } from "./post.js";
4+
import { handle } from "./error.js";
45

56
export const checkFeeds = () => {
67
const promises = state.feedsList.map((feed) => {
7-
state.ui.status = 'pending';
8+
state.ui.status = "pending";
89
return fetchAndParse(feed)
910
.then(({ items }) => {
1011
return items;
1112
})
1213
.catch((error) => {
1314
state.ui.status = "error";
14-
model.error.handle(error, "fetch");
15+
handle(error, "fetch");
1516
return [];
1617
});
1718
});
Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
3-
43
<head>
5-
<meta charset="UTF-8">
6-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
76
<title>Document</title>
87
</head>
98

10-
<body>
11-
12-
</body>
13-
9+
<body></body>
1410
</html>

0 commit comments

Comments
 (0)