Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix(eslint-plugin): [quotes] false positive with backtick in import e…
…quals statement (#1769)
  • Loading branch information
regevbr committed Mar 19, 2020
1 parent 6646959 commit 199863d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/eslint-plugin/src/rules/quotes.ts
Expand Up @@ -42,6 +42,7 @@ export default util.createRule<Options, MessageIds>({
case AST_NODE_TYPES.TSPropertySignature:
case AST_NODE_TYPES.TSModuleDeclaration:
case AST_NODE_TYPES.TSLiteralType:
case AST_NODE_TYPES.TSExternalModuleReference:
return true;

case AST_NODE_TYPES.TSEnumMember:
Expand Down
6 changes: 5 additions & 1 deletion packages/eslint-plugin/tests/rules/quotes.test.ts
Expand Up @@ -310,7 +310,11 @@ ruleTester.run('quotes', rule, {
code: `export * from "a"; export * from 'b';`,
options: ['backtick'],
},

// `backtick` should not warn import with require.
{
code: `import moment = require('moment');`,
options: ['backtick'],
},
// `backtick` should not warn property/method names (not computed).
{
code: `var obj = {"key0": 0, 'key1': 1};`,
Expand Down

0 comments on commit 199863d

Please sign in to comment.