[build][bug] fix rules conversion to JS