mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-18 11:44:05 +08:00
refactor(@angular-devkit/schematics): deprecate TslintFixTask and it's options option
As part of tslint deprecation we are also deprecated the TslintFixTask. Users should use `ng lint --fix` directly instead
This commit is contained in:
parent
57b63b3a93
commit
fed47b00cb
@ -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()),
|
||||
|
@ -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();
|
||||
|
@ -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;
|
||||
@ -23,4 +25,5 @@ export interface TslintFixTaskOptionsBase {
|
||||
tslintConfig?: JsonObject;
|
||||
}
|
||||
|
||||
/** @deprecated since version 11. Use `ng lint --fix` directly instead. */
|
||||
export type TslintFixTaskOptions = TslintFixTaskOptionsBase;
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user