Skip to content

Commit

Permalink
Merge branch 'master' into fix/core/Button/visual-focused-state
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Jan 15, 2019
2 parents ed1ba33 + 3fad812 commit d8f5f45
Show file tree
Hide file tree
Showing 1,618 changed files with 49,256 additions and 13,041 deletions.
73 changes: 36 additions & 37 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
defaults: &defaults
working_directory: /tmp/material-ui
docker:
- image: circleci/node:9.10
- image: circleci/node:10.14
# CircleCI has disabled the cache across forks for security reasons.
# Following their official statement, it was a quick solution, they
# are working on providing this feature back with appropriate security measures.
# https://discuss.circleci.com/t/saving-cache-stopped-working-warning-skipping-this-step-disabled-in-configuration/24423/21
#
# restore_repo: &restore_repo
# restore_cache:
# key: v1-repo-{{ .Branch }}-{{ .Revision }}
Expand All @@ -13,13 +15,13 @@ install_js: &install_js
name: Install js dependencies
command: |
yarn config set yarn-offline-mirror ~/.cache/npm-packages-offline-cache/v1
yarn
yarn --frozen-lockfile
restore_yarn_cache: &restore_yarn_cache
restore_cache:
key: v1-yarn-sha-{{ checksum "yarn.lock" }}
key: v2-yarn-sha-{{ checksum "yarn.lock" }}
restore_yarn_offline_mirror: &restore_yarn_offline_mirror
restore_cache:
key: v1-npm-packages-offline-cache
key: v2-npm-packages-offline-cache
version: 2
jobs:
checkout:
Expand All @@ -42,11 +44,11 @@ jobs:
name: Should not have any git not staged
command: git diff --exit-code
- save_cache:
key: v1-yarn-sha-{{ checksum "yarn.lock" }}
key: v2-yarn-sha-{{ checksum "yarn.lock" }}
paths:
- ~/.cache/yarn/v1
- ~/.cache/yarn/v4
- save_cache:
key: v1-npm-packages-offline-cache
key: v2-npm-packages-offline-cache
paths:
- ~/.cache/npm-packages-offline-cache/v1
test_unit:
Expand All @@ -56,31 +58,9 @@ jobs:
- *restore_yarn_offline_mirror
- *restore_yarn_cache
- *install_js
- run:
name: Export changed files
command: |
# changed files on this branch
# `git diff --name-only master` but since the checkout used reset --hard
# we need to parse the revs for the actual master
echo 'export CHANGED_FILES=$(git diff --name-only $(git rev-parse origin/master)...)' >> $BASH_ENV
- run:
name: Check if yarn prettier was run
command: |
# if we use an empty string as a pattern grep will match everything
if [ -z "$CHANGED_FILES" ]; then
echo "no changes"
else
# Files that should have been formatted while working on this branch
# CircleCI does not support interpolation when setting environment variables
echo 'export FORMATTED_FILES=$(yarn --silent prettier:files | grep "$CHANGED_FILES")' >> $BASH_ENV
source $BASH_ENV
if [ -z "$FORMATTED_FILES" ]; then
echo "no files for prettier were changed"
else
yarn prettier:ci $FORMATTED_FILES
fi
fi
command: yarn prettier check-changed
- run:
name: Lint
command: yarn lint
Expand All @@ -102,7 +82,7 @@ jobs:
fi
- run:
name: Coverage
command: bash <(curl -s https://codecov.io/bash) -Z
command: bash <(curl -s https://codecov.io/bash) -Z -C $CIRCLE_SHA1
test_material-ui-x:
<<: *defaults
steps:
Expand Down Expand Up @@ -175,21 +155,40 @@ jobs:
# This isn't user facing code.
# Let's take advantage of the most up to date node version.
docker:
- image: circleci/node:9.10
- image: circleci/node:10.14
steps:
- checkout
- *restore_yarn_offline_mirror
- *restore_yarn_cache
- *install_js
- run:
name: Can we generate the material-ui build?
name: Can we generate the @material-ui/core build?
command: cd packages/material-ui && yarn build
- run:
name: Can we generate the @material-ui/styles build?
command: cd packages/material-ui-styles && yarn build
- run:
name: Can we generate the @material-ui/utils build?
command: cd packages/material-ui-utils && yarn build
- run:
name: Can we generate the @material-ui/system build?
command: cd packages/material-ui-system && yarn build
# Netlify already do it for us but we need to check the size.
- run:
name: Can we build the docs?
command: yarn docs:build
- run:
name: Is the size acceptable?
command: yarn size
command: yarn lerna bootstrap && yarn size
- run:
name: Install dependencies for Chrome Headless
# From https://github.com/GoogleChrome/puppeteer/blob/811415bc8c47f7882375629b57b3fe186ad61ed4/docs/troubleshooting.md#chrome-headless-doesnt-launch
command: |
sudo apt-get update
sudo apt-get install -y --force-yes gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget
- run:
name: Test umd release
command: yarn test:umd
test_browser:
<<: *defaults
steps:
Expand All @@ -201,21 +200,21 @@ jobs:
name: Can we generate the documentation?
command: yarn docs:api
- run:
name: "`yarn docs:api` changes commited?"
name: '`yarn docs:api` changes commited?'
command: git diff --exit-code
- run:
name: Install dependencies for Chrome Headless
# From https://github.com/GoogleChrome/puppeteer/blob/811415bc8c47f7882375629b57b3fe186ad61ed4/docs/troubleshooting.md#chrome-headless-doesnt-launch
command: |
sudo apt-get update
sudo apt-get install -y gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget
sudo apt-get install -y --force-yes gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget
- run:
name: Tests real browsers
command: yarn test:karma
test_regressions:
<<: *defaults
docker:
- image: circleci/node:9.10
- image: circleci/node:10.14
- image: selenium/standalone-chrome:3.11.0
steps:
- checkout
Expand Down
3 changes: 1 addition & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
/.next
/coverage
/docs/export
/examples/create-react-app*/src/serviceWorker.js
/examples/create-react-app-with-flow/flow
/examples/create-react-app-with-flow/flow-typed
/examples/gatsby/public
/flow
/flow-typed
/packages/material-ui-codemod/lib
/packages/material-ui-codemod/src/*/*.test
/packages/material-ui-codemod/src/*/*.test.js
Expand Down
81 changes: 37 additions & 44 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
const path = require('path');

module.exports = {
// So parent files don't get applied
root: true,
root: true, // So parent files don't get applied
globals: {
preval: false,
preval: false, // Used in the documentation
},
env: {
es6: true,
browser: true,
node: true,
mocha: true,
},
extends: ['plugin:import/recommended', 'airbnb'],
extends: ['plugin:import/recommended', 'airbnb', 'prettier', 'prettier/react'],
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 7,
sourceType: 'module',
},
plugins: ['babel', 'import', 'jsx-a11y', 'mocha', 'material-ui'],
plugins: ['babel', 'mocha', 'material-ui'],
settings: {
'import/resolver': {
webpack: {
Expand All @@ -27,16 +26,31 @@ module.exports = {
},
},
rules: {
'linebreak-style': 'off', // Don't play nicely with Windows
'arrow-body-style': 'off', // Incompatible with prettier
'arrow-parens': 'off', // Incompatible with prettier
'object-curly-newline': 'off', // Incompatible with prettier
'function-paren-newline': 'off', // Incompatible with prettier
indent: 'off', // Incompatible with prettier
'implicit-arrow-linebreak': 'off', // Incompatible with prettier
'space-before-function-paren': 'off', // Incompatible with prettier
'no-confusing-arrow': 'off', // Incompatible with prettier
'no-mixed-operators': 'off', // Incompatible with prettier
// It's buggy
'react/jsx-curly-brace-presence': 'off',
'react/require-default-props': 'off',
'jsx-a11y/label-has-associated-control': 'off',
'jsx-a11y/label-has-for': 'off', // deprecated
'linebreak-style': 'off', // Doesn't play nicely with Windows

// Strict, airbnb is using warn
'no-console': 'error',
'no-alert': 'error',
'react/no-danger': 'error',

// Strict, airbnb is using off
'react/no-direct-mutation-state': 'error',
'react/sort-prop-types': 'error',

// Airbnb use error
'no-param-reassign': 'off',
'no-prototype-builtins': 'off',
'react/forbid-prop-types': 'off',
'react/destructuring-assignment': 'off',
'react/no-find-dom-node': 'off',

'jsx-a11y/no-autofocus': 'off', // We are a library, people do what they want.
'prefer-destructuring': 'off', // Destructuring harm grep potential.
'consistent-this': ['error', 'self'],
'max-len': [
'error',
Expand All @@ -46,15 +60,7 @@ module.exports = {
ignoreUrls: true,
},
], // airbnb is allowing some edge cases
'no-console': 'error', // airbnb is using warn
'prefer-destructuring': 'off', // airbnb is using error. destructuring harm grep potential.
'no-alert': 'error', // airbnb is using warn
'no-param-reassign': 'off', // airbnb use error
'no-prototype-builtins': 'off', // airbnb use error
'operator-linebreak': 'off', // airbnb use error

// It would be better to enable this rule, but it might slow us down.
'import/no-extraneous-dependencies': 'off',
'import/no-extraneous-dependencies': 'off', // It would be better to enable this rule.
'import/namespace': ['error', { allowComputed: true }],
'import/order': [
'error',
Expand All @@ -63,12 +69,6 @@ module.exports = {
'newlines-between': 'never',
},
],

'react/jsx-indent': 'off', // Incompatible with prettier
'react/jsx-closing-bracket-location': 'off', // Incompatible with prettier
'react/jsx-wrap-multilines': 'off', // Incompatible with prettier
'react/jsx-indent-props': 'off', // Incompatible with prettier
'react/jsx-one-expression-per-line': 'off', // Incompatible with prettier
'react/jsx-handler-names': [
'error',
{
Expand All @@ -77,26 +77,19 @@ module.exports = {
eventHandlerPropPrefix: 'on',
},
],
'react/jsx-curly-brace-presence': 'off', // airbnb use error, it's buggy
'react/forbid-prop-types': 'off', // airbnb use error
'react/require-default-props': 'off', // airbnb use error, it's buggy
'react/destructuring-assignment': 'off', // airbnb use error
'react/jsx-filename-extension': ['error', { extensions: ['.js'] }], // airbnb is using .jsx
'react/no-danger': 'error', // airbnb is using warn
'react/no-direct-mutation-state': 'error', // airbnb is using off
'react/no-find-dom-node': 'off', // airbnb use error
'react/sort-prop-types': 'error', // airbnb use off

'material-ui/docgen-ignore-before-comment': 'error',

'mocha/handle-done-callback': 'error',
'mocha/no-exclusive-tests': 'error',
'mocha/no-global-tests': 'error',
'mocha/no-identical-title': 'error',
'mocha/no-nested-tests': 'error',
'mocha/no-pending-tests': 'error',
'mocha/no-return-and-callback': 'error',
'mocha/no-sibling-hooks': 'error',
'mocha/no-skipped-tests': 'error',

'jsx-a11y/label-has-associated-control': 'off',
'jsx-a11y/label-has-for': 'off',
'jsx-a11y/no-autofocus': 'off', // We are a library, people do what they want.
'mocha/no-top-level-hooks': 'error',
'mocha/prefer-arrow-callback': 'error',
'mocha/valid-suite-description': 'error',
},
};
12 changes: 6 additions & 6 deletions .github/ISSUE_TEMPLATE/1.bug.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ about: Create a bug report for Material-UI
- [ ] This is not a v0.x issue. <!-- (v0.x is no longer maintained) -->
- [ ] I have searched the [issues](https://github.com/mui-org/material-ui/issues) of this repository and believe that this is not a duplicate.

## Expected Behavior
## Expected Behavior 🤔
<!---
Describe what should happen.
-->

## Current Behavior
## Current Behavior 😯
<!---
Describe what happens instead of the expected behavior.
-->

## Steps to Reproduce
## Steps to Reproduce 🕹
<!---
Provide a link to a live example (you can use codesandbox.io) and an unambiguous set of steps to reproduce this bug.
Include code to reproduce, if relevant (which it most likely is).
Expand All @@ -45,21 +45,21 @@ Link:
3.
4.

## Context
## Context 🔦
<!---
What are you trying to accomplish? How has this issue affected you?
Providing context helps us come up with a solution that is most useful in the real world.
-->

## Your Environment
## Your Environment 🌎
<!---
Include as many relevant details about the environment with which you experienced the bug.
If you encounter issues with typescript please include version and tsconfig.
-->

| Tech | Version |
|--------------|---------|
| Material-UI | v1.?.? |
| Material-UI | v3.?.? |
| React | |
| Browser | |
| TypeScript | |
Expand Down
10 changes: 5 additions & 5 deletions .github/ISSUE_TEMPLATE/2.feature.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,23 @@ about: Create feature request for Material-UI
- [ ] This is not a v0.x issue. <!-- (v0.x is no longer maintained) -->
- [ ] I have searched the [issues](https://github.com/mui-org/material-ui/issues) of this repository and believe that this is not a duplicate.

## Expected Behavior
## Expected Behavior 🤔
<!---
Describe how it should work.
-->

## Current Behavior
## Current Behavior 😯
<!---
Explain the difference from current behavior.
-->

## Examples
## Examples 🌈
<!---
Provide a link to the Material design specification, other implementations,
Provide a link to the Material design specification, other implementations,
or screenshots of the expected behavior.
-->

## Context
## Context 🔦
<!---
What are you trying to accomplish? How has the lack of this feature affected you?
Providing context helps us come up with a solution that is most useful in the real world.
Expand Down
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<!-- Thanks so much for your PR, your contribution is appreciated! ❤️ -->

- [x] I have followed (at least) the [PR section of the contributing guide](https://github.com/mui-org/material-ui/blob/master/CONTRIBUTING.md#submitting-a-pull-request).
- [ ] I have followed (at least) the [PR section of the contributing guide](https://github.com/mui-org/material-ui/blob/master/CONTRIBUTING.md#submitting-a-pull-request).
Loading

0 comments on commit d8f5f45

Please sign in to comment.