Skip to content

Release v4.8.22

Compare
Choose a tag to compare
@github-actions github-actions released this 02 May 10:24

[V4.8.22]

配置:

// 头部注释模板
"fileheader.customMade": {
  // 获取当前项目下git config中的: 用户名、邮箱
  // 公司项目和个人项目可以配置不同的用户名与邮箱 搜索: gitconfig includeIf  比如: https://ayase.moe/2021/03/09/customized-git-config/
  "Author": "git config user.name && git config user.email", // 同时获取用户名与邮箱
  // "Author": "git config user.name", // 仅获取用户名
  // "Author": "git config user.email", // 仅获取邮箱
  // "Author": "OBKoro1", // 固定值 不从git config中获取
  "Date": "Do not edit",
  // 设置后,保存文件更改默认更新最后编辑人
  "LastEditors": "git config user.name && git config user.email", // 配置规则与Author字段一致
  "LastEditTime": "Do not edit",
  "FilePath": "",
  // 个人版权声明: ${git_name} ${git_email} ${git_name_email}
  // 公司版权声明: 写死即可
  "custom_string_obkoro1_copyright": "Copyright (c) ${now_year} by ${git_name} email: ${git_email}, All Rights Reserved. "
},

示例:

// "Author": "git config user.name && git config user.email"
// "LastEditors": "git config user.name"
//  "custom_string_obkoro1_copyright": "Copyright (c) ${now_year} by ${git_name} email: ${git_email}, All Rights Reserved. "
/*
 * Author       : OBKoro1 [email protected]
 * Date         : 2022-05-01 15:35:12
 * LastEditors  : OBKoro1
 * LastEditTime : 2022-05-02 11:31:09
 * FilePath     : /fileHead/function-params/test.js
 * Copyright (c) 2022 by OBKoro1 email: [email protected], All Rights Reserved. 
 */
  • feat: 函数注释匹配到param 但是不需要type时 只显示param 比如: [*] 改成 []

配置:

"fileheader.configObj": {
    "functionTypeSymbol": "match param no type"
}

示例:

/**
 * @description: 这边匹配到param 但是没有type 正常是 [number] c [string] b
 * @param [] c
 * @param [] b
 * @return []
 */
function test2(c: number, b: string = '2') {}
  • feat: 新建文件自动添加头部注释,不再自动打开。
"fileheader.configObj": {
  "createHeader": false // 默认关闭 之前是true
}
  • feat: specialOptions特殊字段新增Author