@dlzn-ui/prettier-config 2.0.16 → 2.0.22
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.d.mts +35 -0
- package/dist/index.d.ts +35 -0
- package/dist/index.mjs +43 -0
- package/package.json +14 -2
- package/index.ts +0 -32
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Config as Config$1 } from 'prettier';
|
|
2
|
+
import { PluginOptions } from 'prettier-plugin-tailwindcss';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @description: https://prettier.io/docs/en/options
|
|
6
|
+
* @description: 还有些是 prettier-plugin-tailwindcss 的配置 https://github.com/tailwindlabs/prettier-plugin-tailwindcss
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
type Config = Config$1 & PluginOptions;
|
|
10
|
+
declare const _default: {
|
|
11
|
+
$schema: string;
|
|
12
|
+
arrowParens: "always";
|
|
13
|
+
bracketSameLine: false;
|
|
14
|
+
bracketSpacing: true;
|
|
15
|
+
embeddedLanguageFormatting: "auto";
|
|
16
|
+
endOfLine: "lf";
|
|
17
|
+
htmlWhitespaceSensitivity: "css";
|
|
18
|
+
insertPragma: false;
|
|
19
|
+
jsxSingleQuote: false;
|
|
20
|
+
plugins: string[];
|
|
21
|
+
printWidth: number;
|
|
22
|
+
proseWrap: "preserve";
|
|
23
|
+
quoteProps: "as-needed";
|
|
24
|
+
requirePragma: false;
|
|
25
|
+
semi: false;
|
|
26
|
+
singleAttributePerLine: false;
|
|
27
|
+
singleQuote: true;
|
|
28
|
+
tabWidth: number;
|
|
29
|
+
trailingComma: "all";
|
|
30
|
+
useTabs: false;
|
|
31
|
+
vueIndentScriptAndStyle: false;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export { _default as default };
|
|
35
|
+
export type { Config };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Config as Config$1 } from 'prettier';
|
|
2
|
+
import { PluginOptions } from 'prettier-plugin-tailwindcss';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @description: https://prettier.io/docs/en/options
|
|
6
|
+
* @description: 还有些是 prettier-plugin-tailwindcss 的配置 https://github.com/tailwindlabs/prettier-plugin-tailwindcss
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
type Config = Config$1 & PluginOptions;
|
|
10
|
+
declare const _default: {
|
|
11
|
+
$schema: string;
|
|
12
|
+
arrowParens: "always";
|
|
13
|
+
bracketSameLine: false;
|
|
14
|
+
bracketSpacing: true;
|
|
15
|
+
embeddedLanguageFormatting: "auto";
|
|
16
|
+
endOfLine: "lf";
|
|
17
|
+
htmlWhitespaceSensitivity: "css";
|
|
18
|
+
insertPragma: false;
|
|
19
|
+
jsxSingleQuote: false;
|
|
20
|
+
plugins: string[];
|
|
21
|
+
printWidth: number;
|
|
22
|
+
proseWrap: "preserve";
|
|
23
|
+
quoteProps: "as-needed";
|
|
24
|
+
requirePragma: false;
|
|
25
|
+
semi: false;
|
|
26
|
+
singleAttributePerLine: false;
|
|
27
|
+
singleQuote: true;
|
|
28
|
+
tabWidth: number;
|
|
29
|
+
trailingComma: "all";
|
|
30
|
+
useTabs: false;
|
|
31
|
+
vueIndentScriptAndStyle: false;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export { _default as default };
|
|
35
|
+
export type { Config };
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
const index = {
|
|
2
|
+
$schema: "https://json.schemastore.org/prettierrc",
|
|
3
|
+
arrowParens: "always",
|
|
4
|
+
// 单参数箭头函数参数周围使用圆括号-eg: (x) => x
|
|
5
|
+
bracketSameLine: false,
|
|
6
|
+
// 会把多行的 HTML (包括 HTML、JSX、Vue 和 Angular) 元素的 `>` 放在最后一个属性的末尾,而不是另起一行(自闭合标签不受该选项控制)。
|
|
7
|
+
bracketSpacing: true,
|
|
8
|
+
// 在对象前后添加空格-eg: { foo: bar }
|
|
9
|
+
embeddedLanguageFormatting: "auto",
|
|
10
|
+
// 控制嵌入的其他语言代码格式化。
|
|
11
|
+
endOfLine: "lf",
|
|
12
|
+
// 结束行形式
|
|
13
|
+
htmlWhitespaceSensitivity: "css",
|
|
14
|
+
// 对HTML全局空白不敏感
|
|
15
|
+
insertPragma: false,
|
|
16
|
+
// 在已被preitter格式化的文件顶部加上标注
|
|
17
|
+
jsxSingleQuote: false,
|
|
18
|
+
// jsx中使用单引号
|
|
19
|
+
plugins: ["prettier-plugin-tailwindcss"],
|
|
20
|
+
printWidth: 100,
|
|
21
|
+
// 单行长度
|
|
22
|
+
proseWrap: "preserve",
|
|
23
|
+
// 保留原有的换行符,不进行任何修改
|
|
24
|
+
quoteProps: "as-needed",
|
|
25
|
+
// 仅在必需时为对象的key添加引号
|
|
26
|
+
requirePragma: false,
|
|
27
|
+
// 无需顶部注释即可格式化
|
|
28
|
+
semi: false,
|
|
29
|
+
// 句末使用分号
|
|
30
|
+
singleAttributePerLine: false,
|
|
31
|
+
// 会在 HTML、JSX、Vue 和 Angular 中格式化为每个属性单独占一行。
|
|
32
|
+
singleQuote: true,
|
|
33
|
+
// 使用单引号
|
|
34
|
+
tabWidth: 2,
|
|
35
|
+
// 缩进长度
|
|
36
|
+
trailingComma: "all",
|
|
37
|
+
useTabs: false,
|
|
38
|
+
// 使用空格代替tab缩进
|
|
39
|
+
vueIndentScriptAndStyle: false
|
|
40
|
+
// 不对vue中的script及style标签缩进
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export { index as default };
|
package/package.json
CHANGED
|
@@ -1,18 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dlzn-ui/prettier-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.22",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
8
8
|
},
|
|
9
9
|
"exports": {
|
|
10
10
|
".": {
|
|
11
|
-
"
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.mjs"
|
|
12
13
|
}
|
|
13
14
|
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist"
|
|
17
|
+
],
|
|
14
18
|
"peerDependencies": {
|
|
15
19
|
"prettier": "^3.9.6",
|
|
16
20
|
"prettier-plugin-tailwindcss": "^0.8.1"
|
|
21
|
+
},
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"rimraf": "^6.1.3",
|
|
24
|
+
"unbuild": "^3.6.1"
|
|
25
|
+
},
|
|
26
|
+
"scripts": {
|
|
27
|
+
"build": "unbuild",
|
|
28
|
+
"stub": "unbuild --stub"
|
|
17
29
|
}
|
|
18
30
|
}
|
package/index.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description: https://prettier.io/docs/en/options
|
|
3
|
-
* @description: 还有些是 prettier-plugin-tailwindcss 的配置 https://github.com/tailwindlabs/prettier-plugin-tailwindcss
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import type { Config as _Config } from 'prettier'
|
|
7
|
-
import type { PluginOptions } from 'prettier-plugin-tailwindcss'
|
|
8
|
-
|
|
9
|
-
export type Config = _Config & PluginOptions
|
|
10
|
-
export default {
|
|
11
|
-
$schema: 'https://json.schemastore.org/prettierrc',
|
|
12
|
-
arrowParens: 'always', // 单参数箭头函数参数周围使用圆括号-eg: (x) => x
|
|
13
|
-
bracketSameLine: false, // 会把多行的 HTML (包括 HTML、JSX、Vue 和 Angular) 元素的 `>` 放在最后一个属性的末尾,而不是另起一行(自闭合标签不受该选项控制)。
|
|
14
|
-
bracketSpacing: true, // 在对象前后添加空格-eg: { foo: bar }
|
|
15
|
-
embeddedLanguageFormatting: 'auto', // 控制嵌入的其他语言代码格式化。
|
|
16
|
-
endOfLine: 'lf', // 结束行形式
|
|
17
|
-
htmlWhitespaceSensitivity: 'css', // 对HTML全局空白不敏感
|
|
18
|
-
insertPragma: false, // 在已被preitter格式化的文件顶部加上标注
|
|
19
|
-
jsxSingleQuote: false, // jsx中使用单引号
|
|
20
|
-
plugins: ['prettier-plugin-tailwindcss'],
|
|
21
|
-
printWidth: 100, // 单行长度
|
|
22
|
-
proseWrap: 'preserve', // 保留原有的换行符,不进行任何修改
|
|
23
|
-
quoteProps: 'as-needed', // 仅在必需时为对象的key添加引号
|
|
24
|
-
requirePragma: false, // 无需顶部注释即可格式化
|
|
25
|
-
semi: false, // 句末使用分号
|
|
26
|
-
singleAttributePerLine: false, // 会在 HTML、JSX、Vue 和 Angular 中格式化为每个属性单独占一行。
|
|
27
|
-
singleQuote: true, // 使用单引号
|
|
28
|
-
tabWidth: 2, // 缩进长度
|
|
29
|
-
trailingComma: 'all',
|
|
30
|
-
useTabs: false, // 使用空格代替tab缩进
|
|
31
|
-
vueIndentScriptAndStyle: false, // 不对vue中的script及style标签缩进
|
|
32
|
-
} satisfies Config
|