Skip to content

Commit 56473a4

Browse files
committed
chore: Add eslint-disable for no-template-curly-in-string in typescript.ts
This commit disables the eslint rule `no-template-curly-in-string` for a particular line in typescript.ts file. This was necessary as the rule was preventing the usage of template literals in string, which is needed to construct `tsconfigPath`. The path created is used to add typescript compilation command. Signed-off-by: prisis <[email protected]>
1 parent 3411686 commit 56473a4

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

packages/lint-staged-config/src/groups/eslint/create-eslint-commands.ts

+1
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ const createEslintCommands = async (filenames: string[]): Promise<string[]> => {
104104
}
105105

106106
try {
107+
// eslint-disable-next-line no-template-curly-in-string
107108
config = getNearestConfigPath(configName, filePaths[0] as "/${string}") as string;
108109
} catch {
109110
// Ignore

packages/lint-staged-config/src/groups/typescript.ts

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ const group: Config = {
99

1010
filenames.forEach((filePath) => {
1111
try {
12+
// eslint-disable-next-line no-template-curly-in-string
1213
const tsconfigPath = getNearestConfigPath("tsconfig.json", filePath as "/${string}") as string;
1314

1415
commands.add(`tsc --noEmit --project ${tsconfigPath}`);

0 commit comments

Comments
 (0)