lint-suite 2.0.1 → 2.0.2

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.
package/eslint.js CHANGED
@@ -668,7 +668,12 @@ var classExpressionLiterals = (source) => {
668
668
  };
669
669
 
670
670
  // packages/lint-suite/src/lib/rules/utils/template-classes.util.ts
671
- var CLASS_ATTRIBUTE = "class";
671
+ var CLASS_ATTRIBUTES = [
672
+ "class",
673
+ "routerLinkActive",
674
+ "animate.enter",
675
+ "animate.leave"
676
+ ];
672
677
  var CLASS_BINDING_PREFIX = "class.";
673
678
  var TOKEN = /\S+/gu;
674
679
  var expressionSource = (value) => {
@@ -697,11 +702,11 @@ var boundClassName = (input) => {
697
702
  return input.name;
698
703
  };
699
704
  var isClassExpression = (input) => {
700
- const isClassName = input.name === CLASS_ATTRIBUTE;
705
+ const isClassName = CLASS_ATTRIBUTES.includes(input.name);
701
706
  if (!isClassName) return false;
702
707
  const { details } = input.keySpan;
703
708
  if (details === null) return true;
704
- return details === CLASS_ATTRIBUTE;
709
+ return details === input.name;
705
710
  };
706
711
  var expressionClasses = (input) => {
707
712
  const source = expressionSource(input.value);
@@ -726,7 +731,7 @@ var inputClasses = (input) => {
726
731
  var templateClasses = (node) => {
727
732
  const classes = [];
728
733
  for (const attribute of node.attributes) {
729
- const isClassName = attribute.name === CLASS_ATTRIBUTE;
734
+ const isClassName = CLASS_ATTRIBUTES.includes(attribute.name);
730
735
  if (isClassName) {
731
736
  const found = staticClasses(attribute);
732
737
  classes.push(...found);
@@ -7418,6 +7423,14 @@ var typescriptSafety = defineConfig18([
7418
7423
  // Class actions carry their payload as constructor parameter properties.
7419
7424
  "@typescript-eslint/parameter-properties": "off"
7420
7425
  }
7426
+ },
7427
+ {
7428
+ files: ["**/*.stub.ts"],
7429
+ rules: {
7430
+ // local/test-file-shape requires STUB: Type; a literal stub would trip
7431
+ // no-inferrable-types.
7432
+ "@typescript-eslint/no-inferrable-types": "off"
7433
+ }
7421
7434
  }
7422
7435
  ]);
7423
7436