Skip to content

Commit

Permalink
Merge branch 'mui:master' into icon-colors-33615
Browse files Browse the repository at this point in the history
  • Loading branch information
Zetta56 committed Nov 26, 2022
2 parents 009a6a6 + 91ad7e8 commit 9d06bda
Show file tree
Hide file tree
Showing 14,889 changed files with 266,117 additions and 258,903 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
48 changes: 27 additions & 21 deletions .circleci/config.yml
Expand Up @@ -44,7 +44,7 @@ defaults: &defaults
AWS_REGION_ARTIFACTS: eu-central-1
working_directory: /tmp/material-ui
docker:
- image: cimg/node:14.20
- image: cimg/node:14.21

# CircleCI has disabled the cache across forks for security reasons.
# Following their official statement, it was a quick solution, they
Expand Down Expand Up @@ -72,9 +72,9 @@ commands:
- run:
name: Resolve react version
command: |
node scripts/use-react-version
node scripts/useReactVersion.mjs
# log a patch for maintainers who want to check out this change
git --no-pager diff HEAD
git --no-pager diff HEAD
- restore_cache:
name: Restore yarn cache
keys:
Expand Down Expand Up @@ -102,7 +102,7 @@ commands:
- v6-playwright-{{ arch }}-{{ checksum "/tmp/playwright_info.json" }}
- run:
name: Install js dependencies
command: yarn install --verbose
command: yarn install
environment:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: <<# parameters.browsers >>0<</ parameters.browsers >><<^ parameters.browsers >>1<</ parameters.browsers >>
- save_cache:
Expand Down Expand Up @@ -216,7 +216,7 @@ jobs:
- install_js
- run:
name: '`yarn prettier` changes committed?'
command: yarn prettier check-changed
command: yarn prettier --check
- run:
name: Generate PropTypes
command: yarn proptypes
Expand All @@ -240,6 +240,11 @@ jobs:
command: |
yarn extract-error-codes
git diff --exit-code
- run:
name: '`yarn docs:link-check` changes committed?'
command: |
yarn docs:link-check
git diff --exit-code
test_types:
<<: *defaults
resource_class: 'medium+'
Expand Down Expand Up @@ -281,7 +286,7 @@ jobs:
- run:
name: Any defect declaration files?
command: node scripts/testBuiltTypes.js
command: node scripts/testBuiltTypes.mjs
- save_cache:
name: Save generated declaration files
key: typescript-declaration-files-{{ .Branch }}-{{ .Revision }}
Expand All @@ -300,7 +305,7 @@ jobs:
environment:
TYPESCRIPT_DIST_TAG: next
command: |
node scripts/use-typescript-dist-tag
node scripts/useTypescriptDistTag.mjs
# log a patch for maintainers who want to check out this change
git --no-pager diff HEAD
- install_js
Expand Down Expand Up @@ -337,12 +342,13 @@ jobs:
# Fixing these takes some effort that isn't viable to merge in a single PR.
# We'll simply monitor them for now.
set +e
node scripts/testBuiltTypes.js
node scripts/testBuiltTypes.mjs
exit 0
test_browser:
<<: *defaults
resource_class: 'medium+'
docker:
- image: mcr.microsoft.com/playwright:v1.24.2-focal
- image: mcr.microsoft.com/playwright:v1.27.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand Down Expand Up @@ -372,7 +378,7 @@ jobs:
test_e2e:
<<: *defaults
docker:
- image: mcr.microsoft.com/playwright:v1.24.2-focal
- image: mcr.microsoft.com/playwright:v1.27.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -391,7 +397,7 @@ jobs:
test_e2e_website:
<<: *defaults
docker:
- image: mcr.microsoft.com/playwright:v1.24.2-focal
- image: mcr.microsoft.com/playwright:v1.27.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -406,7 +412,7 @@ jobs:
test_profile:
<<: *defaults
docker:
- image: mcr.microsoft.com/playwright:v1.24.2-focal
- image: mcr.microsoft.com/playwright:v1.27.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -433,7 +439,7 @@ jobs:
test_regressions:
<<: *defaults
docker:
- image: mcr.microsoft.com/playwright:v1.24.2-focal
- image: mcr.microsoft.com/playwright:v1.27.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand Down Expand Up @@ -487,7 +493,7 @@ jobs:
<<: *defaults
working_directory: /tmp/material-ui/test/bundling/fixtures/next-webpack4/
docker:
- image: mcr.microsoft.com/playwright:v1.24.2-focal
- image: mcr.microsoft.com/playwright:v1.27.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -511,7 +517,7 @@ jobs:
<<: *defaults
working_directory: /tmp/material-ui/test/bundling/fixtures/next-webpack5/
docker:
- image: mcr.microsoft.com/playwright:v1.24.2-focal
- image: mcr.microsoft.com/playwright:v1.27.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -535,7 +541,7 @@ jobs:
<<: *defaults
working_directory: /tmp/material-ui/test/bundling/fixtures/create-react-app/
docker:
- image: mcr.microsoft.com/playwright:v1.24.2-focal
- image: mcr.microsoft.com/playwright:v1.27.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -559,7 +565,7 @@ jobs:
<<: *defaults
working_directory: /tmp/material-ui/test/bundling/fixtures/snowpack/
docker:
- image: mcr.microsoft.com/playwright:v1.24.2-focal
- image: mcr.microsoft.com/playwright:v1.27.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -583,7 +589,7 @@ jobs:
<<: *defaults
working_directory: /tmp/material-ui/test/bundling/fixtures/vite/
docker:
- image: mcr.microsoft.com/playwright:v1.24.2-focal
- image: mcr.microsoft.com/playwright:v1.27.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand All @@ -607,7 +613,7 @@ jobs:
<<: *defaults
working_directory: /tmp/material-ui/test/bundling/fixtures/esbuild/
docker:
- image: mcr.microsoft.com/playwright:v1.24.2-focal
- image: mcr.microsoft.com/playwright:v1.27.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand Down Expand Up @@ -635,7 +641,7 @@ jobs:
<<: *defaults
working_directory: /tmp/material-ui/test/bundling/fixtures/gatsby/
docker:
- image: mcr.microsoft.com/playwright:v1.24.2-focal
- image: mcr.microsoft.com/playwright:v1.27.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand Down Expand Up @@ -737,7 +743,7 @@ jobs:
test_benchmark:
<<: *defaults
docker:
- image: mcr.microsoft.com/playwright:v1.24.2-focal
- image: mcr.microsoft.com/playwright:v1.27.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand Down
9 changes: 8 additions & 1 deletion .eslintignore
Expand Up @@ -3,7 +3,7 @@
/benchmark/**/dist
/coverage
/docs/export
/docs/pages/playground.tsx
/docs/pages/playground/
/examples/create-react-app*/src/serviceWorker.js
/examples/gatsby/public/
/examples/preact/config
Expand All @@ -28,3 +28,10 @@
.next
build
node_modules
.nyc_output

