generated from atls-lab/template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: prettier config module, readme and build script
- Loading branch information
Showing
7 changed files
with
30 additions
and
2 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# @atls/config-prettier | ||
|
||
Наш кастомный конфиг `Prettier` с плагином для сортировки импортов (пока не умеет выравнивать | ||
`from` между группам импортов). | ||
|
||
## Инструкция по применению (проверено на IDE JetBrains от 2023.2.5) | ||
|
||
1. Установить в корне проекта | ||
- `@atls/config-prettier` | ||
- `prettier` (протестировано на 3.1.0) | ||
2. Анплаг конфига `yarn unplug @atls/config-prettier` | ||
3. В корневом `package.json` прописать | ||
```json | ||
... | ||
"license": "BSD-3-Clause" | ||
"prettier": "@atls/config-prettier", | ||
... | ||
``` | ||
|
||
Для IDE от JetBrains можно выставить форматирование при сохранение либо по комбинации | ||
- **macOS**: Cmd + Option + L | ||
- **Linux/Windows**: Ctrl + Alt + L | ||
|
||
## Внимание | ||
|
||
**IDE Jetbrains** более ранних версий не умеют работать с конфигом prettier из Yarn PnP. | ||
Протестировано на 2022.2.5. `prettier` не увидит правил нашего конфига и будет форматировать по | ||
умолчанию (напр. `""` вместо наших `''`) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
export default { | ||
module.exports = { | ||
semi: false, | ||
singleQuote: true, | ||
tabWidth: 2, | ||
|