Skip to content

XavierLeTohic/cucumber-json-formatter

Repository files navigation

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"
        }
      }
      """