-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(prettier-config): new package for prettier share configs (#5)
- Loading branch information
Showing
12 changed files
with
111 additions
and
13 deletions.
There are no files selected for viewing
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 was deleted.
Oops, something went wrong.
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
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
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Prettier Configurations | ||
|
||
Alwatr's [shareable configurations](https://prettier.io/docs/en/configuration.html#sharing-configurations) for [Prettier](https://prettier.io/). | ||
|
||
## Installation | ||
|
||
```bash | ||
yarn add -D @alwatr/prettier-config | ||
``` | ||
|
||
## Usage | ||
|
||
Alwatr Prettier rules come bundled in `@alwatr/prettier-config`. To enable these rules, add a prettier property in your package.json. See the Prettier configuration docs for more details. | ||
|
||
The Prettier rules from Alwatr are included in the `@alwatr/prettier-config` package. To use these rules, add a prettier property to your `package.json` file. Refer to the [Prettier configuration documentation](https://prettier.io/docs/en/configuration.html) for more information. | ||
|
||
```json | ||
{ | ||
"prettier": "@alwatr/prettier-config" | ||
} | ||
``` |
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,35 @@ | ||
{ | ||
"name": "@alwatr/prettier-config", | ||
"version": "1.0.0", | ||
"description": "Alwatr's shareable configurations for Prettier.", | ||
"author": "S. Ali Mihandoost <ali.mihandoost@gmail.com>", | ||
"keywords": [ | ||
"prettier", | ||
"config", | ||
"typescript", | ||
"esm", | ||
"alwatr" | ||
], | ||
"type": "commonjs", | ||
"main": "./prettier.config.cjs", | ||
"license": "MIT", | ||
"files": [ | ||
"**/*.{d.ts.map,d.ts,js.map,js,html,md,cjs,mjs,cjs.map,mjs.map}" | ||
], | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/Alwatr/nanolib", | ||
"directory": "packages/prettier-config" | ||
}, | ||
"homepage": "https://github.com/Alwatr/nanolib/tree/next/packages/prettier-config#readme", | ||
"bugs": { | ||
"url": "https://github.com/Alwatr/nanolib/issues" | ||
}, | ||
"prettier": "@alwatr/prettier-config", | ||
"devDependencies": { | ||
"@alwatr/prettier-config": "workspace:^" | ||
} | ||
} |
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,15 @@ | ||
/** | ||
* @type {import('prettier').Config} | ||
*/ | ||
module.exports = { | ||
singleQuote: true, | ||
semi: true, | ||
trailingComma: 'all', | ||
printWidth: 140, | ||
arrowParens: 'always', | ||
proseWrap: 'preserve', | ||
bracketSpacing: false, | ||
endOfLine: 'lf', | ||
quoteProps: 'as-needed', | ||
tabWidth: 2, | ||
}; |
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