@pengzhanbo/prettier-config 1.31.0 → 1.33.0
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/dist/index.cjs +26 -70
- package/dist/index.d.cts +48 -23
- package/dist/index.d.ts +48 -23
- package/dist/index.js +26 -50
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -1,72 +1,28 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
1
|
|
|
20
|
-
|
|
21
|
-
var
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
// Print spaces between brackets in object literals.
|
|
44
|
-
bracketSpacing: true,
|
|
45
|
-
// Put the > of a multi-line HTML (HTML, JSX, Vue, Angular) element at the end of the last line instead of being alone on the next line (does not apply to self closing elements)
|
|
46
|
-
bracketSameLine: false,
|
|
47
|
-
// Include parentheses around a sole arrow function parameter
|
|
48
|
-
arrowParens: "always",
|
|
49
|
-
// Format only a segment of a file.
|
|
50
|
-
rangeStart: 0,
|
|
51
|
-
rangeEnd: Number.POSITIVE_INFINITY,
|
|
52
|
-
// Specify which parser to use.
|
|
53
|
-
// parser: undefined,
|
|
54
|
-
// Specify the file name to use to infer which parser to use.
|
|
55
|
-
// filepath: undefined,
|
|
56
|
-
// Prettier can restrict itself to only format files that contain a special comment, called a pragma, at the top of the file.
|
|
57
|
-
requirePragma: false,
|
|
58
|
-
// Prettier can insert a special @format marker at the top of files specifying that the file has been formatted with prettier.
|
|
59
|
-
insertPragma: false,
|
|
60
|
-
// By default, Prettier will wrap markdown text as-is since some services use a line-break-sensitive renderer, e.g. GitHub comment and BitBucket.
|
|
61
|
-
proseWrap: "preserve",
|
|
62
|
-
// Specify the global whitespace sensitivity for HTML files
|
|
63
|
-
htmlWhitespaceSensitivity: "css",
|
|
64
|
-
// Whether or not to indent the code inside <script> and <style> tags in Vue files
|
|
65
|
-
vueIndentScriptAndStyle: false,
|
|
66
|
-
// End of line
|
|
67
|
-
endOfLine: "lf",
|
|
68
|
-
// Control whether Prettier formats quoted code embedded in the file
|
|
69
|
-
embeddedLanguageFormatting: "auto",
|
|
70
|
-
// Enforce single attribute per line in HTML, Vue and JSX
|
|
71
|
-
singleAttributePerLine: false
|
|
2
|
+
//#region src/index.ts
|
|
3
|
+
var src_default = {
|
|
4
|
+
printWidth: 120,
|
|
5
|
+
tabWidth: 2,
|
|
6
|
+
useTabs: false,
|
|
7
|
+
semi: false,
|
|
8
|
+
singleQuote: true,
|
|
9
|
+
quoteProps: "consistent",
|
|
10
|
+
jsxSingleQuote: false,
|
|
11
|
+
trailingComma: "all",
|
|
12
|
+
bracketSpacing: true,
|
|
13
|
+
bracketSameLine: false,
|
|
14
|
+
arrowParens: "always",
|
|
15
|
+
rangeStart: 0,
|
|
16
|
+
rangeEnd: Number.POSITIVE_INFINITY,
|
|
17
|
+
requirePragma: false,
|
|
18
|
+
insertPragma: false,
|
|
19
|
+
proseWrap: "preserve",
|
|
20
|
+
htmlWhitespaceSensitivity: "css",
|
|
21
|
+
vueIndentScriptAndStyle: false,
|
|
22
|
+
endOfLine: "lf",
|
|
23
|
+
embeddedLanguageFormatting: "auto",
|
|
24
|
+
singleAttributePerLine: false
|
|
72
25
|
};
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
module.exports = src_default;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,25 +1,50 @@
|
|
|
1
|
+
//#region src/index.d.ts
|
|
1
2
|
declare const _default: {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
3
|
+
// Maximum line length
|
|
4
|
+
readonly printWidth: 120;
|
|
5
|
+
// Specify the number of spaces per indentation-level
|
|
6
|
+
readonly tabWidth: 2;
|
|
7
|
+
// Indent lines with tabs instead of spaces
|
|
8
|
+
readonly useTabs: false;
|
|
9
|
+
// Use semicolons or not
|
|
10
|
+
readonly semi: false;
|
|
11
|
+
// Use single quotes instead of double quotes
|
|
12
|
+
readonly singleQuote: true;
|
|
13
|
+
// Change when properties in objects are quoted
|
|
14
|
+
readonly quoteProps: "consistent";
|
|
15
|
+
// Use single quotes instead of double quotes in JSX
|
|
16
|
+
readonly jsxSingleQuote: false;
|
|
17
|
+
// Print trailing commas wherever possible when multi-line
|
|
18
|
+
readonly trailingComma: "all";
|
|
19
|
+
// Print spaces between brackets in object literals.
|
|
20
|
+
readonly bracketSpacing: true;
|
|
21
|
+
// Put the > of a multi-line HTML (HTML, JSX, Vue, Angular) element at the end of the last line instead of being alone on the next line (does not apply to self closing elements)
|
|
22
|
+
readonly bracketSameLine: false;
|
|
23
|
+
// Include parentheses around a sole arrow function parameter
|
|
24
|
+
readonly arrowParens: "always";
|
|
25
|
+
// Format only a segment of a file.
|
|
26
|
+
readonly rangeStart: 0;
|
|
27
|
+
readonly rangeEnd: number;
|
|
28
|
+
// Specify which parser to use.
|
|
29
|
+
// parser: undefined,
|
|
30
|
+
// Specify the file name to use to infer which parser to use.
|
|
31
|
+
// filepath: undefined,
|
|
32
|
+
// Prettier can restrict itself to only format files that contain a special comment, called a pragma, at the top of the file.
|
|
33
|
+
readonly requirePragma: false;
|
|
34
|
+
// Prettier can insert a special @format marker at the top of files specifying that the file has been formatted with prettier.
|
|
35
|
+
readonly insertPragma: false;
|
|
36
|
+
// By default, Prettier will wrap markdown text as-is since some services use a line-break-sensitive renderer, e.g. GitHub comment and BitBucket.
|
|
37
|
+
readonly proseWrap: "preserve";
|
|
38
|
+
// Specify the global whitespace sensitivity for HTML files
|
|
39
|
+
readonly htmlWhitespaceSensitivity: "css";
|
|
40
|
+
// Whether or not to indent the code inside <script> and <style> tags in Vue files
|
|
41
|
+
readonly vueIndentScriptAndStyle: false;
|
|
42
|
+
// End of line
|
|
43
|
+
readonly endOfLine: "lf";
|
|
44
|
+
// Control whether Prettier formats quoted code embedded in the file
|
|
45
|
+
readonly embeddedLanguageFormatting: "auto";
|
|
46
|
+
// Enforce single attribute per line in HTML, Vue and JSX
|
|
47
|
+
readonly singleAttributePerLine: false;
|
|
23
48
|
};
|
|
24
|
-
|
|
25
|
-
export { _default as default };
|
|
49
|
+
//#endregion
|
|
50
|
+
export { _default as default };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,25 +1,50 @@
|
|
|
1
|
+
//#region src/index.d.ts
|
|
1
2
|
declare const _default: {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
3
|
+
// Maximum line length
|
|
4
|
+
readonly printWidth: 120;
|
|
5
|
+
// Specify the number of spaces per indentation-level
|
|
6
|
+
readonly tabWidth: 2;
|
|
7
|
+
// Indent lines with tabs instead of spaces
|
|
8
|
+
readonly useTabs: false;
|
|
9
|
+
// Use semicolons or not
|
|
10
|
+
readonly semi: false;
|
|
11
|
+
// Use single quotes instead of double quotes
|
|
12
|
+
readonly singleQuote: true;
|
|
13
|
+
// Change when properties in objects are quoted
|
|
14
|
+
readonly quoteProps: "consistent";
|
|
15
|
+
// Use single quotes instead of double quotes in JSX
|
|
16
|
+
readonly jsxSingleQuote: false;
|
|
17
|
+
// Print trailing commas wherever possible when multi-line
|
|
18
|
+
readonly trailingComma: "all";
|
|
19
|
+
// Print spaces between brackets in object literals.
|
|
20
|
+
readonly bracketSpacing: true;
|
|
21
|
+
// Put the > of a multi-line HTML (HTML, JSX, Vue, Angular) element at the end of the last line instead of being alone on the next line (does not apply to self closing elements)
|
|
22
|
+
readonly bracketSameLine: false;
|
|
23
|
+
// Include parentheses around a sole arrow function parameter
|
|
24
|
+
readonly arrowParens: "always";
|
|
25
|
+
// Format only a segment of a file.
|
|
26
|
+
readonly rangeStart: 0;
|
|
27
|
+
readonly rangeEnd: number;
|
|
28
|
+
// Specify which parser to use.
|
|
29
|
+
// parser: undefined,
|
|
30
|
+
// Specify the file name to use to infer which parser to use.
|
|
31
|
+
// filepath: undefined,
|
|
32
|
+
// Prettier can restrict itself to only format files that contain a special comment, called a pragma, at the top of the file.
|
|
33
|
+
readonly requirePragma: false;
|
|
34
|
+
// Prettier can insert a special @format marker at the top of files specifying that the file has been formatted with prettier.
|
|
35
|
+
readonly insertPragma: false;
|
|
36
|
+
// By default, Prettier will wrap markdown text as-is since some services use a line-break-sensitive renderer, e.g. GitHub comment and BitBucket.
|
|
37
|
+
readonly proseWrap: "preserve";
|
|
38
|
+
// Specify the global whitespace sensitivity for HTML files
|
|
39
|
+
readonly htmlWhitespaceSensitivity: "css";
|
|
40
|
+
// Whether or not to indent the code inside <script> and <style> tags in Vue files
|
|
41
|
+
readonly vueIndentScriptAndStyle: false;
|
|
42
|
+
// End of line
|
|
43
|
+
readonly endOfLine: "lf";
|
|
44
|
+
// Control whether Prettier formats quoted code embedded in the file
|
|
45
|
+
readonly embeddedLanguageFormatting: "auto";
|
|
46
|
+
// Enforce single attribute per line in HTML, Vue and JSX
|
|
47
|
+
readonly singleAttributePerLine: false;
|
|
23
48
|
};
|
|
24
|
-
|
|
25
|
-
export { _default as default };
|
|
49
|
+
//#endregion
|
|
50
|
+
export { _default as default };
|
package/dist/index.js
CHANGED
|
@@ -1,51 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
arrowParens: "always",
|
|
25
|
-
// Format only a segment of a file.
|
|
26
|
-
rangeStart: 0,
|
|
27
|
-
rangeEnd: Number.POSITIVE_INFINITY,
|
|
28
|
-
// Specify which parser to use.
|
|
29
|
-
// parser: undefined,
|
|
30
|
-
// Specify the file name to use to infer which parser to use.
|
|
31
|
-
// filepath: undefined,
|
|
32
|
-
// Prettier can restrict itself to only format files that contain a special comment, called a pragma, at the top of the file.
|
|
33
|
-
requirePragma: false,
|
|
34
|
-
// Prettier can insert a special @format marker at the top of files specifying that the file has been formatted with prettier.
|
|
35
|
-
insertPragma: false,
|
|
36
|
-
// By default, Prettier will wrap markdown text as-is since some services use a line-break-sensitive renderer, e.g. GitHub comment and BitBucket.
|
|
37
|
-
proseWrap: "preserve",
|
|
38
|
-
// Specify the global whitespace sensitivity for HTML files
|
|
39
|
-
htmlWhitespaceSensitivity: "css",
|
|
40
|
-
// Whether or not to indent the code inside <script> and <style> tags in Vue files
|
|
41
|
-
vueIndentScriptAndStyle: false,
|
|
42
|
-
// End of line
|
|
43
|
-
endOfLine: "lf",
|
|
44
|
-
// Control whether Prettier formats quoted code embedded in the file
|
|
45
|
-
embeddedLanguageFormatting: "auto",
|
|
46
|
-
// Enforce single attribute per line in HTML, Vue and JSX
|
|
47
|
-
singleAttributePerLine: false
|
|
48
|
-
};
|
|
49
|
-
export {
|
|
50
|
-
index_default as default
|
|
1
|
+
//#region src/index.ts
|
|
2
|
+
var src_default = {
|
|
3
|
+
printWidth: 120,
|
|
4
|
+
tabWidth: 2,
|
|
5
|
+
useTabs: false,
|
|
6
|
+
semi: false,
|
|
7
|
+
singleQuote: true,
|
|
8
|
+
quoteProps: "consistent",
|
|
9
|
+
jsxSingleQuote: false,
|
|
10
|
+
trailingComma: "all",
|
|
11
|
+
bracketSpacing: true,
|
|
12
|
+
bracketSameLine: false,
|
|
13
|
+
arrowParens: "always",
|
|
14
|
+
rangeStart: 0,
|
|
15
|
+
rangeEnd: Number.POSITIVE_INFINITY,
|
|
16
|
+
requirePragma: false,
|
|
17
|
+
insertPragma: false,
|
|
18
|
+
proseWrap: "preserve",
|
|
19
|
+
htmlWhitespaceSensitivity: "css",
|
|
20
|
+
vueIndentScriptAndStyle: false,
|
|
21
|
+
endOfLine: "lf",
|
|
22
|
+
embeddedLanguageFormatting: "auto",
|
|
23
|
+
singleAttributePerLine: false
|
|
51
24
|
};
|
|
25
|
+
|
|
26
|
+
//#endregion
|
|
27
|
+
export { src_default as default };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pengzhanbo/prettier-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.33.0",
|
|
5
5
|
"author": "pengzhanbo <q942450674@outlook.com> (https://github/pengzhanbo/)",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://github.com/pengzhanbo/configs#readme",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"prettier": "^3.5.3"
|
|
37
37
|
},
|
|
38
38
|
"scripts": {
|
|
39
|
-
"build": "
|
|
40
|
-
"stub": "
|
|
39
|
+
"build": "tsdown src/index.ts --format esm,cjs --clean --dts --shims",
|
|
40
|
+
"stub": "tsdown src/index.ts --format esm"
|
|
41
41
|
}
|
|
42
42
|
}
|