Skip to content

Commit 29ef9d3

Browse files
authored
Merge pull request #537 from SuperITMan/feature/add-new-prettier-configurations
Feature/add new prettier configurations for versions 3.2.x to 3.7.x
2 parents 1aa16c7 + 2014cbe commit 29ef9d3

22 files changed

+907
-7
lines changed

.prettierrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
module.exports = require("./lib/prettier/2.3.x/.prettierrc.js");
1+
module.exports = require("./lib/prettier/3.7.x/.prettierrc.js");

lib/prettier/3.2.x/.prettierrc.js

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
module.exports = {
2+
/**
3+
* The line length where Prettier will try wrap.
4+
* Default: `80`
5+
*
6+
* See: https://prettier.io/docs/en/options.html#print-width
7+
*/
8+
printWidth: 140,
9+
10+
/**
11+
* Number of spaces per indentation level.
12+
* Default: `2`
13+
*
14+
* See: https://prettier.io/docs/en/options.html#tab-width
15+
*/
16+
tabWidth: 4,
17+
18+
/**
19+
* Indent with tabs instead of spaces.
20+
* Default: `false`
21+
*
22+
* https://prettier.io/docs/en/options.html#tabs
23+
*/
24+
useTabs: true,
25+
26+
/**
27+
* Print semicolons at the ends of statements.
28+
* default: `true`
29+
*
30+
* See: https://prettier.io/docs/options#semicolons
31+
*/
32+
semi: true,
33+
34+
/**
35+
* Use single quotes instead of double quotes.
36+
* Default: `false`
37+
*
38+
* See: https://prettier.io/docs/options#quote-props
39+
*/
40+
singleQuote: false,
41+
42+
/**
43+
* Change when properties in objects are quoted.
44+
* Default: `"as-needed"`
45+
*
46+
* See: https://prettier.io/docs/options#quote-props
47+
*/
48+
quoteProps: "as-needed",
49+
50+
/**
51+
* Print trailing commas wherever possible when multi-line.
52+
* Default: `"es5"`
53+
*
54+
* See: https://prettier.io/docs/en/options.html#trailing-commas
55+
*/
56+
trailingComma: "none",
57+
58+
/**
59+
* Print spaces between brackets.
60+
* Default: `true`
61+
*
62+
* See: https://prettier.io/docs/en/options.html#bracket-spacing
63+
*/
64+
bracketSpacing: true,
65+
66+
/**
67+
* Put the `>` of a multi-line HTML (HTML, JSX, Vue, Angular) element at the end of the last line instead of being
68+
* alone on the next line (does not apply to self closing elements).
69+
* Default: `false`
70+
*
71+
* See: https://prettier.io/docs/options#bracket-line
72+
*/
73+
bracketSameLine: false,
74+
75+
/**
76+
* Which end of line characters to apply.
77+
* Default: `"lf"`
78+
*
79+
* See: https://prettier.io/docs/en/options.html#end-of-line
80+
*/
81+
endOfLine: "auto",
82+
83+
/**
84+
* Include parentheses around a sole arrow function parameter.
85+
* Default: `"always"`
86+
*
87+
* See: https://prettier.io/docs/en/options.html#arrow-function-parentheses
88+
*/
89+
arrowParens: "always",
90+
91+
/**
92+
* Control how Prettier formats quoted code embedded in the file.
93+
* Default: `"auto"`
94+
*
95+
* See: https://prettier.io/docs/en/options.html#embedded-language-formatting
96+
*/
97+
embeddedLanguageFormatting: "auto",
98+
99+
/**
100+
* Enforce single attribute per line in HTML, Vue and JSX.
101+
* Default: `false`
102+
*
103+
* Valid options:
104+
* - `false` - Do not enforce single attribute per line.
105+
* - `true` - Enforce single attribute per line.
106+
*
107+
* See: https://prettier.io/docs/en/options#single-attribute-per-line
108+
*/
109+
singleAttributePerLine: false,
110+
111+
overrides: [
112+
{
113+
files: "*.{pcss,scss,css,json,md,yml}",
114+
options: {
115+
tabWidth: 2,
116+
useTabs: false
117+
}
118+
},
119+
{
120+
files: "*.html",
121+
options: {
122+
parser: "angular"
123+
}
124+
}
125+
]
126+
};

lib/prettier/3.2.x/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<h1 align="center">
2+
code style - Prettier 3.2.x
3+
</h1>
4+
5+
## About
6+
7+
This sub-package hosts the [Prettier](https://prettier.io) configuration for version 3.2.x.
8+
9+
## Usage
10+
11+
Create a `.prettierrc.js` file and copy the following content inside:
12+
13+
```js
14+
module.exports = require("@nationalbankbelgium/code-style/prettier/3.2.x");
15+
```

lib/prettier/3.2.x/package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"name": "@nationalbankbelgium/code-style/prettier/3.2.x",
3+
"main": ".prettierrc.js"
4+
}

