Skip to content

Commit

Permalink
feat: bump ts-api-utils to v0.0.21 (#6459)
Browse files Browse the repository at this point in the history
  • Loading branch information
bradzacher committed Feb 13, 2023
1 parent d50942c commit 3915661
Show file tree
Hide file tree
Showing 39 changed files with 43 additions and 44 deletions.
2 changes: 1 addition & 1 deletion packages/eslint-plugin/package.json
Expand Up @@ -53,7 +53,7 @@
"natural-compare-lite": "^1.4.0",
"regexpp": "^3.2.0",
"semver": "^7.3.7",
"ts-api-tools": "^0.0.15"
"ts-api-utils": "^0.0.21"
},
"devDependencies": {
"@types/debug": "*",
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/src/rules/await-thenable.ts
@@ -1,4 +1,4 @@
import * as tools from 'ts-api-tools';
import * as tools from 'ts-api-utils';

import * as util from '../util';

Expand Down
3 changes: 1 addition & 2 deletions packages/eslint-plugin/src/rules/dot-notation.ts
@@ -1,5 +1,5 @@
import type { TSESTree } from '@typescript-eslint/utils';
import * as tools from 'ts-api-tools';
import * as tools from 'ts-api-utils';
import * as ts from 'typescript';

import type {
Expand Down Expand Up @@ -77,7 +77,6 @@ export default createRule<Options, MessageIds>({
(options.allowIndexSignaturePropertyAccess ?? false) ||
tools.isCompilerOptionEnabled(
services.program.getCompilerOptions(),
// @ts-expect-error - TS is refining the type to never for some reason
'noPropertyAccessFromIndexSignature',
);

Expand Down
Expand Up @@ -167,7 +167,7 @@ export default util.createRule<Options, MessageIds>({
| TSESTree.FunctionExpression
| TSESTree.FunctionDeclaration,
): boolean {
return node.parent!.type === AST_NODE_TYPES.CallExpression;
return node.parent.type === AST_NODE_TYPES.CallExpression;
}

return {
Expand Down
@@ -1,6 +1,6 @@
import type { TSESLint, TSESTree } from '@typescript-eslint/utils';
import { AST_NODE_TYPES } from '@typescript-eslint/utils';
import * as tools from 'ts-api-tools';
import * as tools from 'ts-api-utils';
import * as ts from 'typescript';

import * as util from '../util';
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/src/rules/no-dynamic-delete.ts
@@ -1,6 +1,6 @@
import type { TSESLint, TSESTree } from '@typescript-eslint/utils';
import { AST_NODE_TYPES } from '@typescript-eslint/utils';
import * as tools from 'ts-api-tools';
import * as tools from 'ts-api-utils';

import * as util from '../util';

Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/src/rules/no-floating-promises.ts
@@ -1,6 +1,6 @@
import type { TSESLint, TSESTree } from '@typescript-eslint/utils';
import { AST_NODE_TYPES } from '@typescript-eslint/utils';
import * as tools from 'ts-api-tools';
import * as tools from 'ts-api-utils';
import * as ts from 'typescript';

import * as util from '../util';
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/src/rules/no-implied-eval.ts
@@ -1,6 +1,6 @@
import type { TSESTree } from '@typescript-eslint/utils';
import { AST_NODE_TYPES } from '@typescript-eslint/utils';
import * as tools from 'ts-api-tools';
import * as tools from 'ts-api-utils';
import * as ts from 'typescript';

import * as util from '../util';
Expand Down
@@ -1,6 +1,6 @@
import type { TSESLint, TSESTree } from '@typescript-eslint/utils';
import { ESLintUtils } from '@typescript-eslint/utils';
import * as tools from 'ts-api-tools';
import * as tools from 'ts-api-utils';
import * as ts from 'typescript';

import * as util from '../util';
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/src/rules/no-misused-promises.ts
@@ -1,6 +1,6 @@
import type { TSESLint, TSESTree } from '@typescript-eslint/utils';
import { AST_NODE_TYPES } from '@typescript-eslint/utils';
import * as tools from 'ts-api-tools';
import * as tools from 'ts-api-utils';
import * as ts from 'typescript';

import * as util from '../util';
Expand Down
@@ -1,5 +1,5 @@
import { AST_NODE_TYPES, TSESTree } from '@typescript-eslint/utils';
import * as tools from 'ts-api-tools';
import * as tools from 'ts-api-utils';
import * as ts from 'typescript';

import * as util from '../util';
Expand Down
@@ -1,6 +1,6 @@
import type { TSESTree } from '@typescript-eslint/utils';
import { AST_NODE_TYPES } from '@typescript-eslint/utils';
import * as tools from 'ts-api-tools';
import * as tools from 'ts-api-utils';
import * as ts from 'typescript';

import * as util from '../util';
Expand Down
@@ -1,6 +1,6 @@
import type { TSESTree } from '@typescript-eslint/utils';
import { AST_NODE_TYPES, AST_TOKEN_TYPES } from '@typescript-eslint/utils';
import * as tools from 'ts-api-tools';
import * as tools from 'ts-api-utils';
import * as ts from 'typescript';

import {
Expand Down
@@ -1,6 +1,6 @@
import type { TSESTree } from '@typescript-eslint/utils';
import { AST_NODE_TYPES } from '@typescript-eslint/utils';
import * as tools from 'ts-api-tools';
import * as tools from 'ts-api-utils';
import * as ts from 'typescript';

import * as util from '../util';
Expand Down
@@ -1,5 +1,5 @@
import type { TSESTree } from '@typescript-eslint/utils';
import * as tools from 'ts-api-tools';
import * as tools from 'ts-api-utils';
import * as ts from 'typescript';

import * as util from '../util';
Expand Down
@@ -1,6 +1,6 @@
import type { TSESTree } from '@typescript-eslint/utils';
import { AST_NODE_TYPES } from '@typescript-eslint/utils';
import * as tools from 'ts-api-tools';
import * as tools from 'ts-api-utils';
import * as ts from 'typescript';

import * as util from '../util';
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/src/rules/no-unsafe-assignment.ts
@@ -1,6 +1,6 @@
import type { TSESTree } from '@typescript-eslint/utils';
import { AST_NODE_TYPES } from '@typescript-eslint/utils';
import * as tools from 'ts-api-tools';
import * as tools from 'ts-api-utils';
import type * as ts from 'typescript';

import * as util from '../util';
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/src/rules/no-unsafe-call.ts
@@ -1,5 +1,5 @@
import type { TSESTree } from '@typescript-eslint/utils';
import * as tools from 'ts-api-tools';
import * as tools from 'ts-api-utils';

import * as util from '../util';
import { getThisExpression } from '../util';
Expand Down
@@ -1,6 +1,6 @@
import type { TSESTree } from '@typescript-eslint/utils';
import { AST_NODE_TYPES } from '@typescript-eslint/utils';
import * as tools from 'ts-api-tools';
import * as tools from 'ts-api-utils';

import * as util from '../util';
import { getThisExpression } from '../util';
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/src/rules/no-unsafe-return.ts
@@ -1,6 +1,6 @@
import type { TSESTree } from '@typescript-eslint/utils';
import { AST_NODE_TYPES } from '@typescript-eslint/utils';
import * as tools from 'ts-api-tools';
import * as tools from 'ts-api-utils';

import * as util from '../util';
import { getThisExpression } from '../util';
Expand Down
@@ -1,6 +1,6 @@
import type { TSESTree } from '@typescript-eslint/utils';
import { AST_NODE_TYPES } from '@typescript-eslint/utils';
import * as tools from 'ts-api-tools';
import * as tools from 'ts-api-utils';
import * as ts from 'typescript';

import * as util from '../util';
Expand Down
@@ -1,6 +1,6 @@
import type { TSESLint, TSESTree } from '@typescript-eslint/utils';
import { AST_NODE_TYPES, AST_TOKEN_TYPES } from '@typescript-eslint/utils';
import * as tools from 'ts-api-tools';
import * as tools from 'ts-api-utils';
import * as ts from 'typescript';

import * as util from '../util';
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/src/rules/prefer-readonly.ts
@@ -1,6 +1,6 @@
import type { TSESTree } from '@typescript-eslint/utils';
import { AST_NODE_TYPES, ASTUtils } from '@typescript-eslint/utils';
import * as tools from 'ts-api-tools';
import * as tools from 'ts-api-utils';
import * as ts from 'typescript';

import * as util from '../util';
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/src/rules/prefer-regexp-exec.ts
@@ -1,6 +1,6 @@
import type { TSESTree } from '@typescript-eslint/utils';
import { AST_NODE_TYPES } from '@typescript-eslint/utils';
import * as tools from 'ts-api-tools';
import * as tools from 'ts-api-utils';
import type * as ts from 'typescript';

import {
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/src/rules/require-await.ts
@@ -1,6 +1,6 @@
import type { TSESLint, TSESTree } from '@typescript-eslint/utils';
import { AST_NODE_TYPES } from '@typescript-eslint/utils';
import * as tools from 'ts-api-tools';
import * as tools from 'ts-api-utils';
import type * as ts from 'typescript';

import * as util from '../util';
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/src/rules/return-await.ts
@@ -1,6 +1,6 @@
import type { TSESLint, TSESTree } from '@typescript-eslint/utils';
import { AST_NODE_TYPES } from '@typescript-eslint/utils';
import * as tools from 'ts-api-tools';
import * as tools from 'ts-api-utils';
import * as ts from 'typescript';

import * as util from '../util';
Expand Down
Expand Up @@ -3,7 +3,7 @@ import type {
TSESTree,
} from '@typescript-eslint/utils';
import { AST_NODE_TYPES } from '@typescript-eslint/utils';
import * as tools from 'ts-api-tools';
import * as tools from 'ts-api-utils';
import * as ts from 'typescript';

import * as util from '../util';
Expand Down Expand Up @@ -818,7 +818,7 @@ export default util.createRule<Options, MessageId>({
// If incoming type is either "true" or "false", there will be one type
// object with intrinsicName set accordingly
// If incoming type is boolean, there will be two type objects with
// intrinsicName set "true" and "false" each because of ts-api-tools.unionTypeParts()
// intrinsicName set "true" and "false" each because of ts-api-utils.unionTypeParts()
if (booleans.length === 1) {
tools.isBooleanLiteralType(booleans[0], true)
? variantTypes.add('truthy boolean')
Expand Down
@@ -1,5 +1,5 @@
import type { TSESLint, TSESTree } from '@typescript-eslint/utils';
import * as tools from 'ts-api-tools';
import * as tools from 'ts-api-utils';
import * as ts from 'typescript';

import {
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/src/rules/unbound-method.ts
@@ -1,6 +1,6 @@
import type { TSESTree } from '@typescript-eslint/utils';
import { AST_NODE_TYPES } from '@typescript-eslint/utils';
import * as tools from 'ts-api-tools';
import * as tools from 'ts-api-utils';
import * as ts from 'typescript';

import * as util from '../util';
Expand Down
2 changes: 1 addition & 1 deletion packages/type-utils/package.json
Expand Up @@ -42,7 +42,7 @@
"@typescript-eslint/typescript-estree": "5.51.0",
"@typescript-eslint/utils": "5.51.0",
"debug": "^4.3.4",
"ts-api-tools": "^0.0.15"
"ts-api-utils": "^0.0.21"
},
"devDependencies": {
"@typescript-eslint/parser": "5.51.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/type-utils/src/containsAllTypesByName.ts
@@ -1,4 +1,4 @@
import * as tools from 'ts-api-tools';
import * as tools from 'ts-api-utils';
import * as ts from 'typescript';

import { isTypeFlagSet } from './typeFlagUtils';
Expand Down
2 changes: 1 addition & 1 deletion packages/type-utils/src/getContextualType.ts
@@ -1,4 +1,4 @@
import * as tools from 'ts-api-tools';
import * as tools from 'ts-api-utils';
import * as ts from 'typescript';

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/type-utils/src/isTypeReadonly.ts
@@ -1,5 +1,5 @@
import { ESLintUtils } from '@typescript-eslint/utils';
import * as tools from 'ts-api-tools';
import * as tools from 'ts-api-utils';
import * as ts from 'typescript';

import { getTypeOfPropertyOfType } from './propertyTypes';
Expand Down
2 changes: 1 addition & 1 deletion packages/type-utils/src/isUnsafeAssignment.ts
@@ -1,6 +1,6 @@
import type { TSESTree } from '@typescript-eslint/utils';
import { AST_NODE_TYPES } from '@typescript-eslint/utils';
import * as tools from 'ts-api-tools';
import * as tools from 'ts-api-utils';
import type * as ts from 'typescript';

import { isTypeAnyType, isTypeUnknownType } from './predicates';
Expand Down
2 changes: 1 addition & 1 deletion packages/type-utils/src/predicates.ts
@@ -1,5 +1,5 @@
import debug from 'debug';
import * as tools from 'ts-api-tools';
import * as tools from 'ts-api-utils';
import * as ts from 'typescript';

import { getTypeArguments } from './getTypeArguments';
Expand Down
2 changes: 1 addition & 1 deletion packages/type-utils/src/typeFlagUtils.ts
@@ -1,4 +1,4 @@
import * as tools from 'ts-api-tools';
import * as tools from 'ts-api-utils';
import * as ts from 'typescript';

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/typescript-estree/package.json
Expand Up @@ -48,7 +48,7 @@
"globby": "^11.1.0",
"is-glob": "^4.0.3",
"semver": "^7.3.7",
"ts-api-tools": "^0.0.15"
"ts-api-utils": "^0.0.21"
},
"devDependencies": {
"@babel/code-frame": "*",
Expand Down
2 changes: 1 addition & 1 deletion packages/typescript-estree/src/convert-comments.ts
@@ -1,4 +1,4 @@
import * as tools from 'ts-api-tools';
import * as tools from 'ts-api-utils';
import * as ts from 'typescript';

import { getLocFor } from './node-utils';
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Expand Up @@ -13659,10 +13659,10 @@ trough@^1.0.0:
resolved "https://registry.yarnpkg.com/trough/-/trough-1.0.5.tgz#b8b639cefad7d0bb2abd37d433ff8293efa5f406"
integrity sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA==

ts-api-tools@^0.0.15:
version "0.0.15"
resolved "https://registry.yarnpkg.com/ts-api-tools/-/ts-api-tools-0.0.15.tgz#d16750e0fdf7816a9b91da6af9db5b5167bfca80"
integrity sha512-aNaUSL3j1IvX2xRahC86OHLLhtuEEKful+HfgZs1TcYr2ZcukrENRxDIP1mjXdMojnfr2VflHqsFaaTp1m/bLw==
ts-api-utils@^0.0.21:
version "0.0.21"
resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-0.0.21.tgz#d5e58e3200f848123a89f3987d6ee9b613642d01"
integrity sha512-Dr9RHp5+4jLF+2wARhwQO1Z/6BFVsKigZhascnbsbyzSEDKO9qGlN7RgsquqHwP0lHiQmLJFYiGCLXTmcDC9Wg==

ts-essentials@^2.0.3:
version "2.0.12"
Expand Down

0 comments on commit 3915661

Please sign in to comment.