Skip to content

Commit 8903d5b

Browse files
committed
fix: do not deps on @typescript-eslint/utils/ast-utils
fix antfu/eslint-config#816
1 parent be26ee5 commit 8903d5b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/rules/consistent-list-newline.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import type { AST_NODE_TYPES, TSESTree } from '@typescript-eslint/utils'
22
import type { RuleFix, RuleFixer, RuleListener } from '@typescript-eslint/utils/ts-eslint'
3-
import { isCommaToken } from '@typescript-eslint/utils/ast-utils'
43
import { createEslintRule } from '../utils'
54

65
export const RULE_NAME = 'consistent-list-newline'
@@ -29,6 +28,10 @@ export type Options = [{
2928
TSTypeParameterInstantiation?: boolean
3029
}]
3130

31+
function isCommaToken(token: TSESTree.Token): boolean {
32+
return token.type === 'Punctuator' && token.value === ','
33+
}
34+
3235
export default createEslintRule<Options, MessageIds>({
3336
name: RULE_NAME,
3437
meta: {

0 commit comments

Comments
 (0)