Skip to content

Commit 7aa374c

Browse files
committed
feat(prettier): add configuration for prettier 3.2.x to 3.6.x
Add configurations files for missing prettier versions.
1 parent 7b5a21b commit 7aa374c

File tree

17 files changed

+856
-5
lines changed

17 files changed

+856
-5
lines changed

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

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

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

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)