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 (