diff --git a/packages/@angular/cli/commands/completion.ts b/packages/@angular/cli/commands/completion.ts index 5a89bdef2deb..d7aa2471c8b4 100644 --- a/packages/@angular/cli/commands/completion.ts +++ b/packages/@angular/cli/commands/completion.ts @@ -1,7 +1,7 @@ import * as fs from 'fs'; import * as path from 'path'; -import { oneLine, stripIndent } from 'common-tags'; +import { stripIndent } from 'common-tags'; const stringUtils = require('ember-cli-string-utils'); const Command = require('../ember-cli/lib/models/command'); diff --git a/packages/@angular/cli/commands/doc.ts b/packages/@angular/cli/commands/doc.ts index 2b055acfebca..20b84e0e23e8 100644 --- a/packages/@angular/cli/commands/doc.ts +++ b/packages/@angular/cli/commands/doc.ts @@ -10,7 +10,7 @@ const DocCommand = Command.extend({ '' ], - run: function(commandOptions: any, rawArgs: Array) { + run: function(_commandOptions: any, rawArgs: Array) { const keyword = rawArgs[0]; const docTask = new DocTask({ diff --git a/packages/@angular/cli/commands/eject.ts b/packages/@angular/cli/commands/eject.ts index e9e7867b4a88..cfb05fd8556d 100644 --- a/packages/@angular/cli/commands/eject.ts +++ b/packages/@angular/cli/commands/eject.ts @@ -1,5 +1,4 @@ import { BuildOptions } from '../models/build-options'; -import { Version } from '../upgrade/version'; import {baseBuildCommandOptions} from './build'; const Command = require('../ember-cli/lib/models/command'); diff --git a/packages/@angular/cli/commands/new.ts b/packages/@angular/cli/commands/new.ts index a9b1cc2ee1d2..47af03940b3e 100644 --- a/packages/@angular/cli/commands/new.ts +++ b/packages/@angular/cli/commands/new.ts @@ -1,4 +1,3 @@ -import * as chalk from 'chalk'; import InitCommand from './init'; import { validateProjectName } from '../utilities/validate-project-name'; diff --git a/packages/@angular/cli/commands/serve.ts b/packages/@angular/cli/commands/serve.ts index 20d12f119d75..f4fcf1e420d1 100644 --- a/packages/@angular/cli/commands/serve.ts +++ b/packages/@angular/cli/commands/serve.ts @@ -4,7 +4,6 @@ import { baseBuildCommandOptions } from './build'; import { CliConfig } from '../models/config'; import { Version } from '../upgrade/version'; import { ServeTaskOptions } from './serve'; -import { checkPort } from '../utilities/check-port'; import { overrideOptions } from '../utilities/override-options'; const SilentError = require('silent-error'); diff --git a/packages/@angular/cli/lib/ast-tools/ast-utils.ts b/packages/@angular/cli/lib/ast-tools/ast-utils.ts index 5377afa50231..370bb79b3d14 100644 --- a/packages/@angular/cli/lib/ast-tools/ast-utils.ts +++ b/packages/@angular/cli/lib/ast-tools/ast-utils.ts @@ -88,7 +88,7 @@ export function insertAfterLastOccurrence(nodes: ts.Node[], toInsert: string, } -export function getContentOfKeyLiteral(source: ts.SourceFile, node: ts.Node): string { +export function getContentOfKeyLiteral(_source: ts.SourceFile, node: ts.Node): string { if (node.kind == ts.SyntaxKind.Identifier) { return (node as ts.Identifier).text; } else if (node.kind == ts.SyntaxKind.StringLiteral) { @@ -101,7 +101,7 @@ export function getContentOfKeyLiteral(source: ts.SourceFile, node: ts.Node): st function _angularImportsFromNode(node: ts.ImportDeclaration, - sourceFile: ts.SourceFile): {[name: string]: string} { + _sourceFile: ts.SourceFile): {[name: string]: string} { const ms = node.moduleSpecifier; let modulePath: string | null = null; switch (ms.kind) { diff --git a/packages/@angular/cli/lib/base-href-webpack/base-href-webpack-plugin.spec.ts b/packages/@angular/cli/lib/base-href-webpack/base-href-webpack-plugin.spec.ts index c0c2e320857c..3e3293e51e8f 100644 --- a/packages/@angular/cli/lib/base-href-webpack/base-href-webpack-plugin.spec.ts +++ b/packages/@angular/cli/lib/base-href-webpack/base-href-webpack-plugin.spec.ts @@ -4,9 +4,9 @@ import {BaseHrefWebpackPlugin} from './base-href-webpack-plugin'; function mockCompiler(indexHtml: string, callback: Function) { return { - plugin: function (event: any, compilerCallback: Function) { + plugin: function (_event: any, compilerCallback: Function) { const compilation = { - plugin: function (hook: any, compilationCallback: Function) { + plugin: function (_hook: any, compilationCallback: Function) { const htmlPluginData = { html: indexHtml }; @@ -29,7 +29,7 @@ describe('base href webpack plugin', () => { it('should do nothing when baseHref is null', () => { const plugin = new BaseHrefWebpackPlugin({ baseHref: null }); - const compiler = mockCompiler(html, (x: any, htmlPluginData: any) => { + const compiler = mockCompiler(html, (_x: any, htmlPluginData: any) => { expect(htmlPluginData.html).toEqual(''); }); plugin.apply(compiler); @@ -37,7 +37,7 @@ describe('base href webpack plugin', () => { it('should insert base tag when not exist', function () { const plugin = new BaseHrefWebpackPlugin({ baseHref: '/' }); - const compiler = mockCompiler(html, (x: any, htmlPluginData: any) => { + const compiler = mockCompiler(html, (_x: any, htmlPluginData: any) => { expect(htmlPluginData.html).toEqual(oneLineTrim` @@ -55,7 +55,7 @@ describe('base href webpack plugin', () => { const compiler = mockCompiler(oneLineTrim` - `, (x: any, htmlPluginData: any) => { + `, (_x: any, htmlPluginData: any) => { expect(htmlPluginData.html).toEqual(oneLineTrim` diff --git a/packages/@angular/cli/models/webpack-configs/common.ts b/packages/@angular/cli/models/webpack-configs/common.ts index 81829a3b3a68..f561b50133b7 100644 --- a/packages/@angular/cli/models/webpack-configs/common.ts +++ b/packages/@angular/cli/models/webpack-configs/common.ts @@ -6,7 +6,6 @@ import { BaseHrefWebpackPlugin } from '../../lib/base-href-webpack'; import { extraEntryParser, lazyChunksFilter, getOutputHashFormat } from './utils'; import { WebpackConfigOptions } from '../webpack-config'; -const autoprefixer = require('autoprefixer'); const ProgressPlugin = require('webpack/lib/ProgressPlugin'); const HtmlWebpackPlugin = require('html-webpack-plugin'); diff --git a/packages/@angular/cli/models/webpack-configs/development.ts b/packages/@angular/cli/models/webpack-configs/development.ts index 2f4e580bf762..37cb362d12eb 100644 --- a/packages/@angular/cli/models/webpack-configs/development.ts +++ b/packages/@angular/cli/models/webpack-configs/development.ts @@ -1,5 +1,5 @@ import { WebpackConfigOptions } from '../webpack-config'; -export const getDevConfig = function (wco: WebpackConfigOptions) { +export const getDevConfig = function (_wco: WebpackConfigOptions) { return {}; }; diff --git a/packages/@angular/cli/models/webpack-configs/production.ts b/packages/@angular/cli/models/webpack-configs/production.ts index 383ed29a4c7d..c629ecb27732 100644 --- a/packages/@angular/cli/models/webpack-configs/production.ts +++ b/packages/@angular/cli/models/webpack-configs/production.ts @@ -9,7 +9,6 @@ import { WebpackConfigOptions } from '../webpack-config'; export const getProdConfig = function (wco: WebpackConfigOptions) { const { projectRoot, buildOptions, appConfig } = wco; - const appRoot = path.resolve(projectRoot, appConfig.root); let extraPlugins: any[] = []; let entryPoints: {[key: string]: string[]} = {}; diff --git a/packages/@angular/cli/models/webpack-configs/styles.ts b/packages/@angular/cli/models/webpack-configs/styles.ts index 532b0c8c99ed..fa53e3165b85 100644 --- a/packages/@angular/cli/models/webpack-configs/styles.ts +++ b/packages/@angular/cli/models/webpack-configs/styles.ts @@ -1,6 +1,5 @@ import * as webpack from 'webpack'; import * as path from 'path'; -import { oneLineTrim } from 'common-tags'; import { SuppressExtractedTextChunksWebpackPlugin } from '../../plugins/suppress-entry-chunks-webpack-plugin'; diff --git a/packages/@angular/cli/models/webpack-configs/typescript.ts b/packages/@angular/cli/models/webpack-configs/typescript.ts index b3fac77f34ca..f461efe5a0d3 100644 --- a/packages/@angular/cli/models/webpack-configs/typescript.ts +++ b/packages/@angular/cli/models/webpack-configs/typescript.ts @@ -1,7 +1,6 @@ -import * as fs from 'fs'; import * as path from 'path'; import { stripIndent } from 'common-tags'; -import {AotPlugin, AotPluginOptions} from '@ngtools/webpack'; +import {AotPlugin} from '@ngtools/webpack'; import { WebpackConfigOptions } from '../webpack-config'; const SilentError = require('silent-error'); diff --git a/packages/@angular/cli/plugins/static-asset.ts b/packages/@angular/cli/plugins/static-asset.ts index 4baf843be97f..39a0fc1fe3bb 100644 --- a/packages/@angular/cli/plugins/static-asset.ts +++ b/packages/@angular/cli/plugins/static-asset.ts @@ -1,5 +1,3 @@ -import * as fs from 'fs'; - export class StaticAssetPlugin { constructor(private name: string, private contents: string) {} diff --git a/packages/@angular/cli/tasks/eject.ts b/packages/@angular/cli/tasks/eject.ts index 5a9a1bdfb8cb..c1c570bcf9ac 100644 --- a/packages/@angular/cli/tasks/eject.ts +++ b/packages/@angular/cli/tasks/eject.ts @@ -24,7 +24,6 @@ const HtmlWebpackPlugin = require('html-webpack-plugin'); const SilentError = require('silent-error'); const Task = require('../ember-cli/lib/models/task'); -const CommonsChunkPlugin = webpack.optimize.CommonsChunkPlugin; const LoaderOptionsPlugin = webpack.LoaderOptionsPlugin; const ProgressPlugin = require('webpack/lib/ProgressPlugin'); @@ -319,7 +318,7 @@ class JsonWebpackSerializer { }); } - private _replacer(key: string, value: any) { + private _replacer(_key: string, value: any) { if (value === undefined) { return value; } diff --git a/packages/@angular/cli/tasks/lint.ts b/packages/@angular/cli/tasks/lint.ts index 6cd8c1ab31d6..e30c28a40a6f 100644 --- a/packages/@angular/cli/tasks/lint.ts +++ b/packages/@angular/cli/tasks/lint.ts @@ -1,6 +1,5 @@ const Task = require('../ember-cli/lib/models/task'); import * as chalk from 'chalk'; -import * as path from 'path'; import * as glob from 'glob'; import * as ts from 'typescript'; import { requireProjectModule } from '../utilities/require-project-module'; diff --git a/packages/@angular/cli/tasks/npm-install.ts b/packages/@angular/cli/tasks/npm-install.ts index f0d4f80bfe4d..923432c96249 100644 --- a/packages/@angular/cli/tasks/npm-install.ts +++ b/packages/@angular/cli/tasks/npm-install.ts @@ -14,7 +14,7 @@ export default Task.extend({ return new Promise(function(resolve, reject) { ui.writeLine(chalk.green(`Installing packages for tooling via ${packageManager}.`)); exec(`${packageManager} install`, - (err: NodeJS.ErrnoException, stdout: string, stderr: string) => { + (err: NodeJS.ErrnoException, _stdout: string, stderr: string) => { if (err) { ui.writeLine(stderr); ui.writeLine(chalk.red('Package install failed, see above.')); diff --git a/packages/@angular/cli/tasks/serve.ts b/packages/@angular/cli/tasks/serve.ts index c78d7728eca6..480a1cc5af33 100644 --- a/packages/@angular/cli/tasks/serve.ts +++ b/packages/@angular/cli/tasks/serve.ts @@ -175,8 +175,8 @@ export default Task.extend({ `)); const server = new WebpackDevServer(webpackCompiler, webpackDevServerConfiguration); - return new Promise((resolve, reject) => { - server.listen(serveTaskOptions.port, serveTaskOptions.host, (err: any, stats: any) => { + return new Promise((_resolve, reject) => { + server.listen(serveTaskOptions.port, serveTaskOptions.host, (err: any, _stats: any) => { if (err) { return reject(err); } diff --git a/packages/@angular/cli/tsconfig.json b/packages/@angular/cli/tsconfig.json index 3d41dd150a4d..79044077aca0 100644 --- a/packages/@angular/cli/tsconfig.json +++ b/packages/@angular/cli/tsconfig.json @@ -8,6 +8,8 @@ "moduleResolution": "node", "noEmitOnError": true, "noImplicitAny": true, + "noUnusedParameters": true, + "noUnusedLocals": true, "outDir": "../../../dist/@angular/cli", "rootDir": ".", "sourceMap": true, diff --git a/packages/@angular/cli/upgrade/version.ts b/packages/@angular/cli/upgrade/version.ts index b0b1829163c8..a33e606c760f 100644 --- a/packages/@angular/cli/upgrade/version.ts +++ b/packages/@angular/cli/upgrade/version.ts @@ -50,7 +50,7 @@ export class Version { try { const angularCliPath = resolve.sync('@angular/cli', { basedir: process.cwd(), - packageFilter: (pkg: any, pkgFile: string) => { + packageFilter: (pkg: any, _pkgFile: string) => { packageJson = pkg; } }); diff --git a/packages/@ngtools/json-schema/src/schema-tree.ts b/packages/@ngtools/json-schema/src/schema-tree.ts index 02b425e2824a..a2b169a736f4 100644 --- a/packages/@ngtools/json-schema/src/schema-tree.ts +++ b/packages/@ngtools/json-schema/src/schema-tree.ts @@ -89,7 +89,7 @@ export abstract class SchemaTreeNode implements SchemaNode { return this._parent.isChildRequired(this.name); } - isChildRequired(name: string) { return false; } + isChildRequired(_name: string) { return false; } get parent(): SchemaTreeNode { return this._parent; } get children(): { [key: string]: SchemaTreeNode } | null { return null; } @@ -97,13 +97,13 @@ export abstract class SchemaTreeNode implements SchemaNode { get itemPrototype(): SchemaTreeNode | null { return null; } abstract get(): T; - set(v: T, init = false, force = false) { + set(_v: T, _init = false, _force = false) { if (!this.readOnly) { throw new MissingImplementationError(); } throw new SettingReadOnlyPropertyError(); }; - isCompatible(v: any) { return false; } + isCompatible(_v: any) { return false; } abstract serialize(serializer: Serializer): void; @@ -223,7 +223,7 @@ export class OneOfSchemaTreeNode extends NonLeafSchemaTreeNode { this._currentTypeHolder.set(v, false, true); } - set(v: any, init = false, force = false) { + set(v: any, _init = false, force = false) { return this._set(v, false, force); } @@ -334,7 +334,7 @@ export class ArraySchemaTreeNode extends NonLeafSchemaTreeNode> { '', undefined, null, metaData.schema['items'], false); } - _set(value: any, init: boolean, force: boolean) { + _set(value: any, init: boolean, _force: boolean) { const schema = this._schema; const forward = this._forward; diff --git a/packages/@ngtools/json-schema/src/serializers/dts.ts b/packages/@ngtools/json-schema/src/serializers/dts.ts index 15d9ae91646f..454a69f3e437 100644 --- a/packages/@ngtools/json-schema/src/serializers/dts.ts +++ b/packages/@ngtools/json-schema/src/serializers/dts.ts @@ -141,24 +141,24 @@ export class DTsSerializer implements Serializer { this._writer(')'); } - outputValue(node: SchemaNode) { + outputValue(_node: SchemaNode) { this._willOutputValue(); this._writer('any'); } - outputString(node: SchemaNode) { + outputString(_node: SchemaNode) { this._willOutputValue(); this._writer('string'); } - outputNumber(node: SchemaNode) { + outputNumber(_node: SchemaNode) { this._willOutputValue(); this._writer('number'); } - outputInteger(node: SchemaNode) { + outputInteger(_node: SchemaNode) { this._willOutputValue(); this._writer('number'); } - outputBoolean(node: SchemaNode) { + outputBoolean(_node: SchemaNode) { this._willOutputValue(); this._writer('boolean'); } diff --git a/packages/@ngtools/json-schema/tsconfig.json b/packages/@ngtools/json-schema/tsconfig.json index c6d2d354b11c..7bd9a9b450de 100644 --- a/packages/@ngtools/json-schema/tsconfig.json +++ b/packages/@ngtools/json-schema/tsconfig.json @@ -7,6 +7,8 @@ "moduleResolution": "node", "noEmitOnError": true, "noImplicitAny": true, + "noUnusedParameters": true, + "noUnusedLocals": true, "outDir": "../../../dist/@ngtools/json-schema", "rootDir": ".", "lib": [ diff --git a/packages/@ngtools/logger/src/logger.ts b/packages/@ngtools/logger/src/logger.ts index a52418dac3de..ad3381a96075 100644 --- a/packages/@ngtools/logger/src/logger.ts +++ b/packages/@ngtools/logger/src/logger.ts @@ -105,9 +105,9 @@ export class Logger extends Observable { subscribe(observer: PartialObserver): Subscription; subscribe(next?: (value: LogEntry) => void, error?: (error: any) => void, complete?: () => void): Subscription; - subscribe(observerOrNext?: PartialObserver | ((value: LogEntry) => void), - error?: (error: any) => void, - complete?: () => void): Subscription { + subscribe(_observerOrNext?: PartialObserver | ((value: LogEntry) => void), + _error?: (error: any) => void, + _complete?: () => void): Subscription { return this._observable.subscribe.apply(this._observable, arguments); } forEach(next: (value: LogEntry) => void, PromiseCtor?: typeof Promise): Promise { diff --git a/packages/@ngtools/logger/tsconfig.json b/packages/@ngtools/logger/tsconfig.json index fbc98879e548..0498a905a9f3 100644 --- a/packages/@ngtools/logger/tsconfig.json +++ b/packages/@ngtools/logger/tsconfig.json @@ -7,6 +7,8 @@ "moduleResolution": "node", "noEmitOnError": true, "noImplicitAny": true, + "noUnusedParameters": true, + "noUnusedLocals": true, "outDir": "../../../dist/@ngtools/logger", "rootDir": ".", "lib": [ diff --git a/packages/@ngtools/webpack/src/compiler_host.ts b/packages/@ngtools/webpack/src/compiler_host.ts index 546ce6f9909e..876744b8070e 100644 --- a/packages/@ngtools/webpack/src/compiler_host.ts +++ b/packages/@ngtools/webpack/src/compiler_host.ts @@ -241,7 +241,7 @@ export class WebpackCompilerHost implements ts.CompilerHost { return delegated.concat(subdirs); } - getSourceFile(fileName: string, languageVersion: ts.ScriptTarget, onError?: OnErrorFn) { + getSourceFile(fileName: string, languageVersion: ts.ScriptTarget, _onError?: OnErrorFn) { fileName = this._resolve(fileName); if (this._files[fileName] == null) { @@ -265,8 +265,8 @@ export class WebpackCompilerHost implements ts.CompilerHost { // This is due to typescript CompilerHost interface being weird on writeFile. This shuts down // typings in WebStorm. get writeFile() { - return (fileName: string, data: string, writeByteOrderMark: boolean, - onError?: (message: string) => void, sourceFiles?: ts.SourceFile[]): void => { + return (fileName: string, data: string, _writeByteOrderMark: boolean, + _onError?: (message: string) => void, _sourceFiles?: ts.SourceFile[]): void => { fileName = this._resolve(fileName); this._setFileContent(fileName, data); }; diff --git a/packages/@ngtools/webpack/src/lazy_routes.ts b/packages/@ngtools/webpack/src/lazy_routes.ts index 8fee4bfce2f5..c32d396dfc22 100644 --- a/packages/@ngtools/webpack/src/lazy_routes.ts +++ b/packages/@ngtools/webpack/src/lazy_routes.ts @@ -4,7 +4,7 @@ import * as ts from 'typescript'; import {TypeScriptFileRefactor} from './refactor'; -function _getContentOfKeyLiteral(source: ts.SourceFile, node: ts.Node): string { +function _getContentOfKeyLiteral(_source: ts.SourceFile, node: ts.Node): string { if (node.kind == ts.SyntaxKind.Identifier) { return (node as ts.Identifier).text; } else if (node.kind == ts.SyntaxKind.StringLiteral) { diff --git a/packages/@ngtools/webpack/src/loader.ts b/packages/@ngtools/webpack/src/loader.ts index dce1b0f5342f..8d1751c832fe 100644 --- a/packages/@ngtools/webpack/src/loader.ts +++ b/packages/@ngtools/webpack/src/loader.ts @@ -8,7 +8,7 @@ const loaderUtils = require('loader-utils'); const NormalModule = require('webpack/lib/NormalModule'); -function _getContentOfKeyLiteral(source: ts.SourceFile, node: ts.Node): string { +function _getContentOfKeyLiteral(_source: ts.SourceFile, node: ts.Node): string { if (!node) { return null; } else if (node.kind == ts.SyntaxKind.Identifier) { @@ -21,7 +21,7 @@ function _getContentOfKeyLiteral(source: ts.SourceFile, node: ts.Node): string { } -function _angularImportsFromNode(node: ts.ImportDeclaration, sourceFile: ts.SourceFile): string[] { +function _angularImportsFromNode(node: ts.ImportDeclaration, _sourceFile: ts.SourceFile): string[] { const ms = node.moduleSpecifier; let modulePath: string | null = null; switch (ms.kind) { @@ -250,7 +250,7 @@ function _removeModuleId(refactor: TypeScriptFileRefactor) { }); }) .forEach((node: ts.ObjectLiteralExpression) => { - const moduleIdProp = node.properties.filter((prop: ts.ObjectLiteralElement, idx: number) => { + const moduleIdProp = node.properties.filter((prop: ts.ObjectLiteralElement, _idx: number) => { return prop.kind == ts.SyntaxKind.PropertyAssignment && _getContentOfKeyLiteral(sourceFile, prop.name) == 'moduleId'; })[0]; @@ -311,22 +311,6 @@ function _replaceResources(refactor: TypeScriptFileRefactor): void { } -function _checkDiagnostics(refactor: TypeScriptFileRefactor) { - const diagnostics: ts.Diagnostic[] = refactor.getDiagnostics(); - - if (diagnostics.length > 0) { - const message = diagnostics - .map(diagnostic => { - const {line, character} = diagnostic.file.getLineAndCharacterOfPosition(diagnostic.start); - const message = ts.flattenDiagnosticMessageText(diagnostic.messageText, '\n'); - return `${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message})`; - }) - .join('\n'); - throw new Error(message); - } -} - - /** * Recursively calls diagnose on the plugins for all the reverse dependencies. * @private diff --git a/packages/@ngtools/webpack/src/plugin.ts b/packages/@ngtools/webpack/src/plugin.ts index c6e824fcb08b..e95a35116911 100644 --- a/packages/@ngtools/webpack/src/plugin.ts +++ b/packages/@ngtools/webpack/src/plugin.ts @@ -278,7 +278,8 @@ export class AotPlugin implements Tapable { result.resource = this.skipCodeGeneration ? this.basePath : this.genDir; result.recursive = true; result.dependencies.forEach((d: any) => d.critical = false); - result.resolveDependencies = (p1: any, p2: any, p3: any, p4: RegExp, cb: any ) => { + result.resolveDependencies = (_fs: any, _resource: any, _recursive: any, + _regExp: RegExp, cb: any) => { const dependencies = Object.keys(this._lazyRoutes) .map((key) => { const value = this._lazyRoutes[key]; diff --git a/packages/@ngtools/webpack/src/refactor.ts b/packages/@ngtools/webpack/src/refactor.ts index 1276d9393762..7b11da71d3a1 100644 --- a/packages/@ngtools/webpack/src/refactor.ts +++ b/packages/@ngtools/webpack/src/refactor.ts @@ -12,7 +12,7 @@ export interface TranspileOutput { } -function resolve(filePath: string, host: ts.CompilerHost, program: ts.Program) { +function resolve(filePath: string, _host: ts.CompilerHost, program: ts.Program) { if (path.isAbsolute(filePath)) { return filePath; } @@ -37,7 +37,7 @@ export class TypeScriptFileRefactor { get sourceText() { return this._sourceString.toString(); } constructor(fileName: string, - private _host: ts.CompilerHost, + _host: ts.CompilerHost, private _program?: ts.Program) { fileName = resolve(fileName, _host, _program).replace(/\\/g, '/'); this._fileName = fileName; diff --git a/packages/@ngtools/webpack/src/resource_loader.ts b/packages/@ngtools/webpack/src/resource_loader.ts index a1db3347476e..d528871320db 100644 --- a/packages/@ngtools/webpack/src/resource_loader.ts +++ b/packages/@ngtools/webpack/src/resource_loader.ts @@ -18,7 +18,7 @@ export class WebpackResourceLoader implements ResourceLoader { this._context = _parentCompilation.context; } - private _compile(filePath: string, content: string): Promise { + private _compile(filePath: string, _content: string): Promise { const compilerName = `compiler(${this._uniqueId++})`; const outputOptions = { filename: filePath }; const relativePath = path.relative(this._context || '', filePath); diff --git a/packages/@ngtools/webpack/tsconfig.json b/packages/@ngtools/webpack/tsconfig.json index 77eea1896f53..eba1a266c139 100644 --- a/packages/@ngtools/webpack/tsconfig.json +++ b/packages/@ngtools/webpack/tsconfig.json @@ -7,6 +7,8 @@ "moduleResolution": "node", "noEmitOnError": true, "noImplicitAny": true, + "noUnusedParameters": true, + "noUnusedLocals": true, "outDir": "../../../dist/@ngtools/webpack", "rootDir": ".", "lib": [