Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Format json files with Prettier #1177

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 14 additions & 16 deletions .devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
// Codespaces environment for docs.github.com
// For format details, see https://aka.ms/vscode-remote/devcontainer.json
{
"name": "docs.github.com",
"service": "container-doc",
"settings": {
"terminal.integrated.shell.linux": "/bin/bash",
"cSpell.language": ",en"
},
// Install pre-requisites, and start to serve docs.github.com locally
"postCreateCommand": "npm install && npm start",
"forwardPorts": [4000],
// Visual Studio Code extensions which help authoring for docs.github.com.
"extensions": [
"yzhang.markdown-all-in-one",
"streetsidesoftware.code-spell-checker"
]
"name": "docs.github.com",
"service": "container-doc",
"settings": {
"terminal.integrated.shell.linux": "/bin/bash",
"cSpell.language": ",en"
},
"postCreateCommand": "npm install && npm start",
"forwardPorts": [
4000
],
"extensions": [
"yzhang.markdown-all-in-one",
"streetsidesoftware.code-spell-checker"
]
}
56 changes: 56 additions & 0 deletions .github/workflows/json-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Lint JSON

on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches-ignore:
- translations

jobs:
see_if_should_skip:
runs-on: ubuntu-latest

outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@36feb0d8d062137530c2e00bd278d138fe191289
with:
cancel_others: 'false'
github_token: ${{ github.token }}
paths: '["**/*.json", ".github/workflows/json-lint.yml"]'

lint:
runs-on: ubuntu-latest
needs: see_if_should_skip
if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
steps:
- name: Check out repo
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f

- name: Setup node
uses: actions/setup-node@56899e050abffc08c2b3b61f3ec6a79a9dc3223d
with:
node-version: 14.x

- name: Get npm cache directory
id: npm-cache
run: |
echo "::set-output name=dir::$(npm config get cache)"

- name: Cache node modules
uses: actions/cache@0781355a23dac32fd3bac414512f4b903437991a
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-

- name: Install dependencies
run: npm ci

