From 8481dea628b11bad3c0e683b5a0d574b15085937 Mon Sep 17 00:00:00 2001 From: Sainath Poojary Date: Mon, 27 Jan 2025 12:39:52 +0530 Subject: [PATCH 1/3] docs: Update links to HTTPS --- docs/contributors/code/coding-guidelines.md | 2 +- docs/contributors/code/testing-overview.md | 2 +- docs/reference-guides/interactivity-api/README.md | 2 +- packages/README.md | 2 +- packages/babel-plugin-import-jsx-pragma/README.md | 4 ++-- packages/e2e-test-utils/README.md | 2 +- packages/eslint-plugin/README.md | 2 +- .../docs/rules/i18n-no-collapsible-whitespace.md | 2 +- packages/i18n/README.md | 6 +++--- packages/is-shallow-equal/README.md | 2 +- platform-docs/docs/basic-concepts/internationalization.md | 2 +- 11 files changed, 14 insertions(+), 14 deletions(-) diff --git a/docs/contributors/code/coding-guidelines.md b/docs/contributors/code/coding-guidelines.md index d8a5220c70ca2..e8e55921f56fa 100644 --- a/docs/contributors/code/coding-guidelines.md +++ b/docs/contributors/code/coding-guidelines.md @@ -607,7 +607,7 @@ Many third-party dependencies will distribute their own TypeScript typings. For If you use a [TypeScript integration](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Editor-Support) for your editor, you can typically see that this works if the type resolves to anything other than the fallback `any` type. -For packages which do not distribute their own TypeScript types, you are welcomed to install and use the [DefinitelyTyped](http://definitelytyped.org/) community-maintained types definitions, if one exists. +For packages which do not distribute their own TypeScript types, you are welcomed to install and use the [DefinitelyTyped](https://definitelytyped.org/) community-maintained types definitions, if one exists. ### Generic types diff --git a/docs/contributors/code/testing-overview.md b/docs/contributors/code/testing-overview.md index 6afa5aed865b7..8b487c0016635 100644 --- a/docs/contributors/code/testing-overview.md +++ b/docs/contributors/code/testing-overview.md @@ -29,7 +29,7 @@ Assuming you've followed the [instructions](/docs/contributors/code/getting-star npm test ``` -Linting is static code analysis used to enforce coding standards and to avoid potential errors. This project uses [ESLint](http://eslint.org/) and [TypeScript's JavaScript type-checking](https://www.typescriptlang.org/docs/handbook/type-checking-javascript-files.html) to capture these issues. While the above `npm test` will execute both unit tests and code linting, code linting can be verified independently by running `npm run lint`. Some JavaScript issues can be fixed automatically by running `npm run lint:js:fix`. +Linting is static code analysis used to enforce coding standards and to avoid potential errors. This project uses [ESLint](https://eslint.org/) and [TypeScript's JavaScript type-checking](https://www.typescriptlang.org/docs/handbook/type-checking-javascript-files.html) to capture these issues. While the above `npm test` will execute both unit tests and code linting, code linting can be verified independently by running `npm run lint`. Some JavaScript issues can be fixed automatically by running `npm run lint:js:fix`. To improve your developer workflow, you should setup an editor linting integration. See the [getting started documentation](/docs/contributors/code/getting-started-with-code-contribution.md) for additional information. diff --git a/docs/reference-guides/interactivity-api/README.md b/docs/reference-guides/interactivity-api/README.md index 3a5bbb84ff159..5504f8fd19faf 100644 --- a/docs/reference-guides/interactivity-api/README.md +++ b/docs/reference-guides/interactivity-api/README.md @@ -113,7 +113,7 @@ Here you have some more resources to learn/read more about the Interactivity API - [Merge announcement](https://make.wordpress.org/core/2024/02/19/merge-announcement-interactivity-api/) - [Proposal: The Interactivity API – A better developer experience in building interactive blocks](https://make.wordpress.org/core/2023/03/30/proposal-the-interactivity-api-a-better-developer-experience-in-building-interactive-blocks/) - [Interactivity API Discussions](https://github.com/WordPress/gutenberg/discussions/52882), especially the [showcase](https://github.com/WordPress/gutenberg/discussions/55642#discussioncomment-9667164) discussions. -- [wpmovies.dev](http://wpmovies.dev/) demo and its [wp-movies-demo](https://github.com/WordPress/wp-movies-demo) repo +- [wpmovies.dev](https://wpmovies.dev/) demo and its [wp-movies-demo](https://github.com/WordPress/wp-movies-demo) repo - Examples using the Interactivity API at [block-development-examples](https://github.com/WordPress/block-development-examples): - [`interactivity-api-block-833d15`](https://github.com/WordPress/block-development-examples/tree/trunk/plugins/interactivity-api-block-833d15) - [`interactivity-api-countdown-3cd73e`](https://github.com/WordPress/block-development-examples/tree/trunk/plugins/interactivity-api-countdown-3cd73e) diff --git a/packages/README.md b/packages/README.md index 79f07af29382c..9a3d077ba671b 100644 --- a/packages/README.md +++ b/packages/README.md @@ -214,7 +214,7 @@ If you are publishing new versions of packages, note that there are versioning r ## TypeScript -The [TypeScript](http://www.typescriptlang.org/) language is a typed superset of JavaScript that compiles to plain JavaScript. +The [TypeScript](https://www.typescriptlang.org/) language is a typed superset of JavaScript that compiles to plain JavaScript. Gutenberg does not use the TypeScript language, however TypeScript has powerful tooling that can be applied to JavaScript projects. Gutenberg uses TypeScript for several reasons, including: diff --git a/packages/babel-plugin-import-jsx-pragma/README.md b/packages/babel-plugin-import-jsx-pragma/README.md index ebc260277b21a..d1622ddf318e5 100644 --- a/packages/babel-plugin-import-jsx-pragma/README.md +++ b/packages/babel-plugin-import-jsx-pragma/README.md @@ -1,6 +1,6 @@ # Babel Plugin Import JSX Pragma -Babel transform plugin for automatically injecting an import to be used as the pragma for the [React JSX Transform plugin](http://babeljs.io/docs/en/babel-plugin-transform-react-jsx). +Babel transform plugin for automatically injecting an import to be used as the pragma for the [React JSX Transform plugin](https://babeljs.io/docs/en/babel-plugin-transform-react-jsx). [JSX](https://reactjs.org/docs/jsx-in-depth.html) is merely a syntactic sugar for a function call, typically to `React.createElement` when used with [React](https://reactjs.org/). As such, it requires that the function referenced by this transform be within the scope of the file where the JSX occurs. In a typical React project, this means React must be imported in any file where JSX exists. @@ -18,7 +18,7 @@ npm install @wordpress/babel-plugin-import-jsx-pragma ## Usage -Refer to the [Babel Plugins documentation](http://babeljs.io/docs/en/plugins) if you don't yet have experience working with Babel plugins. +Refer to the [Babel Plugins documentation](https://babeljs.io/docs/en/plugins) if you don't yet have experience working with Babel plugins. Include `@wordpress/babel-plugin-import-jsx-pragma` (and [@babel/plugin-transform-react-jsx](https://babeljs.io/docs/en/babel-plugin-transform-react-jsx/)) as plugins in your Babel configuration. If you don't include both you will receive errors when encountering JSX tokens. diff --git a/packages/e2e-test-utils/README.md b/packages/e2e-test-utils/README.md index 5fe454d77d8f3..1d88e86bc4273 100644 --- a/packages/e2e-test-utils/README.md +++ b/packages/e2e-test-utils/README.md @@ -434,7 +434,7 @@ Returns a promise resolving to one of either a string or null. A string will be _Related_ -- +- _Returns_ diff --git a/packages/eslint-plugin/README.md b/packages/eslint-plugin/README.md index cde410fc9c992..c4db52af94322 100644 --- a/packages/eslint-plugin/README.md +++ b/packages/eslint-plugin/README.md @@ -22,7 +22,7 @@ To opt-in to the default configuration, extend your own project's `.eslintrc` fi } ``` -Refer to the [ESLint documentation on Shareable Configs](http://eslint.org/docs/developer-guide/shareable-configs) for more information. +Refer to the [ESLint documentation on Shareable Configs](https://eslint.org/docs/developer-guide/shareable-configs) for more information. The `recommended` preset will include rules governing an ES2015+ environment, and includes rules from the [`eslint-plugin-jsdoc`](https://github.com/gajus/eslint-plugin-jsdoc), [`eslint-plugin-jsx-a11y`](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y), [`eslint-plugin-react`](https://github.com/yannickcr/eslint-plugin-react), and other similar plugins. diff --git a/packages/eslint-plugin/docs/rules/i18n-no-collapsible-whitespace.md b/packages/eslint-plugin/docs/rules/i18n-no-collapsible-whitespace.md index 094564ab5432b..5f8d34ec5e9f9 100644 --- a/packages/eslint-plugin/docs/rules/i18n-no-collapsible-whitespace.md +++ b/packages/eslint-plugin/docs/rules/i18n-no-collapsible-whitespace.md @@ -2,7 +2,7 @@ Using complex whitespace in translatable strings and relying on HTML to collapse it can make translation more difficult and lead to unnecessary retranslation. -Whitespace can be appropriate in longer translatable content, for example a whole blog post. These cases are unlikely to occur in the code scanned by eslint but if they do, [disable the rule with inline comments](http://eslint.org/docs/user-guide/configuring#disabling-rules-with-inline-comments. ( e.g. `// eslint-disable-line i18n-no-collapsible-whitespace` ). +Whitespace can be appropriate in longer translatable content, for example a whole blog post. These cases are unlikely to occur in the code scanned by eslint but if they do, [disable the rule with inline comments](https://eslint.org/docs/user-guide/configuring#disabling-rules-with-inline-comments. ( e.g. `// eslint-disable-line i18n-no-collapsible-whitespace` ). ## Rule details diff --git a/packages/i18n/README.md b/packages/i18n/README.md index 128b05c7c2029..0cf23ccea1866 100644 --- a/packages/i18n/README.md +++ b/packages/i18n/README.md @@ -51,7 +51,7 @@ Returns locale data by domain in a Jed-formatted JSON object shape. _Related_ -- +- _Parameters_ @@ -91,7 +91,7 @@ Resets all current Tannin instance locale data and sets the specified locale dat _Related_ -- +- _Parameters_ @@ -104,7 +104,7 @@ Merges locale data into the Tannin instance by domain. Accepts data in a Jed-for _Related_ -- +- _Parameters_ diff --git a/packages/is-shallow-equal/README.md b/packages/is-shallow-equal/README.md index 2908803a7804b..80809459a9c98 100644 --- a/packages/is-shallow-equal/README.md +++ b/packages/is-shallow-equal/README.md @@ -29,7 +29,7 @@ import { isShallowEqualArrays } from '@wordpress/is-shallow-equal'; import { isShallowEqualObjects } from '@wordpress/is-shallow-equal'; ``` -Shallow comparison differs from deep comparison by the fact that it compares members from each as being strictly equal to the other, meaning that arrays and objects will be compared by their _references_, not by their values (see also [_Object Equality in JavaScript_.](http://adripofjavascript.com/blog/drips/object-equality-in-javascript.html)) In situations where nested objects must be compared by value, consider using [`fast-deep-equal`](https://github.com/epoberezkin/fast-deep-equal) instead. +Shallow comparison differs from deep comparison by the fact that it compares members from each as being strictly equal to the other, meaning that arrays and objects will be compared by their _references_, not by their values (see also [_Object Equality in JavaScript_.](https://adripofjavascript.com/blog/drips/object-equality-in-javascript.html)) In situations where nested objects must be compared by value, consider using [`fast-deep-equal`](https://github.com/epoberezkin/fast-deep-equal) instead. ```js import isShallowEqual from '@wordpress/is-shallow-equal'; diff --git a/platform-docs/docs/basic-concepts/internationalization.md b/platform-docs/docs/basic-concepts/internationalization.md index 654d70070f1cb..ce2070119b02c 100644 --- a/platform-docs/docs/basic-concepts/internationalization.md +++ b/platform-docs/docs/basic-concepts/internationalization.md @@ -6,7 +6,7 @@ sidebar_position: 7 The Gutenberg block editor uses the `@wordpress/i18n` package to provide internationalization support. -Translations can be provided by calling the `setLocaleData` function with a domain and a locale data object. The locale data object should be in the [Jed-formatted JSON object shape](http://messageformat.github.io/Jed/). +Translations can be provided by calling the `setLocaleData` function with a domain and a locale data object. The locale data object should be in the [Jed-formatted JSON object shape](https://messageformat.github.io/Jed/). ```js import { setLocaleData } from '@wordpress/i18n'; From 8dc3ff19a3060ba627afc12f8d01e7a01ef01377 Mon Sep 17 00:00:00 2001 From: Sainath Poojary Date: Mon, 27 Jan 2025 13:03:08 +0530 Subject: [PATCH 2/3] docs: Generated build docs --- packages/e2e-test-utils/README.md | 2 +- packages/i18n/README.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/e2e-test-utils/README.md b/packages/e2e-test-utils/README.md index 1d88e86bc4273..5fe454d77d8f3 100644 --- a/packages/e2e-test-utils/README.md +++ b/packages/e2e-test-utils/README.md @@ -434,7 +434,7 @@ Returns a promise resolving to one of either a string or null. A string will be _Related_ -- +- _Returns_ diff --git a/packages/i18n/README.md b/packages/i18n/README.md index 0cf23ccea1866..128b05c7c2029 100644 --- a/packages/i18n/README.md +++ b/packages/i18n/README.md @@ -51,7 +51,7 @@ Returns locale data by domain in a Jed-formatted JSON object shape. _Related_ -- +- _Parameters_ @@ -91,7 +91,7 @@ Resets all current Tannin instance locale data and sets the specified locale dat _Related_ -- +- _Parameters_ @@ -104,7 +104,7 @@ Merges locale data into the Tannin instance by domain. Accepts data in a Jed-for _Related_ -- +- _Parameters_ From 82167296e0dca69befc61093a5984fecdc8f907e Mon Sep 17 00:00:00 2001 From: Sainath Poojary Date: Tue, 28 Jan 2025 12:22:20 +0530 Subject: [PATCH 3/3] docs: Fix redirected documentation links --- packages/babel-plugin-import-jsx-pragma/README.md | 6 +++--- packages/eslint-plugin/README.md | 2 +- .../docs/rules/i18n-no-collapsible-whitespace.md | 2 +- packages/warning/README.md | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/babel-plugin-import-jsx-pragma/README.md b/packages/babel-plugin-import-jsx-pragma/README.md index d1622ddf318e5..7c8ad8c6ac316 100644 --- a/packages/babel-plugin-import-jsx-pragma/README.md +++ b/packages/babel-plugin-import-jsx-pragma/README.md @@ -1,6 +1,6 @@ # Babel Plugin Import JSX Pragma -Babel transform plugin for automatically injecting an import to be used as the pragma for the [React JSX Transform plugin](https://babeljs.io/docs/en/babel-plugin-transform-react-jsx). +Babel transform plugin for automatically injecting an import to be used as the pragma for the [React JSX Transform plugin](https://babeljs.io/docs/babel-plugin-transform-react-jsx). [JSX](https://reactjs.org/docs/jsx-in-depth.html) is merely a syntactic sugar for a function call, typically to `React.createElement` when used with [React](https://reactjs.org/). As such, it requires that the function referenced by this transform be within the scope of the file where the JSX occurs. In a typical React project, this means React must be imported in any file where JSX exists. @@ -18,9 +18,9 @@ npm install @wordpress/babel-plugin-import-jsx-pragma ## Usage -Refer to the [Babel Plugins documentation](https://babeljs.io/docs/en/plugins) if you don't yet have experience working with Babel plugins. +Refer to the [Babel Plugins documentation](https://babeljs.io/docs/plugins) if you don't yet have experience working with Babel plugins. -Include `@wordpress/babel-plugin-import-jsx-pragma` (and [@babel/plugin-transform-react-jsx](https://babeljs.io/docs/en/babel-plugin-transform-react-jsx/)) as plugins in your Babel configuration. If you don't include both you will receive errors when encountering JSX tokens. +Include `@wordpress/babel-plugin-import-jsx-pragma` (and [@babel/plugin-transform-react-jsx](https://babeljs.io/docs/babel-plugin-transform-react-jsx/)) as plugins in your Babel configuration. If you don't include both you will receive errors when encountering JSX tokens. ```js // .babelrc.js diff --git a/packages/eslint-plugin/README.md b/packages/eslint-plugin/README.md index c4db52af94322..dfb3f90c03b82 100644 --- a/packages/eslint-plugin/README.md +++ b/packages/eslint-plugin/README.md @@ -22,7 +22,7 @@ To opt-in to the default configuration, extend your own project's `.eslintrc` fi } ``` -Refer to the [ESLint documentation on Shareable Configs](https://eslint.org/docs/developer-guide/shareable-configs) for more information. +Refer to the [ESLint documentation on Shareable Configs](https://eslint.org/docs/latest/extend/shareable-configs) for more information. The `recommended` preset will include rules governing an ES2015+ environment, and includes rules from the [`eslint-plugin-jsdoc`](https://github.com/gajus/eslint-plugin-jsdoc), [`eslint-plugin-jsx-a11y`](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y), [`eslint-plugin-react`](https://github.com/yannickcr/eslint-plugin-react), and other similar plugins. diff --git a/packages/eslint-plugin/docs/rules/i18n-no-collapsible-whitespace.md b/packages/eslint-plugin/docs/rules/i18n-no-collapsible-whitespace.md index 5f8d34ec5e9f9..d3a795325008d 100644 --- a/packages/eslint-plugin/docs/rules/i18n-no-collapsible-whitespace.md +++ b/packages/eslint-plugin/docs/rules/i18n-no-collapsible-whitespace.md @@ -2,7 +2,7 @@ Using complex whitespace in translatable strings and relying on HTML to collapse it can make translation more difficult and lead to unnecessary retranslation. -Whitespace can be appropriate in longer translatable content, for example a whole blog post. These cases are unlikely to occur in the code scanned by eslint but if they do, [disable the rule with inline comments](https://eslint.org/docs/user-guide/configuring#disabling-rules-with-inline-comments. ( e.g. `// eslint-disable-line i18n-no-collapsible-whitespace` ). +Whitespace can be appropriate in longer translatable content, for example a whole blog post. These cases are unlikely to occur in the code scanned by eslint but if they do, [disable the rule with inline comments](https://eslint.org/docs/latest/use/configure/rules#disabling-rules) ( e.g. `// eslint-disable-line i18n-no-collapsible-whitespace` ). ## Rule details diff --git a/packages/warning/README.md b/packages/warning/README.md index 67b471d154ecc..cc082a7f21446 100644 --- a/packages/warning/README.md +++ b/packages/warning/README.md @@ -18,7 +18,7 @@ Literal strings aren't minified. Keeping them in your production bundle may incr To prevent that, you should: -1. Put `@wordpress/warning/babel-plugin` into your [babel config](https://babeljs.io/docs/en/plugins#plugin-options) or use [`@wordpress/babel-preset-default`](https://www.npmjs.com/package/@wordpress/babel-preset-default), which already includes the babel plugin. +1. Put `@wordpress/warning/babel-plugin` into your [babel config](https://babeljs.io/docs/plugins#plugin-options) or use [`@wordpress/babel-preset-default`](https://www.npmjs.com/package/@wordpress/babel-preset-default), which already includes the babel plugin. This will make sure your `warning` calls are wrapped within a condition that checks if `SCRIPT_DEBUG === true`.