diff --git a/README.md b/README.md index f567335..d7ac7fc 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ [![Build Status](https://travis-ci.org/chrishelgert/react-handler.svg?branch=master)](https://travis-ci.org/chrishelgert/react-handler) [![Build status](https://ci.appveyor.com/api/projects/status/c5qo9wa0n4uwakfj?svg=true)](https://ci.appveyor.com/project/chrishelgert/react-handler/branch/master) [![codecov](https://codecov.io/gh/chrishelgert/react-handler/branch/master/graph/badge.svg)](https://codecov.io/gh/chrishelgert/react-handler) +[![Standard - JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com) > A react-component for handling typical react/redux-states (loading, error, ...) diff --git a/__tests__/__snapshots__/index.js.snap b/__tests__/__snapshots__/index.js.snap index 52bf3f9..1b0abb3 100644 --- a/__tests__/__snapshots__/index.js.snap +++ b/__tests__/__snapshots__/index.js.snap @@ -1,8 +1,8 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`react-handler should contain the Handler-Component 1`] = `[Function]`; +exports[`react-handler contains the Handler-Component 1`] = `[Function]`; -exports[`react-handler should contain the SupHandler´s 1`] = ` +exports[`react-handler contains the the SupHandler´s 1`] = ` Object { "EmptyHandler": [Function], "ErrorEmptyHandler": [Function], diff --git a/__tests__/components/EmptyHandler-test.js b/__tests__/components/EmptyHandler-test.js index 3326c7e..6083a66 100644 --- a/__tests__/components/EmptyHandler-test.js +++ b/__tests__/components/EmptyHandler-test.js @@ -1,26 +1,26 @@ -import React, { PropTypes } from 'react'; -import renderer from 'react-test-renderer'; -import EmptyHandler from '../../src/components/EmptyHandler'; +import React, { PropTypes } from 'react' +import renderer from 'react-test-renderer' +import EmptyHandler from '../../src/components/EmptyHandler' -const TestComponent = () =>

Test

; -const EmptyComponent = ({ children }) =>

{children}

; -EmptyComponent.propTypes = { children: PropTypes.string }; -const componentPropsFilled = { list: ['abc', 'def'] }; -const componentPropsEmpty = { list: [] }; -const emptyMessage = 'no results found'; +const TestComponent = () =>

Test

+const EmptyComponent = ({ children }) =>

{children}

+EmptyComponent.propTypes = { children: PropTypes.string } +const componentPropsFilled = { list: ['abc', 'def'] } +const componentPropsEmpty = { list: [] } +const emptyMessage = 'no results found' describe('EmptyHandler', () => { - it('should return null when called without Component and is not empty', () => { + test('returns null when called without Component and is not empty', () => { const tree = renderer.create( , - ); - expect(tree).toMatchSnapshot(); - }); + ) + expect(tree).toMatchSnapshot() + }) - it('should return the component when the element in componentProps is not empty', () => { + test('returns the component when the element in componentProps is not empty', () => { const tree = renderer.create( { > , - ); - expect(tree.toJSON()).toMatchSnapshot(); - }); + ) + expect(tree.toJSON()).toMatchSnapshot() + }) - it('should return the EmptyComponent, when the list is empty and called with EmptyComponent', () => { + test('returns the EmptyComponent, when the list is empty and called with EmptyComponent', () => { const tree = renderer.create( { > , - ); - expect(tree.toJSON()).toMatchSnapshot(); - }); + ) + expect(tree.toJSON()).toMatchSnapshot() + }) - it('should return the EmptyMessage, when the list is empty', () => { + test('returns the EmptyMessage, when the list is empty', () => { const tree = renderer.create( , - ); - expect(tree.toJSON()).toMatchSnapshot(); - }); + ) + expect(tree.toJSON()).toMatchSnapshot() + }) - it('should return the EmptyMessage, when called without checkedProperty', () => { + test('returns the EmptyMessage, when called without checkedProperty', () => { const tree = renderer.create( , - ); - expect(tree.toJSON()).toMatchSnapshot(); - }); -}); + ) + expect(tree.toJSON()).toMatchSnapshot() + }) +}) diff --git a/__tests__/components/ErrorEmptyHandler-test.js b/__tests__/components/ErrorEmptyHandler-test.js index d625a3e..64b9f7e 100644 --- a/__tests__/components/ErrorEmptyHandler-test.js +++ b/__tests__/components/ErrorEmptyHandler-test.js @@ -1,42 +1,42 @@ -import React from 'react'; -import renderer from 'react-test-renderer'; -import ErrorEmptyHandler from '../../src/components/ErrorEmptyHandler'; +import React from 'react' +import renderer from 'react-test-renderer' +import ErrorEmptyHandler from '../../src/components/ErrorEmptyHandler' -const Component = () =>
Test
; -const checkedProperty = ['test']; +const Component = () =>
Test
+const checkedProperty = ['test'] describe('ErrorEmptyHandler', () => { - it('should display the error-message', () => { + test('displays the error-message', () => { const tree = renderer.create( - + , - ); + ) - expect(tree.toJSON()).toMatchSnapshot(); - }); + expect(tree.toJSON()).toMatchSnapshot() + }) - it('should display the empty-message', () => { + test('displays the empty-message', () => { const tree = renderer.create( , - ); + ) - expect(tree.toJSON()).toMatchSnapshot(); - }); + expect(tree.toJSON()).toMatchSnapshot() + }) - it('should display the Component', () => { + test('displays the Component', () => { const tree = renderer.create( - + , - ); + ) - expect(tree.toJSON()).toMatchSnapshot(); - }); -}); + expect(tree.toJSON()).toMatchSnapshot() + }) +}) diff --git a/__tests__/components/ErrorHandler-test.js b/__tests__/components/ErrorHandler-test.js index ab4a775..d0bea7f 100644 --- a/__tests__/components/ErrorHandler-test.js +++ b/__tests__/components/ErrorHandler-test.js @@ -1,28 +1,28 @@ -import React, { PropTypes } from 'react'; -import renderer from 'react-test-renderer'; -import ErrorHandler from '../../src/components/ErrorHandler'; +import React, { PropTypes } from 'react' +import renderer from 'react-test-renderer' +import ErrorHandler from '../../src/components/ErrorHandler' -const TestComponent = () =>

Test

; -const ErrorComponent = ({ children }) =>

{children}

; -ErrorComponent.propTypes = { children: PropTypes.string }; -const errorMessage = 'failed to call api'; +const TestComponent = () =>

Test

+const ErrorComponent = ({ children }) =>

{children}

