From 6f19b178ee04d09b755225781484af6dfa68558f Mon Sep 17 00:00:00 2001 From: Nikita Nek Dudnik Date: Tue, 19 May 2020 10:36:47 +0200 Subject: [PATCH] fix: PR comments --- package.json | 1 - plugins/circleci/package.json | 2 +- plugins/circleci/src/components/Settings/Settings.tsx | 10 +++++----- plugins/circleci/tsconfig.json | 7 ------- yarn.lock | 8 -------- 5 files changed, 6 insertions(+), 22 deletions(-) delete mode 100644 plugins/circleci/tsconfig.json diff --git a/package.json b/package.json index 11215b0d30..e5028bfd2f 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,6 @@ "version": "1.0.0", "devDependencies": { "@spotify/eslint-config-oss": "^1.0.1", - "file-loader": "^6.0.0", "husky": "^4.2.3", "lerna": "^3.20.2", "lint-staged": "^10.1.0", diff --git a/plugins/circleci/package.json b/plugins/circleci/package.json index 097fa5349f..297b06fb6d 100644 --- a/plugins/circleci/package.json +++ b/plugins/circleci/package.json @@ -2,7 +2,7 @@ "name": "@backstage/plugin-circleci", "version": "0.1.1-alpha.4", "main": "dist/index.esm.js", - "module": "dist/index.esm.js", + "main:src": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", "private": true, diff --git a/plugins/circleci/src/components/Settings/Settings.tsx b/plugins/circleci/src/components/Settings/Settings.tsx index 5159c156cc..e853bb46bb 100644 --- a/plugins/circleci/src/components/Settings/Settings.tsx +++ b/plugins/circleci/src/components/Settings/Settings.tsx @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import React, { useState } from 'react'; +import React, { useState, useEffect } from 'react'; import { Button, TextField, @@ -38,11 +38,11 @@ const Settings = () => { { saveSettings, hideSettings }, ] = useSettings(); - const [token, setToken] = React.useState(() => tokenFromStore); - const [owner, setOwner] = React.useState(() => ownerFromStore); - const [repo, setRepo] = React.useState(() => repoFromStore); + const [token, setToken] = useState(() => tokenFromStore); + const [owner, setOwner] = useState(() => ownerFromStore); + const [repo, setRepo] = useState(() => repoFromStore); - React.useEffect(() => { + useEffect(() => { if (tokenFromStore !== token) { setToken(tokenFromStore); } diff --git a/plugins/circleci/tsconfig.json b/plugins/circleci/tsconfig.json deleted file mode 100644 index 5cf0a023cb..0000000000 --- a/plugins/circleci/tsconfig.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "include": ["src"], - "compilerOptions": { - "module": "esnext" - } -} diff --git a/yarn.lock b/yarn.lock index 69633198cc..090255a316 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9255,14 +9255,6 @@ file-loader@^4.2.0: loader-utils "^1.2.3" schema-utils "^2.5.0" -file-loader@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/file-loader/-/file-loader-6.0.0.tgz#97bbfaab7a2460c07bcbd72d3a6922407f67649f" - integrity sha512-/aMOAYEFXDdjG0wytpTL5YQLfZnnTmLNjn+AIrJ/6HVnTfDqLsVKUUwkDf4I4kgex36BvjuXEn/TX9B/1ESyqQ== - dependencies: - loader-utils "^2.0.0" - schema-utils "^2.6.5" - file-system-cache@^1.0.5: version "1.0.5" resolved "https://registry.npmjs.org/file-system-cache/-/file-system-cache-1.0.5.tgz#84259b36a2bbb8d3d6eb1021d3132ffe64cfff4f"