From 914e37270b478c14d67ba5265a2cd3d0df25c205 Mon Sep 17 00:00:00 2001 From: Ben Conolly Date: Thu, 14 Feb 2019 15:57:54 +1100 Subject: [PATCH] awks commit --- .travis.yml | 3 ++- package.json | 4 ++-- packages/babel-plugin-extract-react-types/index.js | 3 ++- packages/pretty-proptypes/src/Props/index.js | 4 ++++ 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index c59b412c..beed4445 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,7 @@ node_js: cache: yarn script: | yarn bolt - yarn flow check if [[ $? != 0 ]]; then exit 1; fi + yarn lint yarn test + yarn flow diff --git a/package.json b/package.json index 2dbd432e..3fb05db7 100644 --- a/package.json +++ b/package.json @@ -6,10 +6,10 @@ "test": "jest", "changeset": "bolt build-releases changeset", "version-all": "bolt build-releases version", - "publish-all": "yarn build && yarn check && build-releases publish --public", + "publish-all": "yarn validate && build-releases publish --public", "dev:pretty-proptypes": "bolt w pretty-proptypes run dev", "lint": "yarn eslint \"./**/*.js\"", - "check": "yarn lint && yarn test && yarn flow" + "validate": "yarn lint && yarn test && yarn flow" }, "bolt": { "workspaces": [ diff --git a/packages/babel-plugin-extract-react-types/index.js b/packages/babel-plugin-extract-react-types/index.js index fe76342e..f4e1645a 100644 --- a/packages/babel-plugin-extract-react-types/index.js +++ b/packages/babel-plugin-extract-react-types/index.js @@ -23,12 +23,13 @@ module.exports = babel => { t.assignmentExpression( '=', t.memberExpression(t.identifier(name), t.identifier('___types')), - babel.parse('(' + JSON.stringify(component) + ')').program.body[0].expression + babel.parse(`(${JSON.stringify(component)})`).program.body[0].expression ) ) ); } }); + /* eslint-disable no-empty */ } catch (e) {} } } diff --git a/packages/pretty-proptypes/src/Props/index.js b/packages/pretty-proptypes/src/Props/index.js index 4213c0ac..5be37fda 100644 --- a/packages/pretty-proptypes/src/Props/index.js +++ b/packages/pretty-proptypes/src/Props/index.js @@ -1,4 +1,7 @@ // @flow + +/* eslint-disable no-underscore-dangle */ + import React, { Component, type ComponentType } from 'react'; import type { Components } from '../components'; @@ -52,6 +55,7 @@ export default class Props extends Component { if (component.___types) { props = { type: 'program', component: component.___types }; } else { + /* eslint-disable-next-line no-console */ console.error( 'A component was passed to but it does not have types attached.\n' + 'babel-plugin-extract-react-types may not be correctly installed.\n' +