+ErrorComponent.propTypes = { children: PropTypes.string } +const errorMessage = 'failed to call api' describe('ErrorHandler', () => { - it('should return the component when called without errorMessage', () => { + test('returns the component when called without errorMessage', () => { const tree = renderer.create( , - ); - expect(tree.toJSON()).toMatchSnapshot(); - }); + ) + expect(tree.toJSON()).toMatchSnapshot() + }) - it('should return null when called without errorMessage and component', () => { - const tree = renderer.create(); - expect(tree).toMatchSnapshot(); - }); + test('returns null when called without errorMessage and component', () => { + const tree = renderer.create() + expect(tree).toMatchSnapshot() + }) - it('should return the ErrorComponent', () => { + test('returns the ErrorComponent', () => { const tree = renderer.create( { > , - ); - expect(tree.toJSON()).toMatchSnapshot(); - }); + ) + expect(tree.toJSON()).toMatchSnapshot() + }) - it('should return the ErrorMessage when called without ErrorComponent', () => { + test('returns the ErrorMessage when called without ErrorComponent', () => { const tree = renderer.create( , - ); - expect(tree.toJSON()).toMatchSnapshot(); - }); -}); + ) + expect(tree.toJSON()).toMatchSnapshot() + }) +}) diff --git a/__tests__/components/Handler-test.js b/__tests__/components/Handler-test.js index 789c338..0853566 100644 --- a/__tests__/components/Handler-test.js +++ b/__tests__/components/Handler-test.js @@ -1,43 +1,43 @@ -import React from 'react'; -import renderer from 'react-test-renderer'; -import Handler from '../../src/components/Handler'; +import React from 'react' +import renderer from 'react-test-renderer' +import Handler from '../../src/components/Handler' -const Component = () =>
Test
; -const checkedProperty = ['test']; +const Component = () =>
Test
+const checkedProperty = ['test'] describe('Handler', () => { - it('should return the loading-message and the component', () => { + test('returns the loading-message and the component', () => { const tree = renderer.create( - + , - ); + ) - expect(tree.toJSON()).toMatchSnapshot(); - }); + expect(tree.toJSON()).toMatchSnapshot() + }) - it('should only return the loading-message, wen showComponentWhileLoading is false', () => { + test('returns only the loading-message when showComponentWhileLoading is false', () => { const tree = renderer.create( - + , - ); + ) - expect(tree.toJSON()).toMatchSnapshot(); - }); + expect(tree.toJSON()).toMatchSnapshot() + }) - it('should only return the Component, when loading and showComponentWhileLoading is false', () => { + test('returns the Component when loading and showComponentWhileLoading is false', () => { const tree = renderer.create( , - ); + ) - expect(tree.toJSON()).toMatchSnapshot(); - }); -}); + expect(tree.toJSON()).toMatchSnapshot() + }) +}) diff --git a/__tests__/components/LoadingHandler-test.js b/__tests__/components/LoadingHandler-test.js index 29f720c..21bba6b 100644 --- a/__tests__/components/LoadingHandler-test.js +++ b/__tests__/components/LoadingHandler-test.js @@ -1,51 +1,51 @@ -import React from 'react'; -import renderer from 'react-test-renderer'; -import LoadingHandler from '../../src/components/LoadingHandler'; +import React from 'react' +import renderer from 'react-test-renderer' +import LoadingHandler from '../../src/components/LoadingHandler' -const TestComponent = () =>

Test

; -const LoadingComponent = () => loading...; +const TestComponent = () =>

Test

+const LoadingComponent = () => loading... describe('LoadingHandler', () => { - it('should return the component when called with loading false', () => { + test('returns the component when called with loading false', () => { const tree = renderer.create( , - ); - expect(tree.toJSON()).toMatchSnapshot(); - }); + ) + expect(tree.toJSON()).toMatchSnapshot() + }) - it('should return null when called with loading false and no component', () => { + test('returns null when called with loading false and no component', () => { const tree = renderer.create( , - ); - expect(tree).toMatchSnapshot(); - }); + ) + expect(tree).toMatchSnapshot() + }) - it('should return the LoadingComponent', () => { + test('returns the LoadingComponent', () => { const tree = renderer.create( , - ); - expect(tree.toJSON()).toMatchSnapshot(); - }); + ) + expect(tree.toJSON()).toMatchSnapshot() + }) - it('should return the LoadingMessage with given loading message', () => { + test('returns the LoadingMessage with given loading message', () => { const tree = renderer.create( - + , - ); - expect(tree.toJSON()).toMatchSnapshot(); - }); + ) + expect(tree.toJSON()).toMatchSnapshot() + }) - it('should return the LoadingMessage when called without LoadingComponent', () => { + test('returns the LoadingMessage when called without LoadingComponent', () => { const tree = renderer.create( , - ); - expect(tree.toJSON()).toMatchSnapshot(); - }); -}); + ) + expect(tree.toJSON()).toMatchSnapshot() + }) +}) diff --git a/__tests__/components/__snapshots__/EmptyHandler-test.js.snap b/__tests__/components/__snapshots__/EmptyHandler-test.js.snap index 09b8106..9879cd2 100644 --- a/__tests__/components/__snapshots__/EmptyHandler-test.js.snap +++ b/__tests__/components/__snapshots__/EmptyHandler-test.js.snap @@ -1,8 +1,8 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`EmptyHandler should return null when called without Component and is not empty 1`] = `null`; +exports[`EmptyHandler returns null when called without Component and is not empty 1`] = `null`; -exports[`EmptyHandler should return the EmptyComponent, when the list is empty and called with EmptyComponent 1`] = ` +exports[`EmptyHandler returns the EmptyComponent, when the list is empty and called with EmptyComponent 1`] = `

