Skip to content

Commit

Permalink
fix: Fix semi rule for opaque types (#358)
Browse files Browse the repository at this point in the history
  • Loading branch information
pnevyk authored and gajus committed Sep 27, 2018
1 parent 0722187 commit d2c2411
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/rules/semi.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ const create = (context) => {
};

return {
OpaqueType: checkForSemicolon,
TypeAlias: checkForSemicolon
};
};
Expand Down
13 changes: 13 additions & 0 deletions tests/rules/assertions/semi.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@ export default {
],
options: ['never'],
output: 'type FooType = {}'
},
{
code: 'opaque type FooType = {}',
errors: [
{
message: 'Missing semicolon.'
}
],
options: [],
output: 'opaque type FooType = {};'
}
],
misconfigured: [
Expand Down Expand Up @@ -89,6 +99,9 @@ export default {
onlyFilesWithFlowAnnotation: true
}
}
},
{
code: 'opaque type FooType = {};'
}
]
};

0 comments on commit d2c2411

Please sign in to comment.