Skip to content

Commit c4c49f9

Browse files
committed
fix: Use separate rather than inline type keyword for TS compatibility
1 parent 3bec004 commit c4c49f9

36 files changed

Lines changed: 92 additions & 63 deletions

eslint.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export default [
5555
'@typescript-eslint/consistent-type-exports': 'error',
5656
'@typescript-eslint/consistent-type-imports': [
5757
'error',
58-
{ fixStyle: 'inline-type-imports' }
58+
{ fixStyle: 'separate-type-imports' }
5959
],
6060
'@typescript-eslint/no-explicit-any': 'off',
6161
'@typescript-eslint/no-namespace': 'off',

src/cli.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
import { resolve } from 'node:path'
22
import { parseArgs } from 'node:util'
33

4-
import { type Token, prettyToken } from './parse/cst.ts'
4+
import type { Token } from './parse/cst.ts'
5+
import { prettyToken } from './parse/cst.ts'
56
import { Lexer } from './parse/lexer.ts'
67
import { Parser } from './parse/parser.ts'
78
import { Composer } from './compose/composer.ts'
89
import { LineCounter } from './parse/line-counter.ts'
9-
import { type Document } from './doc/Document.ts'
10+
import type { Document } from './doc/Document.ts'
1011
import { prettifyError } from './errors.ts'
11-
import { visit, type visitor } from './visit.ts'
12+
import type { visitor } from './visit.ts'
13+
import { visit } from './visit.ts'
1214

1315
export const help = `\
1416
yaml: A command-line YAML processor and inspector

src/compose/compose-collection.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import type {
99
FlowCollection,
1010
SourceToken
1111
} from '../parse/cst.ts'
12-
import { type CollectionTag } from '../schema/types.ts'
12+
import type { CollectionTag } from '../schema/types.ts'
1313
import type { ComposeContext, ComposeNode } from './compose-node.ts'
1414
import type { ComposeErrorHandler } from './composer.ts'
1515
import { resolveBlockMap } from './resolve-block-map.ts'

src/compose/composer.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Directives } from '../doc/directives.ts'
22
import { Document } from '../doc/Document.ts'
3-
import { type ErrorCode, YAMLParseError, YAMLWarning } from '../errors.ts'
3+
import type { ErrorCode } from '../errors.ts'
4+
import { YAMLParseError, YAMLWarning } from '../errors.ts'
45
import { isCollection, isPair } from '../nodes/identity.ts'
56
import type { ParsedNode, Range } from '../nodes/Node.ts'
67
import type {

src/compose/resolve-block-map.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { ParsedNode } from '../nodes/Node.ts'
22
import { Pair } from '../nodes/Pair.ts'
33
import { YAMLMap } from '../nodes/YAMLMap.ts'
44
import type { BlockMap } from '../parse/cst.ts'
5-
import { type CollectionTag } from '../schema/types.ts'
5+
import type { CollectionTag } from '../schema/types.ts'
66
import type { ComposeContext, ComposeNode } from './compose-node.ts'
77
import type { ComposeErrorHandler } from './composer.ts'
88
import { resolveProps } from './resolve-props.ts'

src/compose/resolve-block-scalar.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { type Range } from '../nodes/Node.ts'
1+
import type { Range } from '../nodes/Node.ts'
22
import { Scalar } from '../nodes/Scalar.ts'
33
import type { BlockScalar } from '../parse/cst.ts'
44
import type { ComposeContext } from './compose-node.ts'

src/compose/resolve-block-seq.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { YAMLSeq } from '../nodes/YAMLSeq.ts'
22
import type { BlockSequence } from '../parse/cst.ts'
3-
import { type CollectionTag } from '../schema/types.ts'
3+
import type { CollectionTag } from '../schema/types.ts'
44
import type { ComposeContext, ComposeNode } from './compose-node.ts'
55
import type { ComposeErrorHandler } from './composer.ts'
66
import { resolveProps } from './resolve-props.ts'

src/compose/resolve-flow-collection.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import { Pair } from '../nodes/Pair.ts'
33
import { YAMLMap } from '../nodes/YAMLMap.ts'
44
import { YAMLSeq } from '../nodes/YAMLSeq.ts'
55
import type { FlowCollection, Token } from '../parse/cst.ts'
6-
import { type Schema } from '../schema/Schema.ts'
7-
import { type CollectionTag } from '../schema/types.ts'
6+
import type { Schema } from '../schema/Schema.ts'
7+
import type { CollectionTag } from '../schema/types.ts'
88
import type { ComposeContext, ComposeNode } from './compose-node.ts'
99
import type { ComposeErrorHandler } from './composer.ts'
1010
import { resolveEnd } from './resolve-end.ts'

src/compose/resolve-flow-scalar.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { type ErrorCode } from '../errors.ts'
2-
import { type Range } from '../nodes/Node.ts'
1+
import type { ErrorCode } from '../errors.ts'
2+
import type { Range } from '../nodes/Node.ts'
33
import { Scalar } from '../nodes/Scalar.ts'
44
import type { FlowScalar } from '../parse/cst.ts'
55
import type { ComposeErrorHandler } from './composer.ts'

src/compose/util-flow-indent-check.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { type Token } from '../parse/cst.ts'
2-
import { type ComposeErrorHandler } from './composer.ts'
1+
import type { Token } from '../parse/cst.ts'
2+
import type { ComposeErrorHandler } from './composer.ts'
33
import { containsNewline } from './util-contains-newline.ts'
44

55
export function flowIndentCheck(

0 commit comments

Comments
 (0)