Skip to content

Commit 54b399b

Browse files
author
Nataliia Karpenko
committed
tools
1 parent c09a227 commit 54b399b

File tree

5 files changed

+46
-33
lines changed

5 files changed

+46
-33
lines changed

docs/tools/changelog.md

+9-8
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
## Changelog
2-
> Reading a markdown file with the progress in the project is easier than reading a commit log.
2+
> Читати файл розмітки з прогресом у проекті легше, ніж читати журнал фіксації.
33
4-
Automatic changelog generation from commit messages is a fairly common pattern nowadays. There is a project called [conventional-changelog](https://github.com/conventional-changelog/conventional-changelog) that generates a changelog from commit messages that follow a *convention*.
4+
Автоматичне створення журналу змін із повідомлень комітів є досить поширеним шаблоном у наш час. Є проект під назвою [conventional-changelog](https://github.com/conventional-changelog/conventional-changelog) який генерує журнал змін із повідомлень про фіксацію, які відповідають *convention*.
55

66
### Commit message convention
7-
The most common convention is the *angular* commit messages convention which is [detailed here](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#-git-commit-guidelines).
7+
Найпоширенішою угодою є угода про повідомлення фіксації *angular*, яка [детально описана тут . Налаштування](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#-git-commit-guidelines).
88

99
### Setup
10-
* Install:
10+
11+
* встановити:
1112

1213
```bash
1314
npm install standard-version -D
1415
```
1516

16-
* Add a `script` target to your `package.json`:
17+
* Додайте ціль `script` до свого `package.json`:
1718

1819
```js
1920
{
@@ -23,7 +24,7 @@ npm install standard-version -D
2324
}
2425
```
2526

26-
* Optionally : To automatically push the new *git commit and tag* plus publish to npm add a `postrelease` script:
27+
* Додатково: щоб автоматично надсилати новий *git commit and tag* плюс публікацію до npm, додайте `postrelease` сценарій:
2728

2829
```js
2930
{
@@ -36,13 +37,13 @@ npm install standard-version -D
3637

3738
### Releasing
3839

39-
Simply run:
40+
Простий запуск:
4041

4142
```bash
4243
npm run release
4344
```
4445

45-
Based on the commit messages `major` | `minor` | `patch` is automatically determined. To *explicitly* specify a version you can specify `--release-as` e.g.:
46+
На основі повідомлень тип версії: `major` | `minor` | `patch` визначається автоматично. Щоб *explicitly* явно вказати версію, ви можете вказати `--release-as` наприклад::
4647

4748
```bash
4849
npm run release -- --release-as minor

docs/tools/eslint.md

+21-15
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,30 @@
11
# ESLint
22

3-
ESLint existed to lint JavaScript, but now it is also becoming the defacto linter for [TypeScript](https://github.com/Microsoft/TypeScript/issues/29288), thanks to the [collaboration](https://eslint.org/blog/2019/01/future-typescript-eslint) between the two teams.
3+
ESLint існував для лінтування JavaScript, але тепер він також стає дефакто лінтером для [TypeScript](https://github.com/Microsoft/TypeScript/issues/29288), завдяки
4+
[співпраці](https://eslint.org/blog/2019/01/future-typescript-eslint) між двома командами.
45

56
## Install
7+
Встановлення
68

7-
To setup ESLint for TypeScript you need the following packages:
9+
Щоб налаштувати ESLint для TypeScript, вам потрібні такі пакети:
810

911
```sh
1012
npm i eslint eslint-plugin-react @typescript-eslint/parser @typescript-eslint/eslint-plugin
1113
```
1214

13-
> TIP: eslint calls packages that contain lint rules as "plugin"
15+
> TIP: eslint називає свої пакети з правилами "plugin"
1416
1517
* eslint : Core eslint
16-
* eslint-plugin-react : For react rules provided by eslint. [Supported rules list](https://github.com/yannickcr/eslint-plugin-react#list-of-supported-rules)
17-
* @typescript-eslint/parse : To allow eslint to understand ts / tsx files
18-
* @typescript-eslint/eslint-plugin : For TypeScript rules. [Supported rules list](https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin#supported-rules)
18+
* eslint-plugin-react : Правіла для react від eslint. [Supported rules list](https://github.com/yannickcr/eslint-plugin-react#list-of-supported-rules)
19+
* @typescript-eslint/parse : Дозволяє eslint розуміти ts / tsx files
20+
* @typescript-eslint/eslint-plugin : Для правил TypeScript. [Supported rules list](https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin#supported-rules)
1921

20-
> As you can see there are two eslint packages (for use with js or ts) and two @typescript-eslint packages (for use with ts). So the overhead for TypeScript is not *that much*.
22+
> Как ви бачите, 2 eslint пакети (для використання js та ts) та 2 @typescript-eslint пакета (для ts). Така звишена увага для TypeScript не *that much*.
2123
2224
## Configure
23-
Create `.eslintrc.js`:
25+
Конфігурація
26+
27+
Створіть `.eslintrc.js`:
2428

2529
```js
2630
module.exports = {
@@ -34,15 +38,15 @@ module.exports = {
3438
'plugin:@typescript-eslint/recommended',
3539
],
3640
rules: {
37-
// Overwrite rules specified from the extended configs e.g.
38-
// "@typescript-eslint/explicit-function-return-type": "off",
39-
}
41+
// Правила перезапису, указані в розширених конфігураціях, наприклад
42+
// "@typescript-eslint/explicit-function-return-type": "off",
4043
}
4144
```
4245
4346
## Run
47+
Використання
4448
45-
In your `package.json` add to `scripts`:
49+
У вашому `package.json` додайте до `scripts`:
4650
4751
```json
4852
{
@@ -52,12 +56,14 @@ In your `package.json` add to `scripts`:
5256
}
5357
```
5458
55-
Now you can `npm run lint` to validate.
59+
Тепер ви можете `npm run lint` для перевірки.
5660
5761
## Configure VSCode
62+
Конфігурація VSCode
63+
64+
* Встановіть розширення https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint
5865
59-
* Install extension https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint
60-
* Add to `settings.json`:
66+
* Додайте до `settings.json`:
6167
```js
6268
"eslint.validate": [
6369
"javascript",

docs/tools/husky.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# Husky
22

3-
> Husky can prevent bad commits, pushes and more 🐶!
3+
> Husky може захистити вас від поганих комітів та відправок 🐶!
44
5-
If you want to run some JavaScript / TypeScript code before a commit takes place, husky is the tool for that.
5+
Якщо ви хочете запустити деякий код JavaScript / TypeScript до того, як відбудеться коміт, інструментом для цього є Husky.
6+
7+
Наприклад, ви можете використовувати Husky, щоб переконатися, що файли форматуються prettier автоматично, тож вам більше не доведеться турбуватися про форматування файлів вручну, а натомість зосередитися на меті коду. Ось налаштування:
68

7-
For example, you can use husky to make sure files are formatted by prettier automatically so you don't have to worry about manually formatting files ever again and focus on the objective of the code instead. Here is the setup:
89

910
* `npm install husky -D`
1011
* Add `scripts` to `package.json`:
@@ -13,7 +14,7 @@ For example, you can use husky to make sure files are formatted by prettier auto
1314
"precommit": "npm run prettier:write",
1415
```
1516

16-
Now whenever you commit code and there are any formatting changes that need to be made, you'd get them as a *modified* file in your git log. You can now
17+
Тепер щоразу, коли ви фіксуєте код і потрібно внести будь-які зміни форматування, ви отримуватимете їх як *modified* файл у своєму журналі git. Ви можете спробувати зараз
1718

18-
* If you have pushed your code already, simply commit them with a comment `pretty`.
19-
* If you haven't pushed your code, amend your last commit and look like a superhero.
19+
* Якщо ви вже просунули (push) свій код, просто зафіксуйте їх у коментарі `pretty`.
20+
* Якщо ви не просунули свій код, змініть свій останній комміт і виглядайте як супергерой.

docs/tools/intro.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
# Tools
2-
Here are some great tools that I recommend you use or at least try in your TypeScript projects.
2+
Інструменти
3+
4+
Ось кілька чудових інструментів, які я рекомендую вам використовувати або принаймні спробувати у своїх проектах TypeScript.

docs/tools/prettier.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# Prettier
22

3-
Prettier is a great tool by facebook that makes code formatting so much easier that it's worth mentioning. Setting up with TypeScript using our recommended project setup (aka everything in `src` folder) is super easy:
3+
Prettier — це чудовий інструмент від Facebook, який робить форматування коду настільки простим, що варто згадати про нього. Налаштувати TypeScript за допомогою наших рекомендованих налаштувань проекту (також відомого як усе в папці `src`) надзвичайно просто:
44

55
## Setup
6+
Наставлення
67

78
* `npm install prettier -D`
89
* Add `scripts` to `package.json`:
@@ -14,8 +15,10 @@ Prettier is a great tool by facebook that makes code formatting so much easier t
1415
```
1516

1617
## Usage
17-
On your build server:
18+
Використання
19+
20+
На вашому сервері збірки:
1821
* `npm run prettier:check`
1922

20-
During dev (or pre commit hook):
23+
Під час розробки (або перед комітом):
2124
* `npm run prettier:write`

0 commit comments

Comments
 (0)