- name: Run linter
run: npx prettier -c "**/*.json"
10 changes: 9 additions & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
{
"overrides": [
{
"files":[
"files": [
"**/*.json"
],
"options": {
"parser": "json-stringify"
}
},
{
"files": [
"**/*.{yml,yaml}"
],
"options": {
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"files.exclude": {
"**/translations": true
}
}
}
4 changes: 3 additions & 1 deletion app.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"NPM_CONFIG_PRODUCTION": "true"
},
"buildpacks": [
{ "url": "heroku/nodejs" }
{
"url": "heroku/nodejs"
}
],
"formation": {
"web": {
Expand Down
2 changes: 1 addition & 1 deletion lib/algolia/cached-index-names.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@
"github-docs-dotcom-es",
"github-docs-dotcom-ja",
"github-docs-dotcom-pt"
]
]
2 changes: 1 addition & 1 deletion lib/enterprise-dates.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,4 @@
"releaseDate": "2020-12-08",
"deprecationDate": "2021-12-08"
}
}
}
2 changes: 1 addition & 1 deletion lib/graphql/static/changelog.json
Original file line number Diff line number Diff line change
Expand Up @@ -6748,4 +6748,4 @@
"previewChanges": [],
"upcomingChanges": []
}
]
]
2 changes: 1 addition & 1 deletion lib/graphql/static/prerendered-objects.json
Original file line number Diff line number Diff line change
Expand Up @@ -12919,4 +12919,4 @@
}
]
}
}
}
2 changes: 1 addition & 1 deletion lib/graphql/static/previews.json
Original file line number Diff line number Diff line change
Expand Up @@ -1324,4 +1324,4 @@
"href": "/graphql/overview/schema-previews#team-review-assignments-preview"
}
]
}
}
2 changes: 1 addition & 1 deletion lib/graphql/static/schema-dotcom.json
Original file line number Diff line number Diff line change
Expand Up @@ -69330,4 +69330,4 @@
"description": "<p>A valid x509 certificate string.</p>"
}
]
}
}
2 changes: 1 addition & 1 deletion lib/graphql/static/schema-ghae.json
Original file line number Diff line number Diff line change
Expand Up @@ -64910,4 +64910,4 @@
"description": "<p>A valid x509 certificate string.</p>"
}
]
}
}
2 changes: 1 addition & 1 deletion lib/graphql/static/schema-ghes-2.19.json
Original file line number Diff line number Diff line change
Expand Up @@ -65566,4 +65566,4 @@
"description": "<p>A valid x509 certificate string.</p>"
}
]
}
}
2 changes: 1 addition & 1 deletion lib/graphql/static/schema-ghes-2.20.json
Original file line number Diff line number Diff line change
Expand Up @@ -68512,4 +68512,4 @@
"description": "<p>A valid x509 certificate string.</p>"
}
]
}
}
2 changes: 1 addition & 1 deletion lib/graphql/static/schema-ghes-2.21.json
Original file line number Diff line number Diff line change
Expand Up @@ -69609,4 +69609,4 @@
"description": "<p>A valid x509 certificate string.</p>"
}
]
}
}
2 changes: 1 addition & 1 deletion lib/graphql/static/schema-ghes-2.22.json
Original file line number Diff line number Diff line change
Expand Up @@ -66008,4 +66008,4 @@
"description": "<p>A valid x509 certificate string.</p>"
}
]
}
}
2 changes: 1 addition & 1 deletion lib/graphql/static/upcoming-changes.json
Original file line number Diff line number Diff line change
Expand Up @@ -1839,4 +1839,4 @@
}
]
}
}
}
32 changes: 16 additions & 16 deletions lib/graphql/types.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
[
{
"kind":"queries",
"type":"QueryTypeDefinition"
"kind": "queries",
"type": "QueryTypeDefinition"
},
{
"kind":"mutations",
"type":"Mutation"
"kind": "mutations",
"type": "Mutation"
},
{
"kind":"objects",
"type":"ObjectTypeDefinition"
"kind": "objects",
"type": "ObjectTypeDefinition"
},
{
"kind":"interfaces",
"type":"InterfaceTypeDefinition"
"kind": "interfaces",
"type": "InterfaceTypeDefinition"
},
{
"kind":"enums",
"type":"EnumTypeDefinition"
"kind": "enums",
"type": "EnumTypeDefinition"
},
{
"kind":"unions",
"type":"UnionTypeDefinition"
"kind": "unions",
"type": "UnionTypeDefinition"
},
{
"kind":"inputObjects",
"type":"InputObjectTypeDefinition"
"kind": "inputObjects",
"type": "InputObjectTypeDefinition"
},
{
"kind":"scalars",
"type":"ScalarTypeDefinition"
"kind": "scalars",
"type": "ScalarTypeDefinition"
}
]
2 changes: 1 addition & 1 deletion lib/redirects/static/archived-routes-from-213-to-217.json
Original file line number Diff line number Diff line change
Expand Up @@ -16244,4 +16244,4 @@
"/pt/enterprise/2.17/user/rest/reference/search",
"/pt/enterprise/2.17/user/rest/reference/teams",
"/pt/enterprise/2.17/user/rest/reference/users"
]
]
2 changes: 1 addition & 1 deletion lib/rest/static/decorated/api.github.com.json
Original file line number Diff line number Diff line change
Expand Up @@ -86098,4 +86098,4 @@
"bodyParameters": [],
"descriptionHTML": "<p>Get a random sentence from the Zen of GitHub</p>"
}
]
]
2 changes: 1 addition & 1 deletion lib/rest/static/decorated/ghes-2.18.json
Original file line number Diff line number Diff line change
Expand Up @@ -64159,4 +64159,4 @@
"bodyParameters": [],
"descriptionHTML": "<p>Get a random sentence from the Zen of GitHub</p>"
}
]
]
2 changes: 1 addition & 1 deletion lib/rest/static/decorated/ghes-2.19.json
Original file line number Diff line number Diff line change
Expand Up @@ -64757,4 +64757,4 @@
"bodyParameters": [],
"descriptionHTML": "<p>Get a random sentence from the Zen of GitHub</p>"
}
]
]
2 changes: 1 addition & 1 deletion lib/rest/static/decorated/ghes-2.20.json
Original file line number Diff line number Diff line change
Expand Up @@ -65315,4 +65315,4 @@
"bodyParameters": [],
"descriptionHTML": "<p>Get a random sentence from the Zen of GitHub</p>"
}
]
]
2 changes: 1 addition & 1 deletion lib/rest/static/decorated/ghes-2.21.json
Original file line number Diff line number Diff line change
Expand Up @@ -69469,4 +69469,4 @@
"bodyParameters": [],
"descriptionHTML": "<p>Get a random sentence from the Zen of GitHub</p>"
}
]
]
2 changes: 1 addition & 1 deletion lib/rest/static/decorated/ghes-2.22.json
Original file line number Diff line number Diff line change
Expand Up @@ -76896,4 +76896,4 @@
"bodyParameters": [],
"descriptionHTML": "<p>Get a random sentence from the Zen of GitHub</p>"
}
]
]
2 changes: 1 addition & 1 deletion lib/rest/static/decorated/github.ae.json
Original file line number Diff line number Diff line change
Expand Up @@ -65718,4 +65718,4 @@
"bodyParameters": [],
"descriptionHTML": "<p>Get a random sentence from the Zen of GitHub</p>"
}
]
]
2 changes: 1 addition & 1 deletion lib/rest/static/dereferenced/api.github.com.deref.json
Original file line number Diff line number Diff line change
Expand Up @@ -304787,4 +304787,4 @@
}
}
}
}
}
2 changes: 1 addition & 1 deletion lib/rest/static/dereferenced/ghes-2.18.deref.json
Original file line number Diff line number Diff line change
Expand Up @@ -247037,4 +247037,4 @@
}
}
}
}
}
2 changes: 1 addition & 1 deletion lib/rest/static/dereferenced/ghes-2.19.deref.json
Original file line number Diff line number Diff line change
Expand Up @@ -250276,4 +250276,4 @@
}
}
}
}
}
2 changes: 1 addition & 1 deletion lib/rest/static/dereferenced/ghes-2.20.deref.json
Original file line number Diff line number Diff line change
Expand Up @@ -252363,4 +252363,4 @@
}
}
}
}
}
2 changes: 1 addition & 1 deletion lib/rest/static/dereferenced/ghes-2.21.deref.json
Original file line number Diff line number Diff line change
Expand Up @@ -259700,4 +259700,4 @@
}
}
}
}
}
2 changes: 1 addition & 1 deletion lib/rest/static/dereferenced/ghes-2.22.deref.json
Original file line number Diff line number Diff line change
Expand Up @@ -280713,4 +280713,4 @@
}
}
}
}
}
2 changes: 1 addition & 1 deletion lib/rest/static/dereferenced/github.ae.deref.json
Original file line number Diff line number Diff line change
Expand Up @@ -251656,4 +251656,4 @@
}
}
}
}
}
8 changes: 2 additions & 6 deletions lib/webhooks/static/dotcom/check_run.completed.payload.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,7 @@
"team_discussions": "write",
"vulnerability_alerts": "read"
},
"events": [

]
"events": []
},
"created_at": "2019-05-15T15:20:31Z",
"updated_at": "2019-05-15T15:21:14Z"
Expand Down Expand Up @@ -162,9 +160,7 @@
"team_discussions": "write",
"vulnerability_alerts": "read"
},
"events": [

]
"events": []
},
"pull_requests": [
{
Expand Down
Loading