tabs-template-rule.js 1.1 KB

123456789101112131415161718192021222324252627
  1. "use strict";
  2. /**
  3. * Use of this source code is governed by an MIT-style license that can be
  4. * found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
  5. */
  6. Object.defineProperty(exports, "__esModule", { value: true });
  7. exports.TabsTemplateRule = void 0;
  8. const schematics_1 = require("@angular/cdk/schematics");
  9. const elements_1 = require("../../../utils/ng-update/elements");
  10. class TabsTemplateRule extends schematics_1.Migration {
  11. constructor() {
  12. super(...arguments);
  13. this.enabled = false;
  14. }
  15. visitTemplate(template) {
  16. (0, elements_1.findElementWithoutStructuralDirective)(template.content, 'a', 'nzTabLink', 'nz-tab-link')
  17. .forEach(offset => {
  18. this.failures.push({
  19. filePath: template.filePath,
  20. position: template.getCharacterAndLineOfPosition(offset),
  21. message: `Found deprecated selector 'a[nz-tab-link]', please use 'ng-template[nzTabLink] > a[nz-tab-link]' instead.`
  22. });
  23. });
  24. }
  25. }
  26. exports.TabsTemplateRule = TabsTemplateRule;
  27. //# sourceMappingURL=tabs-template-rule.js.map