This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 271556

Summary: When I created the package.json, I couldn't format it properly.The code will become very messy
Product: ide Reporter: buffge
Component: CodeAssignee: issues@ide <issues>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.2   
Hardware: PC   
OS: Windows 7 x64   
Issue Type: DEFECT Exception Reporter:

Description buffge 2017-09-29 18:07:23 UTC
Overview:
When I create a package.json file. I can't use Ctrl+Alt+F correctly to format it. Other JSON files can be properly formatted. As will wrap in after a comma. If I create a JSON file and renamed package.json I can be his normal format. But if I run the NPM script then the package.json was not the normal format.
Such as:
Step 1: I create a new package.json file under HTML5/Javascript
Step 2: I write a section of code to package.json as follows:
           {
              "name": "selenium_php",
              "version": "1.0.0",
              "description": "something",
              "author": "buff",
              "private": true,
              "function": "123",
              "asf": {
              "asd": "123",
              "qq":"safdf"
              }
           }
    Step 3: I press CTRL+SHIFT+F to format the code
Result: the content in package.json becomes like this as follows:
           {
    "name": "selenium_php", "version": "1.0.0", "description": "something", "author": "buff", "private": true, "function": "123", "asf": {
        "asd": "123", "qq": "safdf"
    }
}

If I write it in any other JSON file, it can be formatted normally. My code formatting conditions are all default. Nothing has been corrected