Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into swipe-ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
michaldudak committed Dec 28, 2022
2 parents fa7b76e + fea32da commit d48c9ee
Show file tree
Hide file tree
Showing 12,903 changed files with 67,900 additions and 92,358 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
46 changes: 26 additions & 20 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
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,7 +72,7 @@ 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
- restore_cache:
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.26.0-focal
- image: mcr.microsoft.com/playwright:v1.29.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.26.0-focal
- image: mcr.microsoft.com/playwright:v1.29.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.26.0-focal
- image: mcr.microsoft.com/playwright:v1.29.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.26.0-focal
- image: mcr.microsoft.com/playwright:v1.29.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.26.0-focal
- image: mcr.microsoft.com/playwright:v1.29.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.26.0-focal
- image: mcr.microsoft.com/playwright:v1.29.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.26.0-focal
- image: mcr.microsoft.com/playwright:v1.29.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.26.0-focal
- image: mcr.microsoft.com/playwright:v1.29.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.26.0-focal
- image: mcr.microsoft.com/playwright:v1.29.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.26.0-focal
- image: mcr.microsoft.com/playwright:v1.29.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.26.0-focal
- image: mcr.microsoft.com/playwright:v1.29.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.26.0-focal
- image: mcr.microsoft.com/playwright:v1.29.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.26.0-focal
- image: mcr.microsoft.com/playwright:v1.29.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
Expand Down
9 changes: 8 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
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
38 changes: 34 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -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 @@ -159,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 @@ -342,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 @@ -395,5 +419,11 @@ module.exports = {
'import/extensions': ['error', 'ignorePackages'],
},
},
{
files: ['scripts/**/*.mjs'],
rules: {
'import/extensions': ['error', 'ignorePackages'],
},
},
],
};
Loading

0 comments on commit d48c9ee

Please sign in to comment.