From 605c6e5c01df39ab687bf9d7cc3e1036357a1961 Mon Sep 17 00:00:00 2001 From: wh1t3h47 Date: Fri, 13 Oct 2023 18:12:30 -0300 Subject: [PATCH] fix(infra): Build error :octocat: --- package.json | 4 +++- src/hooks/useSenatorsQuery/index.ts | 5 ++++- yarn.lock | 14 ++++++++++++-- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 6904af7..91ca754 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,8 @@ "build": "react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject", - "deploy": "gh-pages -d build" + "deploy": "gh-pages -d build", + "lint": "eslint src/**/*.ts src/**/*.tsx" }, "eslintConfig": { "extends": [ @@ -43,6 +44,7 @@ ] }, "devDependencies": { + "@babel/plugin-proposal-private-property-in-object": "^7.21.11", "@visx/responsive": "^3.3.0", "gh-pages": "^6.0.0", "tailwindcss": "^3.3.3", diff --git a/src/hooks/useSenatorsQuery/index.ts b/src/hooks/useSenatorsQuery/index.ts index 60305c2..c684e13 100644 --- a/src/hooks/useSenatorsQuery/index.ts +++ b/src/hooks/useSenatorsQuery/index.ts @@ -6,7 +6,10 @@ export function useSenatorsQuery() { const [loading, setLoading] = useState(true); useEffect(() => { - const fetchData = async () => { + + // @fixme: Precisamos de um back ou pedir pra habilitar * no CORS + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const _fetchData = async () => { try { const response = await fetch('https://api.propublica.org/congress/v1/members/senate.json', { headers: ({ diff --git a/yarn.lock b/yarn.lock index 40f8575..ec37854 100644 --- a/yarn.lock +++ b/yarn.lock @@ -87,7 +87,7 @@ "@jridgewell/trace-mapping" "^0.3.17" jsesc "^2.5.1" -"@babel/helper-annotate-as-pure@^7.22.5": +"@babel/helper-annotate-as-pure@^7.18.6", "@babel/helper-annotate-as-pure@^7.22.5": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.22.5.tgz#e7f06737b197d580a01edf75d97e2c8be99d3882" integrity sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg== @@ -112,7 +112,7 @@ lru-cache "^5.1.1" semver "^6.3.1" -"@babel/helper-create-class-features-plugin@^7.18.6", "@babel/helper-create-class-features-plugin@^7.22.11", "@babel/helper-create-class-features-plugin@^7.22.15", "@babel/helper-create-class-features-plugin@^7.22.5": +"@babel/helper-create-class-features-plugin@^7.18.6", "@babel/helper-create-class-features-plugin@^7.21.0", "@babel/helper-create-class-features-plugin@^7.22.11", "@babel/helper-create-class-features-plugin@^7.22.15", "@babel/helper-create-class-features-plugin@^7.22.5": version "7.22.15" resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.22.15.tgz#97a61b385e57fe458496fad19f8e63b63c867de4" integrity sha512-jKkwA59IXcvSaiK2UN45kKwSC9o+KuoXsBDvHvU/7BecYIp8GQ2UwrVvFgJASUT+hBnwJx6MhvMCuMzwZZ7jlg== @@ -363,6 +363,16 @@ resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz#7844f9289546efa9febac2de4cfe358a050bd703" integrity sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w== +"@babel/plugin-proposal-private-property-in-object@^7.21.11": + version "7.21.11" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.11.tgz#69d597086b6760c4126525cfa154f34631ff272c" + integrity sha512-0QZ8qP/3RLDVBwBFoWAwCtgcDZJVwA5LUJRZU8x2YFfKNuFq161wK3cuGrALu5yiPu+vzwTAg/sMWVNeWeNyaw== + dependencies: + "@babel/helper-annotate-as-pure" "^7.18.6" + "@babel/helper-create-class-features-plugin" "^7.21.0" + "@babel/helper-plugin-utils" "^7.20.2" + "@babel/plugin-syntax-private-property-in-object" "^7.14.5" + "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d"