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 - When I created the package.json, I couldn't format it properly.The code will become very messy
Summary: When I created the package.json, I couldn't format it properly.The code will ...
Status: NEW
Alias: None
Product: ide
Classification: Unclassified
Component: Code (show other bugs)
Version: 8.2
Hardware: PC Windows 7 x64
: P3 normal (vote)
Assignee: issues@ide
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-29 18:07 UTC by buffge
Modified: 2017-09-29 18:07 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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