Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/angular_devkit/build_angular/src/tslint/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ async function _run(
options: TslintBuilderOptions,
context: BuilderContext,
): Promise<BuilderOutput> {
context.logger.warn(
`TSLint's support is discontinued and we're deprecating its support in Angular CLI.\n` +
'To opt-in using the community driven ESLint builder, see: https://github.com/angular-eslint/angular-eslint#migrating-from-codelyzer-and-tslint.',
);

const systemRoot = context.workspaceRoot;
process.chdir(context.currentDirectory);
const projectName = (context.target && context.target.project) || '<???>';
Expand Down Expand Up @@ -134,6 +139,7 @@ async function _run(
}


/** @deprecated since version 11 as part of the TSLint deprecation. */
export default createBuilder<TslintBuilderOptions>(_run);


Expand Down
1 change: 1 addition & 0 deletions packages/angular_devkit/schematics/tasks/node/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export class BuiltinTaskExecutor {
name: RunSchematicName,
create: () => import('../run-schematic/executor').then(mod => mod.default()) as Promise<TaskExecutor<{}>>,
};
/** @deprecated since version 11. Use `ng lint --fix` directly instead. */
static readonly TslintFix: TaskExecutorFactory<{}> = {
name: TslintFixName,
create: () => import('../tslint-fix/executor').then(mod => mod.default()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ function _listAllFiles(root: string): string[] {
return result;
}


/** @deprecated since version 11. Use `ng lint --fix` directly instead. */
export default function (): TaskExecutor<TslintFixTaskOptions> {
return async (options: TslintFixTaskOptions = {}, context: SchematicContext) => {
const root = process.cwd();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
*/
import { JsonObject } from '@angular-devkit/core';

/** @deprecated since version 11. Use `ng lint --fix` directly instead. */
export const TslintFixName = 'tslint-fix';

/** @deprecated since version 11. Use `ng lint --fix` directly instead. */
export interface TslintFixTaskOptionsBase {
silent?: boolean;
format?: string;
Expand All @@ -23,4 +25,5 @@ export interface TslintFixTaskOptionsBase {
tslintConfig?: JsonObject;
}

/** @deprecated since version 11. Use `ng lint --fix` directly instead. */
export type TslintFixTaskOptions = TslintFixTaskOptionsBase;
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { TaskConfiguration, TaskConfigurationGenerator } from '../../src';
import { TslintFixName, TslintFixTaskOptions, TslintFixTaskOptionsBase } from './options';


/** @deprecated since version 11. Use `ng lint --fix` directly instead. */
export class TslintFixTask implements TaskConfigurationGenerator<TslintFixTaskOptions> {
protected _configOrPath: null | string | JsonObject;
protected _options: TslintFixTaskOptionsBase;
Expand Down
3 changes: 2 additions & 1 deletion packages/schematics/angular/application/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@
"type": "boolean",
"default": false,
"description": "When true, applies lint fixes after generating the application.",
"x-user-analytics": 15
"x-user-analytics": 15,
"x-deprecated": "Use \"ng lint --fix\" directly instead."
},
"strict": {
"description": "Creates an application with stricter bundle budgets settings.",
Expand Down
3 changes: 2 additions & 1 deletion packages/schematics/angular/class/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
"type": "boolean",
"default": false,
"description": "When true, applies lint fixes after generating the class.",
"x-user-analytics": 15
"x-user-analytics": 15,
"x-deprecated": "Use \"ng lint --fix\" directly instead."
}
},
"required": [
Expand Down
3 changes: 2 additions & 1 deletion packages/schematics/angular/component/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@
"type": "boolean",
"default": false,
"description": "When true, applies lint fixes after generating the component.",
"x-user-analytics": 15
"x-user-analytics": 15,
"x-deprecated": "Use \"ng lint --fix\" directly instead."
}
},
"required": [
Expand Down
3 changes: 2 additions & 1 deletion packages/schematics/angular/directive/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@
"type": "boolean",
"default": false,
"description": "When true, applies lint fixes after generating the directive.",
"x-user-analytics": 15
"x-user-analytics": 15,
"x-deprecated": "Use \"ng lint --fix\" directly instead."
}
},
"required": [
Expand Down
3 changes: 2 additions & 1 deletion packages/schematics/angular/enum/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
"type": "boolean",
"default": false,
"description": "When true, applies lint fixes after generating the enum.",
"x-user-analytics": 15
"x-user-analytics": 15,
"x-deprecated": "Use \"ng lint --fix\" directly instead."
}
},
"required": [
Expand Down
3 changes: 2 additions & 1 deletion packages/schematics/angular/guard/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
"type": "boolean",
"default": false,
"description": "When true, applies lint fixes after generating the guard.",
"x-user-analytics": 15
"x-user-analytics": 15,
"x-deprecated": "Use \"ng lint --fix\" directly instead."
},
"implements": {
"type": "array",
Expand Down
3 changes: 2 additions & 1 deletion packages/schematics/angular/interceptor/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
"type": "boolean",
"default": false,
"description": "When true, applies lint fixes after generating the interceptor.",
"x-user-analytics": 15
"x-user-analytics": 15,
"x-deprecated": "Use \"ng lint --fix\" directly instead."
}
},
"required": ["name"]
Expand Down
3 changes: 2 additions & 1 deletion packages/schematics/angular/interface/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
"type": "boolean",
"default": false,
"description": "When true, applies lint fixes after generating the interface.",
"x-user-analytics": 15
"x-user-analytics": 15,
"x-deprecated": "Use \"ng lint --fix\" directly instead."
}
},
"required": [
Expand Down
3 changes: 2 additions & 1 deletion packages/schematics/angular/library/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
"type": "boolean",
"default": false,
"description": "When true, applies lint fixes after generating the library.",
"x-user-analytics": 15
"x-user-analytics": 15,
"x-deprecated": "Use \"ng lint --fix\" directly instead."
}
},
"required": []
Expand Down
3 changes: 2 additions & 1 deletion packages/schematics/angular/module/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@
"type": "boolean",
"default": false,
"description": "When true, applies lint fixes after generating the module.",
"x-user-analytics": 15
"x-user-analytics": 15,
"x-deprecated": "Use \"ng lint --fix\" directly instead."
}
},
"required": [
Expand Down
3 changes: 2 additions & 1 deletion packages/schematics/angular/pipe/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@
"type": "boolean",
"default": false,
"description": "When true, applies lint fixes after generating the pipe.",
"x-user-analytics": 15
"x-user-analytics": 15,
"x-deprecated": "Use \"ng lint --fix\" directly instead."
}
},
"required": [
Expand Down
3 changes: 2 additions & 1 deletion packages/schematics/angular/service/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
"type": "boolean",
"default": false,
"description": "When true, applies lint fixes after generating the service.",
"x-user-analytics": 15
"x-user-analytics": 15,
"x-deprecated": "Use \"ng lint --fix\" directly instead."
}
},
"required": ["name"]
Expand Down