diff --git a/packages/eslint-plugin/src/rules/quotes.ts b/packages/eslint-plugin/src/rules/quotes.ts index a266e912fdf..5d4d44028b1 100644 --- a/packages/eslint-plugin/src/rules/quotes.ts +++ b/packages/eslint-plugin/src/rules/quotes.ts @@ -42,6 +42,7 @@ export default util.createRule({ 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: diff --git a/packages/eslint-plugin/tests/rules/quotes.test.ts b/packages/eslint-plugin/tests/rules/quotes.test.ts index c6bf01f3e77..ad1487b8506 100644 --- a/packages/eslint-plugin/tests/rules/quotes.test.ts +++ b/packages/eslint-plugin/tests/rules/quotes.test.ts @@ -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};`,