Skip to content

Commit

Permalink
Merge pull request #26184 from github/repo-sync
Browse files Browse the repository at this point in the history
Repo sync
  • Loading branch information
docs-bot committed Jun 22, 2023
2 parents a543459 + 1c10252 commit 0c2a1c4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
1 change: 1 addition & 0 deletions src/content-linter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ We are using the [markdownlint](https://github.com/DavidAnson/markdownlint) fram
| [MD027](https://github.com/DavidAnson/markdownlint/blob/main/doc/md027.md) | Catches multiple spaces after blockquote symbol. | warning |
| [MD029](https://github.com/DavidAnson/markdownlint/blob/main/doc/md029.md) | All ordered lists should be prefixed with `1.`. | error |
| [MD030](https://github.com/DavidAnson/markdownlint/blob/main/doc/md030.md) | Only allow one space after list markers. | error |
| [MD031](https://github.com/DavidAnson/markdownlint/blob/main/doc/md031.md) | Fenced code blocks must be surrounded by blank lines. | warning |
| [MD037](https://github.com/DavidAnson/markdownlint/blob/main/doc/md037.md) | Remove extra spacing inside emphasis markers. | warning |
| [MD039](https://github.com/DavidAnson/markdownlint/blob/main/doc/md039.md) | Remove spacing around image text. | warning |
| [MD040](https://github.com/DavidAnson/markdownlint/blob/main/doc/md040.md) | Code fences must have a language specified. | warning |
Expand Down
1 change: 1 addition & 0 deletions src/content-linter/scripts/markdownlint.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ async function main() {
MD027: true,
MD029: { style: 'one' },
MD030: true,
MD031: true,
MD037: true,
MD039: true,
MD040: {
Expand Down
18 changes: 9 additions & 9 deletions src/graphql/tests/validate-schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ graphqlTypes.forEach((type) => {
describe('graphql json files', () => {
jest.setTimeout(3 * 60 * 1000)

test('schemas object validation', () => {
// The typeObj is repeated thousands of times in each .json file
// so use a cache of which we've already validated to speed this
// test up significantly.
const typeObjsTested = new Set()
graphqlVersions.forEach((version) => {
const schemaJsonPerVersion = readJsonFile(`${GRAPHQL_DATA_DIR}/${version}/schema.json`)
// all graphql types are arrays except for queries
graphqlTypes.forEach((type) => {
// The typeObj is repeated thousands of times in each .json file
// so use a cache of which we've already validated to speed this
// test up significantly.
const typeObjsTested = new Set()
graphqlVersions.forEach((version) => {
const schemaJsonPerVersion = readJsonFile(`${GRAPHQL_DATA_DIR}/${version}/schema.json`)
// all graphql types are arrays except for queries
graphqlTypes.forEach((type) => {
test(`${version} schemas object validation for ${type}`, () => {
schemaJsonPerVersion[type].forEach((typeObj) => {
const key = JSON.stringify(typeObj) + type
if (typeObjsTested.has(key)) return
Expand Down

0 comments on commit 0c2a1c4

Please sign in to comment.