From d48543a744a07bfd65a64b1443462d09b5e60fec Mon Sep 17 00:00:00 2001 From: Dimitri POSTOLOV Date: Sat, 25 Feb 2023 02:26:56 +0100 Subject: [PATCH] enable `unicorn/no-zero-fractions` rule --- .eslintrc.js | 1 + packages/graphql-language-service/benchmark/index.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.eslintrc.js b/.eslintrc.js index 2394e895bc4..40ea6258d90 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -248,6 +248,7 @@ module.exports = { 'unicorn/consistent-destructuring': 'error', 'prefer-destructuring': ['error', { VariableDeclarator: { object: true } }], 'promise/no-multiple-resolved': 'error', + 'unicorn/no-zero-fractions': 'error', 'sonarjs/no-redundant-jump': 'error', 'unicorn/prefer-logical-operator-over-ternary': 'error', 'logical-assignment-operators': [ diff --git a/packages/graphql-language-service/benchmark/index.ts b/packages/graphql-language-service/benchmark/index.ts index 857f6b76dbd..115fc29542c 100644 --- a/packages/graphql-language-service/benchmark/index.ts +++ b/packages/graphql-language-service/benchmark/index.ts @@ -14,7 +14,7 @@ interface IStats { const printResult = (stats: IStats, name: string, schema: string) => { console.log({ name, - mean: `${1.0 / stats.mean} ops / sec`, + mean: `${1 / stats.mean} ops / sec`, variance: stats.variance, rme: `${stats.rme}%`, lines: schema.split('\n').length,