From d4d1409e6fd59233fa647709dfb8d5df28349ae4 Mon Sep 17 00:00:00 2001 From: Zeke Sikelianos Date: Fri, 5 May 2017 13:52:14 -0700 Subject: [PATCH 1/2] use tsconfig file when linting electron.d.ts --- script/create-dist.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/script/create-dist.py b/script/create-dist.py index 933b594ec2aa..66ff9c982002 100755 --- a/script/create-dist.py +++ b/script/create-dist.py @@ -150,9 +150,11 @@ def create_typescript_definitions(): env['PATH'] = os.path.pathsep.join([node_bin_dir, env['PATH']]) infile = os.path.relpath(os.path.join(DIST_DIR, 'electron-api.json')) outfile = os.path.relpath(os.path.join(DIST_DIR, 'electron.d.ts')) + tslintconfig = os.path.relpath(os.path.join(DIST_DIR, + 'node_modules/electron-typescript-definitions/tslint.json')) execute(['electron-typescript-definitions', '--in={0}'.format(infile), '--out={0}'.format(outfile)], env=env) - execute(['tslint', outfile], env=env) + execute(['tslint', '--config', tslintconfig, outfile], env=env) def strip_binaries(): for binary in TARGET_BINARIES[PLATFORM]: From f22880931749b688d146f1fccb8aade02fa1761b Mon Sep 17 00:00:00 2001 From: Zeke Sikelianos Date: Fri, 5 May 2017 15:00:29 -0700 Subject: [PATCH 2/2] fix the tslint.json path --- script/create-dist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/create-dist.py b/script/create-dist.py index 66ff9c982002..9188ad8dca5b 100755 --- a/script/create-dist.py +++ b/script/create-dist.py @@ -151,7 +151,7 @@ def create_typescript_definitions(): infile = os.path.relpath(os.path.join(DIST_DIR, 'electron-api.json')) outfile = os.path.relpath(os.path.join(DIST_DIR, 'electron.d.ts')) tslintconfig = os.path.relpath(os.path.join(DIST_DIR, - 'node_modules/electron-typescript-definitions/tslint.json')) + '../node_modules/electron-typescript-definitions/tslint.json')) execute(['electron-typescript-definitions', '--in={0}'.format(infile), '--out={0}'.format(outfile)], env=env) execute(['tslint', '--config', tslintconfig, outfile], env=env)