From a3efffb75c3b27b22e0a038de65b7dc382e2deef Mon Sep 17 00:00:00 2001 From: Melissa Nunes Date: Sun, 7 Feb 2021 11:25:52 -0700 Subject: [PATCH 1/3] extend testing library with renderAuthenticated and renderUnauthenticated functions. --- plop-templates/component.js.hbs | 6 +-- plop-templates/componentSpec.js.hbs | 10 ++--- src/App.test.js | 28 ++++++++---- .../testingLibraryWithHelpers.js | 43 +++++++++++++++++++ 4 files changed, 70 insertions(+), 17 deletions(-) create mode 100644 src/testUtilities/testingLibraryWithHelpers.js diff --git a/plop-templates/component.js.hbs b/plop-templates/component.js.hbs index de1949731..a0e974b3f 100644 --- a/plop-templates/component.js.hbs +++ b/plop-templates/component.js.hbs @@ -2,12 +2,12 @@ import React from 'react' import PropTypes from 'prop-types' /** -* Describe your component -*/ + * Describe your component + */ const {{pascalCase name}} = () => { return <>{{pascalCase name}} } {{pascalCase name}}.propTypes = {} -export default {{ pascalCase name }} \ No newline at end of file +export default {{ pascalCase name }} diff --git a/plop-templates/componentSpec.js.hbs b/plop-templates/componentSpec.js.hbs index 42e6fe428..124499b22 100644 --- a/plop-templates/componentSpec.js.hbs +++ b/plop-templates/componentSpec.js.hbs @@ -1,13 +1,11 @@ import '@testing-library/jest-dom/extend-expect' import React from 'react' -import { render } from '@testing-library/react' - +import { renderAuthenticated } from '../../testUtilities/testingLibraryWithHelpers' import {{pascalCase name}} from './{{pascalCase name}}' test('{{pascalCase name}} component renders with the expected UI elements', () => { -const utilities = render( -<{{pascalCase name}} />) + const utilities = renderAuthenticated(<{{pascalCase name}} />) -expect(utilities.getByText('I should fail')) -}) \ No newline at end of file + expect(utilities.getByText('I should fail')) +}) diff --git a/src/App.test.js b/src/App.test.js index 5a4531213..f1c7c667b 100644 --- a/src/App.test.js +++ b/src/App.test.js @@ -1,9 +1,21 @@ -// import React from 'react' -// import { render, screen } from '@testing-library/react' -// import App from './App' - -test('renders learn react link', () => { - // render() - // const linkElement = screen.getByText(/learn react/i) - // expect(linkElement).toBeInTheDocument() +import React from 'react' +import { + renderAuthenticated, + renderUnauthenticated, + screen, +} from './testUtilities/testingLibraryWithHelpers' +import App from './App' + +test('App renders the initial screen as expected for a authenticated user', () => { + renderAuthenticated() + + // this assertion is for demo purposes only and will be deleted as the landing pages are built + expect(screen.getByText('All projects page placeholder')) +}) + +test('App renders the initial screen as expected for a not authenticated user', () => { + renderUnauthenticated() + + // this assertion is for demo purposes only and will be deleted as the landing pages are built + expect(screen.queryByText('All projects page placeholder')).toBeNull() }) diff --git a/src/testUtilities/testingLibraryWithHelpers.js b/src/testUtilities/testingLibraryWithHelpers.js new file mode 100644 index 000000000..029ff5af3 --- /dev/null +++ b/src/testUtilities/testingLibraryWithHelpers.js @@ -0,0 +1,43 @@ +import { Auth0Context } from '@auth0/auth0-react' +import { render } from '@testing-library/react' +import { ThemeProvider } from 'styled-components/macro' +import PropTypes from 'prop-types' +import React from 'react' +import theme from '../theme' + +const AuthenticatedProviders = ({ children }) => ( + + {children} + +) + +const UnauthenticatedProviders = ({ children }) => ( + {} }} + > + {children} + +) + +AuthenticatedProviders.propTypes = { + children: PropTypes.node.isRequired, +} +UnauthenticatedProviders.propTypes = { + children: PropTypes.node.isRequired, +} + +const renderAuthenticated = (ui, options) => + render(ui, { wrapper: AuthenticatedProviders, ...options }) +const renderUnauthenticated = (ui, options) => + render(ui, { wrapper: UnauthenticatedProviders, ...options }) + +const renderOverride = () => { + throw new Error( + 'Please use renderAuthenticated or renderUnauthenticated instead of render.', + ) +} + +export * from '@testing-library/react' +export { renderOverride as render, renderAuthenticated, renderUnauthenticated } From 8eb6beaa76566e454d58c524a775adf635038978 Mon Sep 17 00:00:00 2001 From: Melissa Nunes Date: Sun, 7 Feb 2021 11:59:50 -0700 Subject: [PATCH 2/3] Fix git hooks being skipped by Sourcetree, VSCode source control, etc. Downgrade Husky. --- package.json | 2 +- yarn.lock | 128 +++++++++++++++++++-------------------------------- 2 files changed, 48 insertions(+), 82 deletions(-) diff --git a/package.json b/package.json index 5a6c35b4b..5c2741764 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,7 @@ "@storybook/node-logger": "^6.1.16", "@storybook/preset-create-react-app": "^3.1.5", "@storybook/react": "^6.1.16", - "husky": "^4.3.8", + "husky": "3.1.0", "plop": "^2.7.4" }, "husky": { diff --git a/yarn.lock b/yarn.lock index cb7e39ab8..7a2c8e088 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1765,6 +1765,11 @@ estree-walker "^1.0.1" picomatch "^2.2.2" +"@scarf/scarf@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@scarf/scarf/-/scarf-1.1.0.tgz#b84b4a91cd938a688d36245b7a7db6fbc476a499" + integrity sha512-b2iE8kjjzzUo2WZ0xuE2N77kfnTds7ClrDxcz3Atz7h2XrNVoAPUoT75i7CY0st5x++70V91Y+c6RpBX9MX7Jg== + "@sinonjs/commons@^1.7.0": version "1.8.2" resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.2.tgz#858f5c4b48d80778fde4b9d541f27edc0d56488b" @@ -2827,9 +2832,9 @@ "@types/node" "*" "@types/uglify-js@*": - version "3.11.1" - resolved "https://registry.yarnpkg.com/@types/uglify-js/-/uglify-js-3.11.1.tgz#97ff30e61a0aa6876c270b5f538737e2d6ab8ceb" - integrity sha512-7npvPKV+jINLu1SpSYVWG8KvyJBhBa8tmzMMdDoVc2pWUYHN8KIXlPJhjJ4LT97c4dXJA2SHL/q6ADbDriZN+Q== + version "3.12.0" + resolved "https://registry.yarnpkg.com/@types/uglify-js/-/uglify-js-3.12.0.tgz#2bb061c269441620d46b946350c8f16d52ef37c5" + integrity sha512-sYAF+CF9XZ5cvEBkI7RtrG9g2GtMBkviTnBxYYyq+8BWvO4QtXfwwR6a2LFwCi4evMKZfpv6U43ViYvv17Wz3Q== dependencies: source-map "^0.6.1" @@ -4965,11 +4970,6 @@ commondir@^1.0.1: resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" integrity sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs= -compare-versions@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-3.6.0.tgz#1a5689913685e5a87637b8d3ffca75514ec41d62" - integrity sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA== - component-emitter@^1.2.1: version "1.3.0" resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" @@ -5146,7 +5146,7 @@ core-util-is@1.0.2, core-util-is@~1.0.0: resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= -cosmiconfig@^5.0.0: +cosmiconfig@^5.0.0, cosmiconfig@^5.2.1: version "5.2.1" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-5.2.1.tgz#040f726809c591e77a17c0a3626ca45b4f168b1a" integrity sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA== @@ -6035,9 +6035,9 @@ ejs@^2.6.1: integrity sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA== ejs@^3.1.2: - version "3.1.5" - resolved "https://registry.yarnpkg.com/ejs/-/ejs-3.1.5.tgz#aed723844dc20acb4b170cd9ab1017e476a0d93b" - integrity sha512-dldq3ZfFtgVTJMLjOe+/3sROTzALlL9E34V4/sDtUd/KlBSS0s6U1/+WPE1B4sj9CXHJpL1M6rhNJnc9Wbal9w== + version "3.1.6" + resolved "https://registry.yarnpkg.com/ejs/-/ejs-3.1.6.tgz#5bfd0a0689743bb5268b3550cceeebbc1702822a" + integrity sha512-9lt9Zse4hPucPkoP7FHDF0LQAlGyF9JVpnClFLFH3aSSbxmyoqINRpp/9wePWJTUl4KOQwRL72Iw3InHPDkoGw== dependencies: jake "^10.6.1" @@ -6980,9 +6980,9 @@ file-uri-to-path@1.0.0: integrity sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== filelist@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/filelist/-/filelist-1.0.1.tgz#f10d1a3ae86c1694808e8f20906f43d4c9132dbb" - integrity sha512-8zSK6Nu0DQIC08mUC46sWGXi+q3GGpKydAG36k+JDba6VRpkevvOWUW5a/PhShij4+vHT9M+ghgG7eM+a9JDUQ== + version "1.0.2" + resolved "https://registry.yarnpkg.com/filelist/-/filelist-1.0.2.tgz#80202f21462d4d1c2e214119b1807c1bc0380e5b" + integrity sha512-z7O0IS8Plc39rTCq6i6iHxk43duYOn8uFJiWSewIq0Bww1RNybVHSCjahmcC87ZqAm4OTvFzlzeGu3XAzG1ctQ== dependencies: minimatch "^3.0.4" @@ -7071,21 +7071,6 @@ find-up@^3.0.0: dependencies: locate-path "^3.0.0" -find-up@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" - integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== - dependencies: - locate-path "^6.0.0" - path-exists "^4.0.0" - -find-versions@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/find-versions/-/find-versions-4.0.0.tgz#3c57e573bf97769b8cb8df16934b627915da4965" - integrity sha512-wgpWy002tA+wgmO27buH/9KzyEOQnKsG/R0yrcjPT9BOFm0zRBVQbZ95nRGXWMywS8YR5knRbpohio0bcJABxQ== - dependencies: - semver-regex "^3.1.2" - findup-sync@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-2.0.0.tgz#9326b1488c22d1a6088650a86901b2d9a90a2cbc" @@ -7401,6 +7386,11 @@ get-stdin@^6.0.0: resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b" integrity sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g== +get-stdin@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-7.0.0.tgz#8d5de98f15171a125c5e516643c7a6d0ea8a96f6" + integrity sha512-zRKcywvrXlXsA0v0i9Io4KDRaAw7+a1ZpjRwl9Wox8PFlVCCHra7E9c4kqXCoCM9nR5tBkaTTZRBoCm60bFqTQ== + get-stream@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" @@ -8104,21 +8094,22 @@ human-signals@^1.1.1: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw== -husky@^4.3.8: - version "4.3.8" - resolved "https://registry.yarnpkg.com/husky/-/husky-4.3.8.tgz#31144060be963fd6850e5cc8f019a1dfe194296d" - integrity sha512-LCqqsB0PzJQ/AlCgfrfzRe3e3+NvmefAdKQhRYpxS4u6clblBoDdzzvHi8fmxKRzvMxPY/1WZWzomPZww0Anow== +husky@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/husky/-/husky-3.1.0.tgz#5faad520ab860582ed94f0c1a77f0f04c90b57c0" + integrity sha512-FJkPoHHB+6s4a+jwPqBudBDvYZsoQW5/HBuMSehC8qDiCe50kpcxeqFoDSlow+9I6wg47YxBoT3WxaURlrDIIQ== dependencies: - chalk "^4.0.0" + chalk "^2.4.2" ci-info "^2.0.0" - compare-versions "^3.6.0" - cosmiconfig "^7.0.0" - find-versions "^4.0.0" + cosmiconfig "^5.2.1" + execa "^1.0.0" + get-stdin "^7.0.0" opencollective-postinstall "^2.0.2" - pkg-dir "^5.0.0" + pkg-dir "^4.2.0" please-upgrade-node "^3.2.0" + read-pkg "^5.2.0" + run-node "^1.0.0" slash "^3.0.0" - which-pm-runs "^1.0.0" iconv-lite@0.4.24, iconv-lite@^0.4.24: version "0.4.24" @@ -9727,13 +9718,6 @@ locate-path@^5.0.0: dependencies: p-locate "^4.1.0" -locate-path@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" - integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== - dependencies: - p-locate "^5.0.0" - lodash-es@^4.17.15: version "4.17.20" resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.20.tgz#29f6332eefc60e849f869c264bc71126ad61e8f7" @@ -10855,13 +10839,6 @@ p-locate@^4.1.0: dependencies: p-limit "^2.2.0" -p-locate@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" - integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== - dependencies: - p-limit "^3.0.2" - p-map@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/p-map/-/p-map-2.1.0.tgz#310928feef9c9ecc65b68b17693018a665cea175" @@ -11210,13 +11187,6 @@ pkg-dir@^4.1.0, pkg-dir@^4.2.0: dependencies: find-up "^4.0.0" -pkg-dir@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-5.0.0.tgz#a02d6aebe6ba133a928f74aec20bafdfe6b8e760" - integrity sha512-NPE8TDbzl/3YQYY7CSS228s3g2ollTFnc+Qi3tqmqJp9Vg2ovUpixcJEo2HJScN2Ez+kEaal6y70c0ehqJBJeA== - dependencies: - find-up "^5.0.0" - pkg-up@3.1.0, pkg-up@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-3.1.0.tgz#100ec235cc150e4fd42519412596a28512a0def5" @@ -11253,11 +11223,12 @@ pnp-webpack-plugin@1.6.4, pnp-webpack-plugin@^1.6.4: ts-pnp "^1.1.6" polished@^3.4.4: - version "3.6.7" - resolved "https://registry.yarnpkg.com/polished/-/polished-3.6.7.tgz#44cbd0047f3187d83db0c479ef0c7d5583af5fb6" - integrity sha512-b4OViUOihwV0icb9PHmWbR+vPqaSzSAEbgLskvb7ANPATVXGiYv/TQFHQo65S53WU9i5EQ1I03YDOJW7K0bmYg== + version "3.7.0" + resolved "https://registry.yarnpkg.com/polished/-/polished-3.7.0.tgz#ece3368df30d33082bc8a957aa212d3f98119278" + integrity sha512-1tnvQ2wsxfR/DyPE2Xu9sRbnLAwXAarCWiZJ8Hfirw59bTigqjbzEWSAmzYizT6ocQW995V8n7RP48jq50DjJA== dependencies: - "@babel/runtime" "^7.9.2" + "@babel/runtime" "^7.12.5" + "@scarf/scarf" "^1.1.0" portfinder@^1.0.26: version "1.0.28" @@ -11936,9 +11907,9 @@ postcss@^7, postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.14, postcss@^7.0.17, po supports-color "^6.1.0" postcss@^8.1.0: - version "8.2.4" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.2.4.tgz#20a98a39cf303d15129c2865a9ec37eda0031d04" - integrity sha512-kRFftRoExRVXZlwUuay9iC824qmXPcQQVzAjbCCgjpXnkdMCJYBu2gTwAaFBzv8ewND6O8xFb3aELmEkh9zTzg== + version "8.2.5" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.2.5.tgz#3c75149ada4e93db9521913654c0144517f77c9a" + integrity sha512-wMcb7BpDcm3gxQOQx46NDNT36Kk0Ao6PJLLI2ed5vehbbbxCEuslSQzbQ2sfSKy+gkYxhWcGWSeaK+gwm4KIZg== dependencies: colorette "^1.2.1" nanoid "^3.1.20" @@ -13150,6 +13121,11 @@ run-async@^2.2.0, run-async@^2.4.0: resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== +run-node@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/run-node/-/run-node-1.0.0.tgz#46b50b946a2aa2d4947ae1d886e9856fd9cabe5e" + integrity sha512-kc120TBlQ3mih1LSzdAJXo4xn/GWS2ec0l3S+syHDXP9uRr0JAT8Qd3mdMuyjqCzeZktgP3try92cEgf9Nks8A== + run-parallel@^1.1.9: version "1.1.10" resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.1.10.tgz#60a51b2ae836636c81377df16cb107351bcd13ef" @@ -13296,11 +13272,6 @@ semver-compare@^1.0.0: resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" integrity sha1-De4hahyUGrN+nvsXiPavxf9VN/w= -semver-regex@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/semver-regex/-/semver-regex-3.1.2.tgz#34b4c0d361eef262e07199dbef316d0f2ab11807" - integrity sha512-bXWyL6EAKOJa81XG1OZ/Yyuq+oT0b2YLlxx7c+mrdYPaPbnj6WgVULXhinMIeZGufuUBu/eVRqXEhiv4imfwxA== - "semver@2 || 3 || 4 || 5", semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0: version "5.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" @@ -14614,9 +14585,9 @@ typedarray@^0.0.6: integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= uglify-js@^3.1.4: - version "3.12.6" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.12.6.tgz#f884584fcc42e10bca70db5cb32e8625c2c42535" - integrity sha512-aqWHe3DfQmZUDGWBbabZ2eQnJlQd1fKlMUu7gV+MiTuDzdgDw31bI3wA2jLLsV/hNcDP26IfyEgSVoft5+0SVw== + version "3.12.7" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.12.7.tgz#be4f06142a67bd91ef868b4e111dc241e151bff3" + integrity sha512-SIZhkoh+U/wjW+BHGhVwE9nt8tWJspncloBcFapkpGRwNPqcH8pzX36BXe3TPBjzHWPMUZotpCigak/udWNr1Q== unc-path-regex@^0.1.2: version "0.1.2" @@ -15307,11 +15278,6 @@ which-module@^2.0.0: resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= -which-pm-runs@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/which-pm-runs/-/which-pm-runs-1.0.0.tgz#670b3afbc552e0b55df6b7780ca74615f23ad1cb" - integrity sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs= - which@^1.2.14, which@^1.2.9, which@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" From 4de28178baeba59f4e3b4c61c4b537ed781fdd03 Mon Sep 17 00:00:00 2001 From: Melissa Nunes Date: Sun, 7 Feb 2021 12:06:38 -0700 Subject: [PATCH 3/3] Fix linting issues that snuck though --- .eslintrc | 8 +++++++- src/components/generic/ButtonMenu/ButtonMenu.stories.js | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.eslintrc b/.eslintrc index 90a7031e5..7f6971d02 100644 --- a/.eslintrc +++ b/.eslintrc @@ -4,5 +4,11 @@ "rules": { "no-underscore-dangle": "off", "react/jsx-props-no-spreading": "off" - } + }, + "overrides": [ + { + "files": ["*.stories.js"], + "rules": { "import/no-extraneous-dependencies": "off" } + } + ] } diff --git a/src/components/generic/ButtonMenu/ButtonMenu.stories.js b/src/components/generic/ButtonMenu/ButtonMenu.stories.js index 692905f79..2a2668337 100644 --- a/src/components/generic/ButtonMenu/ButtonMenu.stories.js +++ b/src/components/generic/ButtonMenu/ButtonMenu.stories.js @@ -1,8 +1,8 @@ -import React from 'react' import { action } from '@storybook/addon-actions' +import React from 'react' +import styled from 'styled-components' import ButtonMenu from '.' -import styled from 'styled-components' export default { title: 'ButtonMenu',