build: enable no-unused-variable lint rule (#5184)

* Now TSLint starts reporting unused variables again (Rule has been un-deprecated and now uses the type checker
* In favor of linting the whole project the tsconfig file inside of `src/` needs to live in the project root.
This commit is contained in:
Paul Gschwendtner
2017-07-07 20:42:52 +02:00
committed by mmalerba
parent eedf36cafd
commit 589dc05149
42 changed files with 83 additions and 127 deletions
+1 -3
View File
@@ -7,9 +7,7 @@ import {buildConfig} from 'material2-build-tools';
const stylesGlob = '+(tools|src)/**/*.+(css|scss)';
/** List of flags that will passed to the different TSLint tasks. */
const tsLintBaseFlags = [
'-c', 'tslint.json', '+(src|e2e|tools)/**/*.ts', '--exclude', '**/node_modules/**/*'
];
const tsLintBaseFlags = ['-c', 'tslint.json', '--project', './tsconfig.json'];
/** Path to the output of the Material package. */
const materialOutPath = join(buildConfig.outputDir, 'packages', 'material');
-4
View File
@@ -6,10 +6,6 @@ import {remapSourcemap} from './sourcemap-remap';
import {transpileFile} from './typescript-transpile';
import {buildConfig} from './build-config';
// There are no type definitions available for these imports.
const uglify = require('uglify-js');
const sorcery = require('sorcery');
/** Directory where all bundles will be created in. */
const bundlesDir = join(buildConfig.outputDir, 'bundles');
@@ -28,15 +28,13 @@ export function setGithubStatus(commitSHA: string,
'Content-Type': 'application/json'
};
return new Promise((resolve) => {
return new Promise((resolve, reject) => {
request({
url: `https://api.github.com/repos/${repoSlug}/statuses/${commitSHA}`,
method: 'POST',
form: data,
headers: headers
}, function (error: any, response: any) {
console.log(response.statusCode);
resolve(response.statusCode);
});
});
}, (error: any, response: any) => error ? reject(error) : resolve(response.statusCode));
});
}
@@ -46,7 +46,7 @@ export class ViewerComponent {
}
approve() {
this._service.approvePullRequest().then((result) => {
this._service.approvePullRequest().then(() => {
this.snackBar.open(`Approved`, '', this.messageDuration);
}).catch((error) => {
this.snackBar.open(`Error ${error}`, '', this.messageDuration);
@@ -54,7 +54,7 @@ export class ViewerComponent {
}
updateGithubStatus() {
this._service.updatePullRequestResult().then((result) => {
this._service.updatePullRequestResult().then(() => {
this.snackBar.open(`Approved`, '', this.messageDuration);
}).catch((error) => {
this.snackBar.open(error.message, '', this.messageDuration);