Skip to content

Commit dec9c72

Browse files
committed
consistent type imports
1 parent fb56760 commit dec9c72

6 files changed

Lines changed: 12 additions & 7 deletions

File tree

eslint.config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ export default [
7474
},
7575

7676
rules: {
77+
'@typescript-eslint/consistent-type-imports': 'error',
7778
'@typescript-eslint/explicit-function-return-type': 'error'
7879
}
7980
},

src/slang-nodes/MultiLineComment.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
import { TerminalKind, TerminalNode } from '@nomicfoundation/slang/cst';
1+
import { TerminalKind } from '@nomicfoundation/slang/cst';
22
import { doc } from 'prettier';
33
import { CommentNode } from './CommentNode.js';
44
import { isIndentableBlockComment } from '../slang-utils/is-indentable-block-comment.js';
55
import { printIndentableBlockComment } from '../slang-printers/print-indentable-block-comment.js';
66

7+
import type { TerminalNode } from '@nomicfoundation/slang/cst';
78
import type { Doc } from 'prettier';
89

910
const { join, literalline } = doc.builders;

src/slang-nodes/MultiLineNatSpecComment.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
import { TerminalKind, TerminalNode } from '@nomicfoundation/slang/cst';
1+
import { TerminalKind } from '@nomicfoundation/slang/cst';
22
import { doc } from 'prettier';
33
import { CommentNode } from './CommentNode.js';
44
import { isIndentableBlockComment } from '../slang-utils/is-indentable-block-comment.js';
55
import { printIndentableBlockComment } from '../slang-printers/print-indentable-block-comment.js';
66

7+
import type { TerminalNode } from '@nomicfoundation/slang/cst';
78
import type { Doc } from 'prettier';
89

910
const { join, literalline } = doc.builders;

src/slang-nodes/SingleLineComment.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import { TerminalKind, TerminalNode } from '@nomicfoundation/slang/cst';
1+
import { TerminalKind } from '@nomicfoundation/slang/cst';
22
import { CommentNode } from './CommentNode.js';
33

4+
import type { TerminalNode } from '@nomicfoundation/slang/cst';
45
import type { Doc } from 'prettier';
56

67
export class SingleLineComment extends CommentNode {

src/slang-nodes/SingleLineNatSpecComment.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import { TerminalKind, TerminalNode } from '@nomicfoundation/slang/cst';
1+
import { TerminalKind } from '@nomicfoundation/slang/cst';
22
import { CommentNode } from './CommentNode.js';
33

4+
import type { TerminalNode } from '@nomicfoundation/slang/cst';
45
import type { Doc } from 'prettier';
56

67
export class SingleLineNatSpecComment extends CommentNode {

src/slang-nodes/TerminalNode.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import {
1+
import { SlangNode } from './SlangNode.js';
2+
3+
import type {
24
TerminalKind,
35
TerminalNode as SlangTerminalNode
46
} from '@nomicfoundation/slang/cst';
5-
import { SlangNode } from './SlangNode.js';
6-
77
import type { Doc } from 'prettier';
88

99
export class TerminalNode extends SlangNode {

0 commit comments

Comments
 (0)