File tree Expand file tree Collapse file tree 4 files changed +2
-15
lines changed Expand file tree Collapse file tree 4 files changed +2
-15
lines changed Original file line number Diff line number Diff line change 1
1
/** @import { TSESTree } from '@typescript-eslint/types' */
2
- /** @import { Visitors, NodeWithComments, Context } from '../types.js' */
2
+ /** @import { Visitors, Context } from '../types.js' */
3
3
4
4
/** @type {Record<TSESTree.Expression['type'] | 'Super' | 'RestElement', number> } */
5
5
export const EXPRESSIONS_PRECEDENCE = {
Original file line number Diff line number Diff line change @@ -35,13 +35,6 @@ type TSExpressionWithTypeArguments = {
35
35
expression : any ;
36
36
} ;
37
37
38
- // `@typescript-eslint/types` differs from the official `estree` spec by handling
39
- // comments differently. This is a node which we can use to ensure type saftey.
40
- export type NodeWithComments = {
41
- leadingComments ?: TSESTree . Comment [ ] | undefined ;
42
- trailingComments ?: TSESTree . Comment [ ] | undefined ;
43
- } & TSESTree . Node ;
44
-
45
38
export interface Location {
46
39
type : 'Location' ;
47
40
line : number ;
Original file line number Diff line number Diff line change 2
2
3
3
import * as acorn from 'acorn' ;
4
4
import { tsPlugin } from '@sveltejs/acorn-typescript' ;
5
- import { walk } from 'zimmerframe' ;
6
5
7
6
/** @import { TSESTree } from '@typescript-eslint/types' */
8
- /** @import { NodeWithComments } from '../src/types' */
9
7
10
8
// @ts -expect-error
11
9
export const acornTs = acorn . Parser . extend ( tsPlugin ( { allowSatisfies : true } ) ) ;
Original file line number Diff line number Diff line change 1
1
// @ts -check
2
2
/** @import { TSESTree } from '@typescript-eslint/types' */
3
- /** @import { Visitors, PrintOptions } from '../src/types' */
3
+ /** @import { PrintOptions } from '../src/types' */
4
4
import fs from 'node:fs' ;
5
5
import { expect , test } from 'vitest' ;
6
6
import { walk } from 'zimmerframe' ;
@@ -18,10 +18,6 @@ function clean(ast) {
18
18
delete node . start ;
19
19
// @ts -expect-error
20
20
delete node . end ;
21
- // @ts -expect-error
22
- delete node . leadingComments ;
23
- // @ts -expect-error
24
- delete node . trailingComments ;
25
21
context . next ( ) ;
26
22
} ,
27
23
Program ( node , context ) {
You can’t perform that action at this time.
0 commit comments