Add tsconfig.json file for scripts directory

This will fix linting errors when `lint-staged` is run and there are
changed files in the `scripts` directory.
This commit is contained in:
Koen Vlaswinkel
2022-10-31 13:21:51 +01:00
parent 1cce7ae0e2
commit 762288b57f
3 changed files with 10 additions and 4 deletions

View File

@@ -3,7 +3,7 @@ module.exports = {
parserOptions: { parserOptions: {
ecmaVersion: 2018, ecmaVersion: 2018,
sourceType: "module", sourceType: "module",
project: ["tsconfig.json", "./src/**/tsconfig.json", "./gulpfile.ts/tsconfig.json"], project: ["tsconfig.json", "./src/**/tsconfig.json", "./gulpfile.ts/tsconfig.json", "./scripts/tsconfig.json"],
}, },
plugins: ["@typescript-eslint"], plugins: ["@typescript-eslint"],
env: { env: {

View File

@@ -14,7 +14,7 @@ import * as fs from 'fs-extra';
import * as path from 'path'; import * as path from 'path';
if (process.argv.length !== 3) { if (process.argv.length !== 3) {
console.error('Expected 1 argument - the scenario name') console.error('Expected 1 argument - the scenario name');
} }
const scenarioName = process.argv[2]; const scenarioName = process.argv[2];
@@ -39,7 +39,7 @@ async function fixScenarioFiles() {
}); });
let index = 0; let index = 0;
for (let file of orderedFiles) { for (const file of orderedFiles) {
const ext = path.extname(file); const ext = path.extname(file);
if (ext === '.json') { if (ext === '.json') {
const fileName = path.basename(file, ext); const fileName = path.basename(file, ext);
@@ -66,7 +66,7 @@ async function fixScenarioFiles() {
await fs.writeJSON(newFilePath, json); await fs.writeJSON(newFilePath, json);
} }
} }
index++; index++;
} }
} }

View File

@@ -0,0 +1,6 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "../tsconfig.json",
"include": ["**/*.ts"],
"exclude": []
}