XavierLeTohic / cucumber-json-formatter

Format JSON in your Cucumber features using VSCode

Home Page:https://marketplace.visualstudio.com/items?itemName=xletohic.cucumber-json-formatter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cucumber JSON formatter

This extension allow you to automatically indent all the JSON in the current opened .feature file.

GitHub repository
Create an issue
Write a review

Usage

  1. Open your .feature file
  2. Open command list: CMD + Maj + P
  3. Select Format JSON on the current .feature file

Incoming features

  • Indent size from editor config (.editorconfig or VScode settings)
  • Command that prompt a popup to ask for a custom indent size
  • Command that indent all JSON on all .feature files
  • Command that indent everything on the current .feature file

Example

Before

  Scenario: Should format JSON
    Given the following JSON:
      """
{
"hello": "world",
"object":{
"john": "doe"  
}
}
      """

After

  Scenario: Should format JSON
    Given the following JSON:
      """
      {
        "hello": "world",
        "object": {
          "john": "doe"
        }
      }
      """

About

Format JSON in your Cucumber features using VSCode

https://marketplace.visualstudio.com/items?itemName=xletohic.cucumber-json-formatter


Languages

Language:JavaScript 100.0%