diff --git a/.eslintrc b/.eslintrc index c4a3f80010c..914c0d76a7a 100644 --- a/.eslintrc +++ b/.eslintrc @@ -102,7 +102,7 @@ "no-sequences": "off", "no-shadow": "off", "no-sparse-arrays": "error", - "no-template-curly-in-string": "off", + "no-template-curly-in-string": "error", "no-throw-literal": "error", "no-trailing-spaces": "error", "no-undef-init": "error", diff --git a/src/testRunner/unittests/printer.ts b/src/testRunner/unittests/printer.ts index 8e217aa6a3a..0dcf32672d4 100644 --- a/src/testRunner/unittests/printer.ts +++ b/src/testRunner/unittests/printer.ts @@ -54,7 +54,7 @@ namespace ts { printsCorrectly("removeComments", { removeComments: true }, printer => printer.printFile(sourceFile)); // github #14948 - // tslint:disable-next-line no-invalid-template-strings + // eslint-disable-next-line no-template-curly-in-string printsCorrectly("templateLiteral", {}, printer => printer.printFile(createSourceFile("source.ts", "let greeting = `Hi ${name}, how are you?`;", ScriptTarget.ES2017))); // github #18071 diff --git a/src/testRunner/unittests/services/colorization.ts b/src/testRunner/unittests/services/colorization.ts index 71ba8bad394..91730af33a6 100644 --- a/src/testRunner/unittests/services/colorization.ts +++ b/src/testRunner/unittests/services/colorization.ts @@ -1,4 +1,5 @@ -// tslint:disable no-invalid-template-strings (lots of tests use quoted code) +// lots of tests use quoted code +/* eslint-disable no-template-curly-in-string */ interface ClassificationEntry { value: any; diff --git a/src/testRunner/unittests/services/organizeImports.ts b/src/testRunner/unittests/services/organizeImports.ts index c119aadb34e..198d1cb3262 100644 --- a/src/testRunner/unittests/services/organizeImports.ts +++ b/src/testRunner/unittests/services/organizeImports.ts @@ -406,7 +406,7 @@ D(); }, libFile); - // tslint:disable no-invalid-template-strings + /* eslint-disable no-template-curly-in-string */ testOrganizeImports("MoveToTop_Invalid", { path: "/test.ts", @@ -423,7 +423,7 @@ D(); `, }, libFile); - // tslint:enable no-invalid-template-strings + /* eslint-enable no-template-curly-in-string */ testOrganizeImports("CoalesceMultipleModules", { @@ -668,7 +668,7 @@ export * from "lib"; }, libFile); - // tslint:disable no-invalid-template-strings + /* eslint-disable no-template-curly-in-string */ testOrganizeExports("MoveToTop_Invalid", { path: "/test.ts", @@ -684,7 +684,7 @@ export { D } from "lib"; `, }, libFile); - // tslint:enable no-invalid-template-strings + /* eslint-enable no-template-curly-in-string */ testOrganizeExports("MoveToTop_WithImportsFirst", {