Skip to content

Commit 76f8827

Browse files
filipesilvaBrocco
authored andcommitted
fix(lint): fix new linting errors (#4241)
The following linting errors appeared on master. I suppose it was due to a `tslint` update. ``` packages/@ngtools/json-schema/src/schema-tree.ts[34, 23]: Type boolean trivially inferred from a boolean literal, remove type annotation packages/@ngtools/json-schema/src/schema-tree.ts[35, 21]: Type boolean trivially inferred from a boolean literal, remove type annotation packages/@ngtools/json-schema/src/schema-tree.ts[250, 22]: Type boolean trivially inferred from a boolean literal, remove type annotation packages/@ngtools/webpack/src/compiler_host.ts[103, 19]: Type boolean trivially inferred from a boolean literal, remove type annotation packages/@ngtools/webpack/src/plugin.ts[50, 23]: Type boolean trivially inferred from a boolean literal, remove type annotation packages/@ngtools/webpack/src/plugin.ts[51, 32]: Type boolean trivially inferred from a boolean literal, remove type annotation packages/@ngtools/webpack/src/refactor.ts[33, 21]: Type boolean trivially inferred from a boolean literal, remove type annotation packages/angular-cli/lib/webpack/compression-plugin.ts[29, 22]: Type number trivially inferred from a number literal, remove type annotation packages/angular-cli/lib/webpack/compression-plugin.ts[30, 21]: Type number trivially inferred from a number literal, remove type annotation tests/acceptance/get-dependent-files.spec.ts[3, 64]: trailing whitespace ```
1 parent 790dda6 commit 76f8827

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

Diff for: packages/@ngtools/json-schema/src/schema-tree.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ export abstract class SchemaTreeNode<T> implements SchemaNode {
3131
// Hierarchy objects
3232
protected _parent: SchemaTreeNode<any>;
3333

34-
protected _defined: boolean = false;
35-
protected _dirty: boolean = false;
34+
protected _defined = false;
35+
protected _dirty = false;
3636

3737
protected _schema: Schema;
3838
protected _name: string;
@@ -247,7 +247,7 @@ export class OneOfSchemaTreeNode extends NonLeafSchemaTreeNode<any> {
247247
export class ObjectSchemaTreeNode extends NonLeafSchemaTreeNode<{[key: string]: any}> {
248248
// The map of all children metadata.
249249
protected _children: { [key: string]: SchemaTreeNode<any> };
250-
protected _frozen: boolean = false;
250+
protected _frozen = false;
251251

252252
constructor(metaData: TreeNodeConstructorArgument<any>) {
253253
super(metaData);

Diff for: packages/@ngtools/webpack/src/compiler_host.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export class WebpackCompilerHost implements ts.CompilerHost {
100100
private _basePath: string;
101101
private _setParentNodes: boolean;
102102

103-
private _cache: boolean = false;
103+
private _cache = false;
104104

105105
constructor(private _options: ts.CompilerOptions, basePath: string) {
106106
this._setParentNodes = true;

Diff for: packages/@ngtools/webpack/src/plugin.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ export class AotPlugin implements Tapable {
4747
private _compiler: any = null;
4848
private _compilation: any = null;
4949

50-
private _typeCheck: boolean = true;
51-
private _skipCodeGeneration: boolean = false;
50+
private _typeCheck = true;
51+
private _skipCodeGeneration = false;
5252
private _basePath: string;
5353
private _genDir: string;
5454

Diff for: packages/@ngtools/webpack/src/refactor.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export class TypeScriptFileRefactor {
3030
private _sourceFile: ts.SourceFile;
3131
private _sourceString: any;
3232
private _sourceText: string;
33-
private _changed: boolean = false;
33+
private _changed = false;
3434

3535
get fileName() { return this._fileName; }
3636
get sourceFile() { return this._sourceFile; }

Diff for: packages/angular-cli/lib/webpack/compression-plugin.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ export class CompressionPlugin {
2626
private algorithm: Function;
2727
private compressionOptions: any = {};
2828
private test: RegExp[];
29-
private threshold: number = 0;
30-
private minRatio: number = 0.8;
29+
private threshold = 0;
30+
private minRatio = 0.8;
3131

3232
constructor(options: CompressionPluginOptions = {}) {
3333
if (options.hasOwnProperty('asset')) {

Diff for: tests/acceptance/get-dependent-files.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use strict';
22

3-
// This needs to be first so fs module can be mocked correctly.
3+
// This needs to be first so fs module can be mocked correctly.
44
let mockFs = require('mock-fs');
55
import { expect, assert } from 'chai';
66
import * as path from 'path';

0 commit comments

Comments
 (0)