From b9a4360a9e876f050d54924096bfbdf9bd69f64e Mon Sep 17 00:00:00 2001 From: Gregor Anders Date: Fri, 26 Jun 2020 13:45:19 +0200 Subject: [PATCH 1/4] chore(release): prepare next release --- SECURITY.md | 3 ++- docs/public | 2 +- e2e/screenshots | 2 +- package.json | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/SECURITY.md b/SECURITY.md index c9cdcdc..6b8aa65 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -5,7 +5,8 @@ ​ | Version | Supported | | ------- | ------------------ | -| 0.0.14 | :white_check_mark: | +| 0.0.15 | :white_check_mark: | +| 0.0.14 | :x: | | 0.0.13 | :x: | | 0.0.12 | :x: | | 0.0.11 | :x: | diff --git a/docs/public b/docs/public index 5293163..8fecb0a 160000 --- a/docs/public +++ b/docs/public @@ -1 +1 @@ -Subproject commit 5293163ebf27dbcca80e459f8e430099665ae405 +Subproject commit 8fecb0ae321a49953d5dff3c594165b5a8217ec3 diff --git a/e2e/screenshots b/e2e/screenshots index 5d4e725..32cf913 160000 --- a/e2e/screenshots +++ b/e2e/screenshots @@ -1 +1 @@ -Subproject commit 5d4e72513faa81631b4cd5d2b6b6da994390fdc2 +Subproject commit 32cf9136e24eda5fa7c3a8ac9c5898337ff72dbf diff --git a/package.json b/package.json index 416ee23..010dca1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ts-react-playground", - "version": "0.0.14", + "version": "0.0.15", "description": "TypeScript React Playground", "scripts": { "start": "webpack-dev-server --open --progress --config webpack.config.js", From 6cc7951d22cfe10c845fd4330a3d7776615314d2 Mon Sep 17 00:00:00 2001 From: Gregor Anders Date: Fri, 26 Jun 2020 14:08:17 +0200 Subject: [PATCH 2/4] feat(vendor): enable development build #78 --- package.json | 22 ++++++++++---------- src/vendor/rollup-base.config.js | 9 ++++---- src/vendor/rollup-devexpress.config.js | 9 ++++---- src/vendor/rollup-faker.config.js | 9 ++++---- src/vendor/rollup-fontawesome.config.js | 9 ++++---- src/vendor/rollup-materialui-icons.config.js | 9 ++++---- src/vendor/rollup-materialui.config.js | 9 ++++---- src/vendor/rollup-mdi-material-ui.config.js | 9 ++++---- src/vendor/rollup-react.config.js | 9 ++++---- src/vendor/rollup-recharts.config.js | 9 ++++---- 10 files changed, 56 insertions(+), 47 deletions(-) diff --git a/package.json b/package.json index 010dca1..6cd53c6 100644 --- a/package.json +++ b/package.json @@ -32,25 +32,25 @@ "prefavicon": "rimraf ./public/assets ./public/favicon.html", "favicon": "ts-node --project ./scripts/tsconfig.json ./scripts/favicon.ts", "prevendor": "rimraf ./public/vendor ./public/es-module-shims.js", - "vendor": "rimraf ./public/vendor && npm run vendor:base && npm run vendor:faker && npm run vendor:fontawesome && npm run vendor:react && npm run vendor:recharts && npm run vendor:esmoduleshims && npm run vendor:materialui", - "vendor:base": "cross-env NODE_ENV=production rollup -c ./src/vendor/rollup-base.config.js", - "vendor:faker": "cross-env NODE_ENV=production rollup -c ./src/vendor/rollup-faker.config.js", - "vendor:fontawesome": "cross-env NODE_ENV=production rollup -c ./src/vendor/rollup-fontawesome.config.js", - "vendor:react": "cross-env NODE_ENV=production rollup -c ./src/vendor/rollup-react.config.js", - "vendor:recharts": "cross-env NODE_ENV=production rollup -c ./src/vendor/rollup-recharts.config.js", + "vendor": "npm run vendor:base && npm run vendor:faker && npm run vendor:fontawesome && npm run vendor:react && npm run vendor:recharts && npm run vendor:esmoduleshims && npm run vendor:materialui", + "vendor:base": "rollup -c ./src/vendor/rollup-base.config.js", + "vendor:faker": "rollup -c ./src/vendor/rollup-faker.config.js", + "vendor:fontawesome": "rollup -c ./src/vendor/rollup-fontawesome.config.js", + "vendor:react": "rollup -c ./src/vendor/rollup-react.config.js", + "vendor:recharts": "rollup -c ./src/vendor/rollup-recharts.config.js", "vendor:esmoduleshims": "tsc --project ./src/vendor/es-module-shims", "vendor:materialui": "npm run vendor:materialui-base && npm run vendor:materialui-icons && npm run vendor:mdi-material-ui && npm run vendor:devexpress", - "vendor:materialui-base": "cross-env NODE_ENV=production rollup -c ./src/vendor/rollup-materialui.config.js", - "vendor:materialui-icons": "cross-env NODE_ENV=production rollup -c ./src/vendor/rollup-materialui-icons.config.js", - "vendor:mdi-material-ui": "cross-env NODE_ENV=production rollup -c ./src/vendor/rollup-mdi-material-ui.config.js", - "vendor:devexpress": "cross-env NODE_ENV=production rollup -c ./src/vendor/rollup-devexpress.config.js", + "vendor:materialui-base": "rollup -c ./src/vendor/rollup-materialui.config.js", + "vendor:materialui-icons": "rollup -c ./src/vendor/rollup-materialui-icons.config.js", + "vendor:mdi-material-ui": "rollup -c ./src/vendor/rollup-mdi-material-ui.config.js", + "vendor:devexpress": "rollup -c ./src/vendor/rollup-devexpress.config.js", "preserviceWorker": "rimraf ./public/serviceWorker.js", "serviceWorker": "tsc --project ./src/service --outFile ./public/serviceWorker.js", "postserviceWorker": "workbox injectManifest workbox-config.js", "prewatch-serviceWorker": "npm run serviceWorker", "watch-serviceWorker": "tsc --watch --project ./src/service --outFile ./public/serviceWorker.js", "predocker:build": "npm run build", - "docker:build": "cross-env NODE_ENV=production docker-compose build --force-rm --no-cache --parallel --pull", + "docker:build": "docker-compose build --force-rm --no-cache --parallel --pull", "docker:up": "docker-compose up -d", "docker:down": "docker-compose down", "codeclimate": "docker run --interactive --tty --rm --env CODECLIMATE_CODE=\"$PWD\" --volume \"$PWD\":/code --volume /var/run/docker.sock:/var/run/docker.sock --volume /tmp/cc:/tmp/cc codeclimate/codeclimate analyze", diff --git a/src/vendor/rollup-base.config.js b/src/vendor/rollup-base.config.js index a1cc2f2..fab3722 100644 --- a/src/vendor/rollup-base.config.js +++ b/src/vendor/rollup-base.config.js @@ -5,9 +5,9 @@ import resolve from '@rollup/plugin-node-resolve'; import replace from '@rollup/plugin-replace'; import typescript from '@rollup/plugin-typescript'; -const isProd = process.env.NODE_ENV === 'production'; +const isProduction = process.env.NODE_ENV === 'production'; -console.log('Production:', isProd); +console.log('Production:', isProduction); const exported = [ { @@ -109,12 +109,12 @@ const exported = [ format: 'esm', // 'cjs' | 'umd' | 'iife' | 'es' | 'esm' exports: 'named', name, - sourcemap: isProd ? false : true, + sourcemap: isProduction ? false : true, }, ], plugins: [ replace({ - 'process.env.NODE_ENV': JSON.stringify(isProd ? 'production' : 'development'), + 'process.env.NODE_ENV': JSON.stringify(isProduction ? 'production' : 'development'), }), resolve({ preferBuiltins: false, @@ -122,6 +122,7 @@ const exported = [ json(), typescript({ tsconfig: `src/vendor/${name}/tsconfig.json`, + sourceMap: isProduction ? false : true, }), commonjs({ include: ['node_modules/**'], diff --git a/src/vendor/rollup-devexpress.config.js b/src/vendor/rollup-devexpress.config.js index fb688d9..0bf6ede 100644 --- a/src/vendor/rollup-devexpress.config.js +++ b/src/vendor/rollup-devexpress.config.js @@ -5,9 +5,9 @@ import resolve from '@rollup/plugin-node-resolve'; import replace from '@rollup/plugin-replace'; import typescript from '@rollup/plugin-typescript'; -const isProd = process.env.NODE_ENV === 'production'; +const isProduction = process.env.NODE_ENV === 'production'; -console.log('Production:', isProd); +console.log('Production:', isProduction); const exported = [ { @@ -46,12 +46,12 @@ const exported = [ format: 'esm', // 'cjs' | 'umd' | 'iife' | 'es' | 'esm' exports: 'named', name, - sourcemap: isProd ? false : true, + sourcemap: isProduction ? false : true, }, ], plugins: [ replace({ - 'process.env.NODE_ENV': JSON.stringify(isProd ? 'production' : 'development'), + 'process.env.NODE_ENV': JSON.stringify(isProduction ? 'production' : 'development'), }), resolve({ preferBuiltins: false, @@ -59,6 +59,7 @@ const exported = [ json(), typescript({ tsconfig: `src/vendor/${name}/tsconfig.json`, + sourceMap: isProduction ? false : true, }), commonjs({ include: ['node_modules/**'], diff --git a/src/vendor/rollup-faker.config.js b/src/vendor/rollup-faker.config.js index bbf6f1a..4f70d10 100644 --- a/src/vendor/rollup-faker.config.js +++ b/src/vendor/rollup-faker.config.js @@ -5,9 +5,9 @@ import resolve from '@rollup/plugin-node-resolve'; import replace from '@rollup/plugin-replace'; import typescript from '@rollup/plugin-typescript'; -const isProd = process.env.NODE_ENV === 'production'; +const isProduction = process.env.NODE_ENV === 'production'; -console.log('Production:', isProd); +console.log('Production:', isProduction); const exported = [ { @@ -24,12 +24,12 @@ const exported = [ format: 'esm', // 'cjs' | 'umd' | 'iife' | 'es' | 'esm' exports: 'named', name, - sourcemap: isProd ? false : true, + sourcemap: isProduction ? false : true, }, ], plugins: [ replace({ - 'process.env.NODE_ENV': JSON.stringify(isProd ? 'production' : 'development'), + 'process.env.NODE_ENV': JSON.stringify(isProduction ? 'production' : 'development'), }), resolve({ preferBuiltins: false, @@ -37,6 +37,7 @@ const exported = [ json(), typescript({ tsconfig: `src/vendor/${name}/tsconfig.json`, + sourceMap: isProduction ? false : true, }), commonjs({ include: ['node_modules/**'], diff --git a/src/vendor/rollup-fontawesome.config.js b/src/vendor/rollup-fontawesome.config.js index 48e255c..f934a31 100644 --- a/src/vendor/rollup-fontawesome.config.js +++ b/src/vendor/rollup-fontawesome.config.js @@ -5,9 +5,9 @@ import resolve from '@rollup/plugin-node-resolve'; import replace from '@rollup/plugin-replace'; import typescript from '@rollup/plugin-typescript'; -const isProd = process.env.NODE_ENV === 'production'; +const isProduction = process.env.NODE_ENV === 'production'; -console.log('Production:', isProd); +console.log('Production:', isProduction); const exported = [ { @@ -59,12 +59,12 @@ const exported = [ format: 'esm', // 'cjs' | 'umd' | 'iife' | 'es' | 'esm' exports: 'named', name, - sourcemap: isProd ? false : true, + sourcemap: isProduction ? false : true, }, ], plugins: [ replace({ - 'process.env.NODE_ENV': JSON.stringify(isProd ? 'production' : 'development'), + 'process.env.NODE_ENV': JSON.stringify(isProduction ? 'production' : 'development'), }), resolve({ preferBuiltins: false, @@ -72,6 +72,7 @@ const exported = [ json(), typescript({ tsconfig: `src/vendor/${name}/tsconfig.json`, + sourceMap: isProduction ? false : true, }), commonjs({ include: ['node_modules/**'], diff --git a/src/vendor/rollup-materialui-icons.config.js b/src/vendor/rollup-materialui-icons.config.js index 04ce619..7901a7d 100644 --- a/src/vendor/rollup-materialui-icons.config.js +++ b/src/vendor/rollup-materialui-icons.config.js @@ -5,9 +5,9 @@ import resolve from '@rollup/plugin-node-resolve'; import replace from '@rollup/plugin-replace'; import typescript from '@rollup/plugin-typescript'; -const isProd = process.env.NODE_ENV === 'production'; +const isProduction = process.env.NODE_ENV === 'production'; -console.log('Production:', isProd); +console.log('Production:', isProduction); const exported = [ { @@ -27,12 +27,12 @@ const exported = [ format: 'esm', // 'cjs' | 'umd' | 'iife' | 'es' | 'esm' exports: 'named', name, - sourcemap: isProd ? false : true, + sourcemap: isProduction ? false : true, }, ], plugins: [ replace({ - 'process.env.NODE_ENV': JSON.stringify(isProd ? 'production' : 'development'), + 'process.env.NODE_ENV': JSON.stringify(isProduction ? 'production' : 'development'), }), resolve({ preferBuiltins: false, @@ -40,6 +40,7 @@ const exported = [ json(), typescript({ tsconfig: `src/vendor/${name}/tsconfig.json`, + sourceMap: isProduction ? false : true, }), commonjs({ include: ['node_modules/**'], diff --git a/src/vendor/rollup-materialui.config.js b/src/vendor/rollup-materialui.config.js index 08cc1ab..feecd06 100644 --- a/src/vendor/rollup-materialui.config.js +++ b/src/vendor/rollup-materialui.config.js @@ -5,9 +5,9 @@ import resolve from '@rollup/plugin-node-resolve'; import replace from '@rollup/plugin-replace'; import typescript from '@rollup/plugin-typescript'; -const isProd = process.env.NODE_ENV === 'production'; +const isProduction = process.env.NODE_ENV === 'production'; -console.log('Production:', isProd); +console.log('Production:', isProduction); const exported = [ { @@ -57,12 +57,12 @@ const exported = [ format: 'esm', // 'cjs' | 'umd' | 'iife' | 'es' | 'esm' exports: 'named', name, - sourcemap: isProd ? false : true, + sourcemap: isProduction ? false : true, }, ], plugins: [ replace({ - 'process.env.NODE_ENV': JSON.stringify(isProd ? 'production' : 'development'), + 'process.env.NODE_ENV': JSON.stringify(isProduction ? 'production' : 'development'), }), resolve({ preferBuiltins: false, @@ -70,6 +70,7 @@ const exported = [ json(), typescript({ tsconfig: `src/vendor/${name}/tsconfig.json`, + sourceMap: isProduction ? false : true, }), commonjs({ include: ['node_modules/**'], diff --git a/src/vendor/rollup-mdi-material-ui.config.js b/src/vendor/rollup-mdi-material-ui.config.js index 179a62b..60496f3 100644 --- a/src/vendor/rollup-mdi-material-ui.config.js +++ b/src/vendor/rollup-mdi-material-ui.config.js @@ -5,9 +5,9 @@ import resolve from '@rollup/plugin-node-resolve'; import replace from '@rollup/plugin-replace'; import typescript from '@rollup/plugin-typescript'; -const isProd = process.env.NODE_ENV === 'production'; +const isProduction = process.env.NODE_ENV === 'production'; -console.log('Production:', isProd); +console.log('Production:', isProduction); const exported = [ { @@ -26,12 +26,12 @@ const exported = [ format: 'esm', // 'cjs' | 'umd' | 'iife' | 'es' | 'esm' exports: 'named', name, - sourcemap: isProd ? false : true, + sourcemap: isProduction ? false : true, }, ], plugins: [ replace({ - 'process.env.NODE_ENV': JSON.stringify(isProd ? 'production' : 'development'), + 'process.env.NODE_ENV': JSON.stringify(isProduction ? 'production' : 'development'), }), resolve({ preferBuiltins: false, @@ -39,6 +39,7 @@ const exported = [ json(), typescript({ tsconfig: `src/vendor/${name}/tsconfig.json`, + sourceMap: isProduction ? false : true, }), commonjs({ include: ['node_modules/**'], diff --git a/src/vendor/rollup-react.config.js b/src/vendor/rollup-react.config.js index 6c36dbe..1a1895a 100644 --- a/src/vendor/rollup-react.config.js +++ b/src/vendor/rollup-react.config.js @@ -5,9 +5,9 @@ import resolve from '@rollup/plugin-node-resolve'; import replace from '@rollup/plugin-replace'; import typescript from '@rollup/plugin-typescript'; -const isProd = process.env.NODE_ENV === 'production'; +const isProduction = process.env.NODE_ENV === 'production'; -console.log('Production:', isProd); +console.log('Production:', isProduction); const exported = [ { @@ -89,12 +89,12 @@ const exported = [ format: 'esm', // 'cjs' | 'umd' | 'iife' | 'es' | 'esm' exports: 'named', name, - sourcemap: isProd ? false : true, + sourcemap: isProduction ? false : true, }, ], plugins: [ replace({ - 'process.env.NODE_ENV': JSON.stringify(isProd ? 'production' : 'development'), + 'process.env.NODE_ENV': JSON.stringify(isProduction ? 'production' : 'development'), }), resolve({ preferBuiltins: false, @@ -102,6 +102,7 @@ const exported = [ json(), typescript({ tsconfig: `src/vendor/${name}/tsconfig.json`, + sourceMap: isProduction ? false : true, }), commonjs({ include: ['node_modules/**'], diff --git a/src/vendor/rollup-recharts.config.js b/src/vendor/rollup-recharts.config.js index e20b6f3..3e3cf49 100644 --- a/src/vendor/rollup-recharts.config.js +++ b/src/vendor/rollup-recharts.config.js @@ -5,9 +5,9 @@ import resolve from '@rollup/plugin-node-resolve'; import replace from '@rollup/plugin-replace'; import typescript from '@rollup/plugin-typescript'; -const isProd = process.env.NODE_ENV === 'production'; +const isProduction = process.env.NODE_ENV === 'production'; -console.log('Production:', isProd); +console.log('Production:', isProduction); const exported = [ { @@ -40,12 +40,12 @@ const exported = [ format: 'esm', // 'cjs' | 'umd' | 'iife' | 'es' | 'esm' exports: 'named', name, - sourcemap: isProd ? false : true, + sourcemap: isProduction ? false : true, }, ], plugins: [ replace({ - 'process.env.NODE_ENV': JSON.stringify(isProd ? 'production' : 'development'), + 'process.env.NODE_ENV': JSON.stringify(isProduction ? 'production' : 'development'), }), resolve({ preferBuiltins: false, @@ -53,6 +53,7 @@ const exported = [ json(), typescript({ tsconfig: `src/vendor/${name}/tsconfig.json`, + sourceMap: isProduction ? false : true, }), commonjs({ include: ['node_modules/**'], From 2ddea6c12c70ed169772e7f10c57e68d667e2cd2 Mon Sep 17 00:00:00 2001 From: Gregor Anders Date: Fri, 26 Jun 2020 18:19:06 +0200 Subject: [PATCH 3/4] feat(eslint): add jest and unicorn plugin - add eslint-plugin-jest - add eslint-plugin-unicorn - adjust code du to added eslint plugin - move eslint configuration out of package.json into spearate file --- .eslintrc.json | 45 +++++++++++++++ package.json | 55 +------------------ src/script/application.spec.tsx | 2 +- .../components/atoms/button/index.spec.tsx | 2 +- src/script/components/atoms/button/index.tsx | 8 +-- .../components/atoms/navLink/index.spec.tsx | 2 +- src/script/components/atoms/navLink/index.tsx | 2 +- .../atoms/themeSwitch/index.spec.tsx | 4 +- .../components/atoms/user/index.spec.tsx | 2 +- src/script/components/layout/index.spec.tsx | 2 +- .../components/molecules/users/index.spec.tsx | 2 +- .../organisms/footer/index.spec.tsx | 2 +- .../organisms/header/index.spec.tsx | 2 +- .../components/organisms/main/index.spec.tsx | 4 +- .../components/organisms/nav/index.spec.tsx | 2 +- .../components/organisms/users/index.spec.tsx | 4 +- .../components/pages/about/index.spec.tsx | 2 +- .../components/pages/home/index.spec.tsx | 2 +- .../components/pages/index/index.spec.tsx | 2 +- .../pages/materialui/index.spec.tsx | 2 +- src/script/index.tsx | 18 +++--- src/script/loading.spec.tsx | 2 +- src/script/models/theme.spec.tsx | 1 + src/script/models/theme.ts | 2 +- src/script/models/user.tsx | 1 + src/script/{testUtils.tsx => test-utils.tsx} | 0 src/script/theme.spec.tsx | 4 +- 27 files changed, 89 insertions(+), 87 deletions(-) create mode 100644 .eslintrc.json rename src/script/{testUtils.tsx => test-utils.tsx} (100%) diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..f1672a4 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,45 @@ +{ + "parser": "@typescript-eslint/parser", + "extends": [ + "plugin:react-hooks/recommended", + "plugin:react/recommended", + "plugin:@typescript-eslint/recommended", + "plugin:jest/recommended", + "plugin:unicorn/recommended", + "plugin:prettier/recommended", + "prettier/@typescript-eslint" + ], + "parserOptions": { + "ecmaVersion": 2020, + "sourceType": "module", + "ecmaFeatures": { + "jsx": true + } + }, + "rules": { + "@typescript-eslint/explicit-function-return-type": "off", + "@typescript-eslint/explicit-module-boundary-types": "off", + "react-hooks/rules-of-hooks": "error", + "react-hooks/exhaustive-deps": "warn", + "sort-imports": [ + "error", + { + "ignoreCase": false, + "ignoreDeclarationSort": true, + "ignoreMemberSort": false, + "memberSyntaxSortOrder": ["none", "all", "multiple", "single"] + } + ], + "no-restricted-imports": [ + "error", + { + "patterns": ["@material-ui/*/*/*", "!@material-ui/core/test-utils/*"] + } + ] + }, + "settings": { + "react": { + "version": "detect" + } + } +} diff --git a/package.json b/package.json index 6cd53c6..fa075c9 100644 --- a/package.json +++ b/package.json @@ -99,7 +99,7 @@ "**/script/**/*.ts", "!**/script/index.tsx", "!**/script/application.tsx", - "!**/script/testUtils.tsx" + "!**/script/test-utils.tsx" ], "coverageReporters": [ "lcovonly", @@ -148,57 +148,6 @@ "jest-junit": { "outputDirectory": "./test" }, - "eslintConfig": { - "parser": "@typescript-eslint/parser", - "extends": [ - "plugin:react-hooks/recommended", - "plugin:react/recommended", - "plugin:@typescript-eslint/recommended", - "plugin:prettier/recommended", - "prettier/@typescript-eslint" - ], - "parserOptions": { - "ecmaVersion": 2020, - "sourceType": "module", - "ecmaFeatures": { - "jsx": true - } - }, - "rules": { - "@typescript-eslint/explicit-function-return-type": "off", - "@typescript-eslint/explicit-module-boundary-types": "off", - "react-hooks/rules-of-hooks": "error", - "react-hooks/exhaustive-deps": "warn", - "sort-imports": [ - "error", - { - "ignoreCase": false, - "ignoreDeclarationSort": true, - "ignoreMemberSort": false, - "memberSyntaxSortOrder": [ - "none", - "all", - "multiple", - "single" - ] - } - ], - "no-restricted-imports": [ - "error", - { - "patterns": [ - "@material-ui/*/*/*", - "!@material-ui/core/test-utils/*" - ] - } - ] - }, - "settings": { - "react": { - "version": "detect" - } - } - }, "prettier": { "semi": true, "trailingComma": "all", @@ -301,9 +250,11 @@ "es-module-shims": "0.4.7", "eslint": "7.3.1", "eslint-config-prettier": "6.11.0", + "eslint-plugin-jest": "23.17.1", "eslint-plugin-prettier": "3.1.4", "eslint-plugin-react": "7.20.0", "eslint-plugin-react-hooks": "4.0.4", + "eslint-plugin-unicorn": "20.1.0", "express": "4.17.1", "faker": "4.1.0", "favicons": "6.1.0", diff --git a/src/script/application.spec.tsx b/src/script/application.spec.tsx index 7857b91..be4a8ab 100644 --- a/src/script/application.spec.tsx +++ b/src/script/application.spec.tsx @@ -1,4 +1,4 @@ -import React, { mount } from '@app/testUtils'; +import React, { mount } from '@app/test-utils'; import * as TestSubject from '@app/application'; diff --git a/src/script/components/atoms/button/index.spec.tsx b/src/script/components/atoms/button/index.spec.tsx index 98c03a8..7f2cd01 100644 --- a/src/script/components/atoms/button/index.spec.tsx +++ b/src/script/components/atoms/button/index.spec.tsx @@ -1,4 +1,4 @@ -import React, { act, create, mount } from '@app/testUtils'; +import React, { act, create, mount } from '@app/test-utils'; import * as TestSubject from '@atoms/button'; diff --git a/src/script/components/atoms/button/index.tsx b/src/script/components/atoms/button/index.tsx index 01c5c21..8633134 100644 --- a/src/script/components/atoms/button/index.tsx +++ b/src/script/components/atoms/button/index.tsx @@ -20,9 +20,9 @@ const defaultProps = { /** * onClick handler * - * @type (e: React.MouseEvent) => void + * @type (event: React.MouseEvent) => void */ - onClick: (e: React.MouseEvent) => console.log(e), + onClick: (event: React.MouseEvent) => console.log(event), /** * HTML button content * @@ -39,8 +39,8 @@ export const Button = ({ children, disabled, onClick }: Props) => { return (