diff --git a/.eslintrc.js b/.eslintrc.js index b39e5187bc73..e03f3106c93e 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -66,7 +66,6 @@ module.exports = { // TODO - enable these new recommended rules '@typescript-eslint/no-unsafe-member-access': 'off', - '@typescript-eslint/no-unsafe-return': 'off', '@typescript-eslint/restrict-template-expressions': 'off', // TODO - enable this '@typescript-eslint/naming-convention': 'off', @@ -173,6 +172,7 @@ module.exports = { }, rules: { '@typescript-eslint/no-unsafe-assignment': 'off', + '@typescript-eslint/no-unsafe-return': 'off', 'eslint-plugin/no-identical-tests': 'error', 'jest/no-disabled-tests': 'warn', 'jest/no-focused-tests': 'error', @@ -198,6 +198,7 @@ module.exports = { rules: { '@typescript-eslint/explicit-function-return-type': 'off', '@typescript-eslint/no-unsafe-call': 'off', + '@typescript-eslint/no-unsafe-return': 'off', '@typescript-eslint/restrict-plus-operands': 'off', }, }, diff --git a/packages/eslint-plugin/src/rules/no-loss-of-precision.ts b/packages/eslint-plugin/src/rules/no-loss-of-precision.ts index f6b15c0430c1..e9d52852668f 100644 --- a/packages/eslint-plugin/src/rules/no-loss-of-precision.ts +++ b/packages/eslint-plugin/src/rules/no-loss-of-precision.ts @@ -4,7 +4,9 @@ import * as util from '../util'; const baseRule = ((): typeof BaseRule | null => { try { - return require('eslint/lib/rules/no-loss-of-precision'); + return require('eslint/lib/rules/no-loss-of-precision') as + | typeof BaseRule + | null; } catch { /* istanbul ignore next */ return null; diff --git a/packages/eslint-plugin/tools/generate-rules-lists.ts b/packages/eslint-plugin/tools/generate-rules-lists.ts index 65faf6f2aa20..a4d3f3af8e72 100644 --- a/packages/eslint-plugin/tools/generate-rules-lists.ts +++ b/packages/eslint-plugin/tools/generate-rules-lists.ts @@ -43,7 +43,7 @@ const staticElements = { emojiKey.fixable, emojiKey.requiresTypeChecking, ], - listSpacerRow: Array(5).fill('-'), + listSpacerRow: Array(5).fill('-'), }; const returnEmojiIfTrue = ( diff --git a/packages/scope-manager/tests/util/serializers/TSESTreeNode.ts b/packages/scope-manager/tests/util/serializers/TSESTreeNode.ts index 4611ddcce736..3d57ab11d73e 100644 --- a/packages/scope-manager/tests/util/serializers/TSESTreeNode.ts +++ b/packages/scope-manager/tests/util/serializers/TSESTreeNode.ts @@ -18,7 +18,7 @@ const SEEN_NODES = new Map(); const serializer: NewPlugin = { test(val): boolean { - return ( + return !!( val && typeof val === 'object' && // make sure it's not one of the classes from the package diff --git a/packages/typescript-estree/src/convert.ts b/packages/typescript-estree/src/convert.ts index 8ffa10ab9181..567da9d88ca1 100644 --- a/packages/typescript-estree/src/convert.ts +++ b/packages/typescript-estree/src/convert.ts @@ -1,5 +1,5 @@ // There's lots of funny stuff due to the typing of ts.Node -/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call */ +/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-return */ import * as ts from 'typescript'; import { canContainDirective, diff --git a/tools/generate-contributors.ts b/tools/generate-contributors.ts index 07d59c394f00..c668ecf3da4a 100644 --- a/tools/generate-contributors.ts +++ b/tools/generate-contributors.ts @@ -78,9 +78,9 @@ async function main(): Promise { // fetch the user info const users = await Promise.all( - githubContributors.map>(async c => { + githubContributors.map(async c => { const response = await fetch(c.url, { method: 'GET' }); - return response.json(); + return (await response.json()) as User; }), ); pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy