Skip to content

Commit

Permalink
refactor(nodes)!: camelcase node types
Browse files Browse the repository at this point in the history
- matches mdast node type formatting

Signed-off-by: Lexus Drumgold <[email protected]>
  • Loading branch information
unicornware committed Feb 9, 2024
1 parent 0e244ce commit 043d475
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/nodes/__tests__/block-tag.spec-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ describe('unit-d:nodes/BlockTag', () => {
.toEqualTypeOf<Optional<BlockTagData>>()
})

it('should match [type: "block-tag"]', () => {
it('should match [type: "blockTag"]', () => {
expectTypeOf<TestSubject>()
.toHaveProperty('type')
.toEqualTypeOf<'block-tag'>()
.toEqualTypeOf<'blockTag'>()
})
})
2 changes: 1 addition & 1 deletion src/nodes/__tests__/comment.spec-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import type { CommentData, default as TestSubject } from '../comment'
import type Parent from '../parent'

describe('unit-d:nodes/Comment', () => {
it('should extend Parent>', () => {
it('should extend Parent', () => {
expectTypeOf<TestSubject>().toMatchTypeOf<Parent>()
})

Expand Down
4 changes: 2 additions & 2 deletions src/nodes/__tests__/inline-tag.spec-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ describe('unit-d:nodes/InlineTag', () => {
.toEqualTypeOf<Optional<InlineTagData>>()
})

it('should match [type: "inline-tag"]', () => {
it('should match [type: "inlineTag"]', () => {
expectTypeOf<TestSubject>()
.toHaveProperty('type')
.toEqualTypeOf<'inline-tag'>()
.toEqualTypeOf<'inlineTag'>()
})
})
4 changes: 2 additions & 2 deletions src/nodes/__tests__/type-expression.spec-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ describe('unit-d:nodes/TypeExpression', () => {
.toEqualTypeOf<Optional<TypeExpressionData>>()
})

it('should match [type: "type-expression"]', () => {
it('should match [type: "typeExpression"]', () => {
expectTypeOf<TestSubject>()
.toHaveProperty('type')
.toEqualTypeOf<'type-expression'>()
.toEqualTypeOf<'typeExpression'>()
})
})
2 changes: 1 addition & 1 deletion src/nodes/block-tag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ interface BlockTag extends Parent, Tag {
/**
* Node type.
*/
type: 'block-tag'
type: 'blockTag'
}

export type { BlockTagData, BlockTag as default }
2 changes: 1 addition & 1 deletion src/nodes/inline-tag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ interface InlineTag extends Literal, Tag {
/**
* Node type.
*/
type: 'inline-tag'
type: 'inlineTag'
}

export type { InlineTagData, InlineTag as default }
2 changes: 1 addition & 1 deletion src/nodes/type-expression.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ interface TypeExpression extends Literal {
/**
* Node type.
*/
type: 'type-expression'
type: 'typeExpression'
}

export type { TypeExpressionData, TypeExpression as default }

0 comments on commit 043d475

Please sign in to comment.