z***@qq.com
z***@qq.com
  • 发布:2022-07-06 09:28
  • 更新:2022-07-06 09:28
  • 阅读:239

【报Bug】无法格式化

分类:HBuilderX

产品分类: HbuilderX

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: 10 企业版 G

HBuilderX版本号: 3.4.18

示例代码:

[Format] 09:14:39.075 C:\Users\Administrator\AppData\Roaming\HBuilder X\extensions\format\jsbeautifyrc.js:2
[Format] 09:14:39.075 "indent_size": "2",
[Format] 09:14:39.075 ^
[Format] 09:14:39.075
[Format] 09:14:39.075 SyntaxError: Unexpected token ':'
[Format] 09:14:39.075 at wrapSafe (internal/modules/cjs/loader.js:915:16)
[Format] 09:14:39.075 at Module._compile (internal/modules/cjs/loader.js:963:27)
[Format] 09:14:39.075 at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
[Format] 09:14:39.075 at Module.load (internal/modules/cjs/loader.js:863:32)
[Format] 09:14:39.075 at Function.Module._load (internal/modules/cjs/loader.js:708:14)
[Format] 09:14:39.075 at Module.require (internal/modules/cjs/loader.js:887:19)
[Format] 09:14:39.075 at require (internal/modules/cjs/helpers.js:74:18)
[Format] 09:14:39.075 at Object.<anonymous> (D:\Project\DevelopmentTool\HBuilderX.3.4.14.20220607\HBuilderX\plugins\format\js_beautify.js:35:20)
[Format] 09:14:39.075 at Module._compile (internal/modules/cjs/loader.js:999:30)
[Format] 09:14:39.075 at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
[Format] 09:14:39.075
[Format] 09:22:26.770 C:\Users\Administrator\AppData\Roaming\HBuilder X\extensions\format\jsbeautifyrc.js:2
[Format] 09:22:26.770 "indent_size": "2",
[Format] 09:22:26.770 ^
[Format] 09:22:26.770
[Format] 09:22:26.770 SyntaxError: Unexpected token ':'
[Format] 09:22:26.770 at wrapSafe (internal/modules/cjs/loader.js:915:16)
[Format] 09:22:26.770 at Module._compile (internal/modules/cjs/loader.js:963:27)
[Format] 09:22:26.770 at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
[Format] 09:22:26.770 at Module.load (internal/modules/cjs/loader.js:863:32)
[Format] 09:22:26.770 at Function.Module._load (internal/modules/cjs/loader.js:708:14)
[Format] 09:22:26.770 at Module.require (internal/modules/cjs/loader.js:887:19)
[Format] 09:22:26.770 at require (internal/modules/cjs/helpers.js:74:18)
[Format] 09:22:26.770 at Object.<anonymous> (D:\Project\DevelopmentTool\HBuilderX.3.4.14.20220607\HBuilderX\plugins\format\js_beautify.js:35:20)
[Format] 09:22:26.770 at Module._compile (internal/modules/cjs/loader.js:999:30)
[Format] 09:22:26.770 at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
[Format] 09:22:26.770

操作步骤:

[Format] 09:14:39.075 C:\Users\Administrator\AppData\Roaming\HBuilder X\extensions\format\jsbeautifyrc.js:2
[Format] 09:14:39.075 "indent_size": "2",
[Format] 09:14:39.075 ^
[Format] 09:14:39.075
[Format] 09:14:39.075 SyntaxError: Unexpected token ':'
[Format] 09:14:39.075 at wrapSafe (internal/modules/cjs/loader.js:915:16)
[Format] 09:14:39.075 at Module._compile (internal/modules/cjs/loader.js:963:27)
[Format] 09:14:39.075 at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
[Format] 09:14:39.075 at Module.load (internal/modules/cjs/loader.js:863:32)
[Format] 09:14:39.075 at Function.Module._load (internal/modules/cjs/loader.js:708:14)
[Format] 09:14:39.075 at Module.require (internal/modules/cjs/loader.js:887:19)
[Format] 09:14:39.075 at require (internal/modules/cjs/helpers.js:74:18)
[Format] 09:14:39.075 at Object.<anonymous> (D:\Project\DevelopmentTool\HBuilderX.3.4.14.20220607\HBuilderX\plugins\format\js_beautify.js:35:20)
[Format] 09:14:39.075 at Module._compile (internal/modules/cjs/loader.js:999:30)
[Format] 09:14:39.075 at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
[Format] 09:14:39.075
[Format] 09:22:26.770 C:\Users\Administrator\AppData\Roaming\HBuilder X\extensions\format\jsbeautifyrc.js:2
[Format] 09:22:26.770 "indent_size": "2",
[Format] 09:22:26.770 ^
[Format] 09:22:26.770
[Format] 09:22:26.770 SyntaxError: Unexpected token ':'
[Format] 09:22:26.770 at wrapSafe (internal/modules/cjs/loader.js:915:16)
[Format] 09:22:26.770 at Module._compile (internal/modules/cjs/loader.js:963:27)
[Format] 09:22:26.770 at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
[Format] 09:22:26.770 at Module.load (internal/modules/cjs/loader.js:863:32)
[Format] 09:22:26.770 at Function.Module._load (internal/modules/cjs/loader.js:708:14)
[Format] 09:22:26.770 at Module.require (internal/modules/cjs/loader.js:887:19)
[Format] 09:22:26.770 at require (internal/modules/cjs/helpers.js:74:18)
[Format] 09:22:26.770 at Object.<anonymous> (D:\Project\DevelopmentTool\HBuilderX.3.4.14.20220607\HBuilderX\plugins\format\js_beautify.js:35:20)
[Format] 09:22:26.770 at Module._compile (internal/modules/cjs/loader.js:999:30)
[Format] 09:22:26.770 at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
[Format] 09:22:26.770

