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:
@@ -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: {
|
||||||
|
|||||||
@@ -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++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
6
extensions/ql-vscode/scripts/tsconfig.json
Normal file
6
extensions/ql-vscode/scripts/tsconfig.json
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://json.schemastore.org/tsconfig",
|
||||||
|
"extends": "../tsconfig.json",
|
||||||
|
"include": ["**/*.ts"],
|
||||||
|
"exclude": []
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user