Skip to content

Commit d2c2411

Browse files
pnevykgajus
authored andcommittedSep 27, 2018
fix: Fix semi rule for opaque types (#358)
1 parent 0722187 commit d2c2411

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed
 

‎src/rules/semi.js

+1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ const create = (context) => {
5454
};
5555

5656
return {
57+
OpaqueType: checkForSemicolon,
5758
TypeAlias: checkForSemicolon
5859
};
5960
};

‎tests/rules/assertions/semi.js

+13
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,16 @@ export default {
2929
],
3030
options: ['never'],
3131
output: 'type FooType = {}'
32+
},
33+
{
34+
code: 'opaque type FooType = {}',
35+
errors: [
36+
{
37+
message: 'Missing semicolon.'
38+
}
39+
],
40+
options: [],
41+
output: 'opaque type FooType = {};'
3242
}
3343
],
3444
misconfigured: [
@@ -89,6 +99,9 @@ export default {
8999
onlyFilesWithFlowAnnotation: true
90100
}
91101
}
102+
},
103+
{
104+
code: 'opaque type FooType = {};'
92105
}
93106
]
94107
};

0 commit comments

Comments
 (0)
Please sign in to comment.