@swisspost/design-system-eslint 1.1.0-next.2 → 10.0.0-next.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/dist/configs/stencil/recommended.d.ts.map +1 -1
  2. package/dist/configs/stencil/recommended.js +1 -0
  3. package/dist/configs/stencil/recommended.js.map +1 -1
  4. package/dist/rules/html/migrations/index.d.ts +1 -13
  5. package/dist/rules/html/migrations/index.d.ts.map +1 -1
  6. package/dist/rules/html/migrations/no-deprecated-btn-rg.d.ts +2 -3
  7. package/dist/rules/html/migrations/no-deprecated-btn-rg.d.ts.map +1 -1
  8. package/dist/rules/html/migrations/no-deprecated-btn-rg.js +7 -11
  9. package/dist/rules/html/migrations/no-deprecated-btn-rg.js.map +1 -1
  10. package/dist/rules/html/migrations/no-deprecated-chip-filter.d.ts +2 -3
  11. package/dist/rules/html/migrations/no-deprecated-chip-filter.d.ts.map +1 -1
  12. package/dist/rules/html/migrations/no-deprecated-chip-filter.js +7 -12
  13. package/dist/rules/html/migrations/no-deprecated-chip-filter.js.map +1 -1
  14. package/dist/rules/html/migrations/no-deprecated-elevation-utilities.d.ts +2 -4
  15. package/dist/rules/html/migrations/no-deprecated-elevation-utilities.d.ts.map +1 -1
  16. package/dist/rules/html/migrations/no-deprecated-elevation-utilities.js +13 -17
  17. package/dist/rules/html/migrations/no-deprecated-elevation-utilities.js.map +1 -1
  18. package/dist/rules/html/migrations/no-deprecated-font-curves.d.ts +2 -4
  19. package/dist/rules/html/migrations/no-deprecated-font-curves.d.ts.map +1 -1
  20. package/dist/rules/html/migrations/no-deprecated-font-curves.js +15 -19
  21. package/dist/rules/html/migrations/no-deprecated-font-curves.js.map +1 -1
  22. package/dist/rules/html/migrations/no-deprecated-font-weight.d.ts +2 -3
  23. package/dist/rules/html/migrations/no-deprecated-font-weight.d.ts.map +1 -1
  24. package/dist/rules/html/migrations/no-deprecated-font-weight.js +13 -49
  25. package/dist/rules/html/migrations/no-deprecated-font-weight.js.map +1 -1
  26. package/dist/rules/html/migrations/no-deprecated-h-clearfix.d.ts +2 -4
  27. package/dist/rules/html/migrations/no-deprecated-h-clearfix.d.ts.map +1 -1
  28. package/dist/rules/html/migrations/no-deprecated-h-clearfix.js +7 -13
  29. package/dist/rules/html/migrations/no-deprecated-h-clearfix.js.map +1 -1
  30. package/dist/rules/html/migrations/no-deprecated-h-visuallyhidden.d.ts +2 -4
  31. package/dist/rules/html/migrations/no-deprecated-h-visuallyhidden.d.ts.map +1 -1
  32. package/dist/rules/html/migrations/no-deprecated-h-visuallyhidden.js +7 -13
  33. package/dist/rules/html/migrations/no-deprecated-h-visuallyhidden.js.map +1 -1
  34. package/dist/rules/html/migrations/no-deprecated-loader.d.ts +2 -4
  35. package/dist/rules/html/migrations/no-deprecated-loader.d.ts.map +1 -1
  36. package/dist/rules/html/migrations/no-deprecated-loader.js +19 -23
  37. package/dist/rules/html/migrations/no-deprecated-loader.js.map +1 -1
  38. package/dist/rules/html/migrations/no-deprecated-position-helpers.d.ts +2 -4
  39. package/dist/rules/html/migrations/no-deprecated-position-helpers.d.ts.map +1 -1
  40. package/dist/rules/html/migrations/no-deprecated-position-helpers.js +12 -16
  41. package/dist/rules/html/migrations/no-deprecated-position-helpers.js.map +1 -1
  42. package/dist/rules/html/migrations/no-deprecated-shadow-utilities.d.ts +2 -4
  43. package/dist/rules/html/migrations/no-deprecated-shadow-utilities.d.ts.map +1 -1
  44. package/dist/rules/html/migrations/no-deprecated-shadow-utilities.js +12 -16
  45. package/dist/rules/html/migrations/no-deprecated-shadow-utilities.js.map +1 -1
  46. package/dist/rules/html/migrations/no-form-text.d.ts +2 -3
  47. package/dist/rules/html/migrations/no-form-text.d.ts.map +1 -1
  48. package/dist/rules/html/migrations/no-form-text.js +10 -37
  49. package/dist/rules/html/migrations/no-form-text.js.map +1 -1
  50. package/dist/rules/html/migrations/no-unnumbered-border-radius.d.ts +2 -4
  51. package/dist/rules/html/migrations/no-unnumbered-border-radius.d.ts.map +1 -1
  52. package/dist/rules/html/migrations/no-unnumbered-border-radius.js +13 -17
  53. package/dist/rules/html/migrations/no-unnumbered-border-radius.js.map +1 -1
  54. package/dist/rules/index.d.ts +1 -0
  55. package/dist/rules/index.d.ts.map +1 -1
  56. package/dist/rules/index.js +2 -0
  57. package/dist/rules/index.js.map +1 -1
  58. package/dist/rules/stencil-no-unreflected-required-props.d.ts +5 -0
  59. package/dist/rules/stencil-no-unreflected-required-props.d.ts.map +1 -0
  60. package/dist/rules/stencil-no-unreflected-required-props.js +53 -0
  61. package/dist/rules/stencil-no-unreflected-required-props.js.map +1 -0
  62. package/dist/utils/create-class-update-rule.d.ts +13 -0
  63. package/dist/utils/create-class-update-rule.d.ts.map +1 -1
  64. package/dist/utils/create-class-update-rule.js +14 -1
  65. package/dist/utils/create-class-update-rule.js.map +1 -1
  66. package/dist/utils/stencil-helpers.d.ts +22 -0
  67. package/dist/utils/stencil-helpers.d.ts.map +1 -0
  68. package/dist/utils/stencil-helpers.js +37 -0
  69. package/dist/utils/stencil-helpers.js.map +1 -0
  70. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"recommended.d.ts","sourceRoot":"","sources":["../../../src/configs/stencil/recommended.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAGzD,QAAA,MAAM,wBAAwB,GAC5B,eAAe,QAAQ,CAAC,UAAU,CAAC,MAAM,EACzC,QAAQ,QAAQ,CAAC,UAAU,CAAC,MAAM,KACjC,QAAQ,CAAC,UAAU,CAAC,MAmBrB,CAAC;AAEH,eAAe,wBAAwB,CAAC"}
1
+ {"version":3,"file":"recommended.d.ts","sourceRoot":"","sources":["../../../src/configs/stencil/recommended.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAGzD,QAAA,MAAM,wBAAwB,GAC5B,eAAe,QAAQ,CAAC,UAAU,CAAC,MAAM,EACzC,QAAQ,QAAQ,CAAC,UAAU,CAAC,MAAM,KACjC,QAAQ,CAAC,UAAU,CAAC,MAoBrB,CAAC;AAEH,eAAe,wBAAwB,CAAC"}
@@ -19,6 +19,7 @@ const stencilRecommendedConfig = (stencilPlugin, parser) => ({
19
19
  },
20
20
  rules: {
21
21
  '@swisspost/design-system-eslint/stencil-strict-props-initialization': 'error',
22
+ '@swisspost/design-system-eslint/stencil-no-unreflected-required-props': 'error',
22
23
  },
23
24
  });
24
25
  exports.default = stencilRecommendedConfig;
