Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: bump ts-api-utils to v0.0.21 #6459

Merged
merged 3 commits into from
Feb 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/eslint-plugin/package.json
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
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