diff options
| author | ST-DDT <[email protected]> | 2024-05-25 21:49:24 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-05-25 19:49:24 +0000 |
| commit | a60f097af43bee273c431e26b19456d8fe7f4256 (patch) | |
| tree | ce82b776da6cf1cd0d11de3e33ce4f966ea32196 | |
| parent | 558b959e0e2f791dab0ba2f500493ba7ddbd25e2 (diff) | |
| download | faker-a60f097af43bee273c431e26b19456d8fe7f4256.tar.xz faker-a60f097af43bee273c431e26b19456d8fe7f4256.zip | |
infra(typescript-eslint): no-confusing-void-expression (#2909)
| -rw-r--r-- | .eslintrc.cjs | 10 | ||||
| -rw-r--r-- | test/modules/helpers.spec.ts | 3 |
2 files changed, 8 insertions, 5 deletions
diff --git a/.eslintrc.cjs b/.eslintrc.cjs index a7a7d168..cf0f611c 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -80,6 +80,12 @@ module.exports = defineConfig({ trailingUnderscore: 'forbid', }, ], + '@typescript-eslint/no-confusing-void-expression': [ + 'error', + { + ignoreArrowShorthand: true, + }, + ], '@typescript-eslint/no-inferrable-types': [ 'error', { ignoreParameters: true }, @@ -114,10 +120,6 @@ module.exports = defineConfig({ '@typescript-eslint/unbound-method': 'off', '@typescript-eslint/unified-signatures': 'off', // incompatible with our api docs generation - // TODO @ST-DDT 2023-10-10: The following rules currently conflict with our code. - // Each rule should be checked whether it should be enabled/configured and the problems fixed, or stay disabled permanently. - '@typescript-eslint/no-confusing-void-expression': 'off', - 'jsdoc/require-jsdoc': 'off', // Enabled only for src/**/*.ts 'jsdoc/require-returns': 'off', 'jsdoc/sort-tags': [ diff --git a/test/modules/helpers.spec.ts b/test/modules/helpers.spec.ts index b9b59f22..09f26467 100644 --- a/test/modules/helpers.spec.ts +++ b/test/modules/helpers.spec.ts @@ -799,7 +799,8 @@ describe('helpers', () => { }); it('should never return the callback result when probability is 0', () => { - const actual = faker.helpers.maybe(() => expect.fail(), { + const method: () => unknown = expect.fail; + const actual = faker.helpers.maybe(method, { probability: 0, }); |
