appease the linter

This commit is contained in:
Leif Singer 2023-11-06 23:43:45 +01:00
parent 0d7a833056
commit 9edad5270d
8 changed files with 87 additions and 87 deletions

View File

@ -21,7 +21,7 @@ Our most critical targets are:
For more targets, see the `In Scope` section on [HackerOne](https://hackerone.com/automattic). For more targets, see the `In Scope` section on [HackerOne](https://hackerone.com/automattic).
_Please note that the **WordPress software is a separate entity** from Automattic. Please report vulnerabilities for WordPress through [the WordPress Foundation's HackerOne page](https://hackerone.com/wordpress)._ Please note that the **WordPress software is a separate entity** from Automattic. Please report vulnerabilities for WordPress through [the WordPress Foundation's HackerOne page](https://hackerone.com/wordpress).
## Guidelines ## Guidelines
@ -31,7 +31,7 @@ We're committed to working with security researchers to resolve the vulnerabilit
* Pen-testing Production: * Pen-testing Production:
* Please **setup a local environment** instead whenever possible. Most of our code is open source (see above). * Please **setup a local environment** instead whenever possible. Most of our code is open source (see above).
* If that's not possible, **limit any data access/modification** to the bare minimum necessary to reproduce a PoC. * If that's not possible, **limit any data access/modification** to the bare minimum necessary to reproduce a PoC.
* **_Don't_ automate form submissions!** That's very annoying for us, because it adds extra work for the volunteers who manage those systems, and reduces the signal/noise ratio in our communication channels. * **Don't automate form submissions!** That's very annoying for us, because it adds extra work for the volunteers who manage those systems, and reduces the signal/noise ratio in our communication channels.
* To be eligible for a bounty, please follow all of these guidelines. * To be eligible for a bounty, please follow all of these guidelines.
* Be Patient - Give us a reasonable time to correct the issue before you disclose the vulnerability. * Be Patient - Give us a reasonable time to correct the issue before you disclose the vulnerability.

View File

@ -34,6 +34,7 @@ Version 0.2.0 added a test installer that will populate the `tests/e2e/specs` fo
- Create the folder `tests/e2e/specs` in your repository if it does not exist. - Create the folder `tests/e2e/specs` in your repository if it does not exist.
- To add a core test to your test suite, create a new `.test.js` file within `tests/e2e/specs` . Example code to run all the shopper tests: - To add a core test to your test suite, create a new `.test.js` file within `tests/e2e/specs` . Example code to run all the shopper tests:
```js ```js
const { runShopperTests } = require( '@woocommerce/e2e-core-tests' ); const { runShopperTests } = require( '@woocommerce/e2e-core-tests' );
@ -118,7 +119,8 @@ The functions to access the core tests are:
## Contributing a new test ## Contributing a new test
- In your branch create a new `example-test-name.test.js` under the appropriate folder in the [`specs`](specs) directory. - In your branch create a new `example-test-name.test.js` under the appropriate folder in the [`specs`](specs) directory.
- Jest does not allow its global functions to be accessed outside the jest environment. To allow the test code to be published in a package import any jest global functions used in your test - Jest does not allow its global functions to be accessed outside the jest environment. To allow the test code to be published in a package import any jest global functions used in your test.
```js ```js
const { const {
it, it,
@ -126,7 +128,9 @@ const {
beforeAll, beforeAll,
} = require( '@jest/globals' ); } = require( '@jest/globals' );
``` ```
- Wrap your test in a function and export it - Wrap your test in a function and export it
```js ```js
const runExampleTestName = () => { const runExampleTestName = () => {
describe('Example test', () => { describe('Example test', () => {
@ -143,7 +147,9 @@ const runExampleTestName = () => {
module.exports = runExampleTestName; module.exports = runExampleTestName;
``` ```
- Add your test to [`specs/index.js`](specs/index.js) - Add your test to [`specs/index.js`](specs/index.js)
```js ```js
const runExampleTestName = require( './grouping/example-test-name.test' ); const runExampleTestName = require( './grouping/example-test-name.test' );
// ... // ...

View File

@ -1,5 +1,4 @@
Activity Panel Inbox # Activity Panel Inbox
====================
Right now, installing and activating WooCommerce and a few extensions quickly results in a cascade of notices vying for the store administrators attention (and pushing whatever wp-admin content they were trying to get to on a page down, way down.) Right now, installing and activating WooCommerce and a few extensions quickly results in a cascade of notices vying for the store administrators attention (and pushing whatever wp-admin content they were trying to get to on a page down, way down.)
@ -19,14 +18,15 @@ But unlike todays notices, this part of the UI will be reserved for “priori
The second category is what were focusing on in this example - and what we expect the vast majority of extension developers will want to extend - we call it the “Activity Panel Inbox.” It will look something like this: The second category is what were focusing on in this example - and what we expect the vast majority of extension developers will want to extend - we call it the “Activity Panel Inbox.” It will look something like this:
<img src="images/activity-panel-inbox.png" width="400" title="Activity Panel Inbox" alt="Activity Panel Inbox" /> ![Activity Panel Inbox](images/activity-panel-inbox.png)
This section is dedicated to informational content coming from multiple sources such as WooCommerce core, Woo.com Subscription management, extensions activity and store achievements. This section was also envisioned to display more insightful content in the future, e.g. content that could help with the day to day tasks of managing and optimizing a store. This section is dedicated to informational content coming from multiple sources such as WooCommerce core, Woo.com Subscription management, extensions activity and store achievements. This section was also envisioned to display more insightful content in the future, e.g. content that could help with the day to day tasks of managing and optimizing a store.
Each notice or “note” has a type represented by an icon (Gridicon), a title, content, a timestamp and one or two actions (action title + link). Each notice or “note” has a type represented by an icon (Gridicon), a title, content, a timestamp and one or two actions (action title + link).
### Inbox Design Constraints and Best Practices ### Inbox Design Constraints and Best Practices
Extensions can add their own notes via the data stores well be covering below, but first... some constraints...
Extensions can add their own notes via the data stores well be covering below, but first: some constraints.
There are some constraints extensions should follow when working with the inbox: There are some constraints extensions should follow when working with the inbox:

View File

@ -28,8 +28,8 @@ Here is a link: [Woo.com](https://woo.com).
![An image](https://picsum.photos/200/300 'This is an image.') ![An image](https://picsum.photos/200/300 'This is an image.')
``` ```shell
$ cd /path/to/woocommerce-docs cd /path/to/woocommerce-docs
``` ```
> This is a blockquote. > This is a blockquote.

View File

@ -2,7 +2,7 @@
title: Some frontmatter title: Some frontmatter
--- ---
# Heading 1 # Heading 1 {{< mdl-disable "<!-- markdownlint-disable MD025 -->" >}}
## Heading 2 ## Heading 2
@ -30,8 +30,8 @@ Here is a link: [Woo.com](https://woo.com).
![An image](https://picsum.photos/200/300 'This is an image.') ![An image](https://picsum.photos/200/300 'This is an image.')
``` ```shell
$ cd /path/to/woocommerce-docs cd /path/to/woocommerce-docs
``` ```
> This is a blockquote. > This is a blockquote.

View File

@ -1,12 +1,10 @@
<p align="center"><a href="https://woo.com/"><img src="https://woo.com/wp-content/themes/woo/images/logo-woocommerce@2x.png" alt="WooCommerce"></a></p> # [![WooCommerce](https://woo.com/wp-content/themes/woo/images/logo-woocommerce@2x.png 'WooCommerce')](https://woo.com/)
<p align="center"> [![License](https://poser.pugx.org/woocommerce/woocommerce/license 'License')](https://packagist.org/packages/woocommerce/woocommerce)
<a href="https://packagist.org/packages/woocommerce/woocommerce"><img src="https://poser.pugx.org/woocommerce/woocommerce/license" alt="license"></a> ![WordPress.org downloads](https://img.shields.io/wordpress/plugin/dt/woocommerce.svg 'WordPress.org downloads')
<img src="https://img.shields.io/wordpress/plugin/dt/woocommerce.svg" alt="WordPress.org downloads"> ![WordPress.org rating](https://img.shields.io/wordpress/plugin/r/woocommerce.svg 'WordPress.org rating')
<img src="https://img.shields.io/wordpress/plugin/r/woocommerce.svg" alt="WordPress.org rating"> [![Build Status](https://github.com/woocommerce/woocommerce/actions/workflows/ci.yml/badge.svg?branch=trunk 'Build Status')](https://github.com/woocommerce/woocommerce/actions/workflows/ci.yml)
<a href="https://github.com/woocommerce/woocommerce/actions/workflows/ci.yml"><img src="https://github.com/woocommerce/woocommerce/actions/workflows/ci.yml/badge.svg?branch=trunk" alt="Build Status"></a> [![codecov](https://codecov.io/gh/woocommerce/woocommerce/branch/trunk/graph/badge.svg 'codecov')](https://codecov.io/gh/woocommerce/woocommerce)
<a href="https://codecov.io/gh/woocommerce/woocommerce"><img src="https://codecov.io/gh/woocommerce/woocommerce/branch/trunk/graph/badge.svg" alt="codecov"></a>
</p>
This is the WooCommerce Core plugin. Here you can browse the source and keep track of development. We recommend all developers to follow the [WooCommerce development blog](https://woocommerce.wordpress.com/) to stay up to date about everything happening in the project. You can also [follow @DevelopWC](https://twitter.com/DevelopWC) on Twitter for the latest development updates. This is the WooCommerce Core plugin. Here you can browse the source and keep track of development. We recommend all developers to follow the [WooCommerce development blog](https://woocommerce.wordpress.com/) to stay up to date about everything happening in the project. You can also [follow @DevelopWC](https://twitter.com/DevelopWC) on Twitter for the latest development updates.
@ -25,7 +23,7 @@ cd plugins/woocommerce
pnpm -- wp-env start pnpm -- wp-env start
``` ```
You should now be able to visit http://localhost:8888/ and access WooCommerce environment. You should now be able to visit `http://localhost:8888/` and access WooCommerce environment.
## Building Components ## Building Components
@ -72,10 +70,12 @@ pnpm --filter=woocommerce/client/admin ts:check
``` ```
## Documentation ## Documentation
* [WooCommerce Documentation](https://woo.com/) * [WooCommerce Documentation](https://woo.com/)
* [WooCommerce Developer Documentation](https://github.com/woocommerce/woocommerce/wiki) * [WooCommerce Developer Documentation](https://github.com/woocommerce/woocommerce/wiki)
* [WooCommerce Code Reference](https://woo.com/wc-apidocs/) * [WooCommerce Code Reference](https://woo.com/wc-apidocs/)
* [WooCommerce REST API Docs](https://woocommerce.github.io/woocommerce-rest-api-docs/) * [WooCommerce REST API Docs](https://woocommerce.github.io/woocommerce-rest-api-docs/)
## Reporting Security Issues ## Reporting Security Issues
To disclose a security issue to our team, [please submit a report via HackerOne here](https://hackerone.com/automattic/). To disclose a security issue to our team, [please submit a report via HackerOne here](https://hackerone.com/automattic/).

View File

@ -8,19 +8,13 @@ You need Composer to use the packages. If you don't have it installed, go and ch
## Developing new packages ## Developing new packages
To create a package and/or feature plugin for core, you can base your plugin on the example package here: To create a package and/or feature plugin for core, you can base your plugin on [the example package here](https://github.com/woocommerce/woocommerce-example-package).
https://github.com/woocommerce/woocommerce-example-package
Packages require a Package class which inits the package and returns version information, and Packages also require that you use the `jetpack-autoloader` package which prevents version conflicts should the same package be used by multiple plugins at once. This is shown in the example package above. Packages require a Package class which inits the package and returns version information, and Packages also require that you use the `jetpack-autoloader` package which prevents version conflicts should the same package be used by multiple plugins at once. This is shown in the example package above.
## Publishing a package ## Publishing a package
Your package should be published to Packagist. For example: Your package should be published to Packagist ([example](https://packagist.org/packages/woocommerce/woocommerce-example-package)). The package name in this case is `woocommerce/woocommerce-example-package`.
https://packagist.org/packages/woocommerce/woocommerce-example-package
The package name in this case is `woocommerce/woocommerce-example-package`.
## Including packages in core ## Including packages in core
@ -47,7 +41,7 @@ Edit `composer.json` in the root directory and add the package and package versi
Next, if your package contains user translatable strings you'll need to edit `bin/package-update.sh` and instruct it to change your package textdomain to the `woocommerce` textdomain. For example: Next, if your package contains user translatable strings you'll need to edit `bin/package-update.sh` and instruct it to change your package textdomain to the `woocommerce` textdomain. For example:
``` ```shell
find ./packages/woocommerce-example-package -iname '*.php' -exec sed -i.bak -e "s/, 'woocommerce-example-package'/, 'woocommerce'/g" {} \; find ./packages/woocommerce-example-package -iname '*.php' -exec sed -i.bak -e "s/, 'woocommerce-example-package'/, 'woocommerce'/g" {} \;
``` ```
@ -67,7 +61,7 @@ You can add tests to ensure your package is loaded to the WooCommerce unit-tests
Once you have defined your package requirements, run Once you have defined your package requirements, run
``` ```shell
composer install composer install
``` ```