Skip to content

Commit

Permalink
[core] Upgrade to babel@rc.1
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Aug 19, 2018
1 parent a29c7f1 commit 65289cf
Show file tree
Hide file tree
Showing 237 changed files with 919 additions and 30,596 deletions.
3 changes: 0 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,6 @@ jobs:
- run:
name: Lint
command: yarn lint
- run:
name: Flow
command: yarn flow
- run:
name: TypeScript
command: yarn typescript
Expand Down
11 changes: 1 addition & 10 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = {
ecmaVersion: 7,
sourceType: 'module',
},
plugins: ['babel', 'import', 'jsx-a11y', 'mocha', 'flowtype', 'material-ui'],
plugins: ['babel', 'import', 'jsx-a11y', 'mocha', 'material-ui'],
settings: {
'import/resolver': {
webpack: {
Expand Down Expand Up @@ -95,15 +95,6 @@ module.exports = {
'mocha/no-pending-tests': 'error',
'mocha/no-skipped-tests': 'error',

'flowtype/define-flow-type': 'error',
'flowtype/require-valid-file-annotation': 'off',
'flowtype/require-parameter-type': 'off',
'flowtype/require-return-type': 'off',
'flowtype/space-after-type-colon': 'off',
'flowtype/space-before-type-colon': 'off',
'flowtype/type-id-match': 'off',
'flowtype/use-flow-type': '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.
Expand Down
50 changes: 0 additions & 50 deletions .flowconfig

This file was deleted.

28 changes: 12 additions & 16 deletions .babelrc.js → babel.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
const ENV = process.env.BABEL_ENV;
let defaultPresets;

// We release a ES version of Material-UI.
// It's something that matches the latest official supported features of JavaScript.
// Nothing more (stage-1, etc), nothing less (require, etc).
if (ENV === 'es') {
if (process.env.BABEL_ENV === 'es') {
defaultPresets = [];
} else {
defaultPresets = [
Expand All @@ -19,28 +18,26 @@ if (ENV === 'es') {
safari: 10,
node: '6.11',
},
modules: ['modules', 'production-umd'].includes(ENV) ? false : 'commonjs',
modules: ['modules', 'production-umd'].includes(process.env.BABEL_ENV) ? false : 'commonjs',
},
],
];
}

module.exports = {
presets: defaultPresets.concat([
['@babel/preset-stage-1', { loose: true }],
'@babel/preset-react',
'@babel/flow',
]),
presets: defaultPresets.concat(['@babel/preset-react']),
plugins: [
['@babel/plugin-proposal-class-properties', { loose: true }],
['@babel/plugin-proposal-object-rest-spread', { loose: true }],
'@babel/plugin-transform-object-assign',
['@babel/plugin-transform-runtime', { polyfill: false, useBuiltIns: true }],
'@babel/plugin-transform-runtime',
],
env: {
coverage: {
plugins: [
'istanbul',
'babel-plugin-istanbul',
[
'module-resolver',
'babel-plugin-module-resolver',
{
root: ['./'],
alias: {
Expand All @@ -54,7 +51,7 @@ module.exports = {
development: {
plugins: [
[
'module-resolver',
'babel-plugin-module-resolver',
{
alias: {
modules: './modules',
Expand All @@ -67,7 +64,7 @@ module.exports = {
plugins: [
'babel-plugin-preval',
[
'module-resolver',
'babel-plugin-module-resolver',
{
alias: {
'@material-ui/core': './packages/material-ui/src',
Expand All @@ -86,7 +83,7 @@ module.exports = {
plugins: [
'babel-plugin-preval',
[
'module-resolver',
'babel-plugin-module-resolver',
{
alias: {
'@material-ui/core': './packages/material-ui/src',
Expand Down Expand Up @@ -150,7 +147,7 @@ module.exports = {
sourceMaps: 'both',
plugins: [
[
'module-resolver',
'babel-plugin-module-resolver',
{
root: ['./'],
alias: {
Expand All @@ -162,5 +159,4 @@ module.exports = {
],
},
},
ignore: ['scripts/*.js'],
};
Loading

0 comments on commit 65289cf

Please sign in to comment.