Skip to content
This repository has been archived by the owner on Aug 18, 2021. It is now read-only.

Commit

Permalink
[import()] Adding support to lint dynamic imports (#413)
Browse files Browse the repository at this point in the history
* [import()] Adding support to lint dynamic imports

* [import()] Adding regression test to import
  • Loading branch information
kesne authored and hzoo committed Oct 17, 2016
1 parent 88e39ad commit 41b9542
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,8 @@ exports.parseNoPatch = function (code, options) {
"functionBind",
"functionSent",
"objectRestSpread",
"trailingFunctionCommas"
"trailingFunctionCommas",
"dynamicImport"
]
};

Expand Down
8 changes: 8 additions & 0 deletions test/non-regression.js
Original file line number Diff line number Diff line change
Expand Up @@ -1601,6 +1601,14 @@ describe("verify", function () {
});
});

it("dynamic import support", function () {
verifyAndAssertMessages(
"import('test-module').then(() => {})",
{},
[]
);
});

// it("regex with es6 unicodeCodePointEscapes", function () {
// verifyAndAssertMessages(
// "string.replace(/[\u{0000A0}-\u{10FFFF}<>\&]/gmiu, (char) => `&#x${char.codePointAt(0).toString(16)};`);",
Expand Down

0 comments on commit 41b9542

Please sign in to comment.