Skip to content

Commit

Permalink
Clarify what esvalid limit we're working around
Browse files Browse the repository at this point in the history
This does mean we're blocked on
estools/esvalid#7 if we want safety.
  • Loading branch information
anko committed Jan 28, 2016
1 parent cea6415 commit 4320a45
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/translate.ls
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ module.exports = (root-env, ast, options={}) ->
|> (.map statementify)

err = errors program-ast |> reject ({node}) ->
# These are valid ES6 nodes, and their errors need to be ignored. See
# https://github.com/estools/esvalid/issues/7.
# TODO Because esvalid doesn't yet support ES6
# https://github.com/estools/esvalid/issues/7 we have to manually ignore
# errors to do with properties that have a computed key. This may miss
# some though!
| node.type is \Property =>
node.computed and node.key?.type not in <[Identifier Literal]>
| otherwise => false
Expand Down

0 comments on commit 4320a45

Please sign in to comment.