@alexlit/config-prettier 20.3.0 → 20.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +10 -6
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { omit } from 'radash';
|
|
2
2
|
|
|
3
3
|
const DEFAULT_PLUGINS = {
|
|
4
|
-
jsdoc: true,
|
|
5
|
-
packagejson: true,
|
|
6
|
-
pug: true,
|
|
7
|
-
sh: true,
|
|
8
|
-
solidity: true,
|
|
4
|
+
'jsdoc': true,
|
|
5
|
+
'packagejson': true,
|
|
6
|
+
'pug': true,
|
|
7
|
+
'sh': true,
|
|
8
|
+
'solidity': true,
|
|
9
9
|
'sort-json': true,
|
|
10
|
-
xml: true,
|
|
10
|
+
'xml': true,
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
const OPTIONAL_PLUGINS = { php: false, ruby: false, sql: false };
|
|
@@ -63,13 +63,17 @@ export const createConfig = async (plugins = {}, options = {}) => {
|
|
|
63
63
|
const pluginsConfig = await createPluginsConfig(plugins);
|
|
64
64
|
|
|
65
65
|
return {
|
|
66
|
+
bracketSameLine: false,
|
|
66
67
|
endOfLine: 'lf',
|
|
68
|
+
objectWrapping: 'collapse',
|
|
67
69
|
overrides: [
|
|
68
70
|
...(pluginsConfig.overrides ?? []),
|
|
69
71
|
...(options.overrides ?? []),
|
|
70
72
|
],
|
|
71
73
|
plugins: [...(pluginsConfig.plugins ?? []), ...(options.plugins ?? [])],
|
|
72
74
|
proseWrap: 'always',
|
|
75
|
+
quoteProps: 'consistent',
|
|
76
|
+
singleAttributePerLine: true,
|
|
73
77
|
singleQuote: true,
|
|
74
78
|
tabWidth: 2,
|
|
75
79
|
trailingComma: 'all',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alexlit/config-prettier",
|
|
3
|
-
"version": "20.3.
|
|
3
|
+
"version": "20.3.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "prettier config",
|
|
6
6
|
"keywords": [
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@prettier/plugin-pug": "^3.2.1",
|
|
34
34
|
"@prettier/plugin-ruby": "^4.0.4",
|
|
35
35
|
"@prettier/plugin-xml": "^3.4.1",
|
|
36
|
-
"prettier": "^3.5.
|
|
36
|
+
"prettier": "^3.5.1",
|
|
37
37
|
"prettier-plugin-eruby": "^0.0.3",
|
|
38
38
|
"prettier-plugin-jsdoc": "^1.3.2",
|
|
39
39
|
"prettier-plugin-packagejson": "^2.5.8",
|