LINTS

tcmts.cli.semver_checks.LINTS · #e7s77yji · term · runs anywhere

Every lint, by id.

import type { Lint } from "#codebase/tcmts/cli/semver_checks";

export const LINTS = {
  definition_removed: { level: "major", summary: "removed", why: "code that uses it no longer compiles" },
  definition_renamed: { level: "major", summary: "renamed", why: "code that imports it by its old name no longer compiles" },
  export_moved: { level: "major", summary: "is exported from a different subpath", why: "imports of it from the old one no longer compile" },
  bin_removed: { level: "major", summary: "command removed", why: "scripts that run it fail" },
  bin_added: { level: "minor", summary: "command added", why: "new API" },
  kind_changed: { level: "major", summary: "is now a type rather than a value, or the other way around", why: "code that uses it the old way no longer compiles" },
  function_became_value: { level: "major", summary: "can't be called any more", why: "calls to it no longer compile" },
  function_required_parameter_added: { level: "major", summary: "takes a required parameter it didn't", why: "calls written for the old version are missing an argument" },
  function_parameter_removed: { level: "major", summary: "takes fewer parameters", why: "calls that pass the removed argument no longer compile" },
  function_parameter_made_required: { level: "major", summary: "requires a parameter that was optional", why: "calls that leave it out no longer compile" },
  function_parameter_type_narrowed: { level: "major", summary: "accepts less for a parameter", why: "arguments the old version accepted may not be accepted" },
  function_return_type_widened: { level: "major", summary: "can return more kinds of value", why: "callers may get a value they don't handle" },
  function_type_parameter_count_changed: { level: "major", summary: "has a different number of type parameters", why: "explicit type arguments no longer match" },
  function_signature_incompatible: { level: "major", summary: "has a signature old calls don't fit", why: "some calls written for the old version no longer compile" },
  constructor_incompatible: { level: "major", summary: "is constructed differently", why: "`new` written for the old version no longer compiles" },
  value_type_widened: { level: "major", summary: "can hold more kinds of value", why: "code reading it may get a value it doesn't handle" },
  type_property_removed: { level: "major", summary: "lost a property", why: "code reading the property no longer compiles" },
  type_required_property_added: { level: "major", summary: "has a new required property", why: "values written for the old type lack it" },
  type_property_made_optional: { level: "major", summary: "has a property that may now be missing", why: "code reading it may get undefined" },
  type_property_made_required: { level: "major", summary: "requires a property that was optional", why: "values written for the old type may lack it" },
  type_property_made_readonly: { level: "major", summary: "has a property that's now readonly", why: "code assigning to it no longer compiles" },
  type_property_type_changed: { level: "major", summary: "has a property of a different type", why: "code reading or writing the property may no longer compile" },
  type_union_member_added: { level: "major", summary: "has a new case", why: "code handling every case no longer does" },
  type_union_member_removed: { level: "major", summary: "lost a case", why: "values of the removed case no longer fit" },
  type_type_parameter_count_changed: { level: "major", summary: "has a different number of type parameters", why: "uses with type arguments no longer match" },
  type_changed: { level: "major", summary: "changed", why: "code using it may no longer compile" },

  definition_added: { level: "minor", summary: "added", why: "new API" },
  function_optional_parameter_added: { level: "minor", summary: "takes a new optional parameter", why: "old calls still work" },
  function_parameter_made_optional: { level: "minor", summary: "no longer requires a parameter", why: "old calls still work" },
  function_parameter_type_widened: { level: "minor", summary: "accepts more for a parameter", why: "old calls still work" },
  function_return_type_narrowed: { level: "minor", summary: "returns a narrower type", why: "what old callers expect still fits" },
  function_signature_extended: { level: "minor", summary: "accepts more (a new overload, say)", why: "old calls still work" },
  value_type_narrowed: { level: "minor", summary: "holds a narrower type", why: "what old readers expect still fits" },
  type_optional_property_added: { level: "minor", summary: "has a new optional property", why: "old values still fit" },
  type_property_made_writable: { level: "minor", summary: "has a property that's no longer readonly", why: "old uses still work" },

  implementation_changed: { level: "patch", summary: "changed, with the same API", why: "uses still compile; behaviour may differ" },
} satisfies Record<string, Lint>

uses

used by