预期结果:

[Format] 09:14:39.075 C:\Users\Administrator\AppData\Roaming\HBuilder X\extensions\format\jsbeautifyrc.js:2
[Format] 09:14:39.075 "indent_size": "2",
[Format] 09:14:39.075 ^
[Format] 09:14:39.075
[Format] 09:14:39.075 SyntaxError: Unexpected token ':'
[Format] 09:14:39.075 at wrapSafe (internal/modules/cjs/loader.js:915:16)
[Format] 09:14:39.075 at Module._compile (internal/modules/cjs/loader.js:963:27)
[Format] 09:14:39.075 at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
[Format] 09:14:39.075 at Module.load (internal/modules/cjs/loader.js:863:32)
[Format] 09:14:39.075 at Function.Module._load (internal/modules/cjs/loader.js:708:14)
[Format] 09:14:39.075 at Module.require (internal/modules/cjs/loader.js:887:19)
[Format] 09:14:39.075 at require (internal/modules/cjs/helpers.js:74:18)
[Format] 09:14:39.075 at Object.<anonymous> (D:\Project\DevelopmentTool\HBuilderX.3.4.14.20220607\HBuilderX\plugins\format\js_beautify.js:35:20)
[Format] 09:14:39.075 at Module._compile (internal/modules/cjs/loader.js:999:30)
[Format] 09:14:39.075 at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
[Format] 09:14:39.075
[Format] 09:22:26.770 C:\Users\Administrator\AppData\Roaming\HBuilder X\extensions\format\jsbeautifyrc.js:2
[Format] 09:22:26.770 "indent_size": "2",
[Format] 09:22:26.770 ^
[Format] 09:22:26.770
[Format] 09:22:26.770 SyntaxError: Unexpected token ':'
[Format] 09:22:26.770 at wrapSafe (internal/modules/cjs/loader.js:915:16)
[Format] 09:22:26.770 at Module._compile (internal/modules/cjs/loader.js:963:27)
[Format] 09:22:26.770 at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
[Format] 09:22:26.770 at Module.load (internal/modules/cjs/loader.js:863:32)
[Format] 09:22:26.770 at Function.Module._load (internal/modules/cjs/loader.js:708:14)
[Format] 09:22:26.770 at Module.require (internal/modules/cjs/loader.js:887:19)
[Format] 09:22:26.770 at require (internal/modules/cjs/helpers.js:74:18)
[Format] 09:22:26.770 at Object.<anonymous> (D:\Project\DevelopmentTool\HBuilderX.3.4.14.20220607\HBuilderX\plugins\format\js_beautify.js:35:20)
[Format] 09:22:26.770 at Module._compile (internal/modules/cjs/loader.js:999:30)
[Format] 09:22:26.770 at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
[Format] 09:22:26.770

实际结果:

[Format] 09:14:39.075 C:\Users\Administrator\AppData\Roaming\HBuilder X\extensions\format\jsbeautifyrc.js:2
[Format] 09:14:39.075 "indent_size": "2",
[Format] 09:14:39.075 ^
[Format] 09:14:39.075
[Format] 09:14:39.075 SyntaxError: Unexpected token ':'
[Format] 09:14:39.075 at wrapSafe (internal/modules/cjs/loader.js:915:16)
[Format] 09:14:39.075 at Module._compile (internal/modules/cjs/loader.js:963:27)
[Format] 09:14:39.075 at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
[Format] 09:14:39.075 at Module.load (internal/modules/cjs/loader.js:863:32)
[Format] 09:14:39.075 at Function.Module._load (internal/modules/cjs/loader.js:708:14)
[Format] 09:14:39.075 at Module.require (internal/modules/cjs/loader.js:887:19)
[Format] 09:14:39.075 at require (internal/modules/cjs/helpers.js:74:18)
[Format] 09:14:39.075 at Object.<anonymous> (D:\Project\DevelopmentTool\HBuilderX.3.4.14.20220607\HBuilderX\plugins\format\js_beautify.js:35:20)
[Format] 09:14:39.075 at Module._compile (internal/modules/cjs/loader.js:999:30)
[Format] 09:14:39.075 at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
[Format] 09:14:39.075
[Format] 09:22:26.770 C:\Users\Administrator\AppData\Roaming\HBuilder X\extensions\format\jsbeautifyrc.js:2
[Format] 09:22:26.770 "indent_size": "2",
[Format] 09:22:26.770 ^
[Format] 09:22:26.770
[Format] 09:22:26.770 SyntaxError: Unexpected token ':'
[Format] 09:22:26.770 at wrapSafe (internal/modules/cjs/loader.js:915:16)
[Format] 09:22:26.770 at Module._compile (internal/modules/cjs/loader.js:963:27)
[Format] 09:22:26.770 at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
[Format] 09:22:26.770 at Module.load (internal/modules/cjs/loader.js:863:32)
[Format] 09:22:26.770 at Function.Module._load (internal/modules/cjs/loader.js:708:14)
[Format] 09:22:26.770 at Module.require (internal/modules/cjs/loader.js:887:19)
[Format] 09:22:26.770 at require (internal/modules/cjs/helpers.js:74:18)
[Format] 09:22:26.770 at Object.<anonymous> (D:\Project\DevelopmentTool\HBuilderX.3.4.14.20220607\HBuilderX\plugins\format\js_beautify.js:35:20)
[Format] 09:22:26.770 at Module._compile (internal/modules/cjs/loader.js:999:30)
[Format] 09:22:26.770 at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
[Format] 09:22:26.770

bug描述:

2022-07-06 09:28 负责人:无 分享
已邀请:

该问题目前已经被锁定, 无法添加新回复