Last change
on this file since eed0bf8 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
1.2 KB
|
Line | |
---|
1 | "use strict";
|
---|
2 | /**
|
---|
3 | * @license
|
---|
4 | * Copyright Google LLC All Rights Reserved.
|
---|
5 | *
|
---|
6 | * Use of this source code is governed by an MIT-style license that can be
|
---|
7 | * found in the LICENSE file at https://angular.io/license
|
---|
8 | */
|
---|
9 | Object.defineProperty(exports, "__esModule", { value: true });
|
---|
10 | exports.TslintFixTask = void 0;
|
---|
11 | const options_1 = require("./options");
|
---|
12 | /** @deprecated since version 11. Use `ng lint --fix` directly instead. */
|
---|
13 | class TslintFixTask {
|
---|
14 | constructor(configOrPath, options) {
|
---|
15 | if (options) {
|
---|
16 | this._configOrPath = configOrPath;
|
---|
17 | this._options = options;
|
---|
18 | }
|
---|
19 | else {
|
---|
20 | this._options = configOrPath;
|
---|
21 | this._configOrPath = null;
|
---|
22 | }
|
---|
23 | }
|
---|
24 | toConfiguration() {
|
---|
25 | const path = typeof this._configOrPath == 'string' ? { tslintPath: this._configOrPath } : {};
|
---|
26 | const config = typeof this._configOrPath == 'object' && this._configOrPath !== null
|
---|
27 | ? { tslintConfig: this._configOrPath }
|
---|
28 | : {};
|
---|
29 | const options = {
|
---|
30 | ...this._options,
|
---|
31 | ...path,
|
---|
32 | ...config,
|
---|
33 | };
|
---|
34 | return { name: options_1.TslintFixName, options };
|
---|
35 | }
|
---|
36 | }
|
---|
37 | exports.TslintFixTask = TslintFixTask;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.