File tree 3 files changed +20
-13
lines changed
packages/prettier-config-ali
3 files changed +20
-13
lines changed Original file line number Diff line number Diff line change 1
1
# 更新日志
2
2
3
+ ## 1.3.0 - 2024-04-07
4
+
5
+ - 更改为 ESM 包
6
+
3
7
## 1.2.0 - 2024-04-07
4
8
5
9
- 重新添加 ` prettier-plugin-packagejson `
Original file line number Diff line number Diff line change 1
- module . exports = {
1
+ const config = {
2
2
// 详见 https://prettier.io/docs/en/options
3
3
printWidth : 100 ,
4
4
tabWidth : 2 ,
@@ -14,7 +14,9 @@ module.exports = {
14
14
endOfLine : 'lf' ,
15
15
// 从 Prettier 3.x 开始,插件必须配置才能生效
16
16
plugins : [
17
- // 排序 package.json 中的属性,ESM 项目报错,暂时禁用
18
- 'prettier-plugin-packagejson' ,
17
+ // 排序 package.json 中的属性
18
+ import . meta . resolve ( 'prettier-plugin-packagejson' ) ,
19
19
] ,
20
20
} ;
21
+
22
+ export default config ;
Original file line number Diff line number Diff line change 2
2
"name" : " prettier-config-ali" ,
3
3
"version" : " 1.2.0" ,
4
4
"description" : " Prettier shareable configuration for Alibaba F2E Guidelines" ,
5
- "main" : " index.js" ,
6
5
"keywords" : [
7
6
" prettier" ,
8
7
" prettier-config" ,
9
8
" f2elint" ,
10
9
" Alibaba F2E Guidelines"
11
10
],
12
- "scripts" : {
13
- "build" : " tsc"
11
+ "homepage" : " https://github.com/alibaba/f2e-spec" ,
12
+ "bugs" : {
13
+ "url" : " https://github.com/alibaba/f2e-spec/issues"
14
14
},
15
15
"repository" : {
16
16
"type" : " git" ,
17
17
"url" : " https://github.com/alibaba/f2e-spec"
18
18
},
19
- "bugs" : {
20
- "url" : " https://github.com/alibaba/f2e-spec/issues"
21
- },
22
- "homepage" : " https://github.com/alibaba/f2e-spec" ,
19
+ "license" : " MIT" ,
23
20
"author" : {
24
21
"name" : " Guo Yunhe" ,
25
22
26
23
"url" : " https://guoyunhe.me/"
27
24
},
28
- "license" : " MIT" ,
29
- "devDependencies" : {
30
- "prettier" : " ^2.2.1"
25
+ "type" : " module" ,
26
+ "main" : " index.js" ,
27
+ "scripts" : {
28
+ "build" : " tsc"
31
29
},
32
30
"dependencies" : {
33
31
"prettier-plugin-packagejson" : " ^2.4.14"
32
+ },
33
+ "devDependencies" : {
34
+ "prettier" : " ^2.2.1"
34
35
}
35
36
}
You can’t perform that action at this time.
0 commit comments