Skip to content

Commit

Permalink
Merge branch 'WordPress:trunk' into trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
mukeshpanchal27 authored May 25, 2022
2 parents 130e8b9 + bfa2ec6 commit 480d05f
Show file tree
Hide file tree
Showing 5,034 changed files with 269,547 additions and 151,390 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
85 changes: 68 additions & 17 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ const majorMinorRegExp =
*/
const developmentFiles = [
'**/benchmark/**/*.js',
'**/@(__mocks__|__tests__|test)/**/*.js',
'**/@(storybook|stories)/**/*.js',
'**/@(__mocks__|__tests__|test)/**/*.[tj]s?(x)',
'**/@(storybook|stories)/**/*.[tj]s?(x)',
'packages/babel-preset-default/bin/**/*.js',
];

Expand All @@ -49,12 +49,13 @@ module.exports = {
jsdoc: {
mode: 'typescript',
},
'import/internal-regex': null,
'import/resolver': require.resolve( './tools/eslint/import-resolver' ),
},
rules: {
'jest/expect-expect': 'off',
'@wordpress/dependency-group': 'error',
'@wordpress/gutenberg-phase': 'error',
'@wordpress/is-gutenberg-plugin': 'error',
'@wordpress/react-no-unsafe-timeout': 'error',
'@wordpress/i18n-text-domain': [
'error',
Expand All @@ -70,16 +71,16 @@ module.exports = {
'error',
{
paths: [
{
name: 'framer-motion',
message:
'Please use the Framer Motion API through `@wordpress/components` instead.',
},
{
name: 'lodash',
importNames: [ 'memoize' ],
message: 'Please use `memize` instead.',
},
{
name: 'react',
message:
'Please use React API through `@wordpress/element` instead.',
},
{
name: 'reakit',
message:
Expand All @@ -99,7 +100,20 @@ module.exports = {
{
name: '@emotion/css',
message:
'Please use `@emotion/react` and `@emotion/styled` in order to maintain iframe support',
'Please use `@emotion/react` and `@emotion/styled` in order to maintain iframe support. As a replacement for the `cx` function, please use the `useCx` hook defined in `@wordpress/components` instead.',
},
],
},
],
'@typescript-eslint/no-restricted-imports': [
'error',
{
paths: [
{
name: 'react',
message:
'Please use React API through `@wordpress/element` instead.',
allowTypeImports: true,
},
],
},
Expand All @@ -115,12 +129,6 @@ module.exports = {
message:
'Path access on WordPress dependencies is not allowed.',
},
{
selector:
'ImportDeclaration[source.value=/^react-spring(?!\\u002Fweb.cjs)/]',
message:
'The react-spring dependency must specify CommonJS bundle: react-spring/web.cjs',
},
{
selector:
'CallExpression[callee.name="deprecated"] Property[key.name="version"][value.value=/' +
Expand Down Expand Up @@ -176,6 +184,7 @@ module.exports = {
...developmentFiles,
],
rules: {
'import/default': 'off',
'import/no-extraneous-dependencies': 'off',
'import/no-unresolved': 'off',
'import/named': 'off',
Expand All @@ -185,7 +194,7 @@ module.exports = {
{
files: [ 'packages/react-native-*/**/*.js' ],
settings: {
'import/ignore': [ 'react-native' ], // Workaround for https://github.com/facebook/react-native/issues/28549
'import/ignore': [ 'react-native' ], // Workaround for https://github.com/facebook/react-native/issues/28549.
},
},
{
Expand Down Expand Up @@ -216,16 +225,47 @@ module.exports = {
},
},
{
files: [ 'packages/jest*/**/*.js' ],
files: [ 'packages/jest*/**/*.js', '**/test/**/*.js' ],
excludedFiles: [ 'test/e2e/**/*.js' ],
extends: [ 'plugin:@wordpress/eslint-plugin/test-unit' ],
},
{
files: [ 'packages/e2e-test*/**/*.js' ],
excludedFiles: [ 'packages/e2e-test-utils-playwright/**/*.js' ],
extends: [ 'plugin:@wordpress/eslint-plugin/test-e2e' ],
rules: {
'jest/expect-expect': 'off',
},
},
{
files: [
'test/e2e/**/*.[tj]s',
'packages/e2e-test-utils-playwright/**/*.[tj]s',
],
extends: [ 'plugin:eslint-plugin-playwright/playwright-test' ],
rules: {
'@wordpress/no-global-active-element': 'off',
'@wordpress/no-global-get-selection': 'off',
'no-restricted-syntax': [
'error',
{
selector: 'CallExpression[callee.property.name="$"]',
message:
'`$` is discouraged, please use `locator` instead',
},
{
selector: 'CallExpression[callee.property.name="$$"]',
message:
'`$$` is discouraged, please use `locator` instead',
},
{
selector:
'CallExpression[callee.object.name="page"][callee.property.name="waitForTimeout"]',
message: 'Prefer page.locator instead.',
},
],
},
},
{
files: [ 'bin/**/*.js', 'packages/env/**' ],
rules: {
Expand All @@ -239,5 +279,16 @@ module.exports = {
'jsdoc/valid-types': 'off',
},
},
{
files: [
'**/@(storybook|stories)/*',
'packages/components/src/**/*.tsx',
],
rules: {
// Useful to add story descriptions via JSDoc without specifying params,
// or in TypeScript files where params are likely already documented outside of the JSDoc.
'jsdoc/require-param': 'off',
},
},
],
};
5 changes: 5 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Set line width to 80.
4857ad58c1241b3d63d21a6880c989b85746c3dc

# ESLint updates.
f63053cace3c02e284f00918e1854284c85b9132
86 changes: 45 additions & 41 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
# Documentation
/docs @chrisvanpatten @ajitbohra
/docs/designers-developers/developers @chrisvanpatten @mkaz @ajitbohra
/docs/designers-developers/designers @chrisvanpatten @mkaz @ajitbohra
/docs @ajitbohra @ryanwelcher @juanmaguitar @fabiankaegy

# Schemas
/schemas/json @ajlende

# Data
/packages/api-fetch @nerrad @mmtr
/packages/core-data @nerrad
/packages/data @nerrad @coderkevin
/packages/data @nerrad
/packages/redux-routine @nerrad
/packages/data-controls @nerrad

# Blocks
/packages/block-library @ajitbohra
/packages/block-library/src/gallery @mkevins
/packages/block-library/src/social-links @mkaz
/packages/block-library/src/social-link @mkaz
/packages/block-library/src/gallery @geriux
/packages/block-library/src/navigation @tellthemachines
/packages/block-library/src/navigation-link @tellthemachines
/packages/block-library/src/navigation-submenu @tellthemachines
/packages/block-library/src/page-list @tellthemachines
/packages/block-library/src/comment-template @michalczaplinski
/packages/block-library/src/comments @michalczaplinski
/packages/block-library/src/table-of-contents @ZebulanStanphill

# Duotone
/lib/block-supports/duotone.php @ajlende
Expand All @@ -31,6 +37,7 @@
/packages/blocks
/packages/edit-post
/packages/editor
/packages/editor/src/components/post-title @alexstine
/packages/list-reusable-blocks
/packages/shortcode
/packages/block-directory
Expand All @@ -40,26 +47,28 @@

# Widgets
/packages/edit-widgets @draganescu @talldan @noisysocks @tellthemachines @adamziel @kevin940726
/packages/customize-widgets @noisysocks
/packages/widgets @noisysocks

# Navigation
/packages/edit-navigation @draganescu @talldan @noisysocks @tellthemachines @adamziel @kevin940726 @getdave
/packages/edit-navigation @draganescu @talldan @tellthemachines @adamziel @kevin940726 @getdave

# Full Site Editing
/packages/edit-site

# Tooling
/bin @ntwb @nerrad @ajitbohra
/bin/api-docs @ntwb @nerrad @ajitbohra @nosolosw
/docs/tool @chrisvanpatten @ajitbohra @nosolosw
/bin/api-docs @ntwb @nerrad @ajitbohra
/docs/tool @ajitbohra
/packages/babel-plugin-import-jsx-pragma @ntwb @nerrad @ajitbohra
/packages/babel-plugin-makepot @ntwb @nerrad @ajitbohra
/packages/babel-preset-default @gziolo @ntwb @nerrad @ajitbohra
/packages/browserslist-config @ntwb @nerrad @ajitbohra
/packages/create-block @gziolo @mkaz
/packages/create-block-tutorial-template @gziolo
/packages/create-block @gziolo @ryanwelcher
/packages/create-block-tutorial-template @gziolo @ryanwelcher
/packages/custom-templated-path-webpack-plugin @ntwb @nerrad @ajitbohra
/packages/dependency-extraction-webpack-plugin @gziolo
/packages/docgen @nosolosw
/packages/docgen
/packages/e2e-test-utils @ntwb @nerrad @ajitbohra
/packages/e2e-tests @ntwb @nerrad @ajitbohra
/packages/eslint-plugin @gziolo @ntwb @nerrad @ajitbohra
Expand All @@ -70,16 +79,16 @@
/packages/npm-package-json-lint-config @gziolo @ntwb @nerrad @ajitbohra
/packages/postcss-themes @ntwb @nerrad @ajitbohra
/packages/prettier-config @ntwb @gziolo
/packages/scripts @gziolo @ntwb @nerrad @ajitbohra
/packages/scripts @gziolo @ntwb @nerrad @ajitbohra @ryanwelcher
/packages/stylelint-config @ntwb

# UI Components
/packages/components @ajitbohra @jaymanpandya @chrisvanpatten
/packages/compose @ajitbohra @jaymanpandya
/packages/element @ajitbohra @jaymanpandya
/packages/notices @ajitbohra @jaymanpandya
/packages/nux @ajitbohra @jaymanpandya
/packages/viewport @ajitbohra @jaymanpandya
/packages/components @ajitbohra
/packages/compose @ajitbohra
/packages/element @ajitbohra
/packages/notices @ajitbohra
/packages/nux @ajitbohra
/packages/viewport @ajitbohra
/packages/base-styles
/packages/icons
/packages/primitives
Expand All @@ -95,22 +104,23 @@
/packages/html-entities
/packages/i18n @swissspidy
/packages/is-shallow-equal
/packages/keyboard-shortcuts
/packages/keycodes
/packages/preferences @talldan
/packages/priority-queue
/packages/token-list
/packages/url
/packages/wordcount
/packages/warning
/packages/keyboard-shortcuts

# Extensibility
/packages/hooks @adamsilverstein
/packages/plugins @gziolo @adamsilverstein

# Rich Text
/packages/format-library @ellatrix @cameronvoell @guarani
/packages/rich-text @ellatrix @cameronvoell @guarani
/packages/block-editor/src/components/rich-text @ellatrix @cameronvoell @guarani
/packages/format-library @ellatrix @fluiddot
/packages/rich-text @ellatrix @fluiddot
/packages/block-editor/src/components/rich-text @ellatrix @fluiddot

# Project Management
/.github
Expand All @@ -120,22 +130,16 @@
/packages/env @noahtallen

# PHP
/lib @timothybjacobs @spacedmonkey
/lib/global-styles.php @timothybjabocs @spacedmonkey @nosolosw
/lib/experimental-default-theme.json @timothybjabocs @spacedmonkey @nosolosw
/lib/class-wp-theme-json-gutenberg.php @timothybjabocs @spacedmonkey @nosolosw
/lib/class-wp-theme-json-resolver-gutenberg.php @timothybjabocs @spacedmonkey @nosolosw
/phpunit/class-wp-theme-json-test.php @nosolosw

# Web App
/packages/admin-manifest @ellatrix
/lib/pwa.php @ellatrix
/lib/service-worker.js @ellatrix
/lib @timothybjacobs @spacedmonkey
/lib/experimental/class-wp-rest-block-editor-settings-controller.php @timothybjacobs @spacedmonkey @geriux

# Native
/packages/components/src/mobile/global-styles-context @geriux

# Native (Unowned)
*.native.js @ghost
*.android.js @ghost
*.ios.js @ghost
*.native.scss @ghost
*.android.scss @ghost
*.ios.scss @ghost
*.native.js
*.android.js
*.ios.js
*.native.scss
*.android.scss
*.ios.scss
Loading

0 comments on commit 480d05f

Please sign in to comment.