# These come from crowdin.
# If we would commit changes crowdin would immediately try to revert.
# If we want to format these files we'd need to do it in crowdin
docs/**/*-pt.md
docs/**/*-zh.md
43 changes: 35 additions & 8 deletions .eslintrc.js
@@ -1,4 +1,5 @@
const path = require('path');
const { rules: baseStyleRules } = require('eslint-config-airbnb-base/rules/style');

const forbidTopLevelMessage = [
'Prefer one level nested imports to avoid bundling everything in dev mode',
Expand All @@ -19,10 +20,11 @@ module.exports = {
node: true,
},
extends: [
'plugin:import/recommended',
'plugin:import/typescript',
'airbnb-typescript',
'prettier',
'plugin:eslint-plugin-import/recommended',
'plugin:eslint-plugin-import/typescript',
'eslint-config-airbnb',
'eslint-config-airbnb-typescript',
'eslint-config-prettier',
],
parser: '@typescript-eslint/parser',
parserOptions: {
Expand Down Expand Up @@ -135,9 +137,6 @@ module.exports = {
allowRequiredDefaults: true,
},
],
// No need to check this as prop types are autogenerated.
// Plus, there are a few false positives.
'react/no-unused-prop-types': 'off',
// Can add verbosity to small functions making them harder to grok.
// Though we have to manually enforce it for function components with default values.
'react/destructuring-assignment': 'off',
Expand All @@ -162,12 +161,33 @@ module.exports = {
'react/state-in-constructor': 'off',
// stylistic opinion. For conditional assignment we want it outside, otherwise as static
'react/static-property-placement': 'off',

'no-restricted-syntax': [
// See https://github.com/eslint/eslint/issues/9192 for why it's needed
...baseStyleRules['no-restricted-syntax'],
{
message:
"Do not import default from React. Use a namespace import (import * as React from 'react';) instead.",
selector: 'ImportDeclaration[source.value="react"] ImportDefaultSpecifier',
},
],

// We re-export default in many places, remove when https://github.com/airbnb/javascript/issues/2500 gets resolved
'no-restricted-exports': 'off',
// Some of these occurences are deliberate and fixing them will break things in repos that use @monorepo dependency
'import/no-relative-packages': 'off',
// Avoid accidental auto-"fixes" https://github.com/jsx-eslint/eslint-plugin-react/issues/3458
'react/no-invalid-html-attribute': 'off',

'react/jsx-no-useless-fragment': ['error', { allowExpressions: true }],
},
overrides: [
{
files: [
// matching the pattern of the test runner
'*.test.mjs',
'*.test.js',
'*.test.mjs',
'*.test.ts',
'*.test.tsx',
],
Expand Down Expand Up @@ -222,6 +242,7 @@ module.exports = {
// components that are defined in test are isolated enough
// that they don't need type-checking
'react/prop-types': 'off',
'react/no-unused-prop-types': 'off',
},
},
{
Expand Down Expand Up @@ -278,7 +299,6 @@ module.exports = {
],
},
],
'react/prop-types': 'off',
},
},
// Files used for generating TypeScript declaration files (#ts-source-files)
Expand Down Expand Up @@ -345,6 +365,7 @@ module.exports = {
'react/require-default-props': 'off',
'react/state-in-constructor': 'off',
'react/static-property-placement': 'off',
'react/function-component-definition': 'off',
},
},
{
Expand Down Expand Up @@ -398,5 +419,11 @@ module.exports = {
'import/extensions': ['error', 'ignorePackages'],
},
},
{
files: ['scripts/**/*.mjs'],
rules: {
'import/extensions': ['error', 'ignorePackages'],
},
},
],
};
27 changes: 12 additions & 15 deletions .github/ISSUE_TEMPLATE/1.bug.yml
Expand Up @@ -22,32 +22,29 @@ body:
options:
- label: I have tested the latest version
required: true
- type: textarea
attributes:
label: Current behavior 😯
description: Describe what happens instead of the expected behavior.
- type: textarea
attributes:
label: Expected behavior 🤔
description: Describe what should happen.
- type: textarea
attributes:
label: Steps to reproduce 🕹
description: |
Please provide a link to a live example and an unambiguous set of steps to reproduce this bug.
As a starting point, we recommend you browse our [documentation](https://mui.com/material-ui/getting-started/installation/), and [select](https://mui.com/static/docs/forking-an-example.png) the closest example to your use case.
Or you can use the [official template](https://mui.com/r/issue-template) to build a reproduction case.
**⚠️ Issues that we can't reproduce will be closed.**
Issues that we can't reproduce will be closed.
Please provide a link to a live example and an unambiguous set of steps to reproduce this bug. As a starting point, we recommend you browse our [documentation](https://mui.com/material-ui/getting-started/installation/), and [select](https://mui.com/static/docs/forking-an-example.png) the closest example to your use case. Or you can use the [official template](https://mui.com/r/issue-template) to build a reproduction case.
value: |
Link to live example:
Steps:
1.
2.
3.
4.
- type: textarea
attributes:
label: Current behavior 😯
description: Describe what happens instead of the expected behavior.
- type: textarea
attributes:
label: Expected behavior 🤔
description: Describe what should happen.
- type: textarea
attributes:
label: Context 🔦
Expand Down

0 comments on commit 9d06bda

Please sign in to comment.