@@ -1 +1 @@
1
- {"version":3,"file":"recommended.js","sourceRoot":"","sources":["../../../src/configs/stencil/recommended.ts"],"names":[],"mappings":";;AAEA,+CAA+C;AAC/C,MAAM,wBAAwB,GAAG,CAC/B,aAAyC,EACzC,MAAkC,EACN,EAAE,CAAC,CAAC;IAChC,IAAI,EAAE,qDAAqD;IAC3D,KAAK,EAAE,CAAC,eAAe,CAAC,EAAE,oCAAoC;IAC9D,eAAe,EAAE;QACf,MAAM,EAAE,0BAA0B;QAClC,aAAa,EAAE;YACb,WAAW,EAAE,IAAI;YACjB,UAAU,EAAE,QAAQ;YACpB,YAAY,EAAE;gBACZ,GAAG,EAAE,IAAI;aACV;SACF;KACF;IACD,OAAO,EAAE;QACP,iCAAiC,EAAE,aAAa;KACjD;IACD,KAAK,EAAE;QACL,qEAAqE,EAAE,OAAO;KAC/E;CACF,CAAC,CAAC;AAEH,kBAAe,wBAAwB,CAAC"}
1
+ {"version":3,"file":"recommended.js","sourceRoot":"","sources":["../../../src/configs/stencil/recommended.ts"],"names":[],"mappings":";;AAEA,+CAA+C;AAC/C,MAAM,wBAAwB,GAAG,CAC/B,aAAyC,EACzC,MAAkC,EACN,EAAE,CAAC,CAAC;IAChC,IAAI,EAAE,qDAAqD;IAC3D,KAAK,EAAE,CAAC,eAAe,CAAC,EAAE,oCAAoC;IAC9D,eAAe,EAAE;QACf,MAAM,EAAE,0BAA0B;QAClC,aAAa,EAAE;YACb,WAAW,EAAE,IAAI;YACjB,UAAU,EAAE,QAAQ;YACpB,YAAY,EAAE;gBACZ,GAAG,EAAE,IAAI;aACV;SACF;KACF;IACD,OAAO,EAAE;QACP,iCAAiC,EAAE,aAAa;KACjD;IACD,KAAK,EAAE;QACL,qEAAqE,EAAE,OAAO;QAC9E,uEAAuE,EAAE,OAAO;KACjF;CACF,CAAC,CAAC;AAEH,kBAAe,wBAAwB,CAAC"}
@@ -1,20 +1,8 @@
1
1
  export declare const htmlMigrationRules: {
2
- [x: string]: import("@typescript-eslint/utils/ts-eslint").RuleModule<"stopUsingFormText", [], import("../../../utils/create-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener> | import("@typescript-eslint/utils/ts-eslint").RuleModule<"deprecatedRegular" | "deprecatedBold", [], import("../../../utils/create-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener> | import("@typescript-eslint/utils/ts-eslint").RuleModule<"deprecatedAlert", [], import("../../../utils/create-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
2
+ [x: string]: import("@typescript-eslint/utils/ts-eslint").RuleModule<"deprecatedAlert", [], import("../../../utils/create-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
3
3
  "no-deprecated-breakpoints-phase-1": import("@typescript-eslint/utils/ts-eslint").RuleModule<string, [], import("../../../utils/create-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
4
4
  "no-deprecated-breakpoints-phase-2": import("@typescript-eslint/utils/ts-eslint").RuleModule<string, [], import("../../../utils/create-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
5
- "no-deprecated-btn-rg": import("@typescript-eslint/utils/ts-eslint").RuleModule<string, [], import("../../../utils/create-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
6
- "no-deprecated-loader": import("@typescript-eslint/utils/ts-eslint").RuleModule<string, [], import("../../../utils/create-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
7
- "no-unnumbered-border-radius": import("@typescript-eslint/utils/ts-eslint").RuleModule<string, [], import("../../../utils/create-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
8
- "no-form-text": import("@typescript-eslint/utils/ts-eslint").RuleModule<"stopUsingFormText", [], import("../../../utils/create-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
9
- "no-deprecated-font-weights": import("@typescript-eslint/utils/ts-eslint").RuleModule<"deprecatedRegular" | "deprecatedBold", [], import("../../../utils/create-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
10
- "no-deprecated-shadow-utilities": import("@typescript-eslint/utils/ts-eslint").RuleModule<string, [], import("../../../utils/create-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
11
- "no-deprecated-h-clearfix": import("@typescript-eslint/utils/ts-eslint").RuleModule<string, [], import("../../../utils/create-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
12
- "no-deprecated-h-visuallyhidden": import("@typescript-eslint/utils/ts-eslint").RuleModule<string, [], import("../../../utils/create-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
13
- "no-deprecated-font-curves": import("@typescript-eslint/utils/ts-eslint").RuleModule<string, [], import("../../../utils/create-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
14
- "no-deprecated-position-helpers": import("@typescript-eslint/utils/ts-eslint").RuleModule<string, [], import("../../../utils/create-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
15
- "no-deprecated-elevation-utilities": import("@typescript-eslint/utils/ts-eslint").RuleModule<string, [], import("../../../utils/create-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
16
5
  "no-deprecated-font-sizes": import("@typescript-eslint/utils/ts-eslint").RuleModule<string, [], import("../../../utils/create-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
17
- "no-deprecated-chip-filter": import("@typescript-eslint/utils/ts-eslint").RuleModule<string, [], import("../../../utils/create-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
18
6
  "no-deprecated-alert": import("@typescript-eslint/utils/ts-eslint").RuleModule<"deprecatedAlert", [], import("../../../utils/create-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
19
7
  };
20
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/rules/html/migrations/index.ts"],"names":[],"mappings":"AA8CA,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;CAyB9B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/rules/html/migrations/index.ts"],"names":[],"mappings":"AA8CA,eAAO,MAAM,kBAAkB;;;;;;CAyB9B,CAAC"}
@@ -1,4 +1,3 @@
1
- export declare const name = "no-deprecated-btn-rg";
2
- declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<string, [], import("../../../utils/create-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
3
- export default _default;
1
+ export declare const name: string, rule: import("@typescript-eslint/utils/ts-eslint").RuleModule<string, [], import("../../../utils/create-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
2
+ export default rule;
4
3
  //# sourceMappingURL=no-deprecated-btn-rg.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"no-deprecated-btn-rg.d.ts","sourceRoot":"","sources":["../../../../src/rules/html/migrations/no-deprecated-btn-rg.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,yBAAyB,CAAC;;AAE3C,wBAUG"}
1
+ {"version":3,"file":"no-deprecated-btn-rg.d.ts","sourceRoot":"","sources":["../../../../src/rules/html/migrations/no-deprecated-btn-rg.ts"],"names":[],"mappings":"AAEA,eAAO,MAAQ,IAAI,UAAE,IAAI,+KAKvB,CAAC;AAEH,eAAe,IAAI,CAAC"}
@@ -1,17 +1,13 @@
1
1
  "use strict";
2
+ var _a;
2
3
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.name = void 0;
4
+ exports.rule = exports.name = void 0;
4
5
  const create_class_update_rule_1 = require("../../../utils/create-class-update-rule");
5
- exports.name = 'no-deprecated-btn-rg';
6
- exports.default = (0, create_class_update_rule_1.createClassUpdateRule)({
7
- name: exports.name,
6
+ _a = (0, create_class_update_rule_1.createClassUpdateRuleWrapper)({
7
+ name: 'no-deprecated-btn-rg',
8
8
  type: 'suggestion',
9
9
  description: 'Flags deprecated "btn-rg" class and suggests removal or replacement with "btn-sm".',
10
- messages: {
11
- deprecatedBtnRg: 'The "btn-rg" class is deprecated. Please remove it or replace it with "btn-sm".',
12
- },
13
- mutations: {
14
- deprecatedBtnRg: ['btn-rg', 'btn-sm']
15
- },
16
- });
10
+ classesMap: [{ old: 'btn-rg', new: 'btn-sm' }],
11
+ }), exports.name = _a.name, exports.rule = _a.rule;
12
+ exports.default = exports.rule;
17
13
  //# sourceMappingURL=no-deprecated-btn-rg.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"no-deprecated-btn-rg.js","sourceRoot":"","sources":["../../../../src/rules/html/migrations/no-deprecated-btn-rg.ts"],"names":[],"mappings":";;;AAAA,sFAAgF;AAEnE,QAAA,IAAI,GAAG,sBAAsB,CAAC;AAE3C,kBAAe,IAAA,gDAAqB,EAAC;IACnC,IAAI,EAAJ,YAAI;IACJ,IAAI,EAAC,YAAY;IACjB,WAAW,EAAE,oFAAoF;IACjG,QAAQ,EAAE;QACR,eAAe,EAAE,iFAAiF;KACnG;IACD,SAAS,EAAE;QACT,eAAe,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC;KACtC;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"no-deprecated-btn-rg.js","sourceRoot":"","sources":["../../../../src/rules/html/migrations/no-deprecated-btn-rg.ts"],"names":[],"mappings":";;;;AAAA,sFAAuF;AAE1E,KAAiB,IAAA,uDAA4B,EAAC;IACzD,IAAI,EAAE,sBAAsB;IAC5B,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,oFAAoF;IACjG,UAAU,EAAE,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC;CAC/C,CAAC,EALa,YAAI,YAAE,YAAI,WAKtB;AAEH,kBAAe,YAAI,CAAC"}
@@ -1,5 +1,4 @@
1
- export declare const name = "no-deprecated-chip-filter";
2
1
  export declare const messageId = "deprecatedChipFilter";
3
- declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<string, [], import("../../../utils/create-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
4
- export default _default;
2
+ export declare const name: string, rule: import("@typescript-eslint/utils/ts-eslint").RuleModule<string, [], import("../../../utils/create-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
3
+ export default rule;
5
4
  //# sourceMappingURL=no-deprecated-chip-filter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"no-deprecated-chip-filter.d.ts","sourceRoot":"","sources":["../../../../src/rules/html/migrations/no-deprecated-chip-filter.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,8BAA8B,CAAC;AAChD,eAAO,MAAM,SAAS,yBAAyB,CAAC;;AAGhD,wBAUG"}
1
+ {"version":3,"file":"no-deprecated-chip-filter.d.ts","sourceRoot":"","sources":["../../../../src/rules/html/migrations/no-deprecated-chip-filter.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS,yBAAyB,CAAC;AAEhD,eAAO,MAAQ,IAAI,UAAE,IAAI,+KAKvB,CAAC;AAEH,eAAe,IAAI,CAAC"}
@@ -1,19 +1,14 @@
1
1
  "use strict";
2
+ var _a;
2
3
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.messageId = exports.name = void 0;
4
+ exports.rule = exports.name = exports.messageId = void 0;
4
5
  const create_class_update_rule_1 = require("../../../utils/create-class-update-rule");
5
- exports.name = 'no-deprecated-chip-filter';
6
6
  exports.messageId = 'deprecatedChipFilter';
7
- // Type: RuleModule<"uppercase", ...>
8
- exports.default = (0, create_class_update_rule_1.createClassUpdateRule)({
9
- name: exports.name,
7
+ _a = (0, create_class_update_rule_1.createClassUpdateRuleWrapper)({
8
+ name: 'no-deprecated-chip-filter',
10
9
  type: 'problem',
11
10
  description: 'Flags deprecated "chip-filter" class and replaces it with "chip-selectable".',
12
- messages: {
13
- [exports.messageId]: 'The "chip-filter" class is deprecated. Please replace it with "chip-selectable".',
14
- },
15
- mutations: {
16
- [exports.messageId]: ['chip-filter', 'chip-selectable'],
17
- },
18
- });
11
+ classesMap: [{ old: 'chip-filter', new: 'chip-selectable' }],
12
+ }), exports.name = _a.name, exports.rule = _a.rule;
13
+ exports.default = exports.rule;
19
14
  //# sourceMappingURL=no-deprecated-chip-filter.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"no-deprecated-chip-filter.js","sourceRoot":"","sources":["../../../../src/rules/html/migrations/no-deprecated-chip-filter.ts"],"names":[],"mappings":";;;AAAA,sFAAgF;AAEnE,QAAA,IAAI,GAAG,2BAA2B,CAAC;AACnC,QAAA,SAAS,GAAG,sBAAsB,CAAC;AAEhD,qCAAqC;AACrC,kBAAe,IAAA,gDAAqB,EAAC;IACnC,IAAI,EAAJ,YAAI;IACJ,IAAI,EAAE,SAAS;IACf,WAAW,EAAE,8EAA8E;IAC3F,QAAQ,EAAE;QACR,CAAC,iBAAS,CAAC,EAAE,kFAAkF;KAChG;IACD,SAAS,EAAE;QACT,CAAC,iBAAS,CAAC,EAAE,CAAC,aAAa,EAAE,iBAAiB,CAAC;KAChD;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"no-deprecated-chip-filter.js","sourceRoot":"","sources":["../../../../src/rules/html/migrations/no-deprecated-chip-filter.ts"],"names":[],"mappings":";;;;AAAA,sFAAuF;AAE1E,QAAA,SAAS,GAAG,sBAAsB,CAAC;AAEnC,KAAiB,IAAA,uDAA4B,EAAC;IACzD,IAAI,EAAE,2BAA2B;IACjC,IAAI,EAAE,SAAS;IACf,WAAW,EAAE,8EAA8E;IAC3F,UAAU,EAAE,CAAC,EAAE,GAAG,EAAE,aAAa,EAAE,GAAG,EAAE,iBAAiB,EAAE,CAAC;CAC7D,CAAC,EALa,YAAI,YAAE,YAAI,WAKtB;AAEH,kBAAe,YAAI,CAAC"}
@@ -1,5 +1,3 @@
1
- export declare const name = "no-deprecated-elevation-utilities";
2
- export declare const data: Record<string, [string, string]>;
3
- declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<string, [], import("../../../utils/create-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
4
- export default _default;
1
+ export declare const name: string, data: Record<string, [string, string]>, rule: import("@typescript-eslint/utils/ts-eslint").RuleModule<string, [], import("../../../utils/create-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
2
+ export default rule;
5
3
  //# sourceMappingURL=no-deprecated-elevation-utilities.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"no-deprecated-elevation-utilities.d.ts","sourceRoot":"","sources":["../../../../src/rules/html/migrations/no-deprecated-elevation-utilities.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,IAAI,sCAAsC,CAAC;AAUxD,eAAO,MAAM,IAAI,kCAA6C,CAAC;;AAE/D,wBAOG"}
1
+ {"version":3,"file":"no-deprecated-elevation-utilities.d.ts","sourceRoot":"","sources":["../../../../src/rules/html/migrations/no-deprecated-elevation-utilities.ts"],"names":[],"mappings":"AAEA,eAAO,MAAQ,IAAI,UAAE,IAAI,oCAAE,IAAI,+KAY7B,CAAC;AAEH,eAAe,IAAI,CAAC"}
@@ -1,23 +1,19 @@
1
1
  "use strict";
2
+ var _a;
2
3
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.data = exports.name = void 0;
4
+ exports.rule = exports.data = exports.name = void 0;
4
5
  const create_class_update_rule_1 = require("../../../utils/create-class-update-rule");
5
- const generate_messages_1 = require("../../../utils/generate-messages");
6
- const generate_mutations_1 = require("../../../utils/generate-mutations");
7
- exports.name = 'no-deprecated-elevation-utilities';
8
- const classesMap = [
9
- { old: 'elevation-1', new: 'elevation-100' },
10
- { old: 'elevation-2', new: 'elevation-200' },
11
- { old: 'elevation-3', new: 'elevation-300' },
12
- { old: 'elevation-4', new: 'elevation-400' },
13
- { old: 'elevation-5', new: 'elevation-500' },
14
- ];
15
- exports.data = (0, generate_mutations_1.generateReplacedClassMutations)(classesMap);
16
- exports.default = (0, create_class_update_rule_1.createClassUpdateRule)({
17
- name: exports.name,
6
+ _a = (0, create_class_update_rule_1.createClassUpdateRuleWrapper)({
7
+ name: 'no-deprecated-elevation-utilities',
18
8
  type: 'problem',
19
9
  description: 'Flags deprecated "elevation-{1|2|3|4|5}" classes and replaces them with "elevation-{100|200|300|400|500}".',
20
- messages: (0, generate_messages_1.generateReplacedClassMessages)(classesMap),
21
- mutations: exports.data,
22
- });
10
+ classesMap: [
11
+ { old: 'elevation-1', new: 'elevation-100' },
12
+ { old: 'elevation-2', new: 'elevation-200' },
13
+ { old: 'elevation-3', new: 'elevation-300' },
14
+ { old: 'elevation-4', new: 'elevation-400' },
15
+ { old: 'elevation-5', new: 'elevation-500' },
16
+ ],
17
+ }), exports.name = _a.name, exports.data = _a.data, exports.rule = _a.rule;
18
+ exports.default = exports.rule;
23
19
  //# sourceMappingURL=no-deprecated-elevation-utilities.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"no-deprecated-elevation-utilities.js","sourceRoot":"","sources":["../../../../src/rules/html/migrations/no-deprecated-elevation-utilities.ts"],"names":[],"mappings":";;;AAAA,sFAAgF;AAChF,wEAAiF;AACjF,0EAAmF;AAEtE,QAAA,IAAI,GAAG,mCAAmC,CAAC;AAExD,MAAM,UAAU,GAAG;IACjB,EAAE,GAAG,EAAE,aAAa,EAAE,GAAG,EAAE,eAAe,EAAE;IAC5C,EAAE,GAAG,EAAE,aAAa,EAAE,GAAG,EAAE,eAAe,EAAE;IAC5C,EAAE,GAAG,EAAE,aAAa,EAAE,GAAG,EAAE,eAAe,EAAE;IAC5C,EAAE,GAAG,EAAE,aAAa,EAAE,GAAG,EAAE,eAAe,EAAE;IAC5C,EAAE,GAAG,EAAE,aAAa,EAAE,GAAG,EAAE,eAAe,EAAE;CAC7C,CAAC;AAEW,QAAA,IAAI,GAAG,IAAA,mDAA8B,EAAC,UAAU,CAAC,CAAC;AAE/D,kBAAe,IAAA,gDAAqB,EAAC;IACnC,IAAI,EAAJ,YAAI;IACJ,IAAI,EAAE,SAAS;IACf,WAAW,EACT,4GAA4G;IAC9G,QAAQ,EAAE,IAAA,iDAA6B,EAAC,UAAU,CAAC;IACnD,SAAS,EAAE,YAAI;CAChB,CAAC,CAAC"}
1
+ {"version":3,"file":"no-deprecated-elevation-utilities.js","sourceRoot":"","sources":["../../../../src/rules/html/migrations/no-deprecated-elevation-utilities.ts"],"names":[],"mappings":";;;;AAAA,sFAAuF;AAE1E,KAAuB,IAAA,uDAA4B,EAAC;IAC/D,IAAI,EAAE,mCAAmC;IACzC,IAAI,EAAE,SAAS;IACf,WAAW,EACT,4GAA4G;IAC9G,UAAU,EAAE;QACV,EAAE,GAAG,EAAE,aAAa,EAAE,GAAG,EAAE,eAAe,EAAE;QAC5C,EAAE,GAAG,EAAE,aAAa,EAAE,GAAG,EAAE,eAAe,EAAE;QAC5C,EAAE,GAAG,EAAE,aAAa,EAAE,GAAG,EAAE,eAAe,EAAE;QAC5C,EAAE,GAAG,EAAE,aAAa,EAAE,GAAG,EAAE,eAAe,EAAE;QAC5C,EAAE,GAAG,EAAE,aAAa,EAAE,GAAG,EAAE,eAAe,EAAE;KAC7C;CACF,CAAC,EAZa,YAAI,YAAE,YAAI,YAAE,YAAI,WAY5B;AAEH,kBAAe,YAAI,CAAC"}
@@ -1,5 +1,3 @@
1
- export declare const name = "no-deprecated-font-curves";
2
- export declare const data: Record<string, [string, string]>;
3
- declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<string, [], import("../../../utils/create-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
4
- export default _default;
1
+ export declare const name: string, data: Record<string, [string, string]>, rule: import("@typescript-eslint/utils/ts-eslint").RuleModule<string, [], import("../../../utils/create-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
2
+ export default rule;
5
3
  //# sourceMappingURL=no-deprecated-font-curves.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"no-deprecated-font-curves.d.ts","sourceRoot":"","sources":["../../../../src/rules/html/migrations/no-deprecated-font-curves.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,IAAI,8BAA8B,CAAC;AAYhD,eAAO,MAAM,IAAI,kCAA6C,CAAC;;AAE/D,wBAOG"}
1
+ {"version":3,"file":"no-deprecated-font-curves.d.ts","sourceRoot":"","sources":["../../../../src/rules/html/migrations/no-deprecated-font-curves.ts"],"names":[],"mappings":"AAEA,eAAO,MAAQ,IAAI,UAAE,IAAI,oCAAE,IAAI,+KAc7B,CAAC;AAEH,eAAe,IAAI,CAAC"}
@@ -1,25 +1,21 @@
1
1
  "use strict";
2
+ var _a;
2
3
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.data = exports.name = void 0;
4
+ exports.rule = exports.data = exports.name = void 0;
4
5
  const create_class_update_rule_1 = require("../../../utils/create-class-update-rule");
5
- const generate_messages_1 = require("../../../utils/generate-messages");
6
- const generate_mutations_1 = require("../../../utils/generate-mutations");
7
- exports.name = 'no-deprecated-font-curves';
8
- const classesMap = [
9
- { old: 'font-curve-tiny', new: 'fs-9' },
10
- { old: 'font-curve-small', new: 'fs-7' },
11
- { old: 'font-curve-regular', new: 'fs-6' },
12
- { old: 'font-curve-bigger-regular', new: 'fs-5' },
13
- { old: 'font-curve-medium', new: 'fs-4' },
14
- { old: 'font-curve-large', new: 'fs-3' },
15
- { old: 'font-curve-big', new: 'fs-1' },
16
- ];
17
- exports.data = (0, generate_mutations_1.generateReplacedClassMutations)(classesMap);
18
- exports.default = (0, create_class_update_rule_1.createClassUpdateRule)({
19
- name: exports.name,
6
+ _a = (0, create_class_update_rule_1.createClassUpdateRuleWrapper)({
7
+ name: 'no-deprecated-font-curves',
20
8
  type: 'problem',
21
9
  description: 'Flags deprecated "font-curve-{tiny|small|regular|bigger-regular|medium|large|big}" classes and replace them with new font curve classes.',
22
- messages: (0, generate_messages_1.generateReplacedClassMessages)(classesMap),
23
- mutations: exports.data,
24
- });
10
+ classesMap: [
11
+ { old: 'font-curve-tiny', new: 'fs-9' },
12
+ { old: 'font-curve-small', new: 'fs-7' },
13
+ { old: 'font-curve-regular', new: 'fs-6' },
14
+ { old: 'font-curve-bigger-regular', new: 'fs-5' },
15
+ { old: 'font-curve-medium', new: 'fs-4' },
16
+ { old: 'font-curve-large', new: 'fs-3' },
17
+ { old: 'font-curve-big', new: 'fs-1' },
18
+ ],
19
+ }), exports.name = _a.name, exports.data = _a.data, exports.rule = _a.rule;
20
+ exports.default = exports.rule;
25
21
  //# sourceMappingURL=no-deprecated-font-curves.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"no-deprecated-font-curves.js","sourceRoot":"","sources":["../../../../src/rules/html/migrations/no-deprecated-font-curves.ts"],"names":[],"mappings":";;;AAAA,sFAAgF;AAChF,wEAAiF;AACjF,0EAAmF;AAEtE,QAAA,IAAI,GAAG,2BAA2B,CAAC;AAEhD,MAAM,UAAU,GAAG;IACjB,EAAE,GAAG,EAAE,iBAAiB,EAAE,GAAG,EAAE,MAAM,EAAE;IACvC,EAAE,GAAG,EAAE,kBAAkB,EAAE,GAAG,EAAE,MAAM,EAAE;IACxC,EAAE,GAAG,EAAE,oBAAoB,EAAE,GAAG,EAAE,MAAM,EAAE;IAC1C,EAAE,GAAG,EAAE,2BAA2B,EAAE,GAAG,EAAE,MAAM,EAAE;IACjD,EAAE,GAAG,EAAE,mBAAmB,EAAE,GAAG,EAAE,MAAM,EAAE;IACzC,EAAE,GAAG,EAAE,kBAAkB,EAAE,GAAG,EAAE,MAAM,EAAE;IACxC,EAAE,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,MAAM,EAAE;CACvC,CAAC;AAEW,QAAA,IAAI,GAAG,IAAA,mDAA8B,EAAC,UAAU,CAAC,CAAC;AAE/D,kBAAe,IAAA,gDAAqB,EAAC;IACnC,IAAI,EAAJ,YAAI;IACJ,IAAI,EAAE,SAAS;IACf,WAAW,EACT,0IAA0I;IAC5I,QAAQ,EAAE,IAAA,iDAA6B,EAAC,UAAU,CAAC;IACnD,SAAS,EAAE,YAAI;CAChB,CAAC,CAAC"}
1
+ {"version":3,"file":"no-deprecated-font-curves.js","sourceRoot":"","sources":["../../../../src/rules/html/migrations/no-deprecated-font-curves.ts"],"names":[],"mappings":";;;;AAAA,sFAAuF;AAE1E,KAAuB,IAAA,uDAA4B,EAAC;IAC/D,IAAI,EAAE,2BAA2B;IACjC,IAAI,EAAE,SAAS;IACf,WAAW,EACT,0IAA0I;IAC5I,UAAU,EAAE;QACV,EAAE,GAAG,EAAE,iBAAiB,EAAE,GAAG,EAAE,MAAM,EAAE;QACvC,EAAE,GAAG,EAAE,kBAAkB,EAAE,GAAG,EAAE,MAAM,EAAE;QACxC,EAAE,GAAG,EAAE,oBAAoB,EAAE,GAAG,EAAE,MAAM,EAAE;QAC1C,EAAE,GAAG,EAAE,2BAA2B,EAAE,GAAG,EAAE,MAAM,EAAE;QACjD,EAAE,GAAG,EAAE,mBAAmB,EAAE,GAAG,EAAE,MAAM,EAAE;QACzC,EAAE,GAAG,EAAE,kBAAkB,EAAE,GAAG,EAAE,MAAM,EAAE;QACxC,EAAE,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,MAAM,EAAE;KACvC;CACF,CAAC,EAda,YAAI,YAAE,YAAI,YAAE,YAAI,WAc5B;AAEH,kBAAe,YAAI,CAAC"}
@@ -1,4 +1,3 @@
1
- export declare const name = "no-deprecated-font-weights";
2
- declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"deprecatedRegular" | "deprecatedBold", [], import("../../../utils/create-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
3
- export default _default;
1
+ export declare const name: string, data: Record<string, [string, string]>, rule: import("@typescript-eslint/utils/ts-eslint").RuleModule<string, [], import("../../../utils/create-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
2
+ export default rule;
4
3
  //# sourceMappingURL=no-deprecated-font-weight.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"no-deprecated-font-weight.d.ts","sourceRoot":"","sources":["../../../../src/rules/html/migrations/no-deprecated-font-weight.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,IAAI,+BAA+B,CAAC;;AAEjD,wBAiDG"}
1
+ {"version":3,"file":"no-deprecated-font-weight.d.ts","sourceRoot":"","sources":["../../../../src/rules/html/migrations/no-deprecated-font-weight.ts"],"names":[],"mappings":"AAEA,eAAO,MAAQ,IAAI,UAAE,IAAI,oCAAE,IAAI,+KAQ7B,CAAC;AAEH,eAAe,IAAI,CAAC"}
@@ -1,52 +1,16 @@
1
1
  "use strict";
2
+ var _a;
2
3
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.name = void 0;
4
- const create_rule_1 = require("../../../utils/create-rule");
5
- exports.name = 'no-deprecated-font-weights';
6
- exports.default = (0, create_rule_1.createRule)({
7
- name: exports.name,
8
- meta: {
9
- docs: {
10
- dir: 'html',
11
- description: 'Flags "bold" and "regular" classes and replaces them with "fw-bold" and "fw-regular".',
12
- },
13
- messages: {
14
- deprecatedRegular: 'The "regular" class has been deleted. Please replace it with "fw-regular".',
15
- deprecatedBold: 'The "bold" class has been deleted. Please replace it with "fw-bold".',
16
- },
17
- type: 'problem',
18
- fixable: 'code',
19
- schema: [],
20
- },
21
- defaultOptions: [],
22
- create(context) {
23
- return {
24
- tag(node) {
25
- if (node.name) {
26
- const $node = node.toCheerio();
27
- if ($node.hasClass('regular')) {
28
- context.report({
29
- messageId: 'deprecatedRegular',
30
- loc: node.loc,
31
- fix(fixer) {
32
- const fixedNode = $node.removeClass('regular').addClass('fw-regular');
33
- return fixer.replaceTextRange(node.range, fixedNode.toString());
34
- },
35
- });
36
- }
37
- if ($node.hasClass('bold')) {
38
- context.report({
39
- messageId: 'deprecatedBold',
40
- loc: node.loc,
41
- fix(fixer) {
42
- const fixedNode = $node.removeClass('bold').addClass('fw-bold');
43
- return fixer.replaceTextRange(node.range, fixedNode.toString());
44
- },
45
- });
46
- }
47
- }
48
- },
49
- };
50
- },
51
- });
4
+ exports.rule = exports.data = exports.name = void 0;
5
+ const create_class_update_rule_1 = require("../../../utils/create-class-update-rule");
6
+ _a = (0, create_class_update_rule_1.createClassUpdateRuleWrapper)({
7
+ name: 'no-deprecated-font-weights',
8
+ type: 'problem',
9
+ description: 'Flags deprecated "h-visuallyhidden" class and replaces it with "visually-hidden".',
10
+ classesMap: [
11
+ { old: 'regular', new: 'fw-regular' },
12
+ { old: 'bold', new: 'fw-bold' },
13
+ ],
14
+ }), exports.name = _a.name, exports.data = _a.data, exports.rule = _a.rule;
15
+ exports.default = exports.rule;
52
16
  //# sourceMappingURL=no-deprecated-font-weight.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"no-deprecated-font-weight.js","sourceRoot":"","sources":["../../../../src/rules/html/migrations/no-deprecated-font-weight.ts"],"names":[],"mappings":";;;AAAA,4DAAwD;AAG3C,QAAA,IAAI,GAAG,4BAA4B,CAAC;AAEjD,kBAAe,IAAA,wBAAU,EAAC;IACxB,IAAI,EAAJ,YAAI;IACJ,IAAI,EAAE;QACJ,IAAI,EAAE;YACJ,GAAG,EAAE,MAAM;YACX,WAAW,EACT,uFAAuF;SAC1F;QACD,QAAQ,EAAE;YACR,iBAAiB,EACf,4EAA4E;YAC9E,cAAc,EAAE,sEAAsE;SACvF;QACD,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,MAAM;QACf,MAAM,EAAE,EAAE;KACX;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,CAAC,OAAO;QACZ,OAAO;YACL,GAAG,CAAC,IAAc;gBAChB,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;oBACd,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;oBAE/B,IAAI,KAAK,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;wBAC9B,OAAO,CAAC,MAAM,CAAC;4BACb,SAAS,EAAE,mBAAmB;4BAC9B,GAAG,EAAE,IAAI,CAAC,GAAG;4BACb,GAAG,CAAC,KAAK;gCACP,MAAM,SAAS,GAAG,KAAK,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;gCACtE,OAAO,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC,KAAK,EAAE,SAAS,CAAC,QAAQ,EAAE,CAAC,CAAC;4BAClE,CAAC;yBACF,CAAC,CAAC;oBACL,CAAC;oBAED,IAAI,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;wBAC3B,OAAO,CAAC,MAAM,CAAC;4BACb,SAAS,EAAE,gBAAgB;4BAC3B,GAAG,EAAE,IAAI,CAAC,GAAG;4BACb,GAAG,CAAC,KAAK;gCACP,MAAM,SAAS,GAAG,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;gCAChE,OAAO,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC,KAAK,EAAE,SAAS,CAAC,QAAQ,EAAE,CAAC,CAAC;4BAClE,CAAC;yBACF,CAAC,CAAC;oBACL,CAAC;gBACH,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"no-deprecated-font-weight.js","sourceRoot":"","sources":["../../../../src/rules/html/migrations/no-deprecated-font-weight.ts"],"names":[],"mappings":";;;;AAAA,sFAAuF;AAE1E,KAAuB,IAAA,uDAA4B,EAAC;IAC/D,IAAI,EAAE,4BAA4B;IAClC,IAAI,EAAE,SAAS;IACf,WAAW,EAAE,mFAAmF;IAChG,UAAU,EAAE;QACV,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,YAAY,EAAE;QACrC,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE;KAChC;CACF,CAAC,EARa,YAAI,YAAE,YAAI,YAAE,YAAI,WAQ5B;AAEH,kBAAe,YAAI,CAAC"}
@@ -1,5 +1,3 @@
1
- export declare const name = "no-deprecated-h-clearfix";
2
- export declare const messageId = "deprecatedHClearfix";
3
- declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<string, [], import("../../../utils/create-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
4
- export default _default;
1
+ export declare const name: string, rule: import("@typescript-eslint/utils/ts-eslint").RuleModule<string, [], import("../../../utils/create-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
2
+ export default rule;
5
3
  //# sourceMappingURL=no-deprecated-h-clearfix.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"no-deprecated-h-clearfix.d.ts","sourceRoot":"","sources":["../../../../src/rules/html/migrations/no-deprecated-h-clearfix.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,6BAA6B,CAAC;AAC/C,eAAO,MAAM,SAAS,wBAAwB,CAAC;;AAG/C,wBAUG"}
1
+ {"version":3,"file":"no-deprecated-h-clearfix.d.ts","sourceRoot":"","sources":["../../../../src/rules/html/migrations/no-deprecated-h-clearfix.ts"],"names":[],"mappings":"AAEA,eAAO,MAAQ,IAAI,UAAE,IAAI,+KAKvB,CAAC;AAEH,eAAe,IAAI,CAAC"}
@@ -1,19 +1,13 @@
1
1
  "use strict";
2
+ var _a;
2
3
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.messageId = exports.name = void 0;
4
+ exports.rule = exports.name = void 0;
4
5
  const create_class_update_rule_1 = require("../../../utils/create-class-update-rule");
5
- exports.name = 'no-deprecated-h-clearfix';
6
- exports.messageId = 'deprecatedHClearfix';
7
- // Type: RuleModule<"uppercase", ...>
8
- exports.default = (0, create_class_update_rule_1.createClassUpdateRule)({
9
- name: exports.name,
6
+ _a = (0, create_class_update_rule_1.createClassUpdateRuleWrapper)({
7
+ name: 'no-deprecated-h-clearfix',
10
8
  type: 'problem',
11
9
  description: 'Flags deprecated "h-clearfix" class and replaces it with "clearfix".',
12
- messages: {
13
- [exports.messageId]: 'The "h-clearfix" class is deprecated. Please replace it with "clearfix".',
14
- },
15
- mutations: {
16
- [exports.messageId]: ['h-clearfix', 'clearfix'],
17
- },
18
- });
10
+ classesMap: [{ old: 'h-clearfix', new: 'clearfix' }],
11
+ }), exports.name = _a.name, exports.rule = _a.rule;
12
+ exports.default = exports.rule;
19
13
  //# sourceMappingURL=no-deprecated-h-clearfix.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"no-deprecated-h-clearfix.js","sourceRoot":"","sources":["../../../../src/rules/html/migrations/no-deprecated-h-clearfix.ts"],"names":[],"mappings":";;;AAAA,sFAAgF;AAEnE,QAAA,IAAI,GAAG,0BAA0B,CAAC;AAClC,QAAA,SAAS,GAAG,qBAAqB,CAAC;AAE/C,qCAAqC;AACrC,kBAAe,IAAA,gDAAqB,EAAC;IACnC,IAAI,EAAJ,YAAI;IACJ,IAAI,EAAE,SAAS;IACf,WAAW,EAAE,sEAAsE;IACnF,QAAQ,EAAE;QACR,CAAC,iBAAS,CAAC,EAAE,0EAA0E;KACxF;IACD,SAAS,EAAE;QACT,CAAC,iBAAS,CAAC,EAAE,CAAC,YAAY,EAAE,UAAU,CAAC;KACxC;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"no-deprecated-h-clearfix.js","sourceRoot":"","sources":["../../../../src/rules/html/migrations/no-deprecated-h-clearfix.ts"],"names":[],"mappings":";;;;AAAA,sFAAuF;AAE1E,KAAiB,IAAA,uDAA4B,EAAC;IACzD,IAAI,EAAE,0BAA0B;IAChC,IAAI,EAAE,SAAS;IACf,WAAW,EAAE,sEAAsE;IACnF,UAAU,EAAE,CAAC,EAAE,GAAG,EAAE,YAAY,EAAE,GAAG,EAAE,UAAU,EAAE,CAAC;CACrD,CAAC,EALa,YAAI,YAAE,YAAI,WAKtB;AAEH,kBAAe,YAAI,CAAC"}
@@ -1,5 +1,3 @@
1
- export declare const name = "no-deprecated-h-visuallyhidden";
2
- export declare const messageId = "deprecatedHVisuallyhidden";
3
- declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<string, [], import("../../../utils/create-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
4
- export default _default;
1
+ export declare const name: string, rule: import("@typescript-eslint/utils/ts-eslint").RuleModule<string, [], import("../../../utils/create-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
2
+ export default rule;
5
3
  //# sourceMappingURL=no-deprecated-h-visuallyhidden.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"no-deprecated-h-visuallyhidden.d.ts","sourceRoot":"","sources":["../../../../src/rules/html/migrations/no-deprecated-h-visuallyhidden.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,mCAAmC,CAAC;AACrD,eAAO,MAAM,SAAS,8BAA8B,CAAC;;AAGrD,wBAWG"}
1
+ {"version":3,"file":"no-deprecated-h-visuallyhidden.d.ts","sourceRoot":"","sources":["../../../../src/rules/html/migrations/no-deprecated-h-visuallyhidden.ts"],"names":[],"mappings":"AAEA,eAAO,MAAQ,IAAI,UAAE,IAAI,+KAKvB,CAAC;AAEH,eAAe,IAAI,CAAC"}
@@ -1,19 +1,13 @@
1
1
  "use strict";
2
+ var _a;
2
3
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.messageId = exports.name = void 0;
4
+ exports.rule = exports.name = void 0;
4
5
  const create_class_update_rule_1 = require("../../../utils/create-class-update-rule");
5
- exports.name = 'no-deprecated-h-visuallyhidden';
6
- exports.messageId = 'deprecatedHVisuallyhidden';
7
- // Type: RuleModule<"uppercase", ...>
8
- exports.default = (0, create_class_update_rule_1.createClassUpdateRule)({
9
- name: exports.name,
6
+ _a = (0, create_class_update_rule_1.createClassUpdateRuleWrapper)({
7
+ name: 'no-deprecated-h-visuallyhidden',
10
8
  type: 'problem',
11
9
  description: 'Flags deprecated "h-visuallyhidden" class and replaces it with "visually-hidden".',
12
- messages: {
13
- [exports.messageId]: 'The "h-visuallyhidden" class is deprecated. Please replace it with "visually-hidden".',
14
- },
15
- mutations: {
16
- [exports.messageId]: ['h-visuallyhidden', 'visually-hidden'],
17
- },
18
- });
10
+ classesMap: [{ old: 'h-visuallyhidden', new: 'visually-hidden' }],
11
+ }), exports.name = _a.name, exports.rule = _a.rule;
12
+ exports.default = exports.rule;
19
13
  //# sourceMappingURL=no-deprecated-h-visuallyhidden.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"no-deprecated-h-visuallyhidden.js","sourceRoot":"","sources":["../../../../src/rules/html/migrations/no-deprecated-h-visuallyhidden.ts"],"names":[],"mappings":";;;AAAA,sFAAgF;AAEnE,QAAA,IAAI,GAAG,gCAAgC,CAAC;AACxC,QAAA,SAAS,GAAG,2BAA2B,CAAC;AAErD,qCAAqC;AACrC,kBAAe,IAAA,gDAAqB,EAAC;IACnC,IAAI,EAAJ,YAAI;IACJ,IAAI,EAAE,SAAS;IACf,WAAW,EAAE,mFAAmF;IAChG,QAAQ,EAAE;QACR,CAAC,iBAAS,CAAC,EACT,uFAAuF;KAC1F;IACD,SAAS,EAAE;QACT,CAAC,iBAAS,CAAC,EAAE,CAAC,kBAAkB,EAAE,iBAAiB,CAAC;KACrD;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"no-deprecated-h-visuallyhidden.js","sourceRoot":"","sources":["../../../../src/rules/html/migrations/no-deprecated-h-visuallyhidden.ts"],"names":[],"mappings":";;;;AAAA,sFAAuF;AAE1E,KAAiB,IAAA,uDAA4B,EAAC;IACzD,IAAI,EAAE,gCAAgC;IACtC,IAAI,EAAE,SAAS;IACf,WAAW,EAAE,mFAAmF;IAChG,UAAU,EAAE,CAAC,EAAE,GAAG,EAAE,kBAAkB,EAAE,GAAG,EAAE,iBAAiB,EAAE,CAAC;CAClE,CAAC,EALa,YAAI,YAAE,YAAI,WAKtB;AAEH,kBAAe,YAAI,CAAC"}
@@ -1,5 +1,3 @@
1
- export declare const name = "no-deprecated-loader";
2
- export declare const data: Record<string, [string, string]>;
3
- declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<string, [], import("../../../utils/create-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
4
- export default _default;
1
+ export declare const name: string, data: Record<string, [string, string]>, rule: import("@typescript-eslint/utils/ts-eslint").RuleModule<string, [], import("../../../utils/create-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
2
+ export default rule;
5
3
  //# sourceMappingURL=no-deprecated-loader.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"no-deprecated-loader.d.ts","sourceRoot":"","sources":["../../../../src/rules/html/migrations/no-deprecated-loader.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,IAAI,yBAAyB,CAAC;AAgB3C,eAAO,MAAM,IAAI,kCAA6C,CAAC;;AAE/D,wBAMG"}
1
+ {"version":3,"file":"no-deprecated-loader.d.ts","sourceRoot":"","sources":["../../../../src/rules/html/migrations/no-deprecated-loader.ts"],"names":[],"mappings":"AAEA,eAAO,MAAQ,IAAI,UAAE,IAAI,oCAAE,IAAI,+KAiB7B,CAAC;AAEH,eAAe,IAAI,CAAC"}
@@ -1,29 +1,25 @@
1
1
  "use strict";
2
+ var _a;
2
3
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.data = exports.name = void 0;
4
+ exports.rule = exports.data = exports.name = void 0;
4
5
  const create_class_update_rule_1 = require("../../../utils/create-class-update-rule");
5
- const generate_mutations_1 = require("../../../utils/generate-mutations");
6
- const generate_messages_1 = require("../../../utils/generate-messages");
7
- exports.name = 'no-deprecated-loader';
8
- const classesMap = [
9
- { old: 'loader', new: 'spinner' },
10
- { old: 'loading-modal', new: 'spinner-modal' },
11
- { old: 'loader-xs', new: 'spinner-16' },
12
- { old: 'loader-sm', new: 'spinner-40' },
13
- { old: 'loader-12', new: 'spinner-12' },
14
- { old: 'loader-16', new: 'spinner-16' },
15
- { old: 'loader-24', new: 'spinner-24' },
16
- { old: 'loader-32', new: 'spinner-32' },
17
- { old: 'loader-40', new: 'spinner-40' },
18
- { old: 'loader-48', new: 'spinner-48' },
19
- { old: 'loader-80', new: 'spinner-80' },
20
- ];
21
- exports.data = (0, generate_mutations_1.generateReplacedClassMutations)(classesMap);
22
- exports.default = (0, create_class_update_rule_1.createClassUpdateRule)({
23
- name: exports.name,
6
+ _a = (0, create_class_update_rule_1.createClassUpdateRuleWrapper)({
7
+ name: 'no-deprecated-loader',
24
8
  type: 'problem',
25
9
  description: 'Flags deprecated "loader-*" classes and replace them with "spinner-*" classes.',
26
- messages: (0, generate_messages_1.generateReplacedClassMessages)(classesMap),
27
- mutations: exports.data,
28
- });
10
+ classesMap: [
11
+ { old: 'loader', new: 'spinner' },
12
+ { old: 'loading-modal', new: 'spinner-modal' },
13
+ { old: 'loader-xs', new: 'spinner-16' },
14
+ { old: 'loader-sm', new: 'spinner-40' },
15
+ { old: 'loader-12', new: 'spinner-12' },
16
+ { old: 'loader-16', new: 'spinner-16' },
17
+ { old: 'loader-24', new: 'spinner-24' },
18
+ { old: 'loader-32', new: 'spinner-32' },
19
+ { old: 'loader-40', new: 'spinner-40' },
20
+ { old: 'loader-48', new: 'spinner-48' },
21
+ { old: 'loader-80', new: 'spinner-80' },
22
+ ],
23
+ }), exports.name = _a.name, exports.data = _a.data, exports.rule = _a.rule;
24
+ exports.default = exports.rule;
29
25
  //# sourceMappingURL=no-deprecated-loader.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"no-deprecated-loader.js","sourceRoot":"","sources":["../../../../src/rules/html/migrations/no-deprecated-loader.ts"],"names":[],"mappings":";;;AAAA,sFAAgF;AAChF,0EAAmF;AACnF,wEAAiF;AAEpE,QAAA,IAAI,GAAG,sBAAsB,CAAC;AAE3C,MAAM,UAAU,GAAG;IACjB,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,SAAS,EAAE;IACjC,EAAE,GAAG,EAAE,eAAe,EAAE,GAAG,EAAE,eAAe,EAAE;IAC9C,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,YAAY,EAAE;IACvC,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,YAAY,EAAE;IACvC,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,YAAY,EAAE;IACvC,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,YAAY,EAAE;IACvC,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,YAAY,EAAE;IACvC,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,YAAY,EAAE;IACvC,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,YAAY,EAAE;IACvC,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,YAAY,EAAE;IACvC,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,YAAY,EAAE;CACxC,CAAC;AAEW,QAAA,IAAI,GAAG,IAAA,mDAA8B,EAAC,UAAU,CAAC,CAAC;AAE/D,kBAAe,IAAA,gDAAqB,EAAC;IACnC,IAAI,EAAJ,YAAI;IACJ,IAAI,EAAE,SAAS;IACf,WAAW,EAAE,gFAAgF;IAC7F,QAAQ,EAAE,IAAA,iDAA6B,EAAC,UAAU,CAAC;IACnD,SAAS,EAAE,YAAI;CAChB,CAAC,CAAC"}
1
+ {"version":3,"file":"no-deprecated-loader.js","sourceRoot":"","sources":["../../../../src/rules/html/migrations/no-deprecated-loader.ts"],"names":[],"mappings":";;;;AAAA,sFAAuF;AAE1E,KAAuB,IAAA,uDAA4B,EAAC;IAC/D,IAAI,EAAE,sBAAsB;IAC5B,IAAI,EAAE,SAAS;IACf,WAAW,EAAE,gFAAgF;IAC7F,UAAU,EAAE;QACV,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,SAAS,EAAE;QACjC,EAAE,GAAG,EAAE,eAAe,EAAE,GAAG,EAAE,eAAe,EAAE;QAC9C,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,YAAY,EAAE;QACvC,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,YAAY,EAAE;QACvC,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,YAAY,EAAE;QACvC,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,YAAY,EAAE;QACvC,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,YAAY,EAAE;QACvC,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,YAAY,EAAE;QACvC,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,YAAY,EAAE;QACvC,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,YAAY,EAAE;QACvC,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,YAAY,EAAE;KACxC;CACF,CAAC,EAjBa,YAAI,YAAE,YAAI,YAAE,YAAI,WAiB5B;AAEH,kBAAe,YAAI,CAAC"}
@@ -1,5 +1,3 @@
1
- export declare const name = "no-deprecated-position-helpers";
2
- export declare const data: Record<string, [string, string]>;
3
- declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<string, [], import("../../../utils/create-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
4
- export default _default;
1
+ export declare const name: string, data: Record<string, [string, string]>, rule: import("@typescript-eslint/utils/ts-eslint").RuleModule<string, [], import("../../../utils/create-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
2
+ export default rule;
5
3
  //# sourceMappingURL=no-deprecated-position-helpers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"no-deprecated-position-helpers.d.ts","sourceRoot":"","sources":["../../../../src/rules/html/migrations/no-deprecated-position-helpers.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,IAAI,mCAAmC,CAAC;AASrD,eAAO,MAAM,IAAI,kCAA6C,CAAC;;AAE/D,wBAOG"}
1
+ {"version":3,"file":"no-deprecated-position-helpers.d.ts","sourceRoot":"","sources":["../../../../src/rules/html/migrations/no-deprecated-position-helpers.ts"],"names":[],"mappings":"AAEA,eAAO,MAAQ,IAAI,UAAE,IAAI,oCAAE,IAAI,+KAW7B,CAAC;AAEH,eAAe,IAAI,CAAC"}
@@ -1,22 +1,18 @@
1
1
  "use strict";
2
+ var _a;
2
3
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.data = exports.name = void 0;
4
+ exports.rule = exports.data = exports.name = void 0;
4
5
  const create_class_update_rule_1 = require("../../../utils/create-class-update-rule");
5
- const generate_messages_1 = require("../../../utils/generate-messages");
6
- const generate_mutations_1 = require("../../../utils/generate-mutations");
7
- exports.name = 'no-deprecated-position-helpers';
8
- const classesMap = [
9
- { old: 'fixed-top', new: 'position-fixed top-0 start-0 end-0 z-fixed' },
10
- { old: 'fixed-bottom', new: 'position-fixed bottom-0 start-0 end-0 z-fixed' },
11
- { old: 'sticky-top', new: 'position-sticky top-0 z-header' },
12
- { old: 'sticky-bottom', new: 'position-sticky bottom-0 z-header' },
13
- ];
14
- exports.data = (0, generate_mutations_1.generateReplacedClassMutations)(classesMap);
15
- exports.default = (0, create_class_update_rule_1.createClassUpdateRule)({
16
- name: exports.name,
6
+ _a = (0, create_class_update_rule_1.createClassUpdateRuleWrapper)({
7
+ name: 'no-deprecated-position-helpers',
17
8
  type: 'problem',
18
9
  description: 'Flags deprecated bootstrap position helpers "fixed-{top|bottom}" and "sticky-{top|bottom}" classes and replace them with a combination of other utility classes.',
19
- messages: (0, generate_messages_1.generateReplacedClassMessages)(classesMap),
20
- mutations: exports.data,
21
- });
10
+ classesMap: [
11
+ { old: 'fixed-top', new: 'position-fixed top-0 start-0 end-0 z-fixed' },
12
+ { old: 'fixed-bottom', new: 'position-fixed bottom-0 start-0 end-0 z-fixed' },
13
+ { old: 'sticky-top', new: 'position-sticky top-0 z-header' },
14
+ { old: 'sticky-bottom', new: 'position-sticky bottom-0 z-header' },
15
+ ],
16
+ }), exports.name = _a.name, exports.data = _a.data, exports.rule = _a.rule;
17
+ exports.default = exports.rule;
22
18
  //# sourceMappingURL=no-deprecated-position-helpers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"no-deprecated-position-helpers.js","sourceRoot":"","sources":["../../../../src/rules/html/migrations/no-deprecated-position-helpers.ts"],"names":[],"mappings":";;;AAAA,sFAAgF;AAChF,wEAAiF;AACjF,0EAAmF;AAEtE,QAAA,IAAI,GAAG,gCAAgC,CAAC;AAErD,MAAM,UAAU,GAAG;IACjB,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,4CAA4C,EAAE;IACvE,EAAE,GAAG,EAAE,cAAc,EAAE,GAAG,EAAE,+CAA+C,EAAE;IAC7E,EAAE,GAAG,EAAE,YAAY,EAAE,GAAG,EAAE,gCAAgC,EAAE;IAC5D,EAAE,GAAG,EAAE,eAAe,EAAE,GAAG,EAAE,mCAAmC,EAAE;CACnE,CAAC;AAEW,QAAA,IAAI,GAAG,IAAA,mDAA8B,EAAC,UAAU,CAAC,CAAC;AAE/D,kBAAe,IAAA,gDAAqB,EAAC;IACnC,IAAI,EAAJ,YAAI;IACJ,IAAI,EAAE,SAAS;IACf,WAAW,EACT,kKAAkK;IACpK,QAAQ,EAAE,IAAA,iDAA6B,EAAC,UAAU,CAAC;IACnD,SAAS,EAAE,YAAI;CAChB,CAAC,CAAC"}
1
+ {"version":3,"file":"no-deprecated-position-helpers.js","sourceRoot":"","sources":["../../../../src/rules/html/migrations/no-deprecated-position-helpers.ts"],"names":[],"mappings":";;;;AAAA,sFAAuF;AAE1E,KAAuB,IAAA,uDAA4B,EAAC;IAC/D,IAAI,EAAE,gCAAgC;IACtC,IAAI,EAAE,SAAS;IACf,WAAW,EACT,kKAAkK;IACpK,UAAU,EAAE;QACV,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,4CAA4C,EAAE;QACvE,EAAE,GAAG,EAAE,cAAc,EAAE,GAAG,EAAE,+CAA+C,EAAE;QAC7E,EAAE,GAAG,EAAE,YAAY,EAAE,GAAG,EAAE,gCAAgC,EAAE;QAC5D,EAAE,GAAG,EAAE,eAAe,EAAE,GAAG,EAAE,mCAAmC,EAAE;KACnE;CACF,CAAC,EAXa,YAAI,YAAE,YAAI,YAAE,YAAI,WAW5B;AAEH,kBAAe,YAAI,CAAC"}
@@ -1,5 +1,3 @@
1
- export declare const name = "no-deprecated-shadow-utilities";
2
- export declare const data: Record<string, [string, string]>;
3
- declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<string, [], import("../../../utils/create-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
4
- export default _default;
1
+ export declare const name: string, data: Record<string, [string, string]>, rule: import("@typescript-eslint/utils/ts-eslint").RuleModule<string, [], import("../../../utils/create-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
2
+ export default rule;
5
3
  //# sourceMappingURL=no-deprecated-shadow-utilities.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"no-deprecated-shadow-utilities.d.ts","sourceRoot":"","sources":["../../../../src/rules/html/migrations/no-deprecated-shadow-utilities.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,IAAI,mCAAmC,CAAC;AASrD,eAAO,MAAM,IAAI,kCAA6C,CAAC;;AAE/D,wBAOG"}
1
+ {"version":3,"file":"no-deprecated-shadow-utilities.d.ts","sourceRoot":"","sources":["../../../../src/rules/html/migrations/no-deprecated-shadow-utilities.ts"],"names":[],"mappings":"AAEA,eAAO,MAAQ,IAAI,UAAE,IAAI,oCAAE,IAAI,+KAW7B,CAAC;AAEH,eAAe,IAAI,CAAC"}
@@ -1,22 +1,18 @@
1
1
  "use strict";
2
+ var _a;
2
3
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.data = exports.name = void 0;
4
+ exports.rule = exports.data = exports.name = void 0;
4
5
  const create_class_update_rule_1 = require("../../../utils/create-class-update-rule");
5
- const generate_messages_1 = require("../../../utils/generate-messages");
6
- const generate_mutations_1 = require("../../../utils/generate-mutations");
7
- exports.name = 'no-deprecated-shadow-utilities';
8
- const classesMap = [
9
- { old: 'shadow-none', new: 'elevation-none' },
10
- { old: 'shadow-sm', new: 'elevation-200' },
11
- { old: 'shadow', new: 'elevation-400' },
12
- { old: 'shadow-lg', new: 'elevation-500' },
13
- ];
14
- exports.data = (0, generate_mutations_1.generateReplacedClassMutations)(classesMap);
15
- exports.default = (0, create_class_update_rule_1.createClassUpdateRule)({
16
- name: exports.name,
6
+ _a = (0, create_class_update_rule_1.createClassUpdateRuleWrapper)({
7
+ name: 'no-deprecated-shadow-utilities',
17
8
  type: 'problem',
18
9
  description: 'Flags deprecated "shadow" and "shadow-{none|sm|lg}" classes and replace them with equivalent elevation classes.',
19
- messages: (0, generate_messages_1.generateReplacedClassMessages)(classesMap),
20
- mutations: exports.data,
21
- });
10
+ classesMap: [
11
+ { old: 'shadow-none', new: 'elevation-none' },
12
+ { old: 'shadow-sm', new: 'elevation-200' },
13
+ { old: 'shadow', new: 'elevation-400' },
14
+ { old: 'shadow-lg', new: 'elevation-500' },
15
+ ],
16
+ }), exports.name = _a.name, exports.data = _a.data, exports.rule = _a.rule;
17
+ exports.default = exports.rule;
22
18
  //# sourceMappingURL=no-deprecated-shadow-utilities.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"no-deprecated-shadow-utilities.js","sourceRoot":"","sources":["../../../../src/rules/html/migrations/no-deprecated-shadow-utilities.ts"],"names":[],"mappings":";;;AAAA,sFAAgF;AAChF,wEAAiF;AACjF,0EAAmF;AAEtE,QAAA,IAAI,GAAG,gCAAgC,CAAC;AAErD,MAAM,UAAU,GAAG;IACjB,EAAE,GAAG,EAAE,aAAa,EAAE,GAAG,EAAE,gBAAgB,EAAE;IAC7C,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,eAAe,EAAE;IAC1C,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,eAAe,EAAE;IACvC,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,eAAe,EAAE;CAC3C,CAAC;AAEW,QAAA,IAAI,GAAG,IAAA,mDAA8B,EAAC,UAAU,CAAC,CAAC;AAE/D,kBAAe,IAAA,gDAAqB,EAAC;IACnC,IAAI,EAAJ,YAAI;IACJ,IAAI,EAAE,SAAS;IACf,WAAW,EACT,iHAAiH;IACnH,QAAQ,EAAE,IAAA,iDAA6B,EAAC,UAAU,CAAC;IACnD,SAAS,EAAE,YAAI;CAChB,CAAC,CAAC"}
1
+ {"version":3,"file":"no-deprecated-shadow-utilities.js","sourceRoot":"","sources":["../../../../src/rules/html/migrations/no-deprecated-shadow-utilities.ts"],"names":[],"mappings":";;;;AAAA,sFAAuF;AAE1E,KAAuB,IAAA,uDAA4B,EAAC;IAC/D,IAAI,EAAE,gCAAgC;IACtC,IAAI,EAAE,SAAS;IACf,WAAW,EACT,iHAAiH;IACnH,UAAU,EAAE;QACV,EAAE,GAAG,EAAE,aAAa,EAAE,GAAG,EAAE,gBAAgB,EAAE;QAC7C,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,eAAe,EAAE;QAC1C,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,eAAe,EAAE;QACvC,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,eAAe,EAAE;KAC3C;CACF,CAAC,EAXa,YAAI,YAAE,YAAI,YAAE,YAAI,WAW5B;AAEH,kBAAe,YAAI,CAAC"}
@@ -1,4 +1,3 @@
1
- export declare const name = "no-form-text";
2
- declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"stopUsingFormText", [], import("../../../utils/create-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
3
- export default _default;
1
+ export declare const name: string, rule: import("@typescript-eslint/utils/ts-eslint").RuleModule<string, [], import("../../../utils/create-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
2
+ export default rule;
4
3
  //# sourceMappingURL=no-form-text.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"no-form-text.d.ts","sourceRoot":"","sources":["../../../../src/rules/html/migrations/no-form-text.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,IAAI,iBAAiB,CAAC;;AAGnC,wBAgCG"}
1
+ {"version":3,"file":"no-form-text.d.ts","sourceRoot":"","sources":["../../../../src/rules/html/migrations/no-form-text.ts"],"names":[],"mappings":"AAEA,eAAO,MAAQ,IAAI,UAAE,IAAI,+KAKvB,CAAC;AAEH,eAAe,IAAI,CAAC"}
@@ -1,40 +1,13 @@
1
1
  "use strict";
2
+ var _a;
2
3
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.name = void 0;
4
- const create_rule_1 = require("../../../utils/create-rule");
5
- exports.name = 'no-form-text';
6
- // Type: RuleModule<"uppercase", ...>
7
- exports.default = (0, create_rule_1.createRule)({
8
- name: exports.name,
9
- meta: {
10
- docs: {
11
- dir: 'html',
12
- description: 'Replaces deprecated "form-text" class with "form-hint".',
13
- },
14
- messages: {
15
- stopUsingFormText: 'The "form-text" class has been replaced by "form-hint.',
16
- },
17
- type: 'problem',
18
- fixable: 'code',
19
- schema: [],
20
- },
21
- defaultOptions: [],
22
- create(context) {
23
- return {
24
- tag(node) {
25
- const $node = node.toCheerio();
26
- if ($node.hasClass('form-text')) {
27
- context.report({
28
- messageId: 'stopUsingFormText',
29
- loc: node.loc,
30
- fix(fixer) {
31
- const fixedNode = $node.removeClass('form-text').addClass('form-hint');
32
- return fixer.replaceTextRange(node.range, fixedNode.toString());
33
- },
34
- });
35
- }
36
- },
37
- };
38
- },
39
- });
4
+ exports.rule = exports.name = void 0;
5
+ const create_class_update_rule_1 = require("../../../utils/create-class-update-rule");
6
+ _a = (0, create_class_update_rule_1.createClassUpdateRuleWrapper)({
7
+ name: 'no-form-text',
8
+ type: 'problem',
9
+ description: 'Flags deprecated "form-text" class and replaces it with "form-hint".',
10
+ classesMap: [{ old: 'form-text', new: 'form-hint' }],
11
+ }), exports.name = _a.name, exports.rule = _a.rule;
12
+ exports.default = exports.rule;
40
13
  //# sourceMappingURL=no-form-text.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"no-form-text.js","sourceRoot":"","sources":["../../../../src/rules/html/migrations/no-form-text.ts"],"names":[],"mappings":";;;AAAA,4DAAwD;AAG3C,QAAA,IAAI,GAAG,cAAc,CAAC;AAEnC,qCAAqC;AACrC,kBAAe,IAAA,wBAAU,EAAC;IACxB,IAAI,EAAJ,YAAI;IACJ,IAAI,EAAE;QACJ,IAAI,EAAE;YACJ,GAAG,EAAE,MAAM;YACX,WAAW,EAAE,yDAAyD;SACvE;QACD,QAAQ,EAAE;YACR,iBAAiB,EAAE,wDAAwD;SAC5E;QACD,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,MAAM;QACf,MAAM,EAAE,EAAE;KACX;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,CAAC,OAAO;QACZ,OAAO;YACL,GAAG,CAAC,IAAc;gBAChB,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;gBAC/B,IAAI,KAAK,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC;oBAChC,OAAO,CAAC,MAAM,CAAC;wBACb,SAAS,EAAE,mBAAmB;wBAC9B,GAAG,EAAE,IAAI,CAAC,GAAG;wBACb,GAAG,CAAC,KAAK;4BACP,MAAM,SAAS,GAAG,KAAK,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;4BACvE,OAAO,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC,KAAK,EAAE,SAAS,CAAC,QAAQ,EAAE,CAAC,CAAC;wBAClE,CAAC;qBACF,CAAC,CAAC;gBACL,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"no-form-text.js","sourceRoot":"","sources":["../../../../src/rules/html/migrations/no-form-text.ts"],"names":[],"mappings":";;;;AAAA,sFAAuF;AAE1E,KAAiB,IAAA,uDAA4B,EAAC;IACzD,IAAI,EAAE,cAAc;IACpB,IAAI,EAAE,SAAS;IACf,WAAW,EAAE,sEAAsE;IACnF,UAAU,EAAE,CAAC,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,WAAW,EAAE,CAAC;CACrD,CAAC,EALa,YAAI,YAAE,YAAI,WAKtB;AAEH,kBAAe,YAAI,CAAC"}
@@ -1,5 +1,3 @@
1
- export declare const name = "no-unnumbered-border-radius";
2
- export declare const data: Record<string, [string, string]>;
3
- declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<string, [], import("../../../utils/create-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
4
- export default _default;
1
+ export declare const name: string, data: Record<string, [string, string]>, rule: import("@typescript-eslint/utils/ts-eslint").RuleModule<string, [], import("../../../utils/create-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
2
+ export default rule;
5
3
  //# sourceMappingURL=no-unnumbered-border-radius.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"no-unnumbered-border-radius.d.ts","sourceRoot":"","sources":["../../../../src/rules/html/migrations/no-unnumbered-border-radius.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,IAAI,gCAAgC,CAAC;AAUlD,eAAO,MAAM,IAAI,kCAA6C,CAAC;;AAE/D,wBAOG"}
1
+ {"version":3,"file":"no-unnumbered-border-radius.d.ts","sourceRoot":"","sources":["../../../../src/rules/html/migrations/no-unnumbered-border-radius.ts"],"names":[],"mappings":"AAEA,eAAO,MAAQ,IAAI,UAAE,IAAI,oCAAE,IAAI,+KAY7B,CAAC;AAEH,eAAe,IAAI,CAAC"}
@@ -1,23 +1,19 @@
1
1
  "use strict";
2
+ var _a;
2
3
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.data = exports.name = void 0;
4
- const generate_messages_1 = require("../../../utils/generate-messages");
5
- const generate_mutations_1 = require("../../../utils/generate-mutations");
4
+ exports.rule = exports.data = exports.name = void 0;
6
5
  const create_class_update_rule_1 = require("../../../utils/create-class-update-rule");
7
- exports.name = 'no-unnumbered-border-radius';
8
- const classesMap = [
9
- { old: 'rounded', new: 'rounded-4' },
10
- { old: 'rounded-top', new: 'rounded-top-4' },
11
- { old: 'rounded-bottom', new: 'rounded-bottom-4' },
12
- { old: 'rounded-start', new: 'rounded-start-4' },
13
- { old: 'rounded-end', new: 'rounded-end-4' },
14
- ];
15
- exports.data = (0, generate_mutations_1.generateReplacedClassMutations)(classesMap);
16
- exports.default = (0, create_class_update_rule_1.createClassUpdateRule)({
17
- name: exports.name,
6
+ _a = (0, create_class_update_rule_1.createClassUpdateRuleWrapper)({
7
+ name: 'no-unnumbered-border-radius',
18
8
  type: 'problem',
19
9
  description: 'Flags "rounded" and "rounded-{top|bottom|start|end}" classes and replaces them with "rounded-4" and "rounded-{top|bottom|start|end}-4", respectively.',
20
- messages: (0, generate_messages_1.generateReplacedClassMessages)(classesMap),
21
- mutations: exports.data,
22
- });
10
+ classesMap: [
11
+ { old: 'rounded', new: 'rounded-4' },
12
+ { old: 'rounded-top', new: 'rounded-top-4' },
13
+ { old: 'rounded-bottom', new: 'rounded-bottom-4' },
14
+ { old: 'rounded-start', new: 'rounded-start-4' },
15
+ { old: 'rounded-end', new: 'rounded-end-4' },
16
+ ],
17
+ }), exports.name = _a.name, exports.data = _a.data, exports.rule = _a.rule;
18
+ exports.default = exports.rule;
23
19
  //# sourceMappingURL=no-unnumbered-border-radius.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"no-unnumbered-border-radius.js","sourceRoot":"","sources":["../../../../src/rules/html/migrations/no-unnumbered-border-radius.ts"],"names":[],"mappings":";;;AAAA,wEAAiF;AACjF,0EAAmF;AACnF,sFAAgF;AAEnE,QAAA,IAAI,GAAG,6BAA6B,CAAC;AAElD,MAAM,UAAU,GAAG;IACjB,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,WAAW,EAAE;IACpC,EAAE,GAAG,EAAE,aAAa,EAAE,GAAG,EAAE,eAAe,EAAE;IAC5C,EAAE,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,kBAAkB,EAAE;IAClD,EAAE,GAAG,EAAE,eAAe,EAAE,GAAG,EAAE,iBAAiB,EAAE;IAChD,EAAE,GAAG,EAAE,aAAa,EAAE,GAAG,EAAE,eAAe,EAAE;CAC7C,CAAC;AAEW,QAAA,IAAI,GAAG,IAAA,mDAA8B,EAAC,UAAU,CAAC,CAAC;AAE/D,kBAAe,IAAA,gDAAqB,EAAC;IACnC,IAAI,EAAJ,YAAI;IACJ,IAAI,EAAE,SAAS;IACf,WAAW,EACT,uJAAuJ;IACzJ,QAAQ,EAAE,IAAA,iDAA6B,EAAC,UAAU,CAAC;IACnD,SAAS,EAAE,YAAI;CAChB,CAAC,CAAC"}
1
+ {"version":3,"file":"no-unnumbered-border-radius.js","sourceRoot":"","sources":["../../../../src/rules/html/migrations/no-unnumbered-border-radius.ts"],"names":[],"mappings":";;;;AAAA,sFAAuF;AAE1E,KAAuB,IAAA,uDAA4B,EAAC;IAC/D,IAAI,EAAE,6BAA6B;IACnC,IAAI,EAAE,SAAS;IACf,WAAW,EACT,uJAAuJ;IACzJ,UAAU,EAAE;QACV,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,WAAW,EAAE;QACpC,EAAE,GAAG,EAAE,aAAa,EAAE,GAAG,EAAE,eAAe,EAAE;QAC5C,EAAE,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,kBAAkB,EAAE;QAClD,EAAE,GAAG,EAAE,eAAe,EAAE,GAAG,EAAE,iBAAiB,EAAE;QAChD,EAAE,GAAG,EAAE,aAAa,EAAE,GAAG,EAAE,eAAe,EAAE;KAC7C;CACF,CAAC,EAZa,YAAI,YAAE,YAAI,YAAE,YAAI,WAY5B;AAEH,kBAAe,YAAI,CAAC"}
@@ -1,4 +1,5 @@
1
1
  export declare const dsLintingRules: {
2
2
  "stencil-strict-props-initialization": import("@typescript-eslint/utils/ts-eslint").RuleModule<"propStrictInit", [], import("../utils/create-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
3
+ "stencil-no-unreflected-required-props": import("@typescript-eslint/utils/ts-eslint").RuleModule<"stencilNoUnreflectedRequiredProps", [], import("../utils/create-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
3
4
  };
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/rules/index.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,cAAc;;CAE1B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/rules/index.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,cAAc;;;CAG1B,CAAC"}
@@ -35,7 +35,9 @@ var __importStar = (this && this.__importStar) || (function () {
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.dsLintingRules = void 0;
37
37
  const stencil_strict_props_initialization_1 = __importStar(require("./stencil-strict-props-initialization"));
38
+ const stencil_no_unreflected_required_props_1 = __importStar(require("./stencil-no-unreflected-required-props"));
38
39
  exports.dsLintingRules = {
39
40
  [stencil_strict_props_initialization_1.name]: stencil_strict_props_initialization_1.default,
41
+ [stencil_no_unreflected_required_props_1.name]: stencil_no_unreflected_required_props_1.default,
40
42
  };
41
43
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/rules/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6GAE+C;AAElC,QAAA,cAAc,GAAG;IAC5B,CAAC,0CAAwC,CAAC,EAAE,6CAAoC;CACjF,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/rules/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6GAE+C;AAC/C,iHAEiD;AAEpC,QAAA,cAAc,GAAG;IAC5B,CAAC,0CAAwC,CAAC,EAAE,6CAAoC;IAChF,CAAC,4CAAyC,CAAC,EAAE,+CAAqC;CACnF,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare const name = "stencil-no-unreflected-required-props";
2
+ export declare const messageId = "stencilNoUnreflectedRequiredProps";
3
+ declare const _default: import("@typescript-eslint/utils/ts-eslint").RuleModule<"stencilNoUnreflectedRequiredProps", [], import("../utils/create-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
4
+ export default _default;
5
+ //# sourceMappingURL=stencil-no-unreflected-required-props.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stencil-no-unreflected-required-props.d.ts","sourceRoot":"","sources":["../../src/rules/stencil-no-unreflected-required-props.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,IAAI,0CAA0C,CAAC;AAC5D,eAAO,MAAM,SAAS,sCAAsC,CAAC;;AAE7D,wBA0DG"}
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.messageId = exports.name = void 0;
4
+ const create_rule_1 = require("../utils/create-rule");
5
+ const stencil_helpers_1 = require("../utils/stencil-helpers");
6
+ const utils_1 = require("@typescript-eslint/utils");
7
+ exports.name = 'stencil-no-unreflected-required-props';
8
+ exports.messageId = 'stencilNoUnreflectedRequiredProps';
9
+ exports.default = (0, create_rule_1.createRule)({
10
+ name: exports.name,
11
+ meta: {
12
+ docs: {
13
+ dir: 'ts',
14
+ description: 'Reports any required Stencil component property, which is not reflected on its host element, since this does not render the props on the server, thus leading to missing required prop errors in our property validations when used in a SSR environment.',
15
+ },
16
+ messages: {
17
+ [exports.messageId]: "The required property '{{propertyName}}' must contain the option `{ reflect: true }` in its decorator.",
18
+ },
19
+ type: 'problem',
20
+ schema: [],
21
+ },
22
+ defaultOptions: [],
23
+ create(context) {
24
+ return {
25
+ PropertyDefinition(node) {
26
+ const isRequired = node.definite === true;
27
+ if (isRequired) {
28
+ node.decorators
29
+ // Find property nodes with a "@Prop()" decorator
30
+ .filter(decorator => (0, stencil_helpers_1.isCallExpressionWithName)(decorator, 'Prop') !== null)
31
+ // Find property nodes without the `{ reflect: true }` argument in their "@Prop()" decorator
32
+ .filter(decorator => !(decorator.expression.type === utils_1.AST_NODE_TYPES.CallExpression &&
33
+ decorator.expression.arguments.some(arg => arg.type === utils_1.AST_NODE_TYPES.ObjectExpression &&
34
+ arg.properties.some(prop => prop.type === utils_1.AST_NODE_TYPES.Property &&
35
+ prop.key.type === utils_1.AST_NODE_TYPES.Identifier &&
36
+ prop.key.name === 'reflect' &&
37
+ prop.value.type === utils_1.AST_NODE_TYPES.Literal &&
38
+ prop.value.value === true))))
39
+ .forEach(() => {
40
+ context.report({
41
+ node,
42
+ messageId: exports.messageId,
43
+ data: {
44
+ propertyName: utils_1.ASTUtils.getPropertyName(node),
45
+ },
46
+ });
47
+ });
48
+ }
49
+ },
50
+ };
51
+ },
52
+ });
53
+ //# sourceMappingURL=stencil-no-unreflected-required-props.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stencil-no-unreflected-required-props.js","sourceRoot":"","sources":["../../src/rules/stencil-no-unreflected-required-props.ts"],"names":[],"mappings":";;;AAAA,sDAAkD;AAClD,8DAAoE;AACpE,oDAAoE;AAEvD,QAAA,IAAI,GAAG,uCAAuC,CAAC;AAC/C,QAAA,SAAS,GAAG,mCAAmC,CAAC;AAE7D,kBAAe,IAAA,wBAAU,EAAC;IACxB,IAAI,EAAJ,YAAI;IACJ,IAAI,EAAE;QACJ,IAAI,EAAE;YACJ,GAAG,EAAE,IAAI;YACT,WAAW,EACT,2PAA2P;SAC9P;QACD,QAAQ,EAAE;YACR,CAAC,iBAAS,CAAC,EACT,wGAAwG;SAC3G;QACD,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,EAAE;KACX;IACD,cAAc,EAAE,EAAE;IAElB,MAAM,CAAC,OAAO;QACZ,OAAO;YACL,kBAAkB,CAAC,IAAI;gBACrB,MAAM,UAAU,GAAG,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC;gBAE1C,IAAI,UAAU,EAAE,CAAC;oBACf,IAAI,CAAC,UAAU;wBACb,iDAAiD;yBAChD,MAAM,CAAC,SAAS,CAAC,EAAE,CAAC,IAAA,0CAAwB,EAAC,SAAS,EAAE,MAAM,CAAC,KAAK,IAAI,CAAC;wBAC1E,4FAA4F;yBAC3F,MAAM,CACL,SAAS,CAAC,EAAE,CACV,CAAC,CACC,SAAS,CAAC,UAAU,CAAC,IAAI,KAAK,sBAAc,CAAC,cAAc;wBAC3D,SAAS,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,CACjC,GAAG,CAAC,EAAE,CACJ,GAAG,CAAC,IAAI,KAAK,sBAAc,CAAC,gBAAgB;4BAC5C,GAAG,CAAC,UAAU,CAAC,IAAI,CACjB,IAAI,CAAC,EAAE,CACL,IAAI,CAAC,IAAI,KAAK,sBAAc,CAAC,QAAQ;gCACrC,IAAI,CAAC,GAAG,CAAC,IAAI,KAAK,sBAAc,CAAC,UAAU;gCAC3C,IAAI,CAAC,GAAG,CAAC,IAAI,KAAK,SAAS;gCAC3B,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,sBAAc,CAAC,OAAO;gCAC1C,IAAI,CAAC,KAAK,CAAC,KAAK,KAAK,IAAI,CAC5B,CACJ,CACF,CACJ;yBACA,OAAO,CAAC,GAAG,EAAE;wBACZ,OAAO,CAAC,MAAM,CAAC;4BACb,IAAI;4BACJ,SAAS,EAAT,iBAAS;4BACT,IAAI,EAAE;gCACJ,YAAY,EAAE,gBAAQ,CAAC,eAAe,CAAC,IAAI,CAAC;6BAC7C;yBACF,CAAC,CAAC;oBACL,CAAC,CAAC,CAAC;gBACP,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
@@ -9,7 +9,20 @@ export interface PhaseConfig<T> {
9
9
  messages: T;
10
10
  mutations: Record<keyof T, [string, string]>;
11
11
  }
12
+ export interface PhaseConfigWrapper {
13
+ description: string;
14
+ classesMap: {
15
+ old: string;
16
+ new: string;
17
+ }[];
18
+ }
12
19
  type SinglePhaseRuleConfig<T> = RuleConfigBase & PhaseConfig<T>;
20
+ type SinglePhaseRuleConfigWrapper = RuleConfigBase & PhaseConfigWrapper;
13
21
  export declare const createClassUpdateRule: <T extends Record<string, string>>(config: SinglePhaseRuleConfig<T>) => import("@typescript-eslint/utils/ts-eslint").RuleModule<string, [], import("./create-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
22
+ export declare const createClassUpdateRuleWrapper: (config: SinglePhaseRuleConfigWrapper) => {
23
+ name: string;
24
+ data: Record<string, [string, string]>;
25
+ rule: import("@typescript-eslint/utils/ts-eslint").RuleModule<string, [], import("./create-rule").RuleDocs, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
26
+ };
14
27
  export {};
15
28
  //# sourceMappingURL=create-class-update-rule.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-class-update-rule.d.ts","sourceRoot":"","sources":["../../src/utils/create-class-update-rule.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,KAAK,QAAQ,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;AAE1C,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,QAAQ,CAAC;CACjB;AAED,MAAM,WAAW,WAAW,CAAC,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,CAAC,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CAC9C;AAED,KAAK,qBAAqB,CAAC,CAAC,IAAI,cAAc,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;AAEhE,eAAO,MAAM,qBAAqB,GAAI,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACpE,QAAQ,qBAAqB,CAAC,CAAC,CAAC,qKAuC9B,CAAC"}
1
+ {"version":3,"file":"create-class-update-rule.d.ts","sourceRoot":"","sources":["../../src/utils/create-class-update-rule.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAI9B,KAAK,QAAQ,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;AAE1C,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,QAAQ,CAAC;CACjB;AAED,MAAM,WAAW,WAAW,CAAC,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,CAAC,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CAC9C;AAED,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE;QACV,GAAG,EAAE,MAAM,CAAC;QACZ,GAAG,EAAE,MAAM,CAAC;KACb,EAAE,CAAC;CACL;AAED,KAAK,qBAAqB,CAAC,CAAC,IAAI,cAAc,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;AAChE,KAAK,4BAA4B,GAAG,cAAc,GAAG,kBAAkB,CAAC;AAExE,eAAO,MAAM,qBAAqB,GAAI,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACpE,QAAQ,qBAAqB,CAAC,CAAC,CAAC,qKAuC9B,CAAC;AAEL,eAAO,MAAM,4BAA4B,GAAI,QAAQ,4BAA4B;;;;CAUhF,CAAC"}
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createClassUpdateRule = void 0;
3
+ exports.createClassUpdateRuleWrapper = exports.createClassUpdateRule = void 0;
4
4
  const create_rule_1 = require("./create-rule");
5
+ const generate_mutations_1 = require("./generate-mutations");
6
+ const generate_messages_1 = require("./generate-messages");
5
7
  const createClassUpdateRule = (config) => (0, create_rule_1.createRule)({
6
8
  name: config.name,
7
9
  meta: {
@@ -40,4 +42,15 @@ const createClassUpdateRule = (config) => (0, create_rule_1.createRule)({
40
42
  },
41
43
  });
42
44
  exports.createClassUpdateRule = createClassUpdateRule;
45
+ const createClassUpdateRuleWrapper = (config) => {
46
+ const data = (0, generate_mutations_1.generateReplacedClassMutations)(config.classesMap);
47
+ const rule = (0, exports.createClassUpdateRule)({
48
+ name: config.name,
49
+ description: config.description,
50
+ messages: (0, generate_messages_1.generateReplacedClassMessages)(config.classesMap),
51
+ mutations: data,
52
+ });
53
+ return { name: config.name, data, rule };
54
+ };
55
+ exports.createClassUpdateRuleWrapper = createClassUpdateRuleWrapper;
43
56
  //# sourceMappingURL=create-class-update-rule.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-class-update-rule.js","sourceRoot":"","sources":["../../src/utils/create-class-update-rule.ts"],"names":[],"mappings":";;;AAAA,+CAA2C;AAmBpC,MAAM,qBAAqB,GAAG,CACnC,MAAgC,EAChC,EAAE,CACF,IAAA,wBAAU,EAAC;IACT,IAAI,EAAE,MAAM,CAAC,IAAI;IACjB,IAAI,EAAE;QACJ,IAAI,EAAE;YACJ,GAAG,EAAE,MAAM;YACX,WAAW,EAAE,MAAM,CAAC,WAAW;SAChC;QACD,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,IAAI,EAAE,MAAM,CAAC,IAAI,IAAI,SAAS;QAC9B,OAAO,EAAE,MAAM;QACf,MAAM,EAAE,EAAE;KACX;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,CAAC,OAAO;QACZ,OAAO;YACL,GAAG,CAAC,IAAc;gBAChB,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;gBAE/B,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,EAAE,EAAE;oBAC7E,IAAI,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;wBAC7B,OAAO,CAAC,MAAM,CAAC;4BACb,SAAS;4BACT,GAAG,EAAE,IAAI,CAAC,GAAG;4BACb,GAAG,CAAC,QAAQ;gCACV,CAAC,CAAC;oCACE,GAAG,CAAC,KAAK;wCACP,MAAM,SAAS,GAAG,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;wCACjE,OAAO,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC,KAAK,EAAE,SAAS,CAAC,QAAQ,EAAE,CAAC,CAAC;oCAClE,CAAC;iCACF;gCACH,CAAC,CAAC,EAAE,CAAC;yBACR,CAAC,CAAC;oBACL,CAAC;gBACH,CAAC,CAAC,CAAC;YACL,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC;AAxCQ,QAAA,qBAAqB,yBAwC7B"}
1
+ {"version":3,"file":"create-class-update-rule.js","sourceRoot":"","sources":["../../src/utils/create-class-update-rule.ts"],"names":[],"mappings":";;;AAAA,+CAA2C;AAG3C,6DAAsE;AACtE,2DAAoE;AA0B7D,MAAM,qBAAqB,GAAG,CACnC,MAAgC,EAChC,EAAE,CACF,IAAA,wBAAU,EAAC;IACT,IAAI,EAAE,MAAM,CAAC,IAAI;IACjB,IAAI,EAAE;QACJ,IAAI,EAAE;YACJ,GAAG,EAAE,MAAM;YACX,WAAW,EAAE,MAAM,CAAC,WAAW;SAChC;QACD,QAAQ,EAAE,MAAM,CAAC,QAAQ;QACzB,IAAI,EAAE,MAAM,CAAC,IAAI,IAAI,SAAS;QAC9B,OAAO,EAAE,MAAM;QACf,MAAM,EAAE,EAAE;KACX;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,CAAC,OAAO;QACZ,OAAO;YACL,GAAG,CAAC,IAAc;gBAChB,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;gBAE/B,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,EAAE,EAAE;oBAC7E,IAAI,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;wBAC7B,OAAO,CAAC,MAAM,CAAC;4BACb,SAAS;4BACT,GAAG,EAAE,IAAI,CAAC,GAAG;4BACb,GAAG,CAAC,QAAQ;gCACV,CAAC,CAAC;oCACE,GAAG,CAAC,KAAK;wCACP,MAAM,SAAS,GAAG,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;wCACjE,OAAO,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC,KAAK,EAAE,SAAS,CAAC,QAAQ,EAAE,CAAC,CAAC;oCAClE,CAAC;iCACF;gCACH,CAAC,CAAC,EAAE,CAAC;yBACR,CAAC,CAAC;oBACL,CAAC;gBACH,CAAC,CAAC,CAAC;YACL,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC;AAxCQ,QAAA,qBAAqB,yBAwC7B;AAEE,MAAM,4BAA4B,GAAG,CAAC,MAAoC,EAAE,EAAE;IACnF,MAAM,IAAI,GAAG,IAAA,mDAA8B,EAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IAC/D,MAAM,IAAI,GAAG,IAAA,6BAAqB,EAAC;QACjC,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,WAAW,EAAE,MAAM,CAAC,WAAW;QAC/B,QAAQ,EAAE,IAAA,iDAA6B,EAAC,MAAM,CAAC,UAAU,CAAC;QAC1D,SAAS,EAAE,IAAI;KAChB,CAAC,CAAC;IAEH,OAAO,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AAC3C,CAAC,CAAC;AAVW,QAAA,4BAA4B,gCAUvC"}
@@ -0,0 +1,22 @@
1
+ import { TSESTree } from '@typescript-eslint/utils';
2
+ /**
3
+ * Checks if a decorator is of type CallExpression (function).
4
+ * @param decorator The decorator node to check.
5
+ * @returns True if the decorator type is matching, otherwise false.
6
+ */
7
+ export declare function isCallExpression(decorator: TSESTree.Decorator): boolean;
8
+ /**
9
+ * Checks if a decorator is of type CallExpression (function) and has the specified name.
10
+ * @param decorator The decorator node to check.
11
+ * @param name The name to search for.
12
+ * @returns True if the decorator CallExpression has the specified name, otherwise false.
13
+ */
14
+ export declare function isCallExpressionWithName(decorator: TSESTree.Decorator, name: string): boolean;
15
+ /**
16
+ * Retrieves the decorator function by its name.
17
+ * @param decorator The decorator node to check.
18
+ * @param name The name of the decorator function.
19
+ * @returns The decorator if it matches the name, otherwise null.
20
+ */
21
+ export declare function getCallExpressionWithName(decorator: TSESTree.Decorator, name: string): TSESTree.Decorator | null;
22
+ //# sourceMappingURL=stencil-helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stencil-helpers.d.ts","sourceRoot":"","sources":["../../src/utils/stencil-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAEpE;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,QAAQ,CAAC,SAAS,GAAG,OAAO,CAEvE;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,QAAQ,CAAC,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAO7F;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,QAAQ,CAAC,SAAS,EAC7B,IAAI,EAAE,MAAM,GACX,QAAQ,CAAC,SAAS,GAAG,IAAI,CAE3B"}
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isCallExpression = isCallExpression;
4
+ exports.isCallExpressionWithName = isCallExpressionWithName;
5
+ exports.getCallExpressionWithName = getCallExpressionWithName;
6
+ const utils_1 = require("@typescript-eslint/utils");
7
+ /**
8
+ * Checks if a decorator is of type CallExpression (function).
9
+ * @param decorator The decorator node to check.
10
+ * @returns True if the decorator type is matching, otherwise false.
11
+ */
12
+ function isCallExpression(decorator) {
13
+ return decorator.expression.type === utils_1.AST_NODE_TYPES.CallExpression;
14
+ }
15
+ /**
16
+ * Checks if a decorator is of type CallExpression (function) and has the specified name.
17
+ * @param decorator The decorator node to check.
18
+ * @param name The name to search for.
19
+ * @returns True if the decorator CallExpression has the specified name, otherwise false.
20
+ */
21
+ function isCallExpressionWithName(decorator, name) {
22
+ if (isCallExpression(decorator)) {
23
+ const expression = decorator.expression;
24
+ return expression.callee.type === utils_1.AST_NODE_TYPES.Identifier && expression.callee.name === name;
25
+ }
26
+ return false;
27
+ }
28
+ /**
29
+ * Retrieves the decorator function by its name.
30
+ * @param decorator The decorator node to check.
31
+ * @param name The name of the decorator function.
32
+ * @returns The decorator if it matches the name, otherwise null.
33
+ */
34
+ function getCallExpressionWithName(decorator, name) {
35
+ return isCallExpressionWithName(decorator, name) ? decorator : null;
36
+ }
37
+ //# sourceMappingURL=stencil-helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stencil-helpers.js","sourceRoot":"","sources":["../../src/utils/stencil-helpers.ts"],"names":[],"mappings":";;AAOA,4CAEC;AAQD,4DAOC;AAQD,8DAKC;AArCD,oDAAoE;AAEpE;;;;GAIG;AACH,SAAgB,gBAAgB,CAAC,SAA6B;IAC5D,OAAO,SAAS,CAAC,UAAU,CAAC,IAAI,KAAK,sBAAc,CAAC,cAAc,CAAC;AACrE,CAAC;AAED;;;;;GAKG;AACH,SAAgB,wBAAwB,CAAC,SAA6B,EAAE,IAAY;IAClF,IAAI,gBAAgB,CAAC,SAAS,CAAC,EAAE,CAAC;QAChC,MAAM,UAAU,GAAG,SAAS,CAAC,UAAqC,CAAC;QACnE,OAAO,UAAU,CAAC,MAAM,CAAC,IAAI,KAAK,sBAAc,CAAC,UAAU,IAAI,UAAU,CAAC,MAAM,CAAC,IAAI,KAAK,IAAI,CAAC;IACjG,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;GAKG;AACH,SAAgB,yBAAyB,CACvC,SAA6B,EAC7B,IAAY;IAEZ,OAAO,wBAAwB,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC;AACtE,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@swisspost/design-system-eslint",
3
3
  "private": false,
4
- "version": "1.1.0-next.2",
4
+ "version": "10.0.0-next.55",
5
5
  "description": "A set of custom ESLint rules to help keeping projects using the Swiss Post Design System up-to-date.",
6
6
  "author": "Swiss Post <design-system@post.ch>",
7
7
  "license": "Apache-2.0",