diff --git a/.editorconfig b/.editorconfig index 0cdfc80277e889..5987f2667d4706 100644 --- a/.editorconfig +++ b/.editorconfig @@ -13,6 +13,10 @@ insert_final_newline = true trim_trailing_whitespace = true indent_style = tab +[*.{yml,yaml}] +indent_style = space +indent_size = 2 + [*.{gradle,java,kt}] indent_style = space diff --git a/.github/ISSUE_TEMPLATE/Bug_report.yml b/.github/ISSUE_TEMPLATE/Bug_report.yml index 50944218a52b86..ab001b41ff793e 100644 --- a/.github/ISSUE_TEMPLATE/Bug_report.yml +++ b/.github/ISSUE_TEMPLATE/Bug_report.yml @@ -13,7 +13,7 @@ body: Feature '...' is not working properly. I expect '...' to happen, but '...' happens instead validations: required: true - + - type: textarea attributes: label: Step-by-step reproduction instructions @@ -42,12 +42,12 @@ body: description: | Please list what Gutenberg version you are using. If you aren't using Gutenberg, please note that it's not installed. placeholder: | - - WordPress version, Gutenberg version, and active Theme you are using. - - Browser(s) are you seeing the problem on. - - Device you are using and operating system (e.g. "Desktop with Windows 10", "iPhone with iOS 14", etc.). + - WordPress version, Gutenberg version, and active Theme you are using. + - Browser(s) are you seeing the problem on. + - Device you are using and operating system (e.g. "Desktop with Windows 10", "iPhone with iOS 14", etc.). validations: required: false - + - type: dropdown id: existing attributes: @@ -55,18 +55,18 @@ body: description: You can do this by searching https://github.com/WordPress/gutenberg/issues and making sure the bug is not related to another plugin. multiple: true options: - - 'Yes' - - 'No' + - 'Yes' + - 'No' validations: required: true - + - type: dropdown id: plugins attributes: label: Please confirm that you have tested with all plugins deactivated except Gutenberg. multiple: true options: - - 'Yes' - - 'No' + - 'Yes' + - 'No' validations: required: true diff --git a/.npmpackagejsonlintrc.json b/.npmpackagejsonlintrc.json index daab51fa30d456..5c240bf5c3bf40 100644 --- a/.npmpackagejsonlintrc.json +++ b/.npmpackagejsonlintrc.json @@ -11,12 +11,7 @@ "prefer-no-devDependencies": "error", "require-publishConfig": "error", "require-repository-directory": "error", - "valid-values-author": [ - "error", - [ - "The WordPress Contributors" - ] - ], + "valid-values-author": [ "error", [ "The WordPress Contributors" ] ], "valid-values-publishConfig": [ "error", [ diff --git a/.prettierignore b/.prettierignore index 39d3acb571b214..0b73d70681dbb0 100644 --- a/.prettierignore +++ b/.prettierignore @@ -5,4 +5,5 @@ build-types packages/block-serialization-spec-parser/parser.js packages/e2e-tests/plugins packages/react-native-editor/bundle +packages/url/src/test/fixtures vendor diff --git a/bin/plugin/commands/test/fixtures/bot-pull-requests.json b/bin/plugin/commands/test/fixtures/bot-pull-requests.json index e1c0957f5d4079..c5e268a04f1d5e 100644 --- a/bin/plugin/commands/test/fixtures/bot-pull-requests.json +++ b/bin/plugin/commands/test/fixtures/bot-pull-requests.json @@ -1,5 +1,5 @@ [ - { + { "url": "https://api.github.com/repos/WordPress/gutenberg/issues/XXXX", "repository_url": "https://api.github.com/repos/WordPress/gutenberg", "labels_url": "https://api.github.com/repos/WordPress/gutenberg/issues/XXXX/labels{/name}", @@ -106,4 +106,4 @@ "body": "\r\n\r\n## Description\r\n\r\n\r\nRelated: #22890 his PR refactors the `MetaBoxesArea` component into a function component using React hooks.\r\n\r\n## How has this been tested?\r\n\r\n\r\n\r\n\r\nShow block editor and check custom field metabox and others.\r\n\r\n## Checklist:\r\n- [x] My code is tested.\r\n- [x] My code follows the WordPress code style. \r\n- [x] My code follows the accessibility standards. \r\n- [x] I've tested my changes with keyboard and screen readers. \r\n- [ ] My code has proper inline documentation. \r\n- [ ] I've included developer documentation if appropriate. \r\n- [ ] I've updated all React Native files affected by any refactorings/renamings in this PR (please manually search all `*.native.js` files for terms that need renaming or removal). \r\n", "performed_via_github_app": null } -] \ No newline at end of file +] diff --git a/docs/toc.json b/docs/toc.json index 8f3b669a281c5a..e2d5c292001be3 100644 --- a/docs/toc.json +++ b/docs/toc.json @@ -88,13 +88,13 @@ { "docs/how-to-guides/data-basics/README.md": [ { - "docs/how-to-guides/data-basics/1-data-basics-setup.md": [] + "docs/how-to-guides/data-basics/1-data-basics-setup.md": [] }, { - "docs/how-to-guides/data-basics/2-building-a-list-of-pages.md": [] + "docs/how-to-guides/data-basics/2-building-a-list-of-pages.md": [] }, { - "docs/how-to-guides/data-basics/3-building-an-edit-form.md": [] + "docs/how-to-guides/data-basics/3-building-an-edit-form.md": [] } ] }, @@ -278,7 +278,9 @@ "docs/explanations/user-interface/README.md": [ { "docs/explanations/user-interface/block-design.md": [] }, { "docs/explanations/user-interface/animation.md": [] }, - { "docs/explanations/user-interface/design-resources.md": [] } + { + "docs/explanations/user-interface/design-resources.md": [] + } ] }, { "docs/explanations/faq.md": [] }, @@ -318,7 +320,9 @@ }, { "docs/contributors/code/backward-compatibility.md": [] }, { "docs/contributors/code/deprecations.md": [] }, - { "docs/contributors/code/how-to-get-your-pull-request-reviewed.md": [] } + { + "docs/contributors/code/how-to-get-your-pull-request-reviewed.md": [] + } ] }, { diff --git a/lib/compat/wordpress-6.0/theme-i18n.json b/lib/compat/wordpress-6.0/theme-i18n.json index f5a65dbddc37d2..282e520c338b42 100644 --- a/lib/compat/wordpress-6.0/theme-i18n.json +++ b/lib/compat/wordpress-6.0/theme-i18n.json @@ -2,33 +2,33 @@ "title": "Style variation name", "settings": { "typography": { - "fontSizes": [ - { - "name": "Font size name" - } - ], - "fontFamilies": [ - { - "name": "Font family name" - } - ] + "fontSizes": [ + { + "name": "Font size name" + } + ], + "fontFamilies": [ + { + "name": "Font family name" + } + ] }, "color": { - "palette": [ - { - "name": "Color name" - } - ], - "gradients": [ - { - "name": "Gradient name" - } - ], - "duotone": [ - { - "name": "Duotone name" - } - ] + "palette": [ + { + "name": "Color name" + } + ], + "gradients": [ + { + "name": "Gradient name" + } + ], + "duotone": [ + { + "name": "Duotone name" + } + ] }, "blocks": { "*": { diff --git a/package-lock.json b/package-lock.json index 861659c2b5f3b7..70ba2680fec2fe 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9110,9 +9110,9 @@ } }, "@samverschueren/stream-to-observable": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@samverschueren/stream-to-observable/-/stream-to-observable-0.3.0.tgz", - "integrity": "sha512-MI4Xx6LHs4Webyvi6EbspgyAb4D2Q2VtnCQ1blOJcoLS6mVa8lNN2rkIy1CVxfTUpoyIbCTkXES1rLXztFD1lg==", + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@samverschueren/stream-to-observable/-/stream-to-observable-0.3.1.tgz", + "integrity": "sha512-c/qwwcHyafOQuVQJj0IlBjf5yYgBI7YPJ77k4fOJYesb41jio65eaJODRUmfYKhTOFBrIZ66kgvGPlNbjuoRdQ==", "dev": true, "requires": { "any-observable": "^0.3.0" @@ -19188,9 +19188,9 @@ "dev": true }, "ansi-escapes": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", - "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", "dev": true }, "ansi-fragments": { @@ -31424,163 +31424,6 @@ } } }, - "del": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/del/-/del-5.1.0.tgz", - "integrity": "sha512-wH9xOVHnczo9jN2IW68BabcecVPxacIA3g/7z6vhSU/4stOKQzeCRK0yD0A24WiAAUJmmVpWqrERcTxnLo3AnA==", - "dev": true, - "requires": { - "globby": "^10.0.1", - "graceful-fs": "^4.2.2", - "is-glob": "^4.0.1", - "is-path-cwd": "^2.2.0", - "is-path-inside": "^3.0.1", - "p-map": "^3.0.0", - "rimraf": "^3.0.0", - "slash": "^3.0.0" - }, - "dependencies": { - "@nodelib/fs.stat": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.2.tgz", - "integrity": "sha512-z8+wGWV2dgUhLqrtRYa03yDx4HWMvXKi1z8g3m2JyxAx8F7xk74asqPk5LAETjqDSGLFML/6CDl0+yFunSYicw==", - "dev": true - }, - "array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true - }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "requires": { - "fill-range": "^7.0.1" - } - }, - "fast-glob": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.0.4.tgz", - "integrity": "sha512-wkIbV6qg37xTJwqSsdnIphL1e+LaGz4AIQqr00mIubMaEhv1/HEmJ0uuCGZRNRUkZZmOB5mJKO0ZUTVq+SxMQg==", - "dev": true, - "requires": { - "@nodelib/fs.stat": "^2.0.1", - "@nodelib/fs.walk": "^1.2.1", - "glob-parent": "^5.0.0", - "is-glob": "^4.0.1", - "merge2": "^1.2.3", - "micromatch": "^4.0.2" - } - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "glob": { - "version": "7.1.4", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", - "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-parent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.0.0.tgz", - "integrity": "sha512-Z2RwiujPRGluePM6j699ktJYxmPpJKCfpGA13jz2hmFZC7gKetzrWvg5KN3+OsIFmydGyZ1AVwERCq1w/ZZwRg==", - "dev": true, - "requires": { - "is-glob": "^4.0.1" - } - }, - "globby": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/globby/-/globby-10.0.1.tgz", - "integrity": "sha512-sSs4inE1FB2YQiymcmTv6NWENryABjUNPeWhOvmn4SjtKybglsyPZxFB3U1/+L1bYi0rNZDqCLlHyLYDl1Pq5A==", - "dev": true, - "requires": { - "@types/glob": "^7.1.1", - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.0.3", - "glob": "^7.1.3", - "ignore": "^5.1.1", - "merge2": "^1.2.3", - "slash": "^3.0.0" - } - }, - "graceful-fs": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.2.tgz", - "integrity": "sha512-IItsdsea19BoLC7ELy13q1iJFNmd7ofZH5+X/pJr90/nRoPEX0DJo1dHDbgtYWOhJhcCgMDTOw84RZ72q6lB+Q==", - "dev": true - }, - "ignore": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.4.tgz", - "integrity": "sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A==", - "dev": true - }, - "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true - }, - "micromatch": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", - "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", - "dev": true, - "requires": { - "braces": "^3.0.1", - "picomatch": "^2.0.5" - } - }, - "path-type": { - "version": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==" - }, - "slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true - }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "requires": { - "is-number": "^7.0.0" - } - } - } - }, "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -36166,9 +36009,9 @@ } }, "get-own-enumerable-property-symbols": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.0.tgz", - "integrity": "sha512-CIJYJC4GGF06TakLg8z4GQKvDsx9EMspVxOYih7LerEL/WosUnFIww45CGfxfeKHqlg3twgUrYRT1O3WQqjGCg==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz", + "integrity": "sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g==", "dev": true }, "get-pkg-repo": { @@ -38714,12 +38557,6 @@ } } }, - "is-path-inside": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.1.tgz", - "integrity": "sha512-CKstxrctq1kUesU6WhtZDbYKzzYBuRH0UYInAVrkc/EYdB9ltbfE0gOoayG9nhohG6447sOOVGhHqsdmBvkbNg==", - "dev": true - }, "is-plain-obj": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", @@ -42877,27 +42714,34 @@ } }, "lint-staged": { - "version": "9.2.5", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-9.2.5.tgz", - "integrity": "sha512-d99gTBFMJ29159+9iRvaMEQstmNcPAbQbhHSYw6D/1FncvFdIj8lWHztaq3Uq+tbZPABHXQ/fyN7Rp1QwF8HIw==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-10.0.1.tgz", + "integrity": "sha512-Qk48GmcMX8zFzhuJsf0ZquILxnnDkY56Y+/y1TGxEe4S5P+RetnisiF0Z15t+Gwa5PMNAG4dPxqGHabW7L4zwg==", "dev": true, "requires": { - "chalk": "^2.4.2", - "commander": "^2.20.0", - "cosmiconfig": "^5.2.1", + "chalk": "^3.0.0", + "commander": "^4.0.1", + "cosmiconfig": "^6.0.0", "debug": "^4.1.1", "dedent": "^0.7.0", - "del": "^5.0.0", - "execa": "^2.0.3", + "execa": "^3.4.0", "listr": "^0.14.3", "log-symbols": "^3.0.0", "micromatch": "^4.0.2", "normalize-path": "^3.0.0", - "please-upgrade-node": "^3.1.1", - "string-argv": "^0.3.0", + "please-upgrade-node": "^3.2.0", "stringify-object": "^3.3.0" }, "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, "braces": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", @@ -42908,38 +42752,53 @@ } }, "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", "dev": true, "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" } }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", + "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", "dev": true }, "cosmiconfig": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz", - "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-6.0.0.tgz", + "integrity": "sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg==", "dev": true, "requires": { - "import-fresh": "^2.0.0", - "is-directory": "^0.3.1", - "js-yaml": "^3.13.1", - "parse-json": "^4.0.0" + "@types/parse-json": "^4.0.0", + "import-fresh": "^3.1.0", + "parse-json": "^5.0.0", + "path-type": "^4.0.0", + "yaml": "^1.7.2" } }, "cross-spawn": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.1.tgz", - "integrity": "sha512-u7v4o84SwFpD32Z8IIcPZ6z1/ie24O6RU3RbtL5Y316l3KuHVPx9ItBgWQ6VlfAFnRnTtMUrsQ9MUUTuEZjogg==", + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, "requires": { "path-key": "^3.1.0", @@ -42948,25 +42807,26 @@ } }, "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dev": true, "requires": { - "ms": "^2.1.1" + "ms": "2.1.2" } }, "execa": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-2.1.0.tgz", - "integrity": "sha512-Y/URAVapfbYy2Xp/gb6A0E7iR8xeqOCXsuuaoMn7A5PzrXUK84E1gyiEfq0wQd/GHA6GsoHWwhNq8anb0mleIw==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-3.4.0.tgz", + "integrity": "sha512-r9vdGQk4bmCuK1yKQu1KTwcT2zwfWdbdaXfCtAh+5nU/4fSX+JAb7vZGvI5naJrQlvONrEB20jeruESI69530g==", "dev": true, "requires": { "cross-spawn": "^7.0.0", "get-stream": "^5.0.0", + "human-signals": "^1.1.1", "is-stream": "^2.0.0", "merge-stream": "^2.0.0", - "npm-run-path": "^3.0.0", + "npm-run-path": "^4.0.0", "onetime": "^5.1.0", "p-finally": "^2.0.0", "signal-exit": "^3.0.2", @@ -42982,24 +42842,11 @@ "to-regex-range": "^5.0.1" } }, - "get-stream": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.1.0.tgz", - "integrity": "sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, - "import-fresh": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz", - "integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=", - "dev": true, - "requires": { - "caller-path": "^2.0.0", - "resolve-from": "^3.0.0" - } + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true }, "is-number": { "version": "7.0.0", @@ -43008,9 +42855,9 @@ "dev": true }, "is-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", - "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", "dev": true }, "log-symbols": { @@ -43020,22 +42867,68 @@ "dev": true, "requires": { "chalk": "^2.4.2" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } } }, - "merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true - }, "micromatch": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", - "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", + "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", "dev": true, "requires": { - "braces": "^3.0.1", - "picomatch": "^2.0.5" + "braces": "^3.0.2", + "picomatch": "^2.3.1" } }, "mimic-fn": { @@ -43057,18 +42950,18 @@ "dev": true }, "npm-run-path": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-3.1.0.tgz", - "integrity": "sha512-Dbl4A/VfiVGLgQv29URL9xshU8XDY1GeLy+fsaZ1AA8JDSfjvr5P5+pzRbWqRSBxk6/DW7MIh8lTM/PaGnP2kg==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", "dev": true, "requires": { "path-key": "^3.0.0" } }, "onetime": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz", - "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", "dev": true, "requires": { "mimic-fn": "^2.1.0" @@ -43080,31 +42973,23 @@ "integrity": "sha512-vpm09aKwq6H9phqRQzecoDpD8TmVyGw70qmWlyq5onxY7tqyTTFVvxMykxQSQKILBSFlbXpypIw2T1Ml7+DDtw==", "dev": true }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - }, "path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } + "path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true + }, + "picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true }, "shebang-command": { "version": "2.0.0", @@ -43121,6 +43006,15 @@ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, "to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -54595,12 +54489,6 @@ "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz", "integrity": "sha1-ucczDHBChi9rFC3CdLvMWGbONUY=" }, - "string-argv": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.1.tgz", - "integrity": "sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==", - "dev": true - }, "string-hash-64": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/string-hash-64/-/string-hash-64-1.0.3.tgz", diff --git a/package.json b/package.json index e3f258ce7ff7ef..942a6b8b49522d 100755 --- a/package.json +++ b/package.json @@ -191,7 +191,7 @@ "jest-watch-typeahead": "1.0.0", "jsdom": "16.7.0", "lerna": "3.22.1", - "lint-staged": "9.2.5", + "lint-staged": "10.0.1", "lodash": "4.17.21", "make-dir": "3.0.0", "metro-react-native-babel-preset": "0.66.2", @@ -302,6 +302,15 @@ "prepare": "husky install" }, "lint-staged": { + "*.{js,json,ts,ts,yml,yaml}": [ + "wp-scripts format" + ], + "*.{js,ts,tsx}": [ + "wp-scripts lint-js" + ], + "*.scss": [ + "wp-scripts lint-style" + ], "package-lock.json": [ "npm run lint-lockfile", "node ./bin/check-latest-npm.js" @@ -309,13 +318,6 @@ "packages/*/package.json": [ "wp-scripts lint-pkg-json" ], - "*.scss": [ - "wp-scripts lint-style" - ], - "*.{js,ts,tsx,yml}": [ - "wp-scripts format", - "wp-scripts lint-js" - ], "{docs/{toc.json,tool/*.js},packages/{*/README.md,components/src/*/**/README.md}}": [ "node ./docs/tool/index.js" ], diff --git a/packages/block-library/src/avatar/block.json b/packages/block-library/src/avatar/block.json index 537e21422b41d4..6bde47a82201bf 100644 --- a/packages/block-library/src/avatar/block.json +++ b/packages/block-library/src/avatar/block.json @@ -22,7 +22,6 @@ "type": "string", "default": "_self" } - }, "usesContext": [ "postType", "postId", "commentId" ], "supports": { diff --git a/packages/block-library/src/list-item/block.json b/packages/block-library/src/list-item/block.json index bb067769bee9b2..5b8ad8456944f3 100644 --- a/packages/block-library/src/list-item/block.json +++ b/packages/block-library/src/list-item/block.json @@ -15,7 +15,7 @@ "content": { "type": "string", "source": "html", - "selector": "li", + "selector": "li", "default": "", "__experimentalRole": "content" } diff --git a/packages/block-library/src/tag-cloud/block.json b/packages/block-library/src/tag-cloud/block.json index 15e744fcaca679..1594e7d8d8bf32 100644 --- a/packages/block-library/src/tag-cloud/block.json +++ b/packages/block-library/src/tag-cloud/block.json @@ -23,7 +23,7 @@ }, "smallestFontSize": { "type": "string", - "default": "8pt" + "default": "8pt" }, "largestFontSize": { "type": "string", diff --git a/packages/block-serialization-spec-parser/.eslintrc.json b/packages/block-serialization-spec-parser/.eslintrc.json index 363e55181855b4..0d1d7ab5302d5e 100644 --- a/packages/block-serialization-spec-parser/.eslintrc.json +++ b/packages/block-serialization-spec-parser/.eslintrc.json @@ -2,9 +2,7 @@ "overrides": [ { "files": [ "shared-tests.js" ], - "extends": [ - "plugin:@wordpress/eslint-plugin/test-unit" - ], + "extends": [ "plugin:@wordpress/eslint-plugin/test-unit" ], "rules": { "jest/no-export": "off" } diff --git a/packages/compose/tsconfig.json b/packages/compose/tsconfig.json index f54010dabab043..cb702233837ff2 100644 --- a/packages/compose/tsconfig.json +++ b/packages/compose/tsconfig.json @@ -3,7 +3,7 @@ "compilerOptions": { "rootDir": "src", "declarationDir": "build-types", - "types": [ "gutenberg-env" ], + "types": [ "gutenberg-env" ] }, "references": [ { "path": "../element" }, @@ -12,7 +12,5 @@ { "path": "../is-shallow-equal" }, { "path": "../keycodes" } ], - "include": [ - "src/**/*" - ] + "include": [ "src/**/*" ] } diff --git a/packages/create-block/CHANGELOG.md b/packages/create-block/CHANGELOG.md index df82debcd56d66..610c273bd258b0 100644 --- a/packages/create-block/CHANGELOG.md +++ b/packages/create-block/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Bug Fix + +- Fix the `.editorconfig` file include to work correctly with YAML files ([#40994](https://github.com/WordPress/gutenberg/pull/40994)). + ### Internal - Updated `commander` dependency from requiring `^4.1.0` to `^9.2.0` ([#40927](https://github.com/WordPress/gutenberg/pull/40927)). diff --git a/packages/create-block/lib/templates/es5/.editorconfig.mustache b/packages/create-block/lib/templates/es5/.editorconfig.mustache index 7cae5d565e1ae2..b5df0fc527b48c 100644 --- a/packages/create-block/lib/templates/es5/.editorconfig.mustache +++ b/packages/create-block/lib/templates/es5/.editorconfig.mustache @@ -12,3 +12,7 @@ end_of_line = lf insert_final_newline = true trim_trailing_whitespace = true indent_style = tab + +[*.{yml,yaml}] +indent_style = space +indent_size = 2 diff --git a/packages/create-block/lib/templates/plugin/.editorconfig.mustache b/packages/create-block/lib/templates/plugin/.editorconfig.mustache index 7cae5d565e1ae2..b5df0fc527b48c 100644 --- a/packages/create-block/lib/templates/plugin/.editorconfig.mustache +++ b/packages/create-block/lib/templates/plugin/.editorconfig.mustache @@ -12,3 +12,7 @@ end_of_line = lf insert_final_newline = true trim_trailing_whitespace = true indent_style = tab + +[*.{yml,yaml}] +indent_style = space +indent_size = 2 diff --git a/packages/data/tsconfig.json b/packages/data/tsconfig.json index b0ff34b3db0f45..6f4a0d8f69599d 100644 --- a/packages/data/tsconfig.json +++ b/packages/data/tsconfig.json @@ -3,7 +3,7 @@ "compilerOptions": { "rootDir": "src", "declarationDir": "build-types", - "noUnusedParameters": false, + "noUnusedParameters": false }, "references": [ { "path": "../compose" }, @@ -17,6 +17,6 @@ "src/redux-store/metadata/**/*", "src/promise-middleware.js", "src/utils", - "src/*.ts" + "src/*.ts" ] } diff --git a/packages/dependency-extraction-webpack-plugin/lib/types.d.ts b/packages/dependency-extraction-webpack-plugin/lib/types.d.ts index 257399c5c9a50f..179b4dab593bd6 100644 --- a/packages/dependency-extraction-webpack-plugin/lib/types.d.ts +++ b/packages/dependency-extraction-webpack-plugin/lib/types.d.ts @@ -11,7 +11,7 @@ declare interface DependencyExtractionWebpackPluginOptions { injectPolyfill?: boolean; useDefaults?: boolean; outputFormat?: 'php' | 'json'; - outputFilename?: string | Function, + outputFilename?: string | Function; requestToExternal?: ( request: string ) => string | string[] | undefined; requestToHandle?: ( request: string ) => string | undefined; combinedOutputFile?: string | null; diff --git a/packages/dom/tsconfig.json b/packages/dom/tsconfig.json index 6fa7b10e3f5bef..671d4a5eba4403 100644 --- a/packages/dom/tsconfig.json +++ b/packages/dom/tsconfig.json @@ -5,7 +5,5 @@ "declarationDir": "build-types", "types": [ "gutenberg-env" ] }, - "include": [ - "src/**/*" - ] + "include": [ "src/**/*" ] } diff --git a/packages/e2e-test-utils-playwright/tsconfig.json b/packages/e2e-test-utils-playwright/tsconfig.json index 52eeefa6913dd6..015df344af7e70 100644 --- a/packages/e2e-test-utils-playwright/tsconfig.json +++ b/packages/e2e-test-utils-playwright/tsconfig.json @@ -13,9 +13,7 @@ "declarationDir": "build-types", "emitDeclarationOnly": false, "allowJs": true, - "checkJs": false, + "checkJs": false }, - "include": [ - "src/**/*" - ] + "include": [ "src/**/*" ] } diff --git a/packages/e2e-tests/specs/editor/fixtures/menu-items-response-fixture.json b/packages/e2e-tests/specs/editor/fixtures/menu-items-response-fixture.json index 16568b4c5464f6..4de75a5c0bacc6 100644 --- a/packages/e2e-tests/specs/editor/fixtures/menu-items-response-fixture.json +++ b/packages/e2e-tests/specs/editor/fixtures/menu-items-response-fixture.json @@ -16,16 +16,10 @@ "parent": 0, "menu_order": 1, "target": "", - "classes": [ - "" - ], - "xfn": [ - "" - ], + "classes": [ "" ], + "xfn": [ "" ], "meta": [], - "menus": [ - 23 - ], + "menus": [ 23 ], "_links": { "self": [ { @@ -95,16 +89,10 @@ "parent": 0, "menu_order": 2, "target": "", - "classes": [ - "" - ], - "xfn": [ - "" - ], + "classes": [ "" ], + "xfn": [ "" ], "meta": [], - "menus": [ - 23 - ], + "menus": [ 23 ], "_links": { "self": [ { @@ -181,16 +169,10 @@ "parent": 95, "menu_order": 3, "target": "", - "classes": [ - "" - ], - "xfn": [ - "" - ], + "classes": [ "" ], + "xfn": [ "" ], "meta": [], - "menus": [ - 23 - ], + "menus": [ 23 ], "_links": { "self": [ { @@ -267,16 +249,10 @@ "parent": 0, "menu_order": 4, "target": "", - "classes": [ - "" - ], - "xfn": [ - "" - ], + "classes": [ "" ], + "xfn": [ "" ], "meta": [], - "menus": [ - 23 - ], + "menus": [ 23 ], "_links": { "self": [ { @@ -353,16 +329,10 @@ "parent": 97, "menu_order": 5, "target": "", - "classes": [ - "" - ], - "xfn": [ - "" - ], + "classes": [ "" ], + "xfn": [ "" ], "meta": [], - "menus": [ - 23 - ], + "menus": [ 23 ], "_links": { "self": [ { @@ -439,16 +409,10 @@ "parent": 98, "menu_order": 6, "target": "", - "classes": [ - "" - ], - "xfn": [ - "" - ], + "classes": [ "" ], + "xfn": [ "" ], "meta": [], - "menus": [ - 23 - ], + "menus": [ 23 ], "_links": { "self": [ { @@ -525,16 +489,10 @@ "parent": 99, "menu_order": 7, "target": "", - "classes": [ - "" - ], - "xfn": [ - "" - ], + "classes": [ "" ], + "xfn": [ "" ], "meta": [], - "menus": [ - 23 - ], + "menus": [ 23 ], "_links": { "self": [ { @@ -611,16 +569,10 @@ "parent": 100, "menu_order": 8, "target": "", - "classes": [ - "" - ], - "xfn": [ - "" - ], + "classes": [ "" ], + "xfn": [ "" ], "meta": [], - "menus": [ - 23 - ], + "menus": [ 23 ], "_links": { "self": [ { @@ -697,16 +649,10 @@ "parent": 0, "menu_order": 9, "target": "", - "classes": [ - "" - ], - "xfn": [ - "" - ], + "classes": [ "" ], + "xfn": [ "" ], "meta": [], - "menus": [ - 23 - ], + "menus": [ 23 ], "_links": { "self": [ { @@ -783,16 +729,10 @@ "parent": 0, "menu_order": 10, "target": "", - "classes": [ - "" - ], - "xfn": [ - "" - ], + "classes": [ "" ], + "xfn": [ "" ], "meta": [], - "menus": [ - 23 - ], + "menus": [ 23 ], "_links": { "self": [ { @@ -869,16 +809,10 @@ "parent": 0, "menu_order": 11, "target": "", - "classes": [ - "" - ], - "xfn": [ - "" - ], + "classes": [ "" ], + "xfn": [ "" ], "meta": [], - "menus": [ - 23 - ], + "menus": [ 23 ], "_links": { "self": [ { @@ -955,16 +889,10 @@ "parent": 104, "menu_order": 12, "target": "", - "classes": [ - "" - ], - "xfn": [ - "" - ], + "classes": [ "" ], + "xfn": [ "" ], "meta": [], - "menus": [ - 23 - ], + "menus": [ 23 ], "_links": { "self": [ { @@ -1041,16 +969,10 @@ "parent": 105, "menu_order": 13, "target": "", - "classes": [ - "" - ], - "xfn": [ - "" - ], + "classes": [ "" ], + "xfn": [ "" ], "meta": [], - "menus": [ - 23 - ], + "menus": [ 23 ], "_links": { "self": [ { @@ -1127,16 +1049,10 @@ "parent": 106, "menu_order": 14, "target": "", - "classes": [ - "" - ], - "xfn": [ - "" - ], + "classes": [ "" ], + "xfn": [ "" ], "meta": [], - "menus": [ - 23 - ], + "menus": [ 23 ], "_links": { "self": [ { @@ -1213,16 +1129,10 @@ "parent": 0, "menu_order": 15, "target": "", - "classes": [ - "" - ], - "xfn": [ - "" - ], + "classes": [ "" ], + "xfn": [ "" ], "meta": [], - "menus": [ - 23 - ], + "menus": [ 23 ], "_links": { "self": [ { @@ -1292,16 +1202,10 @@ "parent": 108, "menu_order": 16, "target": "", - "classes": [ - "" - ], - "xfn": [ - "" - ], + "classes": [ "" ], + "xfn": [ "" ], "meta": [], - "menus": [ - 23 - ], + "menus": [ 23 ], "_links": { "self": [ { diff --git a/packages/prettier-config/tsconfig.json b/packages/prettier-config/tsconfig.json index 450208db3dc966..0fc48d2e9005e4 100644 --- a/packages/prettier-config/tsconfig.json +++ b/packages/prettier-config/tsconfig.json @@ -3,7 +3,7 @@ "compilerOptions": { "rootDir": "lib", "declarationDir": "build-types", - "types": [ "node" ], + "types": [ "node" ] }, "include": [ "lib/**/*" ] } diff --git a/packages/scripts/CHANGELOG.md b/packages/scripts/CHANGELOG.md index df891896bed5d3..45e0edb0064695 100644 --- a/packages/scripts/CHANGELOG.md +++ b/packages/scripts/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### New Feature + +- Enable by default code formatting for JSON files in the `format` command ([#40994](https://github.com/WordPress/gutenberg/pull/40994)). You can opt-out of this behavior by providing a custom file matcher, example: `wp-scripts format src/**/*.js`. + ## 23.0.0 (2022-05-04) ### Breaking Changes diff --git a/packages/scripts/README.md b/packages/scripts/README.md index ce63f1d5de1658..db354c01a0e545 100644 --- a/packages/scripts/README.md +++ b/packages/scripts/README.md @@ -152,7 +152,7 @@ _Flags_: ### `format` -It helps to enforce coding style guidelines for your files (JavaScript, YAML) by formatting source code in a consistent way. +It helps to enforce coding style guidelines for your files (enabled by default for JavaScript, JSON, TypeScript, YAML) by formatting source code in a consistent way. _Example:_ diff --git a/packages/scripts/config/.markdownlint.json b/packages/scripts/config/.markdownlint.json index f5eefa8d99af67..0d203db7f51a99 100644 --- a/packages/scripts/config/.markdownlint.json +++ b/packages/scripts/config/.markdownlint.json @@ -1,8 +1,8 @@ { - "default": true, - "MD003": { "style": "atx" }, - "MD007": { "indent": 4 }, - "MD013": { "line_length": 9999 }, - "no-hard-tabs": false, - "whitespace": false + "default": true, + "MD003": { "style": "atx" }, + "MD007": { "indent": 4 }, + "MD013": { "line_length": 9999 }, + "no-hard-tabs": false, + "whitespace": false } diff --git a/packages/scripts/scripts/format.js b/packages/scripts/scripts/format.js index f4f0af7327aaba..8cdafd70b2980d 100644 --- a/packages/scripts/scripts/format.js +++ b/packages/scripts/scripts/format.js @@ -104,7 +104,7 @@ if ( fileArgs.length === 0 ) { // Converts `foo/bar` directory to `foo/bar/**/*.js` const globArgs = dirGlob( fileArgs, { - extensions: [ 'js', 'jsx', 'ts', 'tsx', 'yml', 'yaml' ], + extensions: [ 'js', 'jsx', 'json', 'ts', 'tsx', 'yml', 'yaml' ], } ); const result = spawn( diff --git a/packages/stylelint-config/test/.stylelintrc.json b/packages/stylelint-config/test/.stylelintrc.json index 1ff3ae886a7f27..1ea6c83527d288 100644 --- a/packages/stylelint-config/test/.stylelintrc.json +++ b/packages/stylelint-config/test/.stylelintrc.json @@ -1,6 +1,4 @@ { "extends": "@wordpress/stylelint-config/scss", - "ignoreFiles": [ - "*-invalid.scss" - ] + "ignoreFiles": [ "*-invalid.scss" ] } diff --git a/schemas/json/block.json b/schemas/json/block.json index 4171965a487604..17e9ec519acf64 100644 --- a/schemas/json/block.json +++ b/schemas/json/block.json @@ -23,18 +23,18 @@ }, "name": { "type": "string", - "pattern": "^[a-z][a-z0-9-]*\/[a-z][a-z0-9-]*$", + "pattern": "^[a-z][a-z0-9-]*/[a-z][a-z0-9-]*$", "description": "The name for a block is a unique string that identifies a block. Names have to be structured as `namespace/block-name`, where namespace is the name of your plugin or theme." }, "__experimental": { "description": "The name of the experiment this block is a part of, or boolean true if there there is no specific experiment name.", "anyOf": [ - { - "type": "string" - }, - { - "type": "boolean" - } + { + "type": "string" + }, + { + "type": "boolean" + } ] }, "title": { diff --git a/test/e2e/tsconfig.json b/test/e2e/tsconfig.json index afd38ab25fa5e2..7f855fd0ba69c8 100644 --- a/test/e2e/tsconfig.json +++ b/test/e2e/tsconfig.json @@ -6,8 +6,6 @@ "allowJs": true, "checkJs": false }, - "include": [ - "**/*" - ], + "include": [ "**/*" ], "exclude": [] }