diff --git a/.eslintrc.js b/.eslintrc.js
index 7d30b92..46306fd 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -55,7 +55,12 @@ module.exports = {
'jsx-a11y/role-has-required-aria-props': 2,
'jsx-a11y/role-supports-aria-props': 2,
'max-len': 0,
- 'newline-per-chained-call': 0,
+ 'newline-per-chained-call': [
+ 'error',
+ {
+ ignoreChainWithDepth: 3,
+ },
+ ],
'no-confusing-arrow': 0,
'no-console': 1,
'no-underscore-dangle': 0,
@@ -70,9 +75,11 @@ module.exports = {
'react/jsx-filename-extension': 0,
'react/jsx-no-target-blank': 0,
'react/jsx-uses-vars': 2,
+ 'react/jsx-props-no-spreading': 0,
'react/require-default-props': 0,
'react/require-extension': 0,
'react/self-closing-comp': 0,
+ 'react/state-in-constructor': 0,
'react/sort-comp': 0,
'require-yield': 0,
},
diff --git a/.prettierrc b/.prettierrc
index 2aa0504..650da5b 100644
--- a/.prettierrc
+++ b/.prettierrc
@@ -1,4 +1,5 @@
{
+ "arrowParens": "avoid",
"semi": false,
"singleQuote": true,
"tabWidth": 2,
diff --git a/.storybook/webpack.config.js b/.storybook/webpack.config.js
index 42ede5c..5676096 100644
--- a/.storybook/webpack.config.js
+++ b/.storybook/webpack.config.js
@@ -1,9 +1,9 @@
-module.exports = function({ config }) {
+module.exports = function ({ config }) {
config.module.rules.push({
test: /\.stories\.jsx?$/,
loaders: [
{
- loader: require.resolve('@storybook/addon-storysource/loader'),
+ loader: require.resolve('@storybook/source-loader'),
options: {
prettierConfig: {
semi: false,
diff --git a/app/components/Anchor/__snapshots__/Anchor.test.js.snap b/app/components/Anchor/__snapshots__/Anchor.test.js.snap
index 8de1709..af75266 100644
--- a/app/components/Anchor/__snapshots__/Anchor.test.js.snap
+++ b/app/components/Anchor/__snapshots__/Anchor.test.js.snap
@@ -101,7 +101,7 @@ exports[`Anchor renders and matches snapshot 1`] = `
stroke-width="2"
/>
-
Click Me
diff --git a/app/components/AutoSaveFormField/AutoSaveFormField.js b/app/components/AutoSaveFormField/AutoSaveFormField.js
index fe9ef09..908aefe 100644
--- a/app/components/AutoSaveFormField/AutoSaveFormField.js
+++ b/app/components/AutoSaveFormField/AutoSaveFormField.js
@@ -39,21 +39,41 @@ const AutoSaveFormField = ({ onSave, name, value, ...rest }) => {
const Status = () => {
if (success)
return (
-
+
)
if (error)
return (
-
+
)
diff --git a/app/components/AutoSaveFormField/__snapshots__/AutoSaveFormField.test.js.snap b/app/components/AutoSaveFormField/__snapshots__/AutoSaveFormField.test.js.snap
index efd5a0d..a53aeb2 100644
--- a/app/components/AutoSaveFormField/__snapshots__/AutoSaveFormField.test.js.snap
+++ b/app/components/AutoSaveFormField/__snapshots__/AutoSaveFormField.test.js.snap
@@ -3,32 +3,28 @@
exports[`AutoSaveFormField renders and matches snapshot 1`] = `
diff --git a/app/components/Avatar/Avatar.doc.js b/app/components/Avatar/Avatar.doc.js
index 888fc17..6776ec5 100644
--- a/app/components/Avatar/Avatar.doc.js
+++ b/app/components/Avatar/Avatar.doc.js
@@ -1,12 +1,10 @@
import { describe, PropTypes } from 'react-desc'
export const doc = Avatar => {
- const DocumentedAvatar = describe(Avatar)
- .description('A Avatar')
- .usage(
- `import { Avatar } from 'components/Avatar';
+ const DocumentedAvatar = describe(Avatar).description('A Avatar').usage(
+ `import { Avatar } from 'components/Avatar';
`,
- )
+ )
DocumentedAvatar.propTypes = {
id: PropTypes.string
diff --git a/app/components/Avatar/__snapshots__/Avatar.test.js.snap b/app/components/Avatar/__snapshots__/Avatar.test.js.snap
index 283af50..ad78911 100644
--- a/app/components/Avatar/__snapshots__/Avatar.test.js.snap
+++ b/app/components/Avatar/__snapshots__/Avatar.test.js.snap
@@ -3,10 +3,10 @@
exports[`Avatar renders and matches snapshot 1`] = `
diff --git a/app/components/Box/stories/Box.Border.stories.js b/app/components/Box/stories/Box.Border.stories.js
index 68c15e5..c4f3369 100644
--- a/app/components/Box/stories/Box.Border.stories.js
+++ b/app/components/Box/stories/Box.Border.stories.js
@@ -44,7 +44,14 @@ storiesOf('Box', module)
{['solid', 'dashed', 'dotted', 'double', 'groove', 'ridge', 'inset', 'outset'].map(
type => (
-
+
{type}
),
diff --git a/app/components/Box/stories/Box.Round.stories.js b/app/components/Box/stories/Box.Round.stories.js
index 2c08a9d..e3ce20b 100644
--- a/app/components/Box/stories/Box.Round.stories.js
+++ b/app/components/Box/stories/Box.Round.stories.js
@@ -46,7 +46,14 @@ storiesOf('Box', module)
))}
-
+
left rounded corner px value
diff --git a/app/components/Box/stories/Box.Simple.stories.js b/app/components/Box/stories/Box.Simple.stories.js
index ce58238..238f0d2 100644
--- a/app/components/Box/stories/Box.Simple.stories.js
+++ b/app/components/Box/stories/Box.Simple.stories.js
@@ -30,7 +30,10 @@ storiesOf('Box', module)
diff --git a/app/components/Box/stories/Box.Size.stories.js b/app/components/Box/stories/Box.Size.stories.js
index 48f3a86..f604c55 100644
--- a/app/components/Box/stories/Box.Size.stories.js
+++ b/app/components/Box/stories/Box.Size.stories.js
@@ -24,7 +24,10 @@ storiesOf('Box', module)
align="center"
justify="center"
background="brand"
- overflow={{ horizontal: 'hidden', vertical: 'scroll' }}
+ overflow={{
+ horizontal: 'hidden',
+ vertical: 'scroll',
+ }}
>
{Array(20)
.fill()
diff --git a/app/components/Button/__snapshots__/Button.test.js.snap b/app/components/Button/__snapshots__/Button.test.js.snap
index 5e53196..20caca0 100644
--- a/app/components/Button/__snapshots__/Button.test.js.snap
+++ b/app/components/Button/__snapshots__/Button.test.js.snap
@@ -2,10 +2,10 @@
exports[`Button active + primary 1`] = `
`;
exports[`Button basic 1`] = `
Test
@@ -86,10 +86,10 @@ exports[`Button children function 1`] = `
exports[`Button color 1`] = `
@@ -299,10 +299,10 @@ exports[`Button disabled 1`] = `
exports[`Button fill 1`] = `
Test
@@ -360,10 +360,10 @@ exports[`Button focus 1`] = `
exports[`Button hoverIndicator as object with color 1`] = `
@@ -475,10 +475,10 @@ exports[`Button icon label 1`] = `
exports[`Button primary 1`] = `
Test
`;
@@ -599,21 +519,6 @@ exports[`renders htmlFor 1`] = `
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
- overflow: hidden;
-}
-
-.c6 {
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- box-sizing: border-box;
- max-width: 100%;
- min-width: 0;
- min-height: 0;
- -webkit-flex-direction: column;
- -ms-flex-direction: column;
- flex-direction: column;
}
.c3 {
@@ -672,16 +577,11 @@ exports[`renders htmlFor 1`] = `
>
+ className="c5 FormField__FormFieldContentBox-m9hood-1"
+ />
`;
@@ -715,21 +615,6 @@ exports[`renders label 1`] = `
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
- overflow: hidden;
-}
-
-.c6 {
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- box-sizing: border-box;
- max-width: 100%;
- min-width: 0;
- min-height: 0;
- -webkit-flex-direction: column;
- -ms-flex-direction: column;
- flex-direction: column;
}
.c3 {
@@ -787,18 +672,13 @@ exports[`renders label 1`] = `
>
test label
+ className="c5 FormField__FormFieldContentBox-m9hood-1"
+ />
`;
diff --git a/app/components/FormContainer/FormContainer.doc.js b/app/components/FormContainer/FormContainer.doc.js
index 4087e2e..5b114e6 100644
--- a/app/components/FormContainer/FormContainer.doc.js
+++ b/app/components/FormContainer/FormContainer.doc.js
@@ -1,12 +1,10 @@
import { describe, PropTypes } from 'react-desc'
export const doc = FormContainer => {
- const DocumentedFormContainer = describe(FormContainer)
- .description('A FormContainer')
- .usage(
- `import { FormContainer } from 'components/FormContainer';
+ const DocumentedFormContainer = describe(FormContainer).description('A FormContainer').usage(
+ `import { FormContainer } from 'components/FormContainer';
`,
- )
+ )
DocumentedFormContainer.propTypes = {
id: PropTypes.string
diff --git a/app/components/FormContainer/__snapshots__/FormContainer.test.js.snap b/app/components/FormContainer/__snapshots__/FormContainer.test.js.snap
index 9db9846..fcb27af 100644
--- a/app/components/FormContainer/__snapshots__/FormContainer.test.js.snap
+++ b/app/components/FormContainer/__snapshots__/FormContainer.test.js.snap
@@ -3,7 +3,7 @@
exports[`FormContainer renders and matches snapshot 1`] = `
diff --git a/app/components/GenericError/GenericError.doc.js b/app/components/GenericError/GenericError.doc.js
index 69730be..4a26bdd 100644
--- a/app/components/GenericError/GenericError.doc.js
+++ b/app/components/GenericError/GenericError.doc.js
@@ -1,12 +1,10 @@
import { describe, PropTypes } from 'react-desc'
export const doc = GenericError => {
- const DocumentedGenericError = describe(GenericError)
- .description('A GenericError')
- .usage(
- `import { GenericError } from 'components/GenericError';
+ const DocumentedGenericError = describe(GenericError).description('A GenericError').usage(
+ `import { GenericError } from 'components/GenericError';
`,
- )
+ )
DocumentedGenericError.propTypes = {
id: PropTypes.string
diff --git a/app/components/GenericError/__snapshots__/GenericError.test.js.snap b/app/components/GenericError/__snapshots__/GenericError.test.js.snap
index bc18b79..485fb44 100644
--- a/app/components/GenericError/__snapshots__/GenericError.test.js.snap
+++ b/app/components/GenericError/__snapshots__/GenericError.test.js.snap
@@ -3,10 +3,10 @@
exports[`GenericError renders and matches snapshot 1`] = `