forked from cookiecutter/cookiecutter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pretty-format JSON files (cookiecutter#1864)
* Add a pre-commit hook to standardize JSON file formatting * Enforce JSON formatting standards * Feedback: Indent JSON files with 2 spaces
- Loading branch information
Showing
26 changed files
with
164 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"template": [ | ||
"fake-project (fake-project)" | ||
] | ||
} | ||
"template": [ | ||
"fake-project (fake-project)" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{} | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
{ | ||
"project_slug": "fake-project-dict", | ||
"file_types": { | ||
"png": { | ||
"name": "Portable Network Graphic", | ||
"library": "libpng", | ||
"apps": [ | ||
"GIMP" | ||
] | ||
}, | ||
"bmp": { | ||
"name": "Bitmap", | ||
"library": "libbmp", | ||
"apps": [ | ||
"Paint", | ||
"GIMP" | ||
] | ||
} | ||
"project_slug": "fake-project-dict", | ||
"file_types": { | ||
"png": { | ||
"name": "Portable Network Graphic", | ||
"library": "libpng", | ||
"apps": [ | ||
"GIMP" | ||
] | ||
}, | ||
"bmp": { | ||
"name": "Bitmap", | ||
"library": "libbmp", | ||
"apps": [ | ||
"Paint", | ||
"GIMP" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
{ | ||
"full_name": "Audrey Roy", | ||
"email": "audreyr@gmail.com", | ||
"github_username": "audreyr", | ||
"project_name": "Fake Project", | ||
"repo_name": "fake-project", | ||
"project_short_description": "This is a fake project.", | ||
"release_date": "2013-07-28", | ||
"year": "2013", | ||
"version": "0.1" | ||
} | ||
"full_name": "Audrey Roy", | ||
"email": "audreyr@gmail.com", | ||
"github_username": "audreyr", | ||
"project_name": "Fake Project", | ||
"repo_name": "fake-project", | ||
"project_short_description": "This is a fake project.", | ||
"release_date": "2013-07-28", | ||
"year": "2013", | ||
"version": "0.1" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
{ | ||
"full_name": "Audrey Roy", | ||
"email": "audreyr@gmail.com", | ||
"github_username": "audreyr", | ||
"project_name": "Fake Project", | ||
"repo_name": "fake-project", | ||
"project_short_description": "This is a fake project.", | ||
"release_date": "2013-07-28", | ||
"year": "2013", | ||
"version": "0.1" | ||
} | ||
"full_name": "Audrey Roy", | ||
"email": "audreyr@gmail.com", | ||
"github_username": "audreyr", | ||
"project_name": "Fake Project", | ||
"repo_name": "fake-project", | ||
"project_short_description": "This is a fake project.", | ||
"release_date": "2013-07-28", | ||
"year": "2013", | ||
"version": "0.1" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
{ | ||
"full_name": "Audrey Roy", | ||
"email": "audreyr@gmail.com", | ||
"github_username": "audreyr", | ||
"project_name": "Fake Project", | ||
"repo_name": "fake-project", | ||
"project_short_description": "This is a fake project.", | ||
"release_date": "2013-07-28", | ||
"year": "2013", | ||
"version": "0.1" | ||
} | ||
"full_name": "Audrey Roy", | ||
"email": "audreyr@gmail.com", | ||
"github_username": "audreyr", | ||
"project_name": "Fake Project", | ||
"repo_name": "fake-project", | ||
"project_short_description": "This is a fake project.", | ||
"release_date": "2013-07-28", | ||
"year": "2013", | ||
"version": "0.1" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
{ | ||
"full_name": "Audrey Roy", | ||
"email": "audreyr@gmail.com", | ||
"github_username": "audreyr", | ||
"project_name": "Fake Project Templated", | ||
"repo_name": "{{ cookiecutter.project_name|lower|replace(' ', '-') }}", | ||
"project_short_description": "This is a fake project.", | ||
"release_date": "2013-07-28", | ||
"year": "2013", | ||
"version": "0.1" | ||
"full_name": "Audrey Roy", | ||
"email": "audreyr@gmail.com", | ||
"github_username": "audreyr", | ||
"project_name": "Fake Project Templated", | ||
"repo_name": "{{ cookiecutter.project_name|lower|replace(' ', '-') }}", | ||
"project_short_description": "This is a fake project.", | ||
"release_date": "2013-07-28", | ||
"year": "2013", | ||
"version": "0.1" | ||
} |
8 changes: 5 additions & 3 deletions
8
tests/test-extensions/custom-extension-post/cookiecutter.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
{ | ||
"project_slug": "foobar", | ||
"name": "World", | ||
"_extensions": ["hello_extension.HelloExtension"] | ||
"project_slug": "foobar", | ||
"name": "World", | ||
"_extensions": [ | ||
"hello_extension.HelloExtension" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
{ | ||
"project_slug": "foobar", | ||
"name": "World", | ||
"_extensions": ["hello_extension.HelloExtension"] | ||
"project_slug": "foobar", | ||
"name": "World", | ||
"_extensions": [ | ||
"hello_extension.HelloExtension" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"project_slug": "{{ 'It\\'s slugified Foobar' | slugify() }}", | ||
"year": "{% now 'utc', '%Y' %}" | ||
"project_slug": "{{ 'It\\'s slugified Foobar' | slugify() }}", | ||
"year": "{% now 'utc', '%Y' %}" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
{ | ||
"project_slug": "Foobar", | ||
"test_value_class_based": "{{cookiecutter.project_slug | foobar}}", | ||
"test_value_function_based": "{{cookiecutter.project_slug | simplefilterextension}}", | ||
"_extensions": [ | ||
"local_extensions.simplefilterextension", | ||
"local_extensions.FoobarExtension" | ||
] | ||
"project_slug": "Foobar", | ||
"test_value_class_based": "{{cookiecutter.project_slug | foobar}}", | ||
"test_value_function_based": "{{cookiecutter.project_slug | simplefilterextension}}", | ||
"_extensions": [ | ||
"local_extensions.simplefilterextension", | ||
"local_extensions.FoobarExtension" | ||
] | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
{ | ||
"project_slug": "Foobar", | ||
"year": "{{cookiecutter.nope | foobar}}", | ||
"_extensions": ["FoobarExtension"] | ||
"project_slug": "Foobar", | ||
"year": "{{cookiecutter.nope | foobar}}", | ||
"_extensions": [ | ||
"FoobarExtension" | ||
] | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
{ | ||
"full_name": "Raphael Pierzina", | ||
"github_username": "hackebrot", | ||
"project_name": "Kivy Project", | ||
"repo_name": "{{cookiecutter.project_name|lower}}", | ||
"orientation": ["all", "landscape", "portrait"] | ||
"full_name": "Raphael Pierzina", | ||
"github_username": "hackebrot", | ||
"project_name": "Kivy Project", | ||
"repo_name": "{{cookiecutter.project_name|lower}}", | ||
"orientation": [ | ||
"all", | ||
"landscape", | ||
"portrait" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
{ | ||
"full_name": "Raphael Pierzina", | ||
"github_username": "hackebrot", | ||
"project": { | ||
"name": "Kivy Project", | ||
"description": "Kivy Project", | ||
"repo_name": "{{cookiecutter.project_name|lower}}", | ||
"orientation": ["all", "landscape", "portrait"] | ||
} | ||
} | ||
"full_name": "Raphael Pierzina", | ||
"github_username": "hackebrot", | ||
"project": { | ||
"name": "Kivy Project", | ||
"description": "Kivy Project", | ||
"repo_name": "{{cookiecutter.project_name|lower}}", | ||
"orientation": [ | ||
"all", | ||
"landscape", | ||
"portrait" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"full_name": "éèà" | ||
"full_name": "éèà" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
{"1": 2, "some_key": "some_val"} | ||
{ | ||
"1": 2, | ||
"some_key": "some_val" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
{ | ||
"full_name": "Philippe Ombredanne", | ||
"year": "2015", | ||
"color": "blue", | ||
"letter": "D", | ||
"folder_name": "im_a.dir", | ||
"filename": "im_a.file", | ||
"test_name": "output_folder" | ||
} | ||
"full_name": "Philippe Ombredanne", | ||
"year": "2015", | ||
"color": "blue", | ||
"letter": "D", | ||
"folder_name": "im_a.dir", | ||
"filename": "im_a.file", | ||
"test_name": "output_folder" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
{ | ||
"full_name": "Audrey Greenfeld", | ||
"year": "2014", | ||
"color": "green", | ||
"letter": "D", | ||
"folder_name": "im_a.dir", | ||
"filename": "im_a.file", | ||
"test_name": "output_folder" | ||
} | ||
"full_name": "Audrey Greenfeld", | ||
"year": "2014", | ||
"color": "green", | ||
"letter": "D", | ||
"folder_name": "im_a.dir", | ||
"filename": "im_a.file", | ||
"test_name": "output_folder" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,8 @@ | ||
{"cookiecutter": {"version": "0.1.0", "email": "raphael@hackebrot.de", "full_name": "Raphael Pierzina", "github_username": "hackebrot"}} | ||
{ | ||
"cookiecutter": { | ||
"version": "0.1.0", | ||
"email": "raphael@hackebrot.de", | ||
"full_name": "Raphael Pierzina", | ||
"github_username": "hackebrot" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,8 @@ | ||
{"not cookiecutter": {"version": "0.1.0", "email": "raphael@hackebrot.de", "full_name": "Raphael Pierzina", "github_username": "hackebrot"}} | ||
{ | ||
"not cookiecutter": { | ||
"version": "0.1.0", | ||
"email": "raphael@hackebrot.de", | ||
"full_name": "Raphael Pierzina", | ||
"github_username": "hackebrot" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"project_slug": "foobar", | ||
"command_line_interface": "click", | ||
"use_pytest": "y" | ||
"project_slug": "foobar", | ||
"command_line_interface": "click", | ||
"use_pytest": "y" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"project_slug": "foobar", | ||
"command_line_interface": "click", | ||
"use_pytest": "y" | ||
"project_slug": "foobar", | ||
"command_line_interface": "click", | ||
"use_pytest": "y" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"project_slug": "foobar", | ||
"command_line_interface": "click", | ||
"use_pytest": "y" | ||
"project_slug": "foobar", | ||
"command_line_interface": "click", | ||
"use_pytest": "y" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"project_slug": "foobar", | ||
"command_line_interface": "click", | ||
"use_pytest": "y" | ||
"project_slug": "foobar", | ||
"command_line_interface": "click", | ||
"use_pytest": "y" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"project_slug": "testproject", | ||
"github_username": "hackebrot" | ||
"project_slug": "testproject", | ||
"github_username": "hackebrot" | ||
} |