Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tool update #89

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 38 additions & 24 deletions .czrc
Original file line number Diff line number Diff line change
@@ -1,40 +1,54 @@
{
"path": "cz-conventional-changelog",
"path": "cz-emoji",
"skipQuestions": [
"footer",
"body",
"scope",
"breaking"
],
"allowCustomScopes": true,
"skip": [
"cz-emoji-1.0.0.json"
],
"config": {
"cz-emoji": {
"types": [
{
"emoji": "🌟",
"code": ":star2:",
"description": "A new feature",
"name": "feature"
}
]
}
},
"subjectLimit": 72,
"allowCustomScopes": false,
"defaultType": "фича",
"maxHeaderWidth": 100,
"types": {
"feat": {
"description": "feat: Новая функция"
"фича": {
"description": "Новая функция"
},
"fix": {
"description": "fix: Багфикс"
"баг": {
"description": "Исправление ошибки"
},
"refactor": {
"description": "refactor: Изменение структуры кода, не влияющее на поведение"
"рефактор": {
"description": "Изменение структуры кода, не влияющее на поведение"
},
"docs": {
"description": "docs: Только документация"
"стиль": {
"description": "Только документация или комментарии"
},
"perf": {
"description": "perf: Оптимизация производительности"
"задача": {
"description": "Мелкие правки кода, генерация конфигураций, изменение настроек окружения и т.п."
},
"test": {
"description": "test: Добавление тестов"
"доки": {
"description": "Только документация или комментарии"
},
"chore": {
"description": "chore: Мелкие правки кода, генерация конфигураций, изменение настроек окружения и т.п."
},
"revert": {
"description": "revert: Откат изменений"
"откат": {
"description": "Откат изменений"
},
"WIP": {
"description": "WIP: Незавершенная работа"
"description": "Незавершенная работа"
}
},
"scopes": [
{"name": "git"}
]
}
}
4 changes: 2 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Описание изменений

-
-

## Чеклист

- [ ]
- [ ]
2 changes: 1 addition & 1 deletion .github/workflows/base-update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Create PR with updates from base repository
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
- cron: "0 0 * * *"

jobs:
create_pr:
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@
/.vercel
/.next
/.env
/build
/build
/.trunk/logs
/.trunk/plugins
10 changes: 10 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Autoformatter friendly markdownlint config (all formatting rules disabled)
default: true
blank_lines: false
bullet: false
html: false
indentation: false
line_length: false
spaces: false
url: false
whitespace: false
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
@gooditworks:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=${NPM_TOKEN}
auto-install-peers=true
7 changes: 7 additions & 0 deletions .shellcheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
enable=all
source-path=SCRIPTDIR
disable=SC2154

# If you're having issues with shellcheck following source, disable the errors via:
# disable=SC1090
# disable=SC1091
1 change: 1 addition & 0 deletions .trunk/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*out
11 changes: 11 additions & 0 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 0.1
cli:
version: 0.16.1-beta
lint:
enabled:
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
12 changes: 12 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"recommendations": [
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint",
"trunk.io",
"editorconfig.editorconfig",
"github.copilot",
"github.vscode-pull-request-github",
"eamodio.gitlens",
"eg2.vscode-npm-script"
]
}
29 changes: 29 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Vercel Dev mode",
"type": "node-terminal",
"request": "launch",
"command": "npm run dev:local"
},
{
"name": "Client Side",
"type": "pwa-chrome",
"request": "launch",
"url": "http://localhost:3000"
},
{
"name": "Full stack",
"type": "node-terminal",
"request": "launch",
"command": "vercel dev",
"console": "integratedTerminal",
"serverReadyAction": {
"pattern": "started server on .+, url: (https?://.+)",
"uriFormat": "%s",
"action": "debugWithChrome"
}
}
]
}
16 changes: 16 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"editor.tabSize": 2,
"javascript.format.insertSpaceAfterOpeningAndBeforeClosingEmptyBraces": false,
"typescript.format.insertSpaceAfterOpeningAndBeforeClosingEmptyBraces": false,
"typescript.updateImportsOnFileMove.enabled": "always",
"javascript.updateImportsOnFileMove.enabled": "always",
"editor.codeActionsOnSave": {
"source.organizeImports": true,
"source.fixAll.eslint": true,
"source.fixAll.tslint": true,
"source.fixAll.stylelint": true
},
"[prisma]": {
"editor.defaultFormatter": "Prisma.prisma"
}
}
16 changes: 7 additions & 9 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
# Changelog
### [0.1.3](https://github.com/gooditworks/base/compare/v0.1.2...v0.1.3) (2021-08-02)

### [0.1.3](https://github.com/gooditworks/base/compare/v0.1.2...v0.1.3) (2021-08-02)

### Features

* **git:** commitlint-prompt заменен на commitzen ([1151987](https://github.com/gooditworks/base/commit/11519871f0942c247400c89ebcbe78771373f11d))
* Добавлен commitlint prompt ([097964f](https://github.com/gooditworks/base/commit/097964fbd1ee8b7bd503f8898bea66d3b20eaeca))
- **git:** commitlint-prompt заменен на commitzen ([1151987](https://github.com/gooditworks/base/commit/11519871f0942c247400c89ebcbe78771373f11d))
- Добавлен commitlint prompt ([097964f](https://github.com/gooditworks/base/commit/097964fbd1ee8b7bd503f8898bea66d3b20eaeca))

### 0.1.2 (2021-07-27)


### Features

* Добавлен standart-version и commitlint ([b713700](https://github.com/gooditworks/base/commit/b713700a6f22366675c411139ab916f30ea54506))
* Запуск commitlint при коммите ([2165c93](https://github.com/gooditworks/base/commit/2165c93cb5c611650695a34712aa75323df5f747))

- Добавлен standart-version и commitlint ([b713700](https://github.com/gooditworks/base/commit/b713700a6f22366675c411139ab916f30ea54506))
- Запуск commitlint при коммите ([2165c93](https://github.com/gooditworks/base/commit/2165c93cb5c611650695a34712aa75323df5f747))

### Bug Fixes

* вернул npm команду release ([caf8306](https://github.com/gooditworks/base/commit/caf8306c28ce101418657c9efb73250c32319ebe))
* правильный формат файла lefthook ([7355550](https://github.com/gooditworks/base/commit/735555070f27c69440663db0fec486750c42291f))
- вернул npm команду release ([caf8306](https://github.com/gooditworks/base/commit/caf8306c28ce101418657c9efb73250c32319ebe))
- правильный формат файла lefthook ([7355550](https://github.com/gooditworks/base/commit/735555070f27c69440663db0fec486750c42291f))

### 0.1.1 (2021-07-27)
6 changes: 5 additions & 1 deletion commitlint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ module.exports = {
rules: {
"subject-empty": [0],
"function-rules/subject-empty": [2, "always", cyrillicRule],
"type-enum": [2, "always", ["feat", "fix", "docs", "style", "refactor", "test", "revert", "chore", "WIP"]]
"type-enum": [
2,
"always",
["фича", "баг", "доки", "стиль", "рефактор", "откат", "задача", "WIP"]
]
}
}
3 changes: 2 additions & 1 deletion docs/env.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Env переменные

Для работы приложения необходимо заполнить следующие env переменные (через командную строку или `.env` файл):

- `SENTRY_DSN`: DSN URL от Sentry
- `SENTRY_ENV`: окружение в Sentry (development/production/etc)
- `LOGDNA_KEY`: ключ от logDNA
Expand All @@ -10,4 +11,4 @@

### Файл `src/env.ts`

В этом файле (и только в нём) производится чтение env переменных всего приложения, а уже из него они пробрасываются дальше. То есть чтение `process.env` вне этого файла запрещено.
В этом файле (и только в нём) производится чтение env переменных всего приложения, а уже из него они пробрасываются дальше. То есть чтение `process.env` вне этого файла запрещено.
9 changes: 6 additions & 3 deletions docs/guides.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
# Инструкции по разработке

## Локальный запуск

1. Выполнить требования из [@gooditworks/shared](https://github.com/gooditworks/shared#%D0%B8%D1%81%D0%BF%D0%BE%D0%BB%D1%8C%D0%B7%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5)
2. Установить зависимости: `npm install`
3. Установить env переменные согласно [`docs/env.md`](docs/env.md)
3. Development запуск: `npm start`
4. Production сборка: `npm run build`
4. Development запуск: `npm start`
5. Production сборка: `npm run build`

## Релиз новой версии

1. Закоммитить изменения согласно [Conventional commits](https://www.conventionalcommits.org)
2. Проверить код: `npm run lint && npm run test`
3. Не бампая версию вручную, запустить `standard-version`: `npm run release`
4. Запушить созданный changelog: `git push`

## Проверка и ручное обновление base

В репозитории уже настроен Github Action, который раз в сутки (или по требованию) будет проверять состояние репозитория на актуальность base и автоматически создавать PR с обновлением.
В репозитории уже настроен Github Action, который раз в сутки (или по требованию) будет проверять состояние репозитория на актуальность base и автоматически создавать PR с обновлением.

Чтобы обновить base вручную, нужно:

1. Запустить команду для проверки: `npm run lint:base`
2. Произвести merge изменений: `git merge base/main`

Expand Down
Loading