Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/isayme/prettier-config
my prettier config
https://github.com/isayme/prettier-config
Last synced: 12 days ago
JSON representation
my prettier config
- Host: GitHub
- URL: https://github.com/isayme/prettier-config
- Owner: isayme
- License: mit
- Created: 2020-09-17T11:38:44.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-10-10T00:16:33.000Z (about 4 years ago)
- Last Synced: 2024-04-16T14:21:46.604Z (8 months ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @isayme/prettier-config
[Prettier](https://prettier.io) 支持 [共享配置](https://prettier.io/docs/en/configuration.html#sharing-configurations).
目的: 共享配置. 使用方只需要升级本包版本即可更新至最新的配置模式, 避免配置变更时, 使用方需要复制新的配置项.
## 如何使用
安装此包: `npm install --save-dev @isayme/prettier-config`
### 方法一
`package.json` 文件中增加属性: `"prettier": "@isayme/prettier-config"`
```
// 示例 package.json 文件内容
{
"name": "your node ",
"version": "v0.0.1",
"prettier": "@isayme/prettier-config"
}
```### 方法二(推荐)
在 Prettier 的配置文件中直接填`"@isayme/prettier-config"`, 注意其中使用的是双引号.
```
// 示例 .prettierrc 文件内容
"@isayme/prettier-config"
```