-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(prettier): add support for prettier 3.1.x
- Loading branch information
1 parent
5d7b177
commit f924bdc
Showing
6 changed files
with
123 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
module.exports = { | ||
/** | ||
* The line length where Prettier will try wrap. | ||
* Default: `80` | ||
* | ||
* See: https://prettier.io/docs/en/options.html#print-width | ||
*/ | ||
printWidth: 140, | ||
|
||
/** | ||
* Number of spaces per indentation level. | ||
* Default: `2` | ||
* | ||
* See: https://prettier.io/docs/en/options.html#tab-width | ||
*/ | ||
tabWidth: 4, | ||
|
||
/** | ||
* Indent with tabs instead of spaces. | ||
* Default: `false` | ||
* | ||
* https://prettier.io/docs/en/options.html#tabs | ||
*/ | ||
useTabs: true, | ||
|
||
/** | ||
* Print trailing commas wherever possible when multi-line. | ||
* Default: `"es5"` | ||
* | ||
* See: https://prettier.io/docs/en/options.html#trailing-commas | ||
*/ | ||
trailingComma: "none", | ||
|
||
/** | ||
* Print spaces between brackets. | ||
* Default: `true` | ||
* | ||
* See: https://prettier.io/docs/en/options.html#bracket-spacing | ||
*/ | ||
bracketSpacing: true, | ||
|
||
/** | ||
* Which end of line characters to apply. | ||
* Default: `lf` | ||
* | ||
* See: https://prettier.io/docs/en/options.html#end-of-line | ||
*/ | ||
endOfLine: "auto", | ||
|
||
/** | ||
* Include parentheses around a sole arrow function parameter. | ||
* Default: `"always"` | ||
* | ||
* See: https://prettier.io/docs/en/options.html#arrow-function-parentheses | ||
*/ | ||
arrowParens: "always", | ||
|
||
/** | ||
* Control how Prettier formats quoted code embedded in the file. | ||
* Default: `"auto"` | ||
* | ||
* See: https://prettier.io/docs/en/options.html#embedded-language-formatting | ||
*/ | ||
embeddedLanguageFormatting: "auto", | ||
|
||
/** | ||
* Enforce single attribute per line in HTML, Vue and JSX. | ||
* Default: `false` | ||
* | ||
* Valid options: | ||
* - `false` - Do not enforce single attribute per line. | ||
* - `true` - Enforce single attribute per line. | ||
* | ||
* See: https://prettier.io/docs/en/options#single-attribute-per-line | ||
*/ | ||
singleAttributePerLine: false, | ||
|
||
overrides: [ | ||
{ | ||
files: "*.{pcss,scss,css,json,md,yml}", | ||
options: { | ||
tabWidth: 2, | ||
useTabs: false | ||
} | ||
}, | ||
{ | ||
files: "*.html", | ||
options: { | ||
parser: "angular" | ||
} | ||
} | ||
] | ||
}; |
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 @@ | ||
<h1 align="center"> | ||
code style - Prettier 3.1.x | ||
</h1> | ||
|
||
## About | ||
|
||
This sub-package hosts the [Prettier](https://prettier.io) configuration for version 3.1.x. | ||
|
||
## Usage | ||
|
||
Create a `.prettierrc.js` file and copy the following content inside: | ||
|
||
```js | ||
module.exports = require("@nationalbankbelgium/code-style/prettier/3.1.x"); | ||
``` |
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,4 @@ | ||
{ | ||
"name": "@nationalbankbelgium/code-style/prettier/3.1.x", | ||
"main": ".prettierrc.js" | ||
} |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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