lib/prettier/3.3.x/.prettierrc.js

Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
module.exports = {
2+
/**
3+
* The line length where Prettier will try wrap.
4+
* Default: `80`
5+
*
6+
* See: https://prettier.io/docs/en/options.html#print-width
7+
*/
8+
printWidth: 140,
9+
10+
/**
11+
* Number of spaces per indentation level.
12+
* Default: `2`
13+
*
14+
* See: https://prettier.io/docs/en/options.html#tab-width
15+
*/
16+
tabWidth: 4,
17+
18+
/**
19+
* Indent with tabs instead of spaces.
20+
* Default: `false`
21+
*
22+
* https://prettier.io/docs/en/options.html#tabs
23+
*/
24+
useTabs: true,
25+
26+
/**
27+
* Print semicolons at the ends of statements.
28+
* default: `true`
29+
*
30+
* See: https://prettier.io/docs/options#semicolons
31+
*/
32+
semi: true,
33+
34+
/**
35+
* Use single quotes instead of double quotes.
36+
* Default: `false`
37+
*
38+
* See: https://prettier.io/docs/options#quote-props
39+
*/
40+
singleQuote: false,
41+
42+
/**
43+
* Change when properties in objects are quoted.
44+
* Default: `"as-needed"`
45+
*
46+
* See: https://prettier.io/docs/options#quote-props
47+
*/
48+
quoteProps: "as-needed",
49+
50+
/**
51+
* Print trailing commas wherever possible when multi-line.
52+
* Default: `"es5"`
53+
*
54+
* See: https://prettier.io/docs/en/options.html#trailing-commas
55+
*/
56+
trailingComma: "none",
57+
58+
/**
59+
* Print spaces between brackets.
60+
* Default: `true`
61+
*
62+
* See: https://prettier.io/docs/en/options.html#bracket-spacing
63+
*/
64+
bracketSpacing: true,
65+
66+
/**
67+
* Put the `>` of a multi-line HTML (HTML, JSX, Vue, Angular) element at the end of the last line instead of being
68+
* alone on the next line (does not apply to self closing elements).
69+
* Default: `false`
70+
*
71+
* See: https://prettier.io/docs/options#bracket-line
72+
*/
73+
bracketSameLine: false,
74+
75+
/**
76+
* Which end of line characters to apply.
77+
* Default: `"lf"`
78+
*
79+
* See: https://prettier.io/docs/en/options.html#end-of-line
80+
*/
81+
endOfLine: "auto",
82+
83+
/**
84+
* Include parentheses around a sole arrow function parameter.
85+
* Default: `"always"`
86+
*
87+
* See: https://prettier.io/docs/en/options.html#arrow-function-parentheses
88+
*/
89+
arrowParens: "always",
90+
91+
/**
92+
* Control how Prettier formats quoted code embedded in the file.
93+
* Default: `"auto"`
94+
*
95+
* See: https://prettier.io/docs/en/options.html#embedded-language-formatting
96+
*/
97+
embeddedLanguageFormatting: "auto",
98+
99+
/**
100+
* Enforce single attribute per line in HTML, Vue and JSX.
101+
* Default: `false`
102+
*
103+
* Valid options:
104+
* - `false` - Do not enforce single attribute per line.
105+
* - `true` - Enforce single attribute per line.
106+
*
107+
* See: https://prettier.io/docs/en/options#single-attribute-per-line
108+
*/
109+
singleAttributePerLine: false,
110+
111+
overrides: [
112+
{
113+
files: "*.{pcss,scss,css,json,md,yml}",
114+
options: {
115+
tabWidth: 2,
116+
useTabs: false
117+
}
118+
},
119+
{
120+
files: "*.html",
121+
options: {
122+
parser: "angular"
123+
}
124+
}
125+
]
126+
};

lib/prettier/3.3.x/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<h1 align="center">
2+
code style - Prettier 3.3.x
3+
</h1>
4+
5+
## About
6+
7+
This sub-package hosts the [Prettier](https://prettier.io) configuration for version 3.3.x.
8+
9+
## Usage
10+
11+
Create a `.prettierrc.js` file and copy the following content inside:
12+
13+
```js
14+
module.exports = require("@nationalbankbelgium/code-style/prettier/3.3.x");
15+
```

lib/prettier/3.3.x/package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"name": "@nationalbankbelgium/code-style/prettier/3.3.x",
3+
"main": ".prettierrc.js"
4+
}

0 commit comments

Comments
 (0)