Skip to content

Commit

Permalink
Merge pull request #440 from SuperITMan/feature/upgrade-prettier-conf…
Browse files Browse the repository at this point in the history
…iguration

Feature/upgrade prettier configuration
  • Loading branch information
SuperITMan authored Dec 12, 2023
2 parents cbb22cd + f924bdc commit e194dbe
Show file tree
Hide file tree
Showing 24 changed files with 781 additions and 13 deletions.
80 changes: 80 additions & 0 deletions lib/prettier/2.4.x/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
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",
overrides: [
{
files: "*.{pcss,scss,css,json,md,yml}",
options: {
tabWidth: 2,
useTabs: false
}
},
{
files: "*.html",
options: {
parser: "angular"
}
}
]
};
15 changes: 15 additions & 0 deletions lib/prettier/2.4.x/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<h1 align="center">
code style - Prettier 2.4.x
</h1>

## About

This sub-package hosts the [Prettier](https://prettier.io) configuration for version 2.4.x.

## Usage

Create a `.prettierrc.js` file and copy the following content inside:

```js
module.exports = require("@nationalbankbelgium/code-style/prettier/2.4.x");
```
4 changes: 4 additions & 0 deletions lib/prettier/2.4.x/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "@nationalbankbelgium/code-style/prettier/2.4.x",
"main": ".prettierrc.js"
}
80 changes: 80 additions & 0 deletions lib/prettier/2.5.x/.prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
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",
overrides: [
{
files: "*.{pcss,scss,css,json,md,yml}",
options: {
tabWidth: 2,
useTabs: false
}
},
{
files: "*.html",
options: {
parser: "angular"
}
}
]
};
15 changes: 15 additions & 0 deletions lib/prettier/2.5.x/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<h1 align="center">
code style - Prettier 2.5.x
</h1>

## About

This sub-package hosts the [Prettier](https://prettier.io) configuration for version 2.5.x.

## Usage

Create a `.prettierrc.js` file and copy the following content inside:

```js
module.exports = require("@nationalbankbelgium/code-style/prettier/2.5.x");
```
4 changes: 4 additions & 0 deletions lib/prettier/2.5.x/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "@nationalbankbelgium/code-style/prettier/2.5.x",
"main": ".prettierrc.js"
}
93 changes: 93 additions & 0 deletions lib/prettier/2.6.x/.prettierrc.js
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"
}
}
]
};
15 changes: 15 additions & 0 deletions lib/prettier/2.6.x/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<h1 align="center">
code style - Prettier 2.6.x
</h1>

## About

This sub-package hosts the [Prettier](https://prettier.io) configuration for version 2.6.x.

## Usage

Create a `.prettierrc.js` file and copy the following content inside:

```js
module.exports = require("@nationalbankbelgium/code-style/prettier/2.6.x");
```
4 changes: 4 additions & 0 deletions lib/prettier/2.6.x/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "@nationalbankbelgium/code-style/prettier/2.6.x",
"main": ".prettierrc.js"
}
Loading

0 comments on commit e194dbe

Please sign in to comment.