From 8b1a98566fee2f52fc02cb034481c852306d79e7 Mon Sep 17 00:00:00 2001 From: Victor Nystad Date: Fri, 13 Dec 2019 14:39:53 +0100 Subject: [PATCH] fix linting issues (#184) --- .eslintignore | 3 + .eslintrc.yaml | 3 + apps/figma-broker/index.js | 1 + libraries/core-react/package.json | 7 +- libraries/core-react/pnpm-lock.yaml | 75 +-- libraries/core-react/pnpmfile.js | 27 +- libraries/core-react/rollup.config.js | 1 + libraries/core-react/rtl.setup.js | 1 + libraries/core-react/src/Button/Button.jsx | 6 +- libraries/core-react/src/Button/index.js | 2 +- libraries/core-react/src/Table/Body.jsx | 10 +- libraries/core-react/src/Table/Cell.jsx | 16 +- libraries/core-react/src/Table/Head.jsx | 11 +- libraries/core-react/src/Table/Row.jsx | 10 +- libraries/core-react/src/Table/Table.jsx | 4 +- libraries/core-react/src/Table/index.js | 12 +- .../core-react/src/Typography/Typography.jsx | 17 +- libraries/core-react/src/Typography/index.js | 2 +- libraries/core-react/src/_common/templates.js | 12 +- libraries/core-react/src/index.js | 6 +- libraries/core/pnpmfile.js | 27 +- libraries/tokens/index.js | 2 +- package.yaml | 4 + pnpm-lock.yaml | 463 +++++++++++++++++- 24 files changed, 598 insertions(+), 124 deletions(-) create mode 100644 .eslintignore diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000000..3d7af8caa8 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,3 @@ +/apps/** +/libraries/icons/** +node_modules diff --git a/.eslintrc.yaml b/.eslintrc.yaml index 7247446ede..4f46d3ed2f 100644 --- a/.eslintrc.yaml +++ b/.eslintrc.yaml @@ -15,6 +15,9 @@ rules: no-unused-vars: - error - varsIgnorePattern: ^React$ + # Named exports are better + import/no-default-export: + - error # Not everything needs a default export, for example utils files import/prefer-default-export: - off diff --git a/apps/figma-broker/index.js b/apps/figma-broker/index.js index c2bbcc8f6b..993483ed7a 100644 --- a/apps/figma-broker/index.js +++ b/apps/figma-broker/index.js @@ -88,6 +88,7 @@ async function createTokens(ctx) { export const tokens = { ${tokens.map((token) => token.name).join(',\n')} } + ` writeFile( PATHS.BASE_TOKENS, diff --git a/libraries/core-react/package.json b/libraries/core-react/package.json index 2175f455f9..31c518cbac 100644 --- a/libraries/core-react/package.json +++ b/libraries/core-react/package.json @@ -14,7 +14,6 @@ "url": "https://github.com/equinor/design-system" }, "scripts": { - "lint": "eslint ./src/**/*.{jsx,js}", "build": "rollup -c", "dev": "rollup -c -w", "test": "jest", @@ -30,10 +29,10 @@ "devDependencies": { "@babel/cli": "^7.7.5", "@babel/core": "^7.7.5", - "@babel/preset-env": "^7.7.5", + "@babel/preset-env": "^7.7.6", "@babel/preset-react": "^7.7.4", "@testing-library/jest-dom": "^4.2.4", - "@testing-library/react": "^9.3.2", + "@testing-library/react": "^9.3.3", "babel-plugin-styled-components": "^1.10.6", "jest": "^24.9.0", "jest-styled-components": "^6.3.4", @@ -41,7 +40,7 @@ "prop-types": "^15.7.2", "react": "^16.12.0", "react-dom": "^16.12.0", - "rollup": "^1.27.8", + "rollup": "^1.27.11", "rollup-plugin-babel": "^4.3.3", "rollup-plugin-commonjs": "^9.3.4", "rollup-plugin-json": "^4.0.0", diff --git a/libraries/core-react/pnpm-lock.yaml b/libraries/core-react/pnpm-lock.yaml index 24fa42e9a5..db96828594 100644 --- a/libraries/core-react/pnpm-lock.yaml +++ b/libraries/core-react/pnpm-lock.yaml @@ -6,7 +6,7 @@ devDependencies: '@babel/preset-env': 7.7.6_@babel+core@7.7.5 '@babel/preset-react': 7.7.4_@babel+core@7.7.5 '@testing-library/jest-dom': 4.2.4 - '@testing-library/react': 9.3.2_react-dom@16.12.0+react@16.12.0 + '@testing-library/react': 9.3.3_react-dom@16.12.0+react@16.12.0 babel-plugin-styled-components: 1.10.6_styled-components@4.4.1 jest: 24.9.0 jest-styled-components: 6.3.4_styled-components@4.4.1 @@ -14,9 +14,9 @@ devDependencies: prop-types: 15.7.2 react: 16.12.0 react-dom: 16.12.0_react@16.12.0 - rollup: 1.27.9 - rollup-plugin-babel: 4.3.3_@babel+core@7.7.5+rollup@1.27.9 - rollup-plugin-commonjs: 9.3.4_rollup@1.27.9 + rollup: 1.27.12 + rollup-plugin-babel: 4.3.3_@babel+core@7.7.5+rollup@1.27.12 + rollup-plugin-commonjs: 9.3.4_rollup@1.27.12 rollup-plugin-json: 4.0.0 rollup-plugin-node-resolve: 4.2.4 styled-components: 4.4.1_b5ffe839b1a452f2d2c7d94d3059774c @@ -775,7 +775,7 @@ packages: '@babel/plugin-transform-unicode-regex': 7.7.4_@babel+core@7.7.5 '@babel/types': 7.7.4 browserslist: 4.8.2 - core-js-compat: 3.4.8 + core-js-compat: 3.5.0 invariant: 2.2.4 js-levenshtein: 1.1.6 semver: 5.7.1 @@ -1049,7 +1049,7 @@ packages: npm: '>=6' resolution: integrity: sha512-j31Bn0rQo12fhCWOUWy9fl7wtqkp7In/YP2p5ZFyRuiiB9Qs3g+hS4gAmDWONbAHcRmVooNJ5eOHQDCOmUFXHg== - /@testing-library/react/9.3.2_react-dom@16.12.0+react@16.12.0: + /@testing-library/react/9.3.3_react-dom@16.12.0+react@16.12.0: dependencies: '@babel/runtime': 7.7.6 '@testing-library/dom': 6.10.1 @@ -1063,23 +1063,23 @@ packages: react: '*' react-dom: '*' resolution: - integrity: sha512-J6ftWtm218tOLS175MF9eWCxGp+X+cUXCpkPIin8KAXWtyZbr9CbqJ8M8QNd6spZxJDAGlw+leLG4MJWLlqVgg== + integrity: sha512-IuoiJR/NAzu9EuT3Fqs92sRHe/9egCipar92wTnXe3fMloWy0Q7JdAXaszzbv2ogH30ztb6Axp5XW63vOTd4jA== /@types/babel__core/7.1.3: dependencies: '@babel/parser': 7.7.5 '@babel/types': 7.7.4 - '@types/babel__generator': 7.6.0 + '@types/babel__generator': 7.6.1 '@types/babel__template': 7.0.2 '@types/babel__traverse': 7.0.8 dev: true resolution: integrity: sha512-8fBo0UR2CcwWxeX7WIIgJ7lXjasFxoYgRnFHUj+hRvKkpiBJbxhdAPTCY6/ZKM0uxANFVzt4yObSLuTiTnazDA== - /@types/babel__generator/7.6.0: + /@types/babel__generator/7.6.1: dependencies: '@babel/types': 7.7.4 dev: true resolution: - integrity: sha512-c1mZUu4up5cp9KROs/QAw0gTeHrw/x7m52LcnvMxxOZ03DmLwPV0MlGmlgzV3cnSdjhJOZsj7E7FHeioai+egw== + integrity: sha512-bBKm+2VPJcMRVwNhxKu8W+5/zT7pwNEqeokFOmbvVSqGzFneNxYcEBro9Ac7/N9tlsaPYnZLK8J1LWKkMsLAew== /@types/babel__template/7.0.2: dependencies: '@babel/parser': 7.7.5 @@ -1114,30 +1114,30 @@ packages: dev: true resolution: integrity: sha512-UpYjBi8xefVChsCoBpKShdxTllC9pwISirfoZsUa2AAdQg/Jd2KQGtSbw+ya7GPo7x/wAPlH6JBhKhAsXUEZNA== - /@types/node/12.12.14: + /@types/node/12.12.17: dev: true resolution: - integrity: sha512-u/SJDyXwuihpwjXy7hOOghagLEV1KdAST6syfnOk6QZAMzZuWZqXy5aYYZbh8Jdpd4escVFP0MvftHNDb9pruA== + integrity: sha512-Is+l3mcHvs47sKy+afn2O1rV4ldZFU7W8101cNlOd+MRbjM4Onida8jSZnJdTe/0Pcf25g9BNIUsuugmE6puHA== /@types/prop-types/15.7.3: dev: true resolution: integrity: sha512-KfRL3PuHmqQLOG+2tGpRO26Ctg+Cq1E01D2DMriKEATHgWLfeNDmq9e29Q9WIky0dQ3NPkd1mzYH8Lm936Z9qw== /@types/react-dom/16.9.4: dependencies: - '@types/react': 16.9.15 + '@types/react': 16.9.16 dev: true resolution: integrity: sha512-fya9xteU/n90tda0s+FtN5Ym4tbgxpq/hb/Af24dvs6uYnYn+fspaxw5USlw0R8apDNwxsqumdRoCoKitckQqw== - /@types/react/16.9.15: + /@types/react/16.9.16: dependencies: '@types/prop-types': 15.7.3 csstype: 2.6.7 dev: true resolution: - integrity: sha512-WsmM1b6xQn1tG3X2Hx4F3bZwc2E82pJXt5OPs2YJgg71IzvUoKOSSSYOvLXYCg1ttipM+UuA4Lj3sfvqjVxyZw== + integrity: sha512-dQ3wlehuBbYlfvRXfF5G+5TbZF3xqgkikK7DWAsQXe2KnzV+kjD4W2ea+ThCrKASZn9h98bjjPzoTYzfRqyBkw== /@types/resolve/0.0.8: dependencies: - '@types/node': 12.12.14 + '@types/node': 12.12.17 dev: true resolution: integrity: sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ== @@ -1663,13 +1663,13 @@ packages: node: '>=0.10.0' resolution: integrity: sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= - /core-js-compat/3.4.8: + /core-js-compat/3.5.0: dependencies: browserslist: 4.8.2 semver: 6.3.0 dev: true resolution: - integrity: sha512-l3WTmnXHV2Sfu5VuD7EHE2w7y+K68+kULKt5RJg8ZJk3YhHF1qLD4O8v8AmNq+8vbOwnPFFDvds25/AoEvMqlQ== + integrity: sha512-E7iJB72svRjJTnm9HDvujzNVMCm3ZcDYEedkJ/sDTNsy/0yooCd9Cg7GSzE7b4e0LfIkjijdB1tqg0pGwxWeWg== /core-util-is/1.0.2: dev: true resolution: @@ -1855,7 +1855,7 @@ packages: dev: true resolution: integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== - /es-abstract/1.16.3: + /es-abstract/1.17.0-next.1: dependencies: es-to-primitive: 1.2.1 function-bind: 1.1.1 @@ -1865,13 +1865,14 @@ packages: is-regex: 1.0.4 object-inspect: 1.7.0 object-keys: 1.1.1 + object.assign: 4.1.0 string.prototype.trimleft: 2.1.0 string.prototype.trimright: 2.1.0 dev: true engines: node: '>= 0.4' resolution: - integrity: sha512-WtY7Fx5LiOnSYgF5eg/1T+GONaGmpvpPdCpSnYij+U2gDTL0UPfWrhDw7b2IYb+9NQJsYpCA0wOQvZfsd6YwRw== + integrity: sha512-7MmGr03N7Rnuid6+wyhD9sHNE2n4tFSwExnU2lQl3lIo2ShXWGePY80zYaoMOmILWv57H0amMjZGHNzzGG70Rw== /es-to-primitive/1.2.1: dependencies: is-callable: 1.1.4 @@ -3454,15 +3455,15 @@ packages: node: '>= 0.4' resolution: integrity: sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== - /object.getownpropertydescriptors/2.0.3: + /object.getownpropertydescriptors/2.1.0: dependencies: define-properties: 1.1.3 - es-abstract: 1.16.3 + es-abstract: 1.17.0-next.1 dev: true engines: node: '>= 0.8' resolution: - integrity: sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY= + integrity: sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg== /object.pick/1.3.0: dependencies: isobject: 3.0.1 @@ -3840,7 +3841,7 @@ packages: regenerate: 1.4.0 regenerate-unicode-properties: 8.1.0 regjsgen: 0.5.1 - regjsparser: 0.6.0 + regjsparser: 0.6.1 unicode-match-property-ecmascript: 1.0.4 unicode-match-property-value-ecmascript: 1.1.0 dev: true @@ -3852,13 +3853,13 @@ packages: dev: true resolution: integrity: sha512-5qxzGZjDs9w4tzT3TPhCJqWdCc3RLYwy9J2NB0nm5Lz+S273lvWcpjaTGHsT1dc6Hhfq41uSEOw8wBmxrKOuyg== - /regjsparser/0.6.0: + /regjsparser/0.6.1: dependencies: jsesc: 0.5.0 dev: true hasBin: true resolution: - integrity: sha512-RQ7YyokLiQBomUJuUG8iGVvkgOLxwyZM8k6d3q5SAXpg4r5TZJZigKFvC6PpD+qQ98bCDC5YelPeA3EucDoNeQ== + integrity: sha512-7LutE94sz/NKSYegK+/4E77+8DipxF+Qn2Tmu362AcmsF2NYq/wx3+ObvU90TKEhjf7hQoFXo23ajjrXP7eUgg== /remove-trailing-separator/1.1.0: dev: true resolution: @@ -3977,11 +3978,11 @@ packages: hasBin: true resolution: integrity: sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== - /rollup-plugin-babel/4.3.3_@babel+core@7.7.5+rollup@1.27.9: + /rollup-plugin-babel/4.3.3_@babel+core@7.7.5+rollup@1.27.12: dependencies: '@babel/core': 7.7.5 '@babel/helper-module-imports': 7.7.4 - rollup: 1.27.9 + rollup: 1.27.12 rollup-pluginutils: 2.8.2 dev: true peerDependencies: @@ -3989,12 +3990,12 @@ packages: rollup: '>=0.60.0 <2' resolution: integrity: sha512-tKzWOCmIJD/6aKNz0H1GMM+lW1q9KyFubbWzGiOG540zxPPifnEAHTZwjo0g991Y+DyOZcLqBgqOdqazYE5fkw== - /rollup-plugin-commonjs/9.3.4_rollup@1.27.9: + /rollup-plugin-commonjs/9.3.4_rollup@1.27.12: dependencies: estree-walker: 0.6.1 magic-string: 0.25.4 resolve: 1.13.1 - rollup: 1.27.9 + rollup: 1.27.12 rollup-pluginutils: 2.8.2 dev: true peerDependencies: @@ -4023,15 +4024,15 @@ packages: dev: true resolution: integrity: sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ== - /rollup/1.27.9: + /rollup/1.27.12: dependencies: '@types/estree': 0.0.40 - '@types/node': 12.12.14 + '@types/node': 12.12.17 acorn: 7.1.0 dev: true hasBin: true resolution: - integrity: sha512-8AfW4cJTPZfG6EXWwT/ujL4owUsDI1Xl8J1t+hvK4wDX81F5I4IbwP9gvGbHzxnV19fnU4rRABZQwZSX9J402Q== + integrity: sha512-51iR7n6NQfdQJlRrIktaGmkdt395A8Vue7CdnlrK6UhY9DY2GaKsTdljWeXisJuZh+w90Gz8VFNh5X+yxP20oQ== /rsvp/4.8.5: dev: true engines: @@ -4600,7 +4601,7 @@ packages: /util.promisify/1.0.0: dependencies: define-properties: 1.1.3 - object.getownpropertydescriptors: 2.0.3 + object.getownpropertydescriptors: 2.1.0 dev: true resolution: integrity: sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA== @@ -4756,11 +4757,11 @@ packages: specifiers: '@babel/cli': ^7.7.5 '@babel/core': ^7.7.5 - '@babel/preset-env': ^7.7.5 + '@babel/preset-env': ^7.7.6 '@babel/preset-react': ^7.7.4 '@equinor/eds-tokens': ^0.0.1-alpha.4 '@testing-library/jest-dom': ^4.2.4 - '@testing-library/react': ^9.3.2 + '@testing-library/react': ^9.3.3 babel-plugin-styled-components: ^1.10.6 jest: ^24.9.0 jest-styled-components: ^6.3.4 @@ -4768,7 +4769,7 @@ specifiers: prop-types: ^15.7.2 react: ^16.12.0 react-dom: ^16.12.0 - rollup: ^1.27.8 + rollup: ^1.27.11 rollup-plugin-babel: ^4.3.3 rollup-plugin-commonjs: ^9.3.4 rollup-plugin-json: ^4.0.0 diff --git a/libraries/core-react/pnpmfile.js b/libraries/core-react/pnpmfile.js index 93461234ee..762ef10880 100644 --- a/libraries/core-react/pnpmfile.js +++ b/libraries/core-react/pnpmfile.js @@ -1,17 +1,22 @@ -module.exports = { - hooks: { - readPackage, - }, -} - function readPackage(pkg, context) { + const additionalDependencies = {} + if (pkg.name === 'enzyme-adapter-react-16') { - pkg.dependencies = { - ...pkg.dependencies, - has: '^1.0.3', - } + additionalDependencies.has = '^1.0.3' context.log('Added missing dependencies for enzyme-adapter-react-16') } - return pkg + return { + ...pkg, + dependencies: { + ...pkg.dependencies, + ...additionalDependencies, + }, + } +} + +module.exports = { + hooks: { + readPackage, + }, } diff --git a/libraries/core-react/rollup.config.js b/libraries/core-react/rollup.config.js index f573bcc71c..dff85f035c 100644 --- a/libraries/core-react/rollup.config.js +++ b/libraries/core-react/rollup.config.js @@ -1,3 +1,4 @@ +/* eslint-disable import/no-default-export */ import resolve from 'rollup-plugin-node-resolve' import commonjs from 'rollup-plugin-commonjs' import json from 'rollup-plugin-json' diff --git a/libraries/core-react/rtl.setup.js b/libraries/core-react/rtl.setup.js index 264828a905..03bb11857b 100644 --- a/libraries/core-react/rtl.setup.js +++ b/libraries/core-react/rtl.setup.js @@ -1 +1,2 @@ +/* eslint-disable import/no-extraneous-dependencies */ import '@testing-library/jest-dom/extend-expect' diff --git a/libraries/core-react/src/Button/Button.jsx b/libraries/core-react/src/Button/Button.jsx index ca8da3d1ea..7ad92b0382 100644 --- a/libraries/core-react/src/Button/Button.jsx +++ b/libraries/core-react/src/Button/Button.jsx @@ -5,7 +5,7 @@ import primaryButtonTokens from '@equinor/eds-tokens/components/button/buttons-p import secondaryButtonTokens from '@equinor/eds-tokens/components/button/buttons-secondary.json' import dangerButtonTokens from '@equinor/eds-tokens/components/button/buttons-danger.json' import disabledButtonTokens from '@equinor/eds-tokens/components/button/buttons-disabled.json' -import { typographyTemplate } from './../_common/templates' +import { typographyTemplate } from '../_common/templates' const colors = { primary: primaryButtonTokens, @@ -96,7 +96,7 @@ const ButtonBase = styled.button.attrs(() => ({ // - Use ThemeProvider // - Set attr on button -const Button = ({ +export const Button = ({ variant, children, disabled, @@ -146,5 +146,3 @@ Button.defaultProps = { } Button.displayName = 'eds-button' - -export default Button diff --git a/libraries/core-react/src/Button/index.js b/libraries/core-react/src/Button/index.js index 3389ecb836..4d0a670f4a 100644 --- a/libraries/core-react/src/Button/index.js +++ b/libraries/core-react/src/Button/index.js @@ -1 +1 @@ -export { default } from './Button' +export { Button } from './Button' diff --git a/libraries/core-react/src/Table/Body.jsx b/libraries/core-react/src/Table/Body.jsx index 1fd3590f22..9561018ad9 100644 --- a/libraries/core-react/src/Table/Body.jsx +++ b/libraries/core-react/src/Table/Body.jsx @@ -4,23 +4,21 @@ import styled from 'styled-components' const TableBase = styled.tbody`` -const TableBody = (props) => { +export const Body = (props) => { const { children } = props return {children} } -TableBody.propTypes = { +Body.propTypes = { /** @ignore */ className: PropTypes.string, /** @ignore */ children: PropTypes.node.isRequired, } -TableBody.defaultProps = { +Body.defaultProps = { className: '', } -TableBody.displayName = 'eds-table-body' - -export default TableBody +Body.displayName = 'eds-table-body' diff --git a/libraries/core-react/src/Table/Cell.jsx b/libraries/core-react/src/Table/Cell.jsx index 7820f6afcd..f0af297ef8 100644 --- a/libraries/core-react/src/Table/Cell.jsx +++ b/libraries/core-react/src/Table/Cell.jsx @@ -2,7 +2,7 @@ import React from 'react' import PropTypes from 'prop-types' import styled from 'styled-components' import tableTokens from '@equinor/eds-tokens/components/table/table.json' -import { typographyTemplate } from './../_common/templates' +import { typographyTemplate } from '../_common/templates' const { header, cell } = tableTokens @@ -35,9 +35,9 @@ const borderTemplate = (borders) => }, '') const Base = ({ tokens }) => { - const { background, height, text, spacings, borders, hover } = tokens + const { background, height, text, spacings, borders } = tokens const { typography } = text - let base = ` + const base = ` background: ${background}; min-height: ${height}; height: ${height}; @@ -55,7 +55,7 @@ const TableBase = styled.td` ${Base} ` -const TableCell = (props) => { +export const Cell = (props) => { const { children, as, variant } = props const tokens = getTokens(as, variant) return ( @@ -65,7 +65,7 @@ const TableCell = (props) => { ) } -TableCell.propTypes = { +Cell.propTypes = { /** @ignore */ className: PropTypes.string, /** @ignore */ @@ -78,13 +78,11 @@ TableCell.propTypes = { variant: PropTypes.oneOf(['text', 'icon', 'numeric', 'input']), } -TableCell.defaultProps = { +Cell.defaultProps = { className: '', // scope: '', as: 'td', variant: 'text', } -TableCell.displayName = 'eds-table-cell' - -export default TableCell +Cell.displayName = 'eds-table-cell' diff --git a/libraries/core-react/src/Table/Head.jsx b/libraries/core-react/src/Table/Head.jsx index 869946f119..5d192b8f07 100644 --- a/libraries/core-react/src/Table/Head.jsx +++ b/libraries/core-react/src/Table/Head.jsx @@ -1,27 +1,24 @@ import React from 'react' import PropTypes from 'prop-types' import styled from 'styled-components' -import Cell from './Cell' const TableBase = styled.thead`` -const TableHead = (props) => { +export const Head = (props) => { const { children } = props return {children} } -TableHead.propTypes = { +Head.propTypes = { /** @ignore */ className: PropTypes.string, /** @ignore */ children: PropTypes.node.isRequired, } -TableHead.defaultProps = { +Head.defaultProps = { className: '', } -TableHead.displayName = 'eds-table-head' - -export default TableHead +Head.displayName = 'eds-table-head' diff --git a/libraries/core-react/src/Table/Row.jsx b/libraries/core-react/src/Table/Row.jsx index 2068d68ed6..f9bc552ac0 100644 --- a/libraries/core-react/src/Table/Row.jsx +++ b/libraries/core-react/src/Table/Row.jsx @@ -4,23 +4,21 @@ import styled from 'styled-components' const TableBase = styled.tr`` -const TableRow = (props) => { +export const Row = (props) => { const { children } = props return {children} } -TableRow.propTypes = { +Row.propTypes = { /** @ignore */ className: PropTypes.string, /** @ignore */ children: PropTypes.node.isRequired, } -TableRow.defaultProps = { +Row.defaultProps = { className: '', } -TableRow.displayName = 'eds-table-row' - -export default TableRow +Row.displayName = 'eds-table-row' diff --git a/libraries/core-react/src/Table/Table.jsx b/libraries/core-react/src/Table/Table.jsx index 84718ce0a9..ec8447d0b7 100644 --- a/libraries/core-react/src/Table/Table.jsx +++ b/libraries/core-react/src/Table/Table.jsx @@ -7,7 +7,7 @@ const TableBase = styled.table` border-collapse: collapse; ` -const Table = (props) => { +export const Table = (props) => { const { children } = props return {children} } @@ -24,5 +24,3 @@ Table.defaultProps = { } Table.displayName = 'eds-table' - -export default Table diff --git a/libraries/core-react/src/Table/index.js b/libraries/core-react/src/Table/index.js index 41d81823c3..dfb23b824e 100644 --- a/libraries/core-react/src/Table/index.js +++ b/libraries/core-react/src/Table/index.js @@ -1,12 +1,12 @@ -import Table from './Table' -import Body from './Body' -import Cell from './Cell' -import Head from './Head' -import Row from './Row' +import { Table } from './Table' +import { Body } from './Body' +import { Cell } from './Cell' +import { Head } from './Head' +import { Row } from './Row' Table.Body = Body Table.Cell = Cell Table.Head = Head Table.Row = Row -export default Table +export { Table } diff --git a/libraries/core-react/src/Typography/Typography.jsx b/libraries/core-react/src/Typography/Typography.jsx index 4e18cef75c..a8311f3805 100644 --- a/libraries/core-react/src/Typography/Typography.jsx +++ b/libraries/core-react/src/Typography/Typography.jsx @@ -2,7 +2,7 @@ import React from 'react' import PropTypes from 'prop-types' import styled from 'styled-components' import { tokens } from '@equinor/eds-tokens' -import { typographyTemplate } from './../_common/templates' +import { typographyTemplate } from '../_common/templates' const { heading, paragraph } = tokens.typography @@ -60,7 +60,7 @@ const toComplexVariantName = ( }` const Base = ({ typography, link }) => { - let base = ` + const base = ` margin: 0; ${typographyTemplate(typography, link)} @@ -73,7 +73,14 @@ const TypographyBase = styled.p` ${Base} ` -const Typography = ({ variant, children, bold, italic, link, ...other }) => { +export const Typography = ({ + variant, + children, + bold, + italic, + link, + ...other +}) => { const as = getElementType(variant, link) const variantName = toComplexVariantName(variant, bold, italic, link) let typography = variantToken[variantName] @@ -114,9 +121,11 @@ Typography.propTypes = { Typography.defaultProps = { variant: 'h1', + bold: false, + italic: false, + link: false, className: '', } Typography.displayName = 'eds-text' -export default Typography diff --git a/libraries/core-react/src/Typography/index.js b/libraries/core-react/src/Typography/index.js index 71f73701e3..3ec44f36f0 100644 --- a/libraries/core-react/src/Typography/index.js +++ b/libraries/core-react/src/Typography/index.js @@ -1 +1 @@ -export { default } from './Typography' +export { Typography } from './Typography' diff --git a/libraries/core-react/src/_common/templates.js b/libraries/core-react/src/_common/templates.js index 5e66add228..195006aa3e 100644 --- a/libraries/core-react/src/_common/templates.js +++ b/libraries/core-react/src/_common/templates.js @@ -9,22 +9,22 @@ export const typographyTemplate = (typography, link) => { ` if (typography.fontStyle) { - base = base + `font-style: ${typography.fontStyle};` + base += `\nfont-style: ${typography.fontStyle};` } if (typography.letterSpacing) { - base = base + `letter-spacing: ${typography.letterSpacing};` + base += `\nletter-spacing: ${typography.letterSpacing};` } if (typography.textTransform) { - base = base + `text-transform: ${typography.textTransform};` + base += `\ntext-transform: ${typography.textTransform};` } if (typography.textDecoration) { - base = base + `text-decoration: ${typography.textDecoration};` + base += `\ntext-decoration: ${typography.textDecoration};` } if (typography.fontFeature) { - base = base + ` font-feature-settings: ${typography.fontFeature};` + base += `\nfont-feature-settings: ${typography.fontFeature};` } if (link) { - base = base + 'cursor: pointer;' + base += `\ncursor: pointer;` } return base diff --git a/libraries/core-react/src/index.js b/libraries/core-react/src/index.js index eaa60ec5ac..a570810c3b 100644 --- a/libraries/core-react/src/index.js +++ b/libraries/core-react/src/index.js @@ -1,5 +1,5 @@ /* eslint-disable import/prefer-default-export */ -export { default as Button } from './Button' -export { default as Typography } from './Typography' -export { default as Table } from './Table' +export { Button } from './Button' +export { Typography } from './Typography' +export { Table } from './Table' /* eslint-enable */ diff --git a/libraries/core/pnpmfile.js b/libraries/core/pnpmfile.js index 58f4b080a0..09be3b4b82 100644 --- a/libraries/core/pnpmfile.js +++ b/libraries/core/pnpmfile.js @@ -1,17 +1,22 @@ -module.exports = { - hooks: { - readPackage, - }, -} - function readPackage(pkg, context) { + const additionalDependencies = {} + if (pkg.name === 'eslint') { - pkg.dependencies = { - ...pkg.dependencies, - 'eslint-import-resolver-node': '0.3.2', - } + additionalDependencies['eslint-import-resolver-node'] = '0.3.2' context.log('Added missing dependencies for eslint-plugin-import') } - return pkg + return { + ...pkg, + dependencies: { + ...pkg.dependencies, + ...additionalDependencies, + }, + } +} + +module.exports = { + hooks: { + readPackage, + }, } diff --git a/libraries/tokens/index.js b/libraries/tokens/index.js index 6f7c1d311d..dd183ade02 100644 --- a/libraries/tokens/index.js +++ b/libraries/tokens/index.js @@ -1 +1 @@ -export { tokens } from './base' \ No newline at end of file +export { tokens } from './base' diff --git a/package.yaml b/package.yaml index ced5a94dd2..8f6238efc4 100644 --- a/package.yaml +++ b/package.yaml @@ -2,6 +2,7 @@ name: eds engines: pnpm: '>=4' scripts: + lint: 'eslint ./libraries/**/*.{jsx,js}' init: pnpm multi install --force && pnpm run build build: pnpm --filter @equinor/eds-core-react run build 'bump:core-react': >- @@ -23,5 +24,8 @@ devDependencies: eslint: ^6.7.2 eslint-config-airbnb: ^17.1.1 eslint-config-prettier: ^6.7.0 + eslint-plugin-import: ^2.19.1 + eslint-plugin-jsx-a11y: ^6.2.3 eslint-plugin-prettier: ^3.1.1 + eslint-plugin-react: ^7.17.0 prettier: ^1.19.1 diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4c8a221072..53c3bb5277 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,8 +1,11 @@ devDependencies: eslint: 6.7.2 - eslint-config-airbnb: 17.1.1_eslint@6.7.2 + eslint-config-airbnb: 17.1.1_8e7ed5692c3a582a54ce22333d27b452 eslint-config-prettier: 6.7.0_eslint@6.7.2 + eslint-plugin-import: 2.19.1_eslint@6.7.2 + eslint-plugin-jsx-a11y: 6.2.3_eslint@6.7.2 eslint-plugin-prettier: 3.1.1_eslint@6.7.2+prettier@1.19.1 + eslint-plugin-react: 7.17.0_eslint@6.7.2 prettier: 1.19.1 lockfileVersion: 5.1 packages: @@ -20,6 +23,19 @@ packages: dev: true resolution: integrity: sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ== + /@babel/runtime-corejs3/7.7.6: + dependencies: + core-js-pure: 3.5.0 + regenerator-runtime: 0.13.3 + dev: true + resolution: + integrity: sha512-NrRUehqG0sMSCaP+0XV/vOvvjNl4BQOWq3Qys1Q2KTEm5tGMo9h0dHnIzeKerj0a7SIB8LP5kYg/T1raE3FoKQ== + /@babel/runtime/7.7.6: + dependencies: + regenerator-runtime: 0.13.3 + dev: true + resolution: + integrity: sha512-BWAJxpNVa0QlE5gZdWjSxXtemZyZ9RmrmVozxt3NUXeZhVIJ5ANyqmMc0JDrivBZyxUuQvFxlvH4OWWOogGfUw== /acorn-jsx/5.1.0_acorn@7.1.0: dependencies: acorn: 7.1.0 @@ -78,12 +94,52 @@ packages: dev: true resolution: integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== + /aria-query/3.0.0: + dependencies: + ast-types-flow: 0.0.7 + commander: 2.20.3 + dev: true + resolution: + integrity: sha1-ZbP8wcoRVajJrmTW7uKX8V1RM8w= + /array-includes/3.1.0: + dependencies: + define-properties: 1.1.3 + es-abstract: 1.17.0-next.1 + dev: true + engines: + node: '>= 0.4' + resolution: + integrity: sha512-ONOEQoKrvXPKk7Su92Co0YMqYO32FfqJTzkKU9u2UpIXyYZIzLSvpdg4AwvSw4mSUW0czu6inK+zby6Oj6gDjQ== + /array.prototype.flat/1.2.2: + dependencies: + define-properties: 1.1.3 + es-abstract: 1.16.3 + function-bind: 1.1.1 + dev: true + engines: + node: '>= 0.4' + resolution: + integrity: sha512-VXjh7lAL4KXKF2hY4FnEW9eRW6IhdvFW1sN/JwLbmECbCgACCnBHNyP3lFiYuttr0jxRN9Bsc5+G27dMseSWqQ== + /ast-types-flow/0.0.7: + dev: true + resolution: + integrity: sha1-9wtzXGvKGlycItmCw+Oef+ujva0= /astral-regex/1.0.0: dev: true engines: node: '>=4' resolution: integrity: sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg== + /axobject-query/2.1.1_eslint@6.7.2: + dependencies: + '@babel/runtime': 7.7.6 + '@babel/runtime-corejs3': 7.7.6 + eslint: 6.7.2 + dev: true + peerDependencies: + eslint: ^5 || ^6 + resolution: + integrity: sha512-lF98xa/yvy6j3fBHAgQXIYl+J4eZadOSqsPojemUqClzNbBV38wWGpUbQbVEyf4eUF5yF7eHmGgGA2JiHyjeqw== /balanced-match/1.0.0: dev: true resolution: @@ -137,6 +193,10 @@ packages: dev: true resolution: integrity: sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= + /commander/2.20.3: + dev: true + resolution: + integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== /concat-map/0.0.1: dev: true resolution: @@ -145,6 +205,17 @@ packages: dev: true resolution: integrity: sha512-KbS1Y0jMtyPgIxjO7ZzMAuUpAKMt1SzCL9fsrKsX6b0zJPTaT0SiSPmewwVZg9UAO83HVIlEhZF84LIjZ0lmAw== + /contains-path/0.1.0: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo= + /core-js-pure/3.5.0: + dev: true + requiresBuild: true + resolution: + integrity: sha512-wB0QtKAofWigiISuT1Tej3hKgq932fB//Lf1VoPbiLpTYlHY0nIDhgF+q1na0DAKFHH5wGCirkAknOmDN8ijXA== /cross-spawn/6.0.5: dependencies: nice-try: 1.0.5 @@ -157,6 +228,16 @@ packages: node: '>=4.8' resolution: integrity: sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== + /damerau-levenshtein/1.0.5: + dev: true + resolution: + integrity: sha512-CBCRqFnpu715iPmw1KrdOrzRqbdFwQTwAWyyyYS42+iAgHCuXZ+/TdMgQkUENPomxEz9z1BEzuQU2Xw0kUuAgA== + /debug/2.6.9: + dependencies: + ms: 2.0.0 + dev: true + resolution: + integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== /debug/4.1.1: dependencies: ms: 2.1.2 @@ -175,6 +256,23 @@ packages: node: '>= 0.4' resolution: integrity: sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== + /doctrine/1.5.0: + dependencies: + esutils: 2.0.3 + isarray: 1.0.0 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-N53Ocw9hZvds76TmcHoVmwLFpvo= + /doctrine/2.1.0: + dependencies: + esutils: 2.0.3 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw== /doctrine/3.0.0: dependencies: esutils: 2.0.3 @@ -191,6 +289,12 @@ packages: dev: true resolution: integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + /error-ex/1.3.2: + dependencies: + is-arrayish: 0.2.1 + dev: true + resolution: + integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== /es-abstract/1.16.3: dependencies: es-to-primitive: 1.2.1 @@ -208,6 +312,24 @@ packages: node: '>= 0.4' resolution: integrity: sha512-WtY7Fx5LiOnSYgF5eg/1T+GONaGmpvpPdCpSnYij+U2gDTL0UPfWrhDw7b2IYb+9NQJsYpCA0wOQvZfsd6YwRw== + /es-abstract/1.17.0-next.1: + dependencies: + es-to-primitive: 1.2.1 + function-bind: 1.1.1 + has: 1.0.3 + has-symbols: 1.0.1 + is-callable: 1.1.4 + is-regex: 1.0.4 + object-inspect: 1.7.0 + object-keys: 1.1.1 + object.assign: 4.1.0 + string.prototype.trimleft: 2.1.0 + string.prototype.trimright: 2.1.0 + dev: true + engines: + node: '>= 0.4' + resolution: + integrity: sha512-7MmGr03N7Rnuid6+wyhD9sHNE2n4tFSwExnU2lQl3lIo2ShXWGePY80zYaoMOmILWv57H0amMjZGHNzzGG70Rw== /es-to-primitive/1.2.1: dependencies: is-callable: 1.1.4 @@ -224,10 +346,11 @@ packages: node: '>=0.8.0' resolution: integrity: sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= - /eslint-config-airbnb-base/13.2.0_eslint@6.7.2: + /eslint-config-airbnb-base/13.2.0_5109a59458c0498b600504b00b431232: dependencies: confusing-browser-globals: 1.0.9 eslint: 6.7.2 + eslint-plugin-import: 2.19.1_eslint@6.7.2 object.assign: 4.1.0 object.entries: 1.1.0 dev: true @@ -238,10 +361,13 @@ packages: eslint-plugin-import: ^2.17.2 resolution: integrity: sha512-1mg/7eoB4AUeB0X1c/ho4vb2gYkNH8Trr/EgCT/aGmKhhG+F6vF5s8+iRBlWAzFIAphxIdp3YfEKgEl0f9Xg+w== - /eslint-config-airbnb/17.1.1_eslint@6.7.2: + /eslint-config-airbnb/17.1.1_8e7ed5692c3a582a54ce22333d27b452: dependencies: eslint: 6.7.2 - eslint-config-airbnb-base: 13.2.0_eslint@6.7.2 + eslint-config-airbnb-base: 13.2.0_5109a59458c0498b600504b00b431232 + eslint-plugin-import: 2.19.1_eslint@6.7.2 + eslint-plugin-jsx-a11y: 6.2.3_eslint@6.7.2 + eslint-plugin-react: 7.17.0_eslint@6.7.2 object.assign: 4.1.0 object.entries: 1.1.0 dev: true @@ -264,6 +390,73 @@ packages: eslint: '>=3.14.1' resolution: integrity: sha512-FamQVKM3jjUVwhG4hEMnbtsq7xOIDm+SY5iBPfR8gKsJoAB2IQnNF+bk1+8Fy44Nq7PPJaLvkRxILYdJWoguKQ== + /eslint-import-resolver-node/0.3.2: + dependencies: + debug: 2.6.9 + resolve: 1.13.1 + dev: true + resolution: + integrity: sha512-sfmTqJfPSizWu4aymbPr4Iidp5yKm8yDkHp+Ir3YiTHiiDfxh69mOUsmiqW6RZ9zRXFaF64GtYmN7e+8GHBv6Q== + /eslint-module-utils/2.5.0: + dependencies: + debug: 2.6.9 + pkg-dir: 2.0.0 + dev: true + engines: + node: '>=4' + resolution: + integrity: sha512-kCo8pZaNz2dsAW7nCUjuVoI11EBXXpIzfNxmaoLhXoRDOnqXLC4iSGVRdZPhOitfbdEfMEfKOiENaK6wDPZEGw== + /eslint-plugin-eslint-plugin/2.1.0_eslint@6.7.2: + dependencies: + eslint: 6.7.2 + dev: true + engines: + node: ^6.14.0 || ^8.10.0 || >=9.10.0 + peerDependencies: + eslint: '>=5.0.0' + resolution: + integrity: sha512-kT3A/ZJftt28gbl/Cv04qezb/NQ1dwYIbi8lyf806XMxkus7DvOVCLIfTXMrorp322Pnoez7+zabXH29tADIDg== + /eslint-plugin-import/2.19.1_eslint@6.7.2: + dependencies: + array-includes: 3.1.0 + array.prototype.flat: 1.2.2 + contains-path: 0.1.0 + debug: 2.6.9 + doctrine: 1.5.0 + eslint: 6.7.2 + eslint-import-resolver-node: 0.3.2 + eslint-module-utils: 2.5.0 + has: 1.0.3 + minimatch: 3.0.4 + object.values: 1.1.0 + read-pkg-up: 2.0.0 + resolve: 1.13.1 + dev: true + engines: + node: '>=4' + peerDependencies: + eslint: 2.x - 6.x + resolution: + integrity: sha512-x68131aKoCZlCae7rDXKSAQmbT5DQuManyXo2sK6fJJ0aK5CWAkv6A6HJZGgqC8IhjQxYPgo6/IY4Oz8AFsbBw== + /eslint-plugin-jsx-a11y/6.2.3_eslint@6.7.2: + dependencies: + '@babel/runtime': 7.7.6 + aria-query: 3.0.0 + array-includes: 3.1.0 + ast-types-flow: 0.0.7 + axobject-query: 2.1.1_eslint@6.7.2 + damerau-levenshtein: 1.0.5 + emoji-regex: 7.0.3 + eslint: 6.7.2 + has: 1.0.3 + jsx-ast-utils: 2.2.3 + dev: true + engines: + node: '>=4.0' + peerDependencies: + eslint: ^3 || ^4 || ^5 || ^6 + resolution: + integrity: sha512-CawzfGt9w83tyuVekn0GDPU9ytYtxyxyFZ3aSWROmnRRFQFT2BiPJd7jvRdzNDi6oLWaS2asMeYSNMjWTV4eNg== /eslint-plugin-prettier/3.1.1_eslint@6.7.2+prettier@1.19.1: dependencies: eslint: 6.7.2 @@ -277,6 +470,26 @@ packages: prettier: '>= 1.13.0' resolution: integrity: sha512-A+TZuHZ0KU0cnn56/9mfR7/KjUJ9QNVXUhwvRFSR7PGPe0zQR6PTkmyqg1AtUUEOzTqeRsUwyKFh0oVZKVCrtA== + /eslint-plugin-react/7.17.0_eslint@6.7.2: + dependencies: + array-includes: 3.1.0 + doctrine: 2.1.0 + eslint: 6.7.2 + eslint-plugin-eslint-plugin: 2.1.0_eslint@6.7.2 + has: 1.0.3 + jsx-ast-utils: 2.2.3 + object.entries: 1.1.0 + object.fromentries: 2.0.1 + object.values: 1.1.0 + prop-types: 15.7.2 + resolve: 1.13.1 + dev: true + engines: + node: '>=4' + peerDependencies: + eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 + resolution: + integrity: sha512-ODB7yg6lxhBVMeiH1c7E95FLD4E/TwmFjltiU+ethv7KPdCwgiFuOZg9zNRHyufStTDLl/dEFqI2Q1VPmCd78A== /eslint-scope/5.0.0: dependencies: esrecurse: 4.2.1 @@ -432,6 +645,14 @@ packages: node: '>=4' resolution: integrity: sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g== + /find-up/2.1.0: + dependencies: + locate-path: 2.0.0 + dev: true + engines: + node: '>=4' + resolution: + integrity: sha1-RdG35QbHF93UgndaK3eSCjwMV6c= /flat-cache/2.0.1: dependencies: flatted: 2.0.1 @@ -491,6 +712,10 @@ packages: node: '>=8' resolution: integrity: sha512-wAfjdLgFsPZsklLJvOBUBmzYE8/CwhEqSBEMRXA3qxIiNtyqvjYurAtIfDh6chlEPUfmTY3MnZh5Hfh4q0UlIw== + /graceful-fs/4.2.3: + dev: true + resolution: + integrity: sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ== /has-flag/3.0.0: dev: true engines: @@ -511,6 +736,10 @@ packages: node: '>= 0.4.0' resolution: integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== + /hosted-git-info/2.8.5: + dev: true + resolution: + integrity: sha512-kssjab8CvdXfcXMXVcvsXum4Hwdq9XGtRD3TteMEvEbq0LXyiNQr6AprqKqfeaDXze7SxWvRxdpwE6ku7ikLkg== /iconv-lite/0.4.24: dependencies: safer-buffer: 2.1.2 @@ -571,6 +800,10 @@ packages: node: '>=6.0.0' resolution: integrity: sha512-rSdC7zelHdRQFkWnhsMu2+2SO41mpv2oF2zy4tMhmiLWkcKbOAs87fWAJhVXttKVwhdZvymvnuM95EyEXg2/tQ== + /is-arrayish/0.2.1: + dev: true + resolution: + integrity: sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= /is-callable/1.1.4: dev: true engines: @@ -629,6 +862,10 @@ packages: node: '>= 0.4' resolution: integrity: sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ== + /isarray/1.0.0: + dev: true + resolution: + integrity: sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= /isexe/2.0.0: dev: true resolution: @@ -653,6 +890,15 @@ packages: dev: true resolution: integrity: sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= + /jsx-ast-utils/2.2.3: + dependencies: + array-includes: 3.1.0 + object.assign: 4.1.0 + dev: true + engines: + node: '>=4.0' + resolution: + integrity: sha512-EdIHFMm+1BPynpKOpdPqiOsvnIrInRGJD7bzPZdPkjitQEqpdpUuFpq4T0npZFKTiB3RhWFdGN+oqOJIdhDhQA== /levn/0.3.0: dependencies: prelude-ls: 1.1.2 @@ -662,10 +908,37 @@ packages: node: '>= 0.8.0' resolution: integrity: sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= + /load-json-file/2.0.0: + dependencies: + graceful-fs: 4.2.3 + parse-json: 2.2.0 + pify: 2.3.0 + strip-bom: 3.0.0 + dev: true + engines: + node: '>=4' + resolution: + integrity: sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg= + /locate-path/2.0.0: + dependencies: + p-locate: 2.0.0 + path-exists: 3.0.0 + dev: true + engines: + node: '>=4' + resolution: + integrity: sha1-K1aLJl7slExtnA3pw9u7ygNUzY4= /lodash/4.17.15: dev: true resolution: integrity: sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== + /loose-envify/1.4.0: + dependencies: + js-tokens: 4.0.0 + dev: true + hasBin: true + resolution: + integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== /mimic-fn/2.1.0: dev: true engines: @@ -689,6 +962,10 @@ packages: hasBin: true resolution: integrity: sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= + /ms/2.0.0: + dev: true + resolution: + integrity: sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= /ms/2.1.2: dev: true resolution: @@ -705,6 +982,21 @@ packages: dev: true resolution: integrity: sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== + /normalize-package-data/2.5.0: + dependencies: + hosted-git-info: 2.8.5 + resolve: 1.13.1 + semver: 5.7.1 + validate-npm-package-license: 3.0.4 + dev: true + resolution: + integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== + /object-assign/4.1.1: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= /object-inspect/1.7.0: dev: true resolution: @@ -737,6 +1029,28 @@ packages: node: '>= 0.4' resolution: integrity: sha512-l+H6EQ8qzGRxbkHOd5I/aHRhHDKoQXQ8g0BYt4uSweQU1/J6dZUOyWh9a2Vky35YCKjzmgxOzta2hH6kf9HuXA== + /object.fromentries/2.0.1: + dependencies: + define-properties: 1.1.3 + es-abstract: 1.16.3 + function-bind: 1.1.1 + has: 1.0.3 + dev: true + engines: + node: '>= 0.4' + resolution: + integrity: sha512-PUQv8Hbg3j2QX0IQYv3iAGCbGcu4yY4KQ92/dhA4sFSixBmSmp13UpDLs6jGK8rBtbmhNNIK99LD2k293jpiGA== + /object.values/1.1.0: + dependencies: + define-properties: 1.1.3 + es-abstract: 1.16.3 + function-bind: 1.1.1 + has: 1.0.3 + dev: true + engines: + node: '>= 0.4' + resolution: + integrity: sha512-8mf0nKLAoFX6VlNVdhGj31SVYpaNFtUnuoOXWyFEstsWRgU837AK+JYM0iAxwkSzGRbwn8cbFmgbyxj1j4VbXg== /once/1.4.0: dependencies: wrappy: 1.0.2 @@ -770,6 +1084,28 @@ packages: node: '>=0.10.0' resolution: integrity: sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= + /p-limit/1.3.0: + dependencies: + p-try: 1.0.0 + dev: true + engines: + node: '>=4' + resolution: + integrity: sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== + /p-locate/2.0.0: + dependencies: + p-limit: 1.3.0 + dev: true + engines: + node: '>=4' + resolution: + integrity: sha1-IKAQOyIqcMj9OcwuWAaA893l7EM= + /p-try/1.0.0: + dev: true + engines: + node: '>=4' + resolution: + integrity: sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= /parent-module/1.0.1: dependencies: callsites: 3.1.0 @@ -778,6 +1114,20 @@ packages: node: '>=6' resolution: integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== + /parse-json/2.2.0: + dependencies: + error-ex: 1.3.2 + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-9ID0BDTvgHQfhGkJn43qGPVaTck= + /path-exists/3.0.0: + dev: true + engines: + node: '>=4' + resolution: + integrity: sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= /path-is-absolute/1.0.1: dev: true engines: @@ -790,6 +1140,32 @@ packages: node: '>=4' resolution: integrity: sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= + /path-parse/1.0.6: + dev: true + resolution: + integrity: sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== + /path-type/2.0.0: + dependencies: + pify: 2.3.0 + dev: true + engines: + node: '>=4' + resolution: + integrity: sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM= + /pify/2.3.0: + dev: true + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-7RQaasBDqEnqWISY59yosVMw6Qw= + /pkg-dir/2.0.0: + dependencies: + find-up: 2.1.0 + dev: true + engines: + node: '>=4' + resolution: + integrity: sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s= /prelude-ls/1.1.2: dev: true engines: @@ -817,12 +1193,47 @@ packages: node: '>=0.4.0' resolution: integrity: sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== + /prop-types/15.7.2: + dependencies: + loose-envify: 1.4.0 + object-assign: 4.1.1 + react-is: 16.12.0 + dev: true + resolution: + integrity: sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ== /punycode/2.1.1: dev: true engines: node: '>=6' resolution: integrity: sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== + /react-is/16.12.0: + dev: true + resolution: + integrity: sha512-rPCkf/mWBtKc97aLL9/txD8DZdemK0vkA3JMLShjlJB3Pj3s+lpf1KaBzMfQrAmhMQB0n1cU/SUGgKKBCe837Q== + /read-pkg-up/2.0.0: + dependencies: + find-up: 2.1.0 + read-pkg: 2.0.0 + dev: true + engines: + node: '>=4' + resolution: + integrity: sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4= + /read-pkg/2.0.0: + dependencies: + load-json-file: 2.0.0 + normalize-package-data: 2.5.0 + path-type: 2.0.0 + dev: true + engines: + node: '>=4' + resolution: + integrity: sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg= + /regenerator-runtime/0.13.3: + dev: true + resolution: + integrity: sha512-naKIZz2GQ8JWh///G7L3X6LaQUAMp2lvb1rvwwsURe/VXwD6VMfr+/1NuNw3ag8v2kY1aQ/go5SNn79O9JU7yw== /regexpp/2.0.1: dev: true engines: @@ -835,6 +1246,12 @@ packages: node: '>=4' resolution: integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== + /resolve/1.13.1: + dependencies: + path-parse: 1.0.6 + dev: true + resolution: + integrity: sha512-CxqObCX8K8YtAhOBRg+lrcdn+LK+WYOS8tSjqSFbjtrI5PnS63QPhZl4+yKfrU9tdsbMu9Anr/amegT87M9Z6w== /restore-cursor/3.1.0: dependencies: onetime: 5.1.0 @@ -909,6 +1326,28 @@ packages: node: '>=6' resolution: integrity: sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ== + /spdx-correct/3.1.0: + dependencies: + spdx-expression-parse: 3.0.0 + spdx-license-ids: 3.0.5 + dev: true + resolution: + integrity: sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q== + /spdx-exceptions/2.2.0: + dev: true + resolution: + integrity: sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA== + /spdx-expression-parse/3.0.0: + dependencies: + spdx-exceptions: 2.2.0 + spdx-license-ids: 3.0.5 + dev: true + resolution: + integrity: sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg== + /spdx-license-ids/3.0.5: + dev: true + resolution: + integrity: sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q== /sprintf-js/1.0.3: dev: true resolution: @@ -967,6 +1406,12 @@ packages: node: '>=8' resolution: integrity: sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== + /strip-bom/3.0.0: + dev: true + engines: + node: '>=4' + resolution: + integrity: sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= /strip-json-comments/3.0.1: dev: true engines: @@ -1036,6 +1481,13 @@ packages: dev: true resolution: integrity: sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g== + /validate-npm-package-license/3.0.4: + dependencies: + spdx-correct: 3.1.0 + spdx-expression-parse: 3.0.0 + dev: true + resolution: + integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== /which/1.3.1: dependencies: isexe: 2.0.0 @@ -1065,5 +1517,8 @@ specifiers: eslint: ^6.7.2 eslint-config-airbnb: ^17.1.1 eslint-config-prettier: ^6.7.0 + eslint-plugin-import: ^2.19.1 + eslint-plugin-jsx-a11y: ^6.2.3 eslint-plugin-prettier: ^3.1.1 + eslint-plugin-react: ^7.17.0 prettier: ^1.19.1