Skip to content

Commit

Permalink
feat: recognize ImportExpresion
Browse files Browse the repository at this point in the history
  • Loading branch information
edvardchen committed Apr 14, 2020
1 parent 69d47d3 commit e54daee
Show file tree
Hide file tree
Showing 3 changed files with 811 additions and 1,061 deletions.
5 changes: 5 additions & 0 deletions lib/rules/no-literal-string.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,11 @@ module.exports = {
// ─── EXPORT AND IMPORT ───────────────────────────────────────────
//

'ImportExpression Literal'(node) {
// allow (import('abc'))
visited.add(node);
},

'ImportDeclaration Literal'(node) {
// allow (import abc form 'abc')
visited.add(node);
Expand Down
Loading

0 comments on commit e54daee

Please sign in to comment.