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

[import()] Adding support to lint dynamic imports #413

Merged
merged 2 commits into from
Oct 17, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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 @@ -1573,6 +1573,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