From b3c1ee664a11f319897acb70f0332f26c9aeb2da Mon Sep 17 00:00:00 2001 From: Igor Lobanov Date: Wed, 23 Nov 2022 12:45:52 +0100 Subject: [PATCH 1/2] npm run start:local fix --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c7da9869..720b571e 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "preview": "astro preview", "server": "node server/server.mjs", "start": "astro dev", - "start:local": "cross-env PUBLIC_API_URL=http://localhost:8080 astro dev", + "start:local": "cross-env PUBLIC_API_URL=http://127.0.0.1:8080 astro dev", "typecheck": "astro check && tsc --noEmit", "typecheck:watch": "tsc --noEmit --watch", "vercel-build": "astro build" From ffc0b7abf9185eda18bbce08a7dca9dc9c25c89e Mon Sep 17 00:00:00 2001 From: Igor Lobanov Date: Wed, 23 Nov 2022 13:31:13 +0100 Subject: [PATCH 2/2] lint --- .eslintrc.js | 1 + src/components/_shared/StatMetrics.tsx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.eslintrc.js b/.eslintrc.js index 0459a05c..448e589e 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -73,6 +73,7 @@ module.exports = { 'unicorn/import-style': 'off', 'unicorn/numeric-separators-style': 'off', 'unicorn/prefer-node-protocol': 'off', + 'unicorn/consistent-function-scoping': 'warn', 'promise/always-return': 'off', diff --git a/src/components/_shared/StatMetrics.tsx b/src/components/_shared/StatMetrics.tsx index fd60946c..9d4bdcbd 100644 --- a/src/components/_shared/StatMetrics.tsx +++ b/src/components/_shared/StatMetrics.tsx @@ -15,7 +15,7 @@ const pseudonames = { comments: 'discussions' } -const nos = (s) => s.slice(0, s.length - 1) +const nos = (s) => s.slice(-1) export const StatMetrics = (props: StatMetricsProps) => { return (