Skip to content

Commit f4ceb07

Browse files
chore(deps): update dependency typescript to v5 (#1514)
* chore(deps): update dependency typescript to v5 * fixes * prettier --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Dimitri POSTOLOV <[email protected]>
1 parent 2e489ae commit f4ceb07

File tree

6 files changed

+60
-59
lines changed

6 files changed

+60
-59
lines changed

examples/multiple-projects-graphql-config/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414
"cosmiconfig-typescript-loader": "4.3.0",
1515
"eslint": "8.36.0",
1616
"ts-node": "10.9.1",
17-
"typescript": "4.9.5"
17+
"typescript": "5.0.2"
1818
}
1919
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"prettier-plugin-tailwindcss": "0.2.5",
4242
"rimraf": "4.4.0",
4343
"tsx": "3.12.6",
44-
"typescript": "4.9.5",
44+
"typescript": "5.0.2",
4545
"vitest": "0.29.7"
4646
},
4747
"resolutions": {

packages/plugin/src/estree-converter/converter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export function convertToESTree<T extends DocumentNode>(node: T, schema?: GraphQ
4343

4444
const rawNode = () => {
4545
if (parent && key !== undefined) {
46-
return parent[key];
46+
return (parent as any)[key];
4747
}
4848
return node.kind === Kind.DOCUMENT
4949
? <DocumentNode>{

packages/plugin/src/utils.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { ASTNode, GraphQLSchema, Kind } from 'graphql';
55
import lowerCase from 'lodash.lowercase';
66
import { SiblingOperations } from './siblings.js';
77
import { GraphQLESLintRuleContext } from './types.js';
8+
import { GraphQLESTreeNode } from './estree-converter/index.js';
89

910
export function requireSiblingsOperations(
1011
ruleId: string,
@@ -123,8 +124,8 @@ export function truthy<T>(value: T): value is Truthy<T> {
123124
return !!value;
124125
}
125126

126-
export function getNodeName(node: any) {
127-
const DisplayNodeNameMap = {
127+
export function getNodeName(node: GraphQLESTreeNode<ASTNode>): string {
128+
const DisplayNodeNameMap: Record<string, string> = {
128129
[Kind.OBJECT_TYPE_DEFINITION]: 'type',
129130
[Kind.INTERFACE_TYPE_DEFINITION]: 'interface',
130131
[Kind.ENUM_TYPE_DEFINITION]: 'enum',
@@ -155,4 +156,5 @@ export function getNodeName(node: any) {
155156
case Kind.OPERATION_DEFINITION:
156157
return node.name ? `${node.operation} "${node.name.value}"` : node.operation;
157158
}
159+
return '';
158160
}

pnpm-lock.yaml

Lines changed: 53 additions & 53 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
"module": "esnext",
1313
"target": "es2018",
1414
"lib": ["es2021", "dom"],
15-
"suppressImplicitAnyIndexErrors": true,
1615
"moduleResolution": "node",
1716
"emitDecoratorMetadata": true,
1817
"sourceMap": true,

0 commit comments

Comments
 (0)