@@ -10,7 +10,7 @@ exports[`EmptyHandler should return the EmptyComponent, when the list is empty a

`; -exports[`EmptyHandler should return the EmptyMessage, when called without checkedProperty 1`] = ` +exports[`EmptyHandler returns the EmptyMessage, when called without checkedProperty 1`] = `
@@ -18,7 +18,7 @@ exports[`EmptyHandler should return the EmptyMessage, when called without checke
`; -exports[`EmptyHandler should return the EmptyMessage, when the list is empty 1`] = ` +exports[`EmptyHandler returns the EmptyMessage, when the list is empty 1`] = `
@@ -26,7 +26,7 @@ exports[`EmptyHandler should return the EmptyMessage, when the list is empty 1`]
`; -exports[`EmptyHandler should return the component when the element in componentProps is not empty 1`] = ` +exports[`EmptyHandler returns the component when the element in componentProps is not empty 1`] = `

Test

diff --git a/__tests__/components/__snapshots__/ErrorEmptyHandler-test.js.snap b/__tests__/components/__snapshots__/ErrorEmptyHandler-test.js.snap index f357115..1c01e6c 100644 --- a/__tests__/components/__snapshots__/ErrorEmptyHandler-test.js.snap +++ b/__tests__/components/__snapshots__/ErrorEmptyHandler-test.js.snap @@ -1,12 +1,12 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`ErrorEmptyHandler should display the Component 1`] = ` +exports[`ErrorEmptyHandler displays the Component 1`] = `
Test
`; -exports[`ErrorEmptyHandler should display the empty-message 1`] = ` +exports[`ErrorEmptyHandler displays the empty-message 1`] = `
@@ -14,7 +14,7 @@ exports[`ErrorEmptyHandler should display the empty-message 1`] = `
`; -exports[`ErrorEmptyHandler should display the error-message 1`] = ` +exports[`ErrorEmptyHandler displays the error-message 1`] = `
diff --git a/__tests__/components/__snapshots__/ErrorHandler-test.js.snap b/__tests__/components/__snapshots__/ErrorHandler-test.js.snap index 661636c..2c83fb8 100644 --- a/__tests__/components/__snapshots__/ErrorHandler-test.js.snap +++ b/__tests__/components/__snapshots__/ErrorHandler-test.js.snap @@ -1,8 +1,8 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`ErrorHandler should return null when called without errorMessage and component 1`] = `null`; +exports[`ErrorHandler returns null when called without errorMessage and component 1`] = `null`; -exports[`ErrorHandler should return the ErrorComponent 1`] = ` +exports[`ErrorHandler returns the ErrorComponent 1`] = `

@@ -10,7 +10,7 @@ exports[`ErrorHandler should return the ErrorComponent 1`] = `

`; -exports[`ErrorHandler should return the ErrorMessage when called without ErrorComponent 1`] = ` +exports[`ErrorHandler returns the ErrorMessage when called without ErrorComponent 1`] = `
@@ -18,7 +18,7 @@ exports[`ErrorHandler should return the ErrorMessage when called without ErrorCo
`; -exports[`ErrorHandler should return the component when called without errorMessage 1`] = ` +exports[`ErrorHandler returns the component when called without errorMessage 1`] = `

Test

diff --git a/__tests__/components/__snapshots__/Handler-test.js.snap b/__tests__/components/__snapshots__/Handler-test.js.snap index 4c93488..4ae9b96 100644 --- a/__tests__/components/__snapshots__/Handler-test.js.snap +++ b/__tests__/components/__snapshots__/Handler-test.js.snap @@ -1,28 +1,28 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Handler should only return the Component, when loading and showComponentWhileLoading is false 1`] = ` +exports[`Handler returns only the loading-message when showComponentWhileLoading is false 1`] = `
-
- Test +
+ loading...
`; -exports[`Handler should only return the loading-message, wen showComponentWhileLoading is false 1`] = ` +exports[`Handler returns the Component when loading and showComponentWhileLoading is false 1`] = `
-
- loading... +
+ Test
`; -exports[`Handler should return the loading-message and the component 1`] = ` +exports[`Handler returns the loading-message and the component 1`] = `
diff --git a/__tests__/components/__snapshots__/LoadingHandler-test.js.snap b/__tests__/components/__snapshots__/LoadingHandler-test.js.snap index cc1646b..e69e9e0 100644 --- a/__tests__/components/__snapshots__/LoadingHandler-test.js.snap +++ b/__tests__/components/__snapshots__/LoadingHandler-test.js.snap @@ -1,15 +1,15 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`LoadingHandler should return null when called with loading false and no component 1`] = `null`; +exports[`LoadingHandler returns null when called with loading false and no component 1`] = `null`; -exports[`LoadingHandler should return the LoadingComponent 1`] = ` +exports[`LoadingHandler returns the LoadingComponent 1`] = ` loading... `; -exports[`LoadingHandler should return the LoadingMessage when called without LoadingComponent 1`] = ` +exports[`LoadingHandler returns the LoadingMessage when called without LoadingComponent 1`] = `
@@ -17,7 +17,7 @@ exports[`LoadingHandler should return the LoadingMessage when called without Loa
`; -exports[`LoadingHandler should return the LoadingMessage with given loading message 1`] = ` +exports[`LoadingHandler returns the LoadingMessage with given loading message 1`] = `
@@ -25,7 +25,7 @@ exports[`LoadingHandler should return the LoadingMessage with given loading mess
`; -exports[`LoadingHandler should return the component when called with loading false 1`] = ` +exports[`LoadingHandler returns the component when called with loading false 1`] = `

Test

diff --git a/__tests__/index.js b/__tests__/index.js index 37aa09e..5b46f34 100644 --- a/__tests__/index.js +++ b/__tests__/index.js @@ -1,11 +1,11 @@ -import Handler, * as SupHandlers from '../src'; +import Handler, * as SupHandlers from '../src' describe('react-handler', () => { - it('should contain the Handler-Component', () => { - expect(Handler).toMatchSnapshot(); - }); + test('contains the Handler-Component', () => { + expect(Handler).toMatchSnapshot() + }) - it('should contain the SupHandler´s', () => { - expect(SupHandlers).toMatchSnapshot(); - }); -}); + test('contains the the SupHandler´s', () => { + expect(SupHandlers).toMatchSnapshot() + }) +}) diff --git a/package.json b/package.json index 87fec00..a79da84 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "build:umd": "cross-env BABEL_ENV=commonjs NODE_ENV=development webpack src/index.js dist/react-handler.js", "build:umd-min": "cross-env BABEL_ENV=commonjs NODE_ENV=production webpack src/index.js dist/react-handler.min.js", "clean": "rimraf es dist lib coverage", - "lint": "eslint --format=node_modules/eslint-formatter-pretty .", + "lint": "standard --verbose | snazzy", "prepublish": "npm run test && npm run clean && npm run build", "test": "npm run lint && npm run test:unit", "test:unit": "jest --coverage" @@ -44,16 +44,12 @@ "babel-preset-es2015": "^6.18.0", "babel-preset-react": "^6.16.0", "cross-env": "^4.0.0", - "eslint": "^3.15.0", - "eslint-config-airbnb": "^14.1.0", - "eslint-formatter-pretty": "1.1.0", - "eslint-plugin-import": "^2.2.0", - "eslint-plugin-jsx-a11y": "^4.0.0", - "eslint-plugin-react": "^6.9.0", "jest": "^19.0.1", "react": "^15.4.1", "react-test-renderer": "^15.4.1", "rimraf": "^2.5.4", + "snazzy": "^6.0.0", + "standard": "^9.0.2", "webpack": "^2.3.0" }, "peerDependencies": { @@ -72,5 +68,10 @@ "eslint-plugin-jsx-a11y", "eslint-plugin-react" ] + }, + "standard": { + "env": { + "jest": true + } } } diff --git a/src/components/EmptyHandler.js b/src/components/EmptyHandler.js index 7c8096d..ca7b55f 100644 --- a/src/components/EmptyHandler.js +++ b/src/components/EmptyHandler.js @@ -1,4 +1,4 @@ -import React, { PropTypes } from 'react'; +import React, { PropTypes } from 'react' /** * This Mini-Handler handles only the empty-state @@ -7,26 +7,26 @@ import React, { PropTypes } from 'react'; const EmptyHandler = ({ message, checkedProperty, EmptyComponent, children }) => { if (!(checkedProperty && checkedProperty.length)) { if (EmptyComponent) { - return {message}; + return {message} } - return
{message}
; + return
{message}
} - return children; -}; + return children +} EmptyHandler.propTypes = { message: PropTypes.string.isRequired, checkedProperty: PropTypes.any, EmptyComponent: PropTypes.func, - children: PropTypes.node, -}; + children: PropTypes.node +} EmptyHandler.defaultProps = { checkedProperty: null, EmptyComponent: null, - children: null, -}; + children: null +} -export default EmptyHandler; +export default EmptyHandler diff --git a/src/components/ErrorEmptyHandler.js b/src/components/ErrorEmptyHandler.js index ea65eee..3a1bf16 100644 --- a/src/components/ErrorEmptyHandler.js +++ b/src/components/ErrorEmptyHandler.js @@ -1,6 +1,6 @@ -import React, { PropTypes } from 'react'; -import EmptyHandler from './EmptyHandler'; -import ErrorHandler from './ErrorHandler'; +import React, { PropTypes } from 'react' +import EmptyHandler from './EmptyHandler' +import ErrorHandler from './ErrorHandler' /** * This Sub-Handler combines the Error and Empty-Handler @@ -11,7 +11,7 @@ const ErrorEmptyHandler = ({ emptyMessage, checkedProperty, EmptyComponent, - children, + children }) => ( -); +) ErrorEmptyHandler.propTypes = { ErrorComponent: PropTypes.func, @@ -30,14 +30,14 @@ ErrorEmptyHandler.propTypes = { errorMessage: PropTypes.string, emptyMessage: PropTypes.string.isRequired, checkedProperty: PropTypes.any, - children: PropTypes.node.isRequired, -}; + children: PropTypes.node.isRequired +} ErrorEmptyHandler.defaultProps = { ErrorComponent: null, EmptyComponent: null, errorMessage: null, - checkedProperty: null, -}; + checkedProperty: null +} -export default ErrorEmptyHandler; +export default ErrorEmptyHandler diff --git a/src/components/ErrorHandler.js b/src/components/ErrorHandler.js index b8a24f0..15f1160 100644 --- a/src/components/ErrorHandler.js +++ b/src/components/ErrorHandler.js @@ -1,4 +1,4 @@ -import React, { PropTypes } from 'react'; +import React, { PropTypes } from 'react' /** * This Mini-Handler handles only the error-state @@ -7,25 +7,25 @@ import React, { PropTypes } from 'react'; const ErrorHandler = ({ message, ErrorComponent, children }) => { if (message) { if (ErrorComponent) { - return {message}; + return {message} } - return
{message}
; + return
{message}
} - return children; -}; + return children +} ErrorHandler.propTypes = { message: PropTypes.string, ErrorComponent: PropTypes.func, - children: PropTypes.node, -}; + children: PropTypes.node +} ErrorHandler.defaultProps = { message: null, ErrorComponent: null, - children: null, -}; + children: null +} -export default ErrorHandler; +export default ErrorHandler diff --git a/src/components/Handler.js b/src/components/Handler.js index 0cca51d..38d51ee 100644 --- a/src/components/Handler.js +++ b/src/components/Handler.js @@ -1,6 +1,6 @@ -import React, { PropTypes } from 'react'; -import ErrorEmptyHandler from './ErrorEmptyHandler'; -import LoadingHandler from './LoadingHandler'; +import React, { PropTypes } from 'react' +import ErrorEmptyHandler from './ErrorEmptyHandler' +import LoadingHandler from './LoadingHandler' /** * The Handler handles loading, error and empty state @@ -12,12 +12,12 @@ const Handler = (props) => { loadingMessage, children, loading, - showComponentWhileLoading, - } = props; + showComponentWhileLoading + } = props if (showComponentWhileLoading) { return ( -
+
{ {children}
- ); + ) } return ( -
+
{
- ); -}; + ) +} Handler.propTypes = { LoadingComponent: PropTypes.func, loadingMessage: PropTypes.string, loading: PropTypes.bool, showComponentWhileLoading: PropTypes.bool, - children: PropTypes.node.isRequired, -}; + children: PropTypes.node.isRequired +} Handler.defaultProps = { LoadingComponent: null, loadingMessage: undefined, loading: true, - showComponentWhileLoading: true, -}; + showComponentWhileLoading: true +} -export default Handler; +export default Handler diff --git a/src/components/LoadingHandler.js b/src/components/LoadingHandler.js index 95cadfd..dcf9f2c 100644 --- a/src/components/LoadingHandler.js +++ b/src/components/LoadingHandler.js @@ -1,4 +1,4 @@ -import React, { PropTypes } from 'react'; +import React, { PropTypes } from 'react' /** * This Mini-Handler handles only the loading-state @@ -6,24 +6,24 @@ import React, { PropTypes } from 'react'; */ const LoadingHandler = ({ LoadingComponent, children, loading, message }) => { if (loading) { - return LoadingComponent ? :
{message}
; + return LoadingComponent ? :
{message}
} - return children; -}; + return children +} LoadingHandler.propTypes = { LoadingComponent: PropTypes.func, children: PropTypes.node, loading: PropTypes.bool, - message: PropTypes.string, -}; + message: PropTypes.string +} LoadingHandler.defaultProps = { LoadingComponent: null, children: null, loading: true, - message: 'loading...', -}; + message: 'loading...' +} -export default LoadingHandler; +export default LoadingHandler diff --git a/src/index.js b/src/index.js index cfc17f5..2f9766f 100644 --- a/src/index.js +++ b/src/index.js @@ -1,13 +1,13 @@ -import Handler from './components/Handler'; -import EmptyHandler from './components/EmptyHandler'; -import ErrorHandler from './components/ErrorHandler'; -import ErrorEmptyHandler from './components/ErrorEmptyHandler'; -import LoadingHandler from './components/LoadingHandler'; +import Handler from './components/Handler' +import EmptyHandler from './components/EmptyHandler' +import ErrorHandler from './components/ErrorHandler' +import ErrorEmptyHandler from './components/ErrorEmptyHandler' +import LoadingHandler from './components/LoadingHandler' -export default Handler; +export default Handler export { EmptyHandler, ErrorHandler, ErrorEmptyHandler, - LoadingHandler, -}; + LoadingHandler +} diff --git a/webpack.config.js b/webpack.config.js index fa8fe0e..acbc8d7 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,33 +1,32 @@ -// eslint-disable-next-line import/no-extraneous-dependencies -const webpack = require('webpack'); +const webpack = require('webpack') -const env = process.env.NODE_ENV; +const env = process.env.NODE_ENV const config = { module: { loaders: [ - { test: /\.js$/, loaders: ['babel-loader'], exclude: /node_modules/ }, - ], + { test: /\.js$/, loaders: ['babel-loader'], exclude: /node_modules/ } + ] }, output: { library: 'react-handler', - libraryTarget: 'umd', + libraryTarget: 'umd' }, plugins: [ new webpack.optimize.OccurrenceOrderPlugin(), new webpack.DefinePlugin({ - 'process.env.NODE_ENV': JSON.stringify(env), - }), + 'process.env.NODE_ENV': JSON.stringify(env) + }) ], externals: { react: { root: 'React', commonjs2: 'react', commonjs: 'react', - amd: 'react', - }, - }, -}; + amd: 'react' + } + } +} if (env === 'production') { const uglifyJS = new webpack.optimize.UglifyJsPlugin({ @@ -35,11 +34,11 @@ if (env === 'production') { pure_getters: true, unsafe: true, unsafe_comps: true, - warnings: false, - }, - }); + warnings: false + } + }) - config.plugins.push(uglifyJS); + config.plugins.push(uglifyJS) } -module.exports = config; +module.exports = config diff --git a/yarn.lock b/yarn.lock index e68c35d..a457b8f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -22,20 +22,24 @@ acorn-globals@^3.1.0: dependencies: acorn "^4.0.4" -acorn-jsx@^3.0.0, acorn-jsx@^3.0.1: +acorn-jsx@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b" dependencies: acorn "^3.0.4" -acorn@4.0.4, acorn@^4.0.3, acorn@^4.0.4: - version "4.0.4" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.4.tgz#17a8d6a7a6c4ef538b814ec9abac2779293bf30a" - acorn@^3.0.4: version "3.3.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" +acorn@^4.0.3, acorn@^4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.4.tgz#17a8d6a7a6c4ef538b814ec9abac2779293bf30a" + +acorn@^5.0.1: + version "5.0.3" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.0.3.tgz#c460df08491463f028ccb82eab3730bf01087b3d" + ajv-keywords@^1.0.0, ajv-keywords@^1.1.1: version "1.5.0" resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.0.tgz#c11e6859eafff83e0dafc416929472eca946aa2c" @@ -107,12 +111,6 @@ argparse@^1.0.7: dependencies: sprintf-js "~1.0.2" -aria-query@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-0.3.0.tgz#cb8a9984e2862711c83c80ade5b8f5ca0de2b467" - dependencies: - ast-types-flow "0.0.7" - arr-diff@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" @@ -142,11 +140,11 @@ array-unique@^0.2.1: resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" array.prototype.find@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/array.prototype.find/-/array.prototype.find-2.0.1.tgz#1557f888df6c57e4d1256f20852d687a25b51fde" + version "2.0.4" + resolved "https://registry.yarnpkg.com/array.prototype.find/-/array.prototype.find-2.0.4.tgz#556a5c5362c08648323ddaeb9de9d14bc1864c90" dependencies: define-properties "^1.1.2" - es-abstract "^1.5.0" + es-abstract "^1.7.0" arrify@^1.0.0, arrify@^1.0.1: version "1.0.1" @@ -182,10 +180,6 @@ assert@^1.1.1: dependencies: util "0.10.3" -ast-types-flow@0.0.7: - version "0.0.7" - resolved "https://registry.yarnpkg.com/ast-types-flow/-/ast-types-flow-0.0.7.tgz#f70b735c6bca1a5c9c22d982c3e39e7feba3bdad" - async-each@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" @@ -200,10 +194,6 @@ async@^2.1.2, async@^2.1.4: dependencies: lodash "^4.14.0" -async@~0.2.6: - version "0.2.10" - resolved "https://registry.yarnpkg.com/async/-/async-0.2.10.tgz#b6bbe0b0674b9d719708ca38de8c237cb526c3d1" - asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" @@ -931,7 +921,7 @@ buffer@^4.3.0: ieee754 "^1.1.4" isarray "^1.0.0" -builtin-modules@^1.0.0, builtin-modules@^1.1.1: +builtin-modules@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" @@ -1075,7 +1065,7 @@ concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" -concat-stream@^1.4.6: +concat-stream@^1.5.0, concat-stream@^1.5.2: version "1.6.0" resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7" dependencies: @@ -1097,10 +1087,6 @@ constants-browserify@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" -contains-path@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/contains-path/-/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a" - content-type-parser@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/content-type-parser/-/content-type-parser-1.0.1.tgz#c3e56988c53c65127fb46d4032a3a900246fdc94" @@ -1190,15 +1176,11 @@ cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0": dependencies: cssom "0.3.x" -d@^0.1.1, d@~0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/d/-/d-0.1.1.tgz#da184c535d18d8ee7ba2aa229b914009fae11309" +d@1: + version "1.0.0" + resolved "https://registry.yarnpkg.com/d/-/d-1.0.0.tgz#754bb5bfe55451da69a58b94d45f4c5b0462d58f" dependencies: - es5-ext "~0.10.2" - -damerau-levenshtein@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/damerau-levenshtein/-/damerau-levenshtein-1.0.3.tgz#ae4f4ce0b62acae10ff63a01bb08f652f5213af2" + es5-ext "^0.10.9" dashdash@^1.12.0: version "1.14.1" @@ -1210,11 +1192,9 @@ date-now@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" -debug@2.2.0, debug@~2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da" - dependencies: - ms "0.7.1" +debug-log@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/debug-log/-/debug-log-1.0.1.tgz#2307632d4c04382b8df8a32f70b895046d52745f" debug@^2.1.1, debug@^2.2.0: version "2.6.0" @@ -1222,6 +1202,12 @@ debug@^2.1.1, debug@^2.2.0: dependencies: ms "0.7.2" +debug@~2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da" + dependencies: + ms "0.7.1" + decamelize@^1.0.0, decamelize@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" @@ -1247,6 +1233,17 @@ define-properties@^1.1.2: foreach "^2.0.5" object-keys "^1.0.8" +deglob@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/deglob/-/deglob-2.1.0.tgz#4d44abe16ef32c779b4972bd141a80325029a14a" + dependencies: + find-root "^1.0.0" + glob "^7.0.5" + ignore "^3.0.9" + pkg-config "^1.1.0" + run-parallel "^1.1.2" + uniq "^1.0.1" + del@^2.0.2: version "2.2.2" resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8" @@ -1292,13 +1289,20 @@ diffie-hellman@^5.0.0: miller-rabin "^4.0.0" randombytes "^2.0.0" -doctrine@1.5.0, doctrine@^1.2.2: +doctrine@^1.2.2: version "1.5.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" dependencies: esutils "^2.0.2" isarray "^1.0.0" +doctrine@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.0.0.tgz#c73d8d2909d22291e1a007a395804da8b665fe63" + dependencies: + esutils "^2.0.2" + isarray "^1.0.0" + domain-browser@^1.1.1: version "1.1.7" resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.1.7.tgz#867aa4b093faa05f1de08c06f4d7b21fdf8698bc" @@ -1321,10 +1325,6 @@ elliptic@^6.0.0: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.0" -emoji-regex@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-6.1.0.tgz#d14ef743a7dfa6eaf436882bd1920a4aed84dd94" - emojis-list@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" @@ -1356,9 +1356,9 @@ error-ex@^1.2.0: dependencies: is-arrayish "^0.2.1" -es-abstract@^1.5.0: - version "1.6.1" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.6.1.tgz#bb8a2064120abcf928a086ea3d9043114285ec99" +es-abstract@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.7.0.tgz#dfade774e01bfcd97f96180298c449c8623fb94c" dependencies: es-to-primitive "^1.1.1" function-bind "^1.1.0" @@ -1373,57 +1373,57 @@ es-to-primitive@^1.1.1: is-date-object "^1.0.1" is-symbol "^1.0.1" -es5-ext@^0.10.7, es5-ext@^0.10.8, es5-ext@~0.10.11, es5-ext@~0.10.2, es5-ext@~0.10.7: - version "0.10.12" - resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.12.tgz#aa84641d4db76b62abba5e45fd805ecbab140047" +es5-ext@^0.10.14, es5-ext@^0.10.9, es5-ext@~0.10.14: + version "0.10.15" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.15.tgz#c330a5934c1ee21284a7c081a86e5fd937c91ea6" dependencies: es6-iterator "2" es6-symbol "~3.1" -es6-iterator@2: - version "2.0.0" - resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.0.tgz#bd968567d61635e33c0b80727613c9cb4b096bac" +es6-iterator@2, es6-iterator@^2.0.1, es6-iterator@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.1.tgz#8e319c9f0453bf575d374940a655920e59ca5512" dependencies: - d "^0.1.1" - es5-ext "^0.10.7" - es6-symbol "3" + d "1" + es5-ext "^0.10.14" + es6-symbol "^3.1" es6-map@^0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/es6-map/-/es6-map-0.1.4.tgz#a34b147be224773a4d7da8072794cefa3632b897" + version "0.1.5" + resolved "https://registry.yarnpkg.com/es6-map/-/es6-map-0.1.5.tgz#9136e0503dcc06a301690f0bb14ff4e364e949f0" dependencies: - d "~0.1.1" - es5-ext "~0.10.11" - es6-iterator "2" - es6-set "~0.1.3" - es6-symbol "~3.1.0" - event-emitter "~0.3.4" + d "1" + es5-ext "~0.10.14" + es6-iterator "~2.0.1" + es6-set "~0.1.5" + es6-symbol "~3.1.1" + event-emitter "~0.3.5" -es6-set@~0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.4.tgz#9516b6761c2964b92ff479456233a247dc707ce8" +es6-set@~0.1.5: + version "0.1.5" + resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.5.tgz#d2b3ec5d4d800ced818db538d28974db0a73ccb1" dependencies: - d "~0.1.1" - es5-ext "~0.10.11" - es6-iterator "2" - es6-symbol "3" - event-emitter "~0.3.4" + d "1" + es5-ext "~0.10.14" + es6-iterator "~2.0.1" + es6-symbol "3.1.1" + event-emitter "~0.3.5" -es6-symbol@3, es6-symbol@~3.1, es6-symbol@~3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.0.tgz#94481c655e7a7cad82eba832d97d5433496d7ffa" +es6-symbol@3.1.1, es6-symbol@^3.1, es6-symbol@^3.1.1, es6-symbol@~3.1, es6-symbol@~3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77" dependencies: - d "~0.1.1" - es5-ext "~0.10.11" + d "1" + es5-ext "~0.10.14" es6-weak-map@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.1.tgz#0d2bbd8827eb5fb4ba8f97fbfea50d43db21ea81" + version "2.0.2" + resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.2.tgz#5e3ab32251ffd1538a1f8e5ffa1357772f92d96f" dependencies: - d "^0.1.1" - es5-ext "^0.10.8" - es6-iterator "2" - es6-symbol "3" + d "1" + es5-ext "^0.10.14" + es6-iterator "^2.0.1" + es6-symbol "^3.1.1" escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: version "1.0.5" @@ -1449,68 +1449,19 @@ escope@^3.6.0: esrecurse "^4.1.0" estraverse "^4.1.1" -eslint-config-airbnb-base@^11.1.0: - version "11.1.0" - resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-11.1.0.tgz#dc9b3ec70b8c74dcbe6d6257c9da3992c39ca2ca" - -eslint-config-airbnb@^14.1.0: - version "14.1.0" - resolved "https://registry.yarnpkg.com/eslint-config-airbnb/-/eslint-config-airbnb-14.1.0.tgz#355d290040bbf8e00bf8b4b19f4b70cbe7c2317f" - dependencies: - eslint-config-airbnb-base "^11.1.0" - -eslint-formatter-pretty@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/eslint-formatter-pretty/-/eslint-formatter-pretty-1.1.0.tgz#ab4d06da02fed8c13ae9f0dc540a433ef7ed6f5e" - dependencies: - ansi-escapes "^1.4.0" - chalk "^1.1.3" - log-symbols "^1.0.2" - plur "^2.1.2" - string-width "^2.0.0" - -eslint-import-resolver-node@^0.2.0: - version "0.2.3" - resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.2.3.tgz#5add8106e8c928db2cba232bcd9efa846e3da16c" - dependencies: - debug "^2.2.0" - object-assign "^4.0.1" - resolve "^1.1.6" - -eslint-module-utils@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.0.0.tgz#a6f8c21d901358759cdc35dbac1982ae1ee58bce" - dependencies: - debug "2.2.0" - pkg-dir "^1.0.0" +eslint-config-standard-jsx@3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/eslint-config-standard-jsx/-/eslint-config-standard-jsx-3.3.0.tgz#cab0801a15a360bf63facb97ab22fbdd88d8a5e0" -eslint-plugin-import@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.2.0.tgz#72ba306fad305d67c4816348a4699a4229ac8b4e" - dependencies: - builtin-modules "^1.1.1" - contains-path "^0.1.0" - debug "^2.2.0" - doctrine "1.5.0" - eslint-import-resolver-node "^0.2.0" - eslint-module-utils "^2.0.0" - has "^1.0.1" - lodash.cond "^4.3.0" - minimatch "^3.0.3" - pkg-up "^1.0.0" +eslint-config-standard@7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-7.1.0.tgz#47e769ea0739f5b2d5693b1a501c21c9650fafcf" -eslint-plugin-jsx-a11y@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-4.0.0.tgz#779bb0fe7b08da564a422624911de10061e048ee" - dependencies: - aria-query "^0.3.0" - ast-types-flow "0.0.7" - damerau-levenshtein "^1.0.0" - emoji-regex "^6.1.0" - jsx-ast-utils "^1.0.0" - object-assign "^4.0.1" +eslint-plugin-promise@~3.4.0: + version "3.4.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-3.4.2.tgz#1be2793eafe2d18b5b123b8136c269f804fe7122" -eslint-plugin-react@^6.9.0: +eslint-plugin-react@~6.9.0: version "6.9.0" resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-6.9.0.tgz#54c2e9906b76f9d10142030bdc34e9d6840a0bb2" dependencies: @@ -1518,17 +1469,22 @@ eslint-plugin-react@^6.9.0: doctrine "^1.2.2" jsx-ast-utils "^1.3.4" -eslint@^3.15.0: - version "3.15.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-3.15.0.tgz#bdcc6a6c5ffe08160e7b93c066695362a91e30f2" +eslint-plugin-standard@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-standard/-/eslint-plugin-standard-2.0.1.tgz#3589699ff9c917f2c25f76a916687f641c369ff3" + +eslint@~3.18.0: + version "3.18.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-3.18.0.tgz#647e985c4ae71502d20ac62c109f66d5104c8a4b" dependencies: babel-code-frame "^6.16.0" chalk "^1.1.3" - concat-stream "^1.4.6" + concat-stream "^1.5.2" debug "^2.1.1" - doctrine "^1.2.2" + doctrine "^2.0.0" escope "^3.6.0" espree "^3.4.0" + esquery "^1.0.0" estraverse "^4.2.0" esutils "^2.0.2" file-entry-cache "^2.0.0" @@ -1558,16 +1514,22 @@ eslint@^3.15.0: user-home "^2.0.0" espree@^3.4.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/espree/-/espree-3.4.0.tgz#41656fa5628e042878025ef467e78f125cb86e1d" + version "3.4.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-3.4.1.tgz#28a83ab4aaed71ed8fe0f5efe61b76a05c13c4d2" dependencies: - acorn "4.0.4" + acorn "^5.0.1" acorn-jsx "^3.0.0" esprima@^2.6.0, esprima@^2.7.1: version "2.7.3" resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" +esquery@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.0.tgz#cfba8b57d7fba93f17298a8a006a04cda13d80fa" + dependencies: + estraverse "^4.0.0" + esrecurse@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.1.0.tgz#4713b6536adf7f2ac4f327d559e7756bff648220" @@ -1579,7 +1541,7 @@ estraverse@^1.9.1: version "1.9.3" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44" -estraverse@^4.1.1, estraverse@^4.2.0: +estraverse@^4.0.0, estraverse@^4.1.1, estraverse@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" @@ -1591,12 +1553,12 @@ esutils@^2.0.0, esutils@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" -event-emitter@~0.3.4: - version "0.3.4" - resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.4.tgz#8d63ddfb4cfe1fae3b32ca265c4c720222080bb5" +event-emitter@~0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" dependencies: - d "~0.1.1" - es5-ext "~0.10.7" + d "1" + es5-ext "~0.10.14" events@^1.0.0: version "1.1.1" @@ -1715,6 +1677,10 @@ find-cache-dir@^0.1.1: mkdirp "^0.5.1" pkg-dir "^1.0.0" +find-root@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/find-root/-/find-root-1.0.0.tgz#962ff211aab25c6520feeeb8d6287f8f6e95807a" + find-up@^1.0.0, find-up@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" @@ -1722,7 +1688,7 @@ find-up@^1.0.0, find-up@^1.1.2: path-exists "^2.0.0" pinkie-promise "^2.0.0" -find-up@^2.1.0: +find-up@^2.0.0, find-up@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" dependencies: @@ -1827,6 +1793,10 @@ get-caller-file@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5" +get-stdin@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-5.0.1.tgz#122e161591e21ff4c52530305693f20e6393a398" + getpass@^0.1.1: version "0.1.6" resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.6.tgz#283ffd9fc1256840875311c1b60e8c40187110e6" @@ -1987,9 +1957,9 @@ ieee754@^1.1.4: version "1.1.8" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4" -ignore@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.2.0.tgz#8d88f03c3002a0ac52114db25d2c673b0bf1e435" +ignore@^3.0.9, ignore@^3.2.0: + version "3.2.6" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.2.6.tgz#26e8da0644be0bb4cb39516f6c79f0e0f4ffe48c" imurmurhash@^0.1.4: version "0.1.4" @@ -2050,10 +2020,6 @@ invert-kv@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" -irregular-plurals@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/irregular-plurals/-/irregular-plurals-1.2.0.tgz#38f299834ba8c00c30be9c554e137269752ff3ac" - is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" @@ -2172,8 +2138,10 @@ is-property@^1.0.0: resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" is-regex@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.3.tgz#0d55182bddf9f2fde278220aec3a75642c908637" + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491" + dependencies: + has "^1.0.1" is-resolvable@^1.0.0: version "1.0.0" @@ -2583,11 +2551,10 @@ jsprim@^1.2.2: json-schema "0.2.3" verror "1.3.6" -jsx-ast-utils@^1.0.0, jsx-ast-utils@^1.3.4: - version "1.3.5" - resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-1.3.5.tgz#9ba6297198d9f754594d62e59496ffb923778dd4" +jsx-ast-utils@^1.3.4: + version "1.4.0" + resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-1.4.0.tgz#5afe38868f56bc8cc7aeaef0100ba8c75bd12591" dependencies: - acorn-jsx "^3.0.1" object-assign "^4.1.0" kind-of@^3.0.2: @@ -2627,6 +2594,15 @@ load-json-file@^1.0.0: pinkie-promise "^2.0.0" strip-bom "^2.0.0" +load-json-file@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8" + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + strip-bom "^3.0.0" + loader-runner@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.3.0.tgz#f482aea82d543e07921700d5a46ef26fdac6b8a2" @@ -2647,10 +2623,6 @@ locate-path@^2.0.0: p-locate "^2.0.0" path-exists "^3.0.0" -lodash.cond@^4.3.0: - version "4.5.2" - resolved "https://registry.yarnpkg.com/lodash.cond/-/lodash.cond-4.5.2.tgz#f471a1da486be60f6ab955d17115523dd1d255d5" - lodash.pickby@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash.pickby/-/lodash.pickby-4.6.0.tgz#7dea21d8c18d7703a27c704c15d3b84a67e33aff" @@ -2659,12 +2631,6 @@ lodash@^4.0.0, lodash@^4.14.0, lodash@^4.2.0, lodash@^4.3.0: version "4.17.4" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" -log-symbols@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-1.0.2.tgz#376ff7b58ea3086a0f09facc74617eca501e1a18" - dependencies: - chalk "^1.0.0" - longest@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" @@ -2752,7 +2718,7 @@ minimist@0.0.8, minimist@~0.0.1: version "0.0.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" -minimist@^1.1.1, minimist@^1.2.0: +minimist@^1.1.0, minimist@^1.1.1, minimist@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" @@ -3056,23 +3022,26 @@ pinkie@^2.0.0: version "2.0.4" resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" -pkg-dir@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-1.0.0.tgz#7a4b508a8d5bb2d629d447056ff4e9c9314cf3d4" +pkg-conf@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/pkg-conf/-/pkg-conf-2.0.0.tgz#071c87650403bccfb9c627f58751bfe47c067279" dependencies: - find-up "^1.0.0" + find-up "^2.0.0" + load-json-file "^2.0.0" -pkg-up@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-1.0.0.tgz#3e08fb461525c4421624a33b9f7e6d0af5b05a26" +pkg-config@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/pkg-config/-/pkg-config-1.1.1.tgz#557ef22d73da3c8837107766c52eadabde298fe4" dependencies: - find-up "^1.0.0" + debug-log "^1.0.0" + find-root "^1.0.0" + xtend "^4.0.1" -plur@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/plur/-/plur-2.1.2.tgz#7482452c1a0f508e3e344eaec312c91c29dc655a" +pkg-dir@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-1.0.0.tgz#7a4b508a8d5bb2d629d447056ff4e9c9314cf3d4" dependencies: - irregular-plurals "^1.0.0" + find-up "^1.0.0" pluralize@^1.2.1: version "1.2.1" @@ -3202,7 +3171,7 @@ read-pkg@^1.0.0: normalize-package-data "^2.3.2" path-type "^1.0.0" -"readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.1.0, readable-stream@^2.2.2: +"readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.0, readable-stream@^2.2.2: version "2.2.2" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.2.tgz#a9e6fec3c7dda85f8bb1b3ba7028604556fc825e" dependencies: @@ -3385,6 +3354,10 @@ run-async@^0.1.0: dependencies: once "^1.3.0" +run-parallel@^1.1.2: + version "1.1.6" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.1.6.tgz#29003c9a2163e01e2d2dfc90575f2c6c1d61a039" + rx-lite@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-3.1.2.tgz#19ce502ca572665f3b647b10939f97fd1615f102" @@ -3438,8 +3411,8 @@ shebang-regex@^1.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" shelljs@^0.7.5: - version "0.7.6" - resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.6.tgz#379cccfb56b91c8601e4793356eb5382924de9ad" + version "0.7.7" + resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.7.tgz#b2f5c77ef97148f4b4f6e22682e10bba8667cff1" dependencies: glob "^7.0.0" interpret "^1.0.0" @@ -3461,6 +3434,18 @@ slice-ansi@0.0.4: version "0.0.4" resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35" +snazzy@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/snazzy/-/snazzy-6.0.0.tgz#6a17d4798cbbc8bc6e113153694907a8bac9494d" + dependencies: + chalk "^1.1.0" + inherits "^2.0.1" + minimist "^1.1.1" + readable-stream "^2.0.6" + standard "*" + standard-json "^1.0.0" + text-table "^0.2.0" + sntp@1.x.x: version "1.0.9" resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" @@ -3526,6 +3511,34 @@ sshpk@^1.7.0: jsbn "~0.1.0" tweetnacl "~0.14.0" +standard-engine@~5.4.0: + version "5.4.0" + resolved "https://registry.yarnpkg.com/standard-engine/-/standard-engine-5.4.0.tgz#e0e86959ea0786425d3383e40c1bf70d2f985579" + dependencies: + deglob "^2.1.0" + get-stdin "^5.0.1" + home-or-tmp "^2.0.0" + minimist "^1.1.0" + pkg-conf "^2.0.0" + +standard-json@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/standard-json/-/standard-json-1.0.2.tgz#82dea4a14c78cd9e35d38cde4b88ac6b62596a23" + dependencies: + concat-stream "^1.5.0" + +standard@*, standard@^9.0.2: + version "9.0.2" + resolved "https://registry.yarnpkg.com/standard/-/standard-9.0.2.tgz#9bd3b9467492e212b1914d78553943ff9b48fd99" + dependencies: + eslint "~3.18.0" + eslint-config-standard "7.1.0" + eslint-config-standard-jsx "3.3.0" + eslint-plugin-promise "~3.4.0" + eslint-plugin-react "~6.9.0" + eslint-plugin-standard "~2.0.1" + standard-engine "~5.4.0" + stream-browserify@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.1.tgz#66266ee5f9bdb9940a4e4514cafb43bb71e5c9db" @@ -3670,7 +3683,7 @@ test-exclude@^4.0.0: read-pkg-up "^1.0.1" require-main-filename "^1.0.1" -text-table@~0.2.0: +text-table@^0.2.0, text-table@~0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" @@ -3740,16 +3753,7 @@ ua-parser-js@^0.7.9: version "0.7.12" resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.12.tgz#04c81a99bdd5dc52263ea29d24c6bf8d4818a4bb" -uglify-js@^2.6: - version "2.7.5" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.7.5.tgz#4612c0c7baaee2ba7c487de4904ae122079f2ca8" - dependencies: - async "~0.2.6" - source-map "~0.5.1" - uglify-to-browserify "~1.0.0" - yargs "~3.10.0" - -uglify-js@^2.8.5: +uglify-js@^2.6, uglify-js@^2.8.5: version "2.8.20" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.20.tgz#be87100fbc18de3876ed606e9d24b4568311cecf" dependencies: @@ -3766,6 +3770,10 @@ uid-number@~0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" +uniq@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" + url@^0.11.0: version "0.11.0" resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" @@ -3917,14 +3925,10 @@ window-size@0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" -wordwrap@0.0.2: +wordwrap@0.0.2, wordwrap@~0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" -wordwrap@~0.0.2: - version "0.0.3" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" - wordwrap@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" @@ -3957,7 +3961,7 @@ xml-name-validator@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-2.0.1.tgz#4d8b8f1eccd3419aa362061becef515e1e559635" -"xtend@>=4.0.0 <4.1.0-0", xtend@^4.0.0: +"xtend@>=4.0.0 <4.1.0-0", xtend@^4.0.0, xtend@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af"