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
naiba4 authored Jan 30, 2024
2 parents 3ca7367 + 8c80c0e commit f2c9ed7
Show file tree
Hide file tree
Showing 5,844 changed files with 435,086 additions and 207,176 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
184 changes: 65 additions & 119 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,132 +44,23 @@ const restrictedImports = [
},
{
name: 'lodash',
importNames: [
'camelCase',
'capitalize',
'castArray',
'chunk',
'clamp',
'clone',
'cloneDeep',
'compact',
'concat',
'countBy',
'debounce',
'deburr',
'defaults',
'defaultTo',
'delay',
'difference',
'differenceWith',
'dropRight',
'each',
'escape',
'escapeRegExp',
'every',
'extend',
'filter',
'find',
'findIndex',
'findKey',
'findLast',
'first',
'flatMap',
'flatten',
'flattenDeep',
'flow',
'flowRight',
'forEach',
'fromPairs',
'has',
'identity',
'includes',
'invoke',
'isArray',
'isBoolean',
'isEqual',
'isFinite',
'isFunction',
'isMatch',
'isNil',
'isNumber',
'isObject',
'isObjectLike',
'isPlainObject',
'isString',
'isUndefined',
'keyBy',
'keys',
'last',
'lowerCase',
'map',
'mapKeys',
'maxBy',
'memoize',
'negate',
'noop',
'nth',
'omit',
'omitBy',
'once',
'orderby',
'overEvery',
'partial',
'partialRight',
'pick',
'pickBy',
'random',
'reduce',
'reject',
'repeat',
'reverse',
'setWith',
'size',
'snakeCase',
'some',
'sortBy',
'startCase',
'startsWith',
'stubFalse',
'stubTrue',
'sum',
'sumBy',
'take',
'throttle',
'times',
'toString',
'trim',
'truncate',
'unescape',
'unionBy',
'uniq',
'uniqBy',
'uniqueId',
'uniqWith',
'upperFirst',
'values',
'without',
'words',
'xor',
'zip',
],
message:
'This Lodash method is not recommended. Please use native functionality instead. If using `memoize`, please use `memize` instead.',
message: 'Please use native functionality instead.',
},
{
name: 'reakit',
message:
'Please use Reakit API through `@wordpress/components` instead.',
},
{
name: '@ariakit/react',
message:
'Please use Ariakit API through `@wordpress/components` instead.',
},
{
name: 'redux',
importNames: [ 'combineReducers' ],
message: 'Please use `combineReducers` from `@wordpress/data` instead.',
},
{
name: 'puppeteer-testing-library',
message: '`puppeteer-testing-library` is still experimental.',
},
{
name: '@emotion/css',
message:
Expand Down Expand Up @@ -197,6 +88,7 @@ module.exports = {
extends: [
'plugin:@wordpress/eslint-plugin/recommended',
'plugin:eslint-comments/recommended',
'plugin:storybook/recommended',
],
globals: {
wp: 'off',
Expand Down Expand Up @@ -242,6 +134,13 @@ module.exports = {
],
},
],
'@typescript-eslint/consistent-type-imports': [
'error',
{
prefer: 'type-imports',
disallowTypeAnnotations: false,
},
],
'no-restricted-syntax': [
'error',
// NOTE: We can't include the forward slash in our regex or
Expand Down Expand Up @@ -349,15 +248,20 @@ module.exports = {
},
},
{
files: [ 'packages/components/src/**/*.[tj]s?(x)' ],
files: [
// Components package.
'packages/components/src/**/*.[tj]s?(x)',
// Navigation block.
'packages/block-library/src/navigation/**/*.[tj]s?(x)',
],
excludedFiles: [ ...developmentFiles ],
rules: {
'react-hooks/exhaustive-deps': 'error',
},
},
{
files: [ 'packages/jest*/**/*.js', '**/test/**/*.js' ],
excludedFiles: [ 'test/e2e/**/*.js' ],
excludedFiles: [ 'test/e2e/**/*.js', 'test/performance/**/*.js' ],
extends: [ 'plugin:@wordpress/eslint-plugin/test-unit' ],
},
{
Expand All @@ -367,6 +271,7 @@ module.exports = {
'packages/react-native-*/**/*.[tj]s?(x)',
'test/native/**/*.[tj]s?(x)',
'test/e2e/**/*.[tj]s?(x)',
'test/performance/**/*.[tj]s?(x)',
'test/storybook-playwright/**/*.[tj]s?(x)',
],
extends: [
Expand All @@ -386,13 +291,24 @@ module.exports = {
{
files: [
'test/e2e/**/*.[tj]s',
'test/performance/**/*.[tj]s',
'packages/e2e-test-utils-playwright/**/*.[tj]s',
],
extends: [ 'plugin:eslint-plugin-playwright/playwright-test' ],
extends: [
'plugin:@wordpress/eslint-plugin/test-playwright',
'plugin:@typescript-eslint/base',
],
parserOptions: {
tsconfigRootDir: __dirname,
project: [
'./test/e2e/tsconfig.json',
'./test/performance/tsconfig.json',
'./packages/e2e-test-utils-playwright/tsconfig.json',
],
},
rules: {
'@wordpress/no-global-active-element': 'off',
'@wordpress/no-global-get-selection': 'off',
'playwright/no-page-pause': 'error',
'no-restricted-syntax': [
'error',
{
Expand All @@ -411,6 +327,10 @@ module.exports = {
message: 'Prefer page.locator instead.',
},
],
'playwright/no-conditional-in-test': 'off',
'@typescript-eslint/await-thenable': 'error',
'@typescript-eslint/no-floating-promises': 'error',
'@typescript-eslint/no-misused-promises': 'error',
},
},
{
Expand All @@ -437,6 +357,26 @@ module.exports = {
'jsdoc/require-param': 'off',
},
},
{
files: [ 'packages/components/src/**' ],
excludedFiles: [ 'packages/components/src/utils/colors-values.js' ],
rules: {
'no-restricted-syntax': [
'error',
{
selector: 'Literal[value=/--wp-admin-theme-/]',
message:
'--wp-admin-theme-* variables do not support component theming. Use variables from the COLORS object in packages/components/src/utils/colors-values.js instead.',
},
{
selector:
'TemplateElement[value.cooked=/--wp-admin-theme-/]',
message:
'--wp-admin-theme-* variables do not support component theming. Use variables from the COLORS object in packages/components/src/utils/colors-values.js instead.',
},
],
},
},
{
files: [ 'packages/components/src/**' ],
excludedFiles: [ 'packages/components/src/**/@(test|stories)/**' ],
Expand Down Expand Up @@ -466,5 +406,11 @@ module.exports = {
],
},
},
{
files: [ 'packages/interactivity*/src/**' ],
rules: {
'react/react-in-jsx-scope': 'error',
},
},
],
};
6 changes: 6 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,9 @@ f63053cace3c02e284f00918e1854284c85b9132

# Prettier upgrade to 2.6.2.
33d84b036592a5bf31af05b7710f3b2b14163dc4

# Prettier upgrade to 2.8.5.
c56e8a1910ed74f405b74bbb12fe81dea974e5c3

# Prettier upgrade to 3.0.3.
0bee15148fe4330c20cf372cb46a33693e45cb5f
24 changes: 15 additions & 9 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Documentation
/docs @ajitbohra @ryanwelcher @juanmaguitar @fabiankaegy
/docs @ajitbohra @ryanwelcher @juanmaguitar @fabiankaegy @ndiego
/packages/interactivity/docs @juanmaguitar

# Schemas
/schemas/json @ajlende
Expand All @@ -21,6 +22,7 @@
/packages/block-library/src/comment-template @michalczaplinski
/packages/block-library/src/comments @michalczaplinski
/packages/block-library/src/table-of-contents @ZebulanStanphill
/packages/block-library/src/image @artemiomorales @michalczaplinski

# Duotone
/lib/block-supports/duotone.php @ajlende
Expand Down Expand Up @@ -54,17 +56,19 @@
# Full Site Editing
/packages/edit-site

# Interactivity API
/packages/interactivity @luisherranz @darerodz

# Tooling
/bin @ntwb @nerrad @ajitbohra
/bin/api-docs @ntwb @nerrad @ajitbohra
/docs/tool @ajitbohra
/docs/tool @ajitbohra @ndiego
/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 @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
/packages/e2e-test-utils @ntwb @nerrad @ajitbohra
Expand All @@ -74,19 +78,20 @@
/packages/jest-console @gziolo @ntwb @nerrad @ajitbohra
/packages/jest-preset-default @gziolo @ntwb @nerrad @ajitbohra
/packages/jest-puppeteer-axe @gziolo @ntwb @nerrad @ajitbohra
/packages/library-export-default-webpack-plugin @ntwb @nerrad @ajitbohra
/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 @ryanwelcher
/packages/stylelint-config @ntwb
/test/e2e @kevin940726
/test/e2e @kevin940726 @Mamaduka
/test/php/gutenberg-coding-standards @anton-vlasenko

# UI Components
/packages/components @ajitbohra
/packages/compose @ajitbohra
/packages/element @ajitbohra
/packages/notices @ajitbohra
/packages/nux @ajitbohra @peterwilsoncc
/packages/viewport @ajitbohra
/packages/base-styles
/packages/icons
Expand Down Expand Up @@ -117,20 +122,21 @@
/packages/plugins @gziolo @adamsilverstein

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

# Project Management
/.github
/packages/project-management-automation
/packages/report-flaky-tests @kevin940726

# wp-env
/packages/env @noahtallen
/packages/env @ObliviousHarmony @t-hamano

# PHP
/lib @spacedmonkey
/lib/compat/*/html-api @dmsnell
/lib/experimental/rest-api.php @timothybjacobs
/lib/experimental/class-wp-rest-* @timothybjacobs
/lib/experimental/class-wp-rest-block-editor-settings-controller.php @timothybjacobs @spacedmonkey @geriux
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/Bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: Bug report
description: Report a bug with the WordPress block editor or Gutenberg plugin
labels: ['[Type] Bug']
body:
- type: markdown
attributes:
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/Feature_request.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
name: Feature request
about: Propose an idea for a feature or an enhancement
labels: "[Type] Enhancement"

---

Expand Down
Loading

0 comments on commit f2c9ed7

Please sign in to comment.