Introduce a shared tsconfig for extensions

Setup a baseline tsconfig for extensions to extend. This will help make sure thatof our built-in extensions are using the recommended settings for target and so on. it also reduces duplicated code and will make updating tsconfig settings easier
This commit is contained in:
Matt Bierner 2018-10-01 16:35:43 -07:00
parent 199c51f4a5
commit 402106a699
3 changed files with 21 additions and 13 deletions

View file

@ -21,6 +21,7 @@ const nlsDev = require('vscode-nls-dev');
const root = path.dirname(__dirname);
const commit = util.getVersion(root);
const plumber = require('gulp-plumber');
const _ = require('underscore');
const extensionsPath = path.join(path.dirname(__dirname), 'extensions');
@ -35,7 +36,9 @@ const tasks = compilations.map(function (tsconfigFile) {
const absolutePath = path.join(extensionsPath, tsconfigFile);
const relativeDirname = path.dirname(tsconfigFile);
const tsOptions = require(absolutePath).compilerOptions;
const tsconfig = require(absolutePath);
const tsOptions = _.assign({}, tsconfig.compilerOptions, tsconfig.extends ? require(path.join(extensionsPath, relativeDirname, tsconfig.extends)).compilerOptions : {});
tsOptions.verbose = false;
tsOptions.sourceMap = true;

View file

@ -0,0 +1,16 @@
{
"compilerOptions": {
"target": "es2017",
"module": "commonjs",
"lib": [
"es6",
"es2015.promise"
],
"strict": true,
"alwaysStrict": true,
"noImplicitAny": true,
"noImplicitReturns": true,
"noUnusedLocals": true,
"noUnusedParameters": true
}
}

View file

@ -1,18 +1,7 @@
{
"extends": "../shared.tsconfig.json",
"compilerOptions": {
"target": "es2017",
"module": "commonjs",
"lib": [
"es6",
"es2015.promise"
],
"outDir": "./out",
"noImplicitAny": true,
"noImplicitReturns": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"strict": true,
"alwaysStrict": true,
"experimentalDecorators": true
},
"include": [