refactor(core): move renderer2 migration lint rule into google3 folder (#31817)
Moves the `renderer_to_renderer2` migration google3 tslint rule
into the new `google3` directory. This is done for consistency
as we recently moved all google3 migration rules into a new
`google3` folder (see: f69e4e6f77
).
PR Close #31817
This commit is contained in:
parent
684579b338
commit
9896d438c0
|
@ -9,6 +9,7 @@ ts_library(
|
|||
"//packages/core/schematics/migrations/injectable-pipe",
|
||||
"//packages/core/schematics/migrations/missing-injectable",
|
||||
"//packages/core/schematics/migrations/missing-injectable/google3",
|
||||
"//packages/core/schematics/migrations/renderer-to-renderer2",
|
||||
"//packages/core/schematics/migrations/static-queries",
|
||||
"//packages/core/schematics/migrations/template-var-assignment",
|
||||
"//packages/core/schematics/utils",
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
import {Replacement, RuleFailure, Rules} from 'tslint';
|
||||
import * as ts from 'typescript';
|
||||
|
||||
import {HelperFunction, getHelper} from '../helpers';
|
||||
import {migrateExpression, replaceImport} from '../migration';
|
||||
import {findCoreImport, findRendererReferences} from '../util';
|
||||
import {HelperFunction, getHelper} from '../renderer-to-renderer2/helpers';
|
||||
import {migrateExpression, replaceImport} from '../renderer-to-renderer2/migration';
|
||||
import {findCoreImport, findRendererReferences} from '../renderer-to-renderer2/util';
|
||||
|
||||
/**
|
||||
* TSLint rule that migrates from `Renderer` to `Renderer2`. More information on how it works:
|
|
@ -6,7 +6,7 @@ ts_library(
|
|||
tsconfig = "//packages/core/schematics:tsconfig.json",
|
||||
visibility = [
|
||||
"//packages/core/schematics:__pkg__",
|
||||
"//packages/core/schematics/migrations/renderer-to-renderer2/google3:__pkg__",
|
||||
"//packages/core/schematics/migrations/google3:__pkg__",
|
||||
"//packages/core/schematics/test:__pkg__",
|
||||
],
|
||||
deps = [
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
load("//tools:defaults.bzl", "ts_library")
|
||||
|
||||
ts_library(
|
||||
name = "google3",
|
||||
srcs = glob(["**/*.ts"]),
|
||||
tsconfig = "//packages/core/schematics:tsconfig.json",
|
||||
visibility = ["//packages/core/schematics/test/google3:__pkg__"],
|
||||
deps = [
|
||||
"//packages/core/schematics/migrations/renderer-to-renderer2",
|
||||
"@npm//tslint",
|
||||
"@npm//typescript",
|
||||
],
|
||||
)
|
|
@ -6,7 +6,6 @@ ts_library(
|
|||
srcs = glob(["**/*.ts"]),
|
||||
deps = [
|
||||
"//packages/core/schematics/migrations/google3",
|
||||
"//packages/core/schematics/migrations/renderer-to-renderer2/google3",
|
||||
"@npm//@types/shelljs",
|
||||
"@npm//tslint",
|
||||
],
|
||||
|
|
|
@ -12,8 +12,8 @@ import * as shx from 'shelljs';
|
|||
import {Configuration, Linter} from 'tslint';
|
||||
|
||||
describe('Google3 Renderer to Renderer2 TSLint rule', () => {
|
||||
const rulesDirectory = dirname(
|
||||
require.resolve('../../migrations/renderer-to-renderer2/google3/rendererToRenderer2Rule'));
|
||||
const rulesDirectory =
|
||||
dirname(require.resolve('../../migrations/google3/rendererToRenderer2Rule'));
|
||||
|
||||
let tmpDir: string;
|
||||
|
||||
|
|
Loading…
Reference in New Issue