1
0
Code Issues Pull Requests Packages Projects Releases Wiki Activity GitHub Gitee

代码注释调整

This commit is contained in:
程序员小墨 2024-04-08 10:10:39 +08:00
parent 74111398da
commit 4ef50ea556
3 changed files with 22 additions and 26 deletions

View File

@ -39,7 +39,7 @@ Or right-click on the selected text -> Convert string to...
## 支持的类型 Support Case
| 类型 | Case | 举例 e.g. |
| ----------------------------------- | ------------------------ | ---------------- |
| ------------------------------------------ | ------------------------ | ---------------- |
| 小驼峰(驼峰)命名 | Camel Case | fooBar |
| 大驼峰(帕斯卡)命名 | Pascal Case | FooBar |
| 下划线(蛇形)命名 | Snake Case | foo_bar |

View File

@ -16,7 +16,6 @@ const handleEditorReplace = (targetCase: SupportCase) => {
return;
}
// console.log('============ start convert ============');
let document = editor.document;
let selection = editor.selection;
let eol: EOL = document.eol === vscode.EndOfLine.CRLF ? '\r\n' : '\n';
@ -45,7 +44,6 @@ const handleEditorReplace = (targetCase: SupportCase) => {
editor.edit(editBuilder => {
editBuilder.replace(selection, converted);
});
// console.log('============ finish convert ============');
};
export default handleEditorReplace;

View File

@ -2,20 +2,18 @@
* When support a new case, there's something we need to do.
*
* Code:
* - Add `commands`, `menus` parts in package.json (and package-comment.jsonc)
* - Add main conversion logic in src/main-code/variable-conversion.ts
* - Add disposable in src/extension.ts
* - Add type definition in below `SupportCase` enum and following array
* - Add `commands`, `menus` parts in [package.json] and [package-comment.jsonc]
* - Add main conversion logic in [src/main-code/conversion.ts]
*
* Test:
* - Add test case type definition in src/type-definition/test-case-type.ts
* - Add test case in src/test/test-case.ts
* - Add test code in src/test/extension.test.ts
* - Add test case type definition in [src/type-definition/TestCaseType.ts]
* - Add test case in [src/test/test-case.ts]
* - Add test code in [src/test/extension.test.ts]
*
* Docs:
* - Add type definition in below `SupportCase` enum
* - Modify `description` in package.json
* - Add changes in CHANGELOG.md
* - Add changes in README.md
* - Modify `description` in [package.json] and [package-comment.jsonc]
* - Add changes in [CHANGELOG.md] and [README.md]
*/
export enum SupportCase {