Changesets Plugin
Rules for Changesets, a tool for managing versioning and changelogs with a focus on multi-package repositories.
This plugin is provided in a standalone @flint.fyi/plugin-changesets npm package.
See the Changesets documentation for more details on how changesets are created and released.
Presets
Section titled “Presets”Flint’s Changesets plugin provides the following presets:
| Preset | Recommended | Description |
|---|---|---|
logical | ✅ Always | Rules that ensure changeset summaries describe changes for package users. |
stylistic | ✅ Always | Rules that enforce consistent formatting of changeset summaries. |
import { const changesets: Plugin<RuleAbout<string>, "all", [Rule<PluginRuleAbout<string> & { readonly description: "Reports changeset summaries that don't start with the configured letter case."; readonly id: "summaryCasing"; readonly presets: readonly ["stylistic"];}, "lowercaseStart" | "uppercaseStart", { casing: ZodDefault<ZodEnum<{ lowercase: "lowercase"; uppercase: "uppercase"; }>>; types: ZodDefault<ZodArray<ZodString>>;}>, Rule<PluginRuleAbout<string> & { ...;}, "missingPunctuation" | "unnecessaryPunctuation", { ...;}>, Rule<...>]>
changesets } from "@flint.fyi/changesets";import { function defineConfig(definition: ConfigDefinition): Config
Defines a new linter configuration for a Flint config file.
defineConfig } from "flint";
export default function defineConfig(definition: ConfigDefinition): Config
Defines a new linter configuration for a Flint config file.
defineConfig({ ConfigDefinition.use: ConfigUseDefinition[]
Specifies the files to be linted alongside the rules and settings to lint with.
use: [ { ConfigUseDefinition.files: AnyLevelDeep<FilesValue>
A list of glob patterns describing which file(s) to lint.
files: const changesets: Plugin<RuleAbout<string>, "all", [Rule<PluginRuleAbout<string> & { readonly description: "Reports changeset summaries that don't start with the configured letter case."; readonly id: "summaryCasing"; readonly presets: readonly ["stylistic"];}, "lowercaseStart" | "uppercaseStart", { casing: ZodDefault<ZodEnum<{ lowercase: "lowercase"; uppercase: "uppercase"; }>>; types: ZodDefault<ZodArray<ZodString>>;}>, Rule<PluginRuleAbout<string> & { ...;}, "missingPunctuation" | "unnecessaryPunctuation", { ...;}>, Rule<...>]>
changesets.Plugin<RuleAbout<string>, "all", [Rule<PluginRuleAbout<string> & { readonly description: "Reports changeset summaries that don't start with the configured letter case."; readonly id: "summaryCasing"; readonly presets: readonly [...]; }, "lowercaseStart" | "uppercaseStart", { ...; }>, Rule<...>, Rule<...>]>.files: Record<"all", FilesValue>
Selectors of files this plugin suggests applying its rules to.
files.all: FilesValue
all, ConfigUseDefinition.rules: AnyLevelDeep<ConfigRuleDefinition>
Any number of rules and/or presets of rules to enable for those files.
rules: [const changesets: Plugin<RuleAbout<string>, "all", [Rule<PluginRuleAbout<string> & { readonly description: "Reports changeset summaries that don't start with the configured letter case."; readonly id: "summaryCasing"; readonly presets: readonly ["stylistic"];}, "lowercaseStart" | "uppercaseStart", { casing: ZodDefault<ZodEnum<{ lowercase: "lowercase"; uppercase: "uppercase"; }>>; types: ZodDefault<ZodArray<ZodString>>;}>, Rule<PluginRuleAbout<string> & { ...;}, "missingPunctuation" | "unnecessaryPunctuation", { ...;}>, Rule<...>]>
changesets.Plugin<RuleAbout<string>, "all", [Rule<PluginRuleAbout<string> & { readonly description: "Reports changeset summaries that don't start with the configured letter case."; readonly id: "summaryCasing"; readonly presets: readonly [...]; }, "lowercaseStart" | "uppercaseStart", { ...; }>, Rule<...>, Rule<...>]>.presets: PluginPresets<[Rule<PluginRuleAbout<string> & { readonly description: "Reports changeset summaries that don't start with the configured letter case."; readonly id: "summaryCasing"; readonly presets: readonly ["stylistic"];}, "lowercaseStart" | "uppercaseStart", { casing: ZodDefault<ZodEnum<{ lowercase: "lowercase"; uppercase: "uppercase"; }>>; types: ZodDefault<ZodArray<ZodString>>;}>, Rule<PluginRuleAbout<string> & { ...;}, "missingPunctuation" | "unnecessaryPunctuation", { ...;}>, Rule<...>]>
Preset lists of rules to enable on files.
presets.logical: (Rule<PluginRuleAbout<string> & { readonly description: "Reports changeset summaries that don't start with the configured letter case."; readonly id: "summaryCasing"; readonly presets: readonly ["stylistic"];}, "lowercaseStart" | "uppercaseStart", { casing: ZodDefault<ZodEnum<{ lowercase: "lowercase"; uppercase: "uppercase"; }>>; types: ZodDefault<ZodArray<ZodString>>;}> | Rule<PluginRuleAbout<string> & { ...;}, "missingPunctuation" | "unnecessaryPunctuation", { ...;}> | Rule<...>)[]
logical, const changesets: Plugin<RuleAbout<string>, "all", [Rule<PluginRuleAbout<string> & { readonly description: "Reports changeset summaries that don't start with the configured letter case."; readonly id: "summaryCasing"; readonly presets: readonly ["stylistic"];}, "lowercaseStart" | "uppercaseStart", { casing: ZodDefault<ZodEnum<{ lowercase: "lowercase"; uppercase: "uppercase"; }>>; types: ZodDefault<ZodArray<ZodString>>;}>, Rule<PluginRuleAbout<string> & { ...;}, "missingPunctuation" | "unnecessaryPunctuation", { ...;}>, Rule<...>]>
changesets.Plugin<RuleAbout<string>, "all", [Rule<PluginRuleAbout<string> & { readonly description: "Reports changeset summaries that don't start with the configured letter case."; readonly id: "summaryCasing"; readonly presets: readonly [...]; }, "lowercaseStart" | "uppercaseStart", { ...; }>, Rule<...>, Rule<...>]>.presets: PluginPresets<[Rule<PluginRuleAbout<string> & { readonly description: "Reports changeset summaries that don't start with the configured letter case."; readonly id: "summaryCasing"; readonly presets: readonly ["stylistic"];}, "lowercaseStart" | "uppercaseStart", { casing: ZodDefault<ZodEnum<{ lowercase: "lowercase"; uppercase: "uppercase"; }>>; types: ZodDefault<ZodArray<ZodString>>;}>, Rule<PluginRuleAbout<string> & { ...;}, "missingPunctuation" | "unnecessaryPunctuation", { ...;}>, Rule<...>]>
Preset lists of rules to enable on files.
presets.stylistic: (Rule<PluginRuleAbout<string> & { readonly description: "Reports changeset summaries that don't start with the configured letter case."; readonly id: "summaryCasing"; readonly presets: readonly ["stylistic"];}, "lowercaseStart" | "uppercaseStart", { casing: ZodDefault<ZodEnum<{ lowercase: "lowercase"; uppercase: "uppercase"; }>>; types: ZodDefault<ZodArray<ZodString>>;}> | Rule<PluginRuleAbout<string> & { ...;}, "missingPunctuation" | "unnecessaryPunctuation", { ...;}> | Rule<...>)[]
stylistic], }, ],});logical
Section titled “logical”Rules that ensure changeset summaries describe changes for the users of released packages.
import { const changesets: Plugin<RuleAbout<string>, "all", [Rule<PluginRuleAbout<string> & { readonly description: "Reports changeset summaries that don't start with the configured letter case."; readonly id: "summaryCasing"; readonly presets: readonly ["stylistic"];}, "lowercaseStart" | "uppercaseStart", { casing: ZodDefault<ZodEnum<{ lowercase: "lowercase"; uppercase: "uppercase"; }>>; types: ZodDefault<ZodArray<ZodString>>;}>, Rule<PluginRuleAbout<string> & { ...;}, "missingPunctuation" | "unnecessaryPunctuation", { ...;}>, Rule<...>]>
changesets } from "@flint.fyi/changesets";import { function defineConfig(definition: ConfigDefinition): Config
Defines a new linter configuration for a Flint config file.
defineConfig } from "flint";
export default function defineConfig(definition: ConfigDefinition): Config
Defines a new linter configuration for a Flint config file.
defineConfig({ ConfigDefinition.use: ConfigUseDefinition[]
Specifies the files to be linted alongside the rules and settings to lint with.
use: [ { ConfigUseDefinition.files: AnyLevelDeep<FilesValue>
A list of glob patterns describing which file(s) to lint.
files: const changesets: Plugin<RuleAbout<string>, "all", [Rule<PluginRuleAbout<string> & { readonly description: "Reports changeset summaries that don't start with the configured letter case."; readonly id: "summaryCasing"; readonly presets: readonly ["stylistic"];}, "lowercaseStart" | "uppercaseStart", { casing: ZodDefault<ZodEnum<{ lowercase: "lowercase"; uppercase: "uppercase"; }>>; types: ZodDefault<ZodArray<ZodString>>;}>, Rule<PluginRuleAbout<string> & { ...;}, "missingPunctuation" | "unnecessaryPunctuation", { ...;}>, Rule<...>]>
changesets.Plugin<RuleAbout<string>, "all", [Rule<PluginRuleAbout<string> & { readonly description: "Reports changeset summaries that don't start with the configured letter case."; readonly id: "summaryCasing"; readonly presets: readonly [...]; }, "lowercaseStart" | "uppercaseStart", { ...; }>, Rule<...>, Rule<...>]>.files: Record<"all", FilesValue>
Selectors of files this plugin suggests applying its rules to.
files.all: FilesValue
all, ConfigUseDefinition.rules: AnyLevelDeep<ConfigRuleDefinition>
Any number of rules and/or presets of rules to enable for those files.
rules: const changesets: Plugin<RuleAbout<string>, "all", [Rule<PluginRuleAbout<string> & { readonly description: "Reports changeset summaries that don't start with the configured letter case."; readonly id: "summaryCasing"; readonly presets: readonly ["stylistic"];}, "lowercaseStart" | "uppercaseStart", { casing: ZodDefault<ZodEnum<{ lowercase: "lowercase"; uppercase: "uppercase"; }>>; types: ZodDefault<ZodArray<ZodString>>;}>, Rule<PluginRuleAbout<string> & { ...;}, "missingPunctuation" | "unnecessaryPunctuation", { ...;}>, Rule<...>]>
changesets.Plugin<RuleAbout<string>, "all", [Rule<PluginRuleAbout<string> & { readonly description: "Reports changeset summaries that don't start with the configured letter case."; readonly id: "summaryCasing"; readonly presets: readonly [...]; }, "lowercaseStart" | "uppercaseStart", { ...; }>, Rule<...>, Rule<...>]>.presets: PluginPresets<[Rule<PluginRuleAbout<string> & { readonly description: "Reports changeset summaries that don't start with the configured letter case."; readonly id: "summaryCasing"; readonly presets: readonly ["stylistic"];}, "lowercaseStart" | "uppercaseStart", { casing: ZodDefault<ZodEnum<{ lowercase: "lowercase"; uppercase: "uppercase"; }>>; types: ZodDefault<ZodArray<ZodString>>;}>, Rule<PluginRuleAbout<string> & { ...;}, "missingPunctuation" | "unnecessaryPunctuation", { ...;}>, Rule<...>]>
Preset lists of rules to enable on files.
presets.logical: (Rule<PluginRuleAbout<string> & { readonly description: "Reports changeset summaries that don't start with the configured letter case."; readonly id: "summaryCasing"; readonly presets: readonly ["stylistic"];}, "lowercaseStart" | "uppercaseStart", { casing: ZodDefault<ZodEnum<{ lowercase: "lowercase"; uppercase: "uppercase"; }>>; types: ZodDefault<ZodArray<ZodString>>;}> | Rule<PluginRuleAbout<string> & { ...;}, "missingPunctuation" | "unnecessaryPunctuation", { ...;}> | Rule<...>)[]
logical, }, ],});stylistic
Section titled “stylistic”Rules that enforce consistent letter casing and punctuation in changeset summaries.
import { const changesets: Plugin<RuleAbout<string>, "all", [Rule<PluginRuleAbout<string> & { readonly description: "Reports changeset summaries that don't start with the configured letter case."; readonly id: "summaryCasing"; readonly presets: readonly ["stylistic"];}, "lowercaseStart" | "uppercaseStart", { casing: ZodDefault<ZodEnum<{ lowercase: "lowercase"; uppercase: "uppercase"; }>>; types: ZodDefault<ZodArray<ZodString>>;}>, Rule<PluginRuleAbout<string> & { ...;}, "missingPunctuation" | "unnecessaryPunctuation", { ...;}>, Rule<...>]>
changesets } from "@flint.fyi/changesets";import { function defineConfig(definition: ConfigDefinition): Config
Defines a new linter configuration for a Flint config file.
defineConfig } from "flint";
export default function defineConfig(definition: ConfigDefinition): Config
Defines a new linter configuration for a Flint config file.
defineConfig({ ConfigDefinition.use: ConfigUseDefinition[]
Specifies the files to be linted alongside the rules and settings to lint with.
use: [ { ConfigUseDefinition.files: AnyLevelDeep<FilesValue>
A list of glob patterns describing which file(s) to lint.
files: const changesets: Plugin<RuleAbout<string>, "all", [Rule<PluginRuleAbout<string> & { readonly description: "Reports changeset summaries that don't start with the configured letter case."; readonly id: "summaryCasing"; readonly presets: readonly ["stylistic"];}, "lowercaseStart" | "uppercaseStart", { casing: ZodDefault<ZodEnum<{ lowercase: "lowercase"; uppercase: "uppercase"; }>>; types: ZodDefault<ZodArray<ZodString>>;}>, Rule<PluginRuleAbout<string> & { ...;}, "missingPunctuation" | "unnecessaryPunctuation", { ...;}>, Rule<...>]>
changesets.Plugin<RuleAbout<string>, "all", [Rule<PluginRuleAbout<string> & { readonly description: "Reports changeset summaries that don't start with the configured letter case."; readonly id: "summaryCasing"; readonly presets: readonly [...]; }, "lowercaseStart" | "uppercaseStart", { ...; }>, Rule<...>, Rule<...>]>.files: Record<"all", FilesValue>
Selectors of files this plugin suggests applying its rules to.
files.all: FilesValue
all, ConfigUseDefinition.rules: AnyLevelDeep<ConfigRuleDefinition>
Any number of rules and/or presets of rules to enable for those files.
rules: const changesets: Plugin<RuleAbout<string>, "all", [Rule<PluginRuleAbout<string> & { readonly description: "Reports changeset summaries that don't start with the configured letter case."; readonly id: "summaryCasing"; readonly presets: readonly ["stylistic"];}, "lowercaseStart" | "uppercaseStart", { casing: ZodDefault<ZodEnum<{ lowercase: "lowercase"; uppercase: "uppercase"; }>>; types: ZodDefault<ZodArray<ZodString>>;}>, Rule<PluginRuleAbout<string> & { ...;}, "missingPunctuation" | "unnecessaryPunctuation", { ...;}>, Rule<...>]>
changesets.Plugin<RuleAbout<string>, "all", [Rule<PluginRuleAbout<string> & { readonly description: "Reports changeset summaries that don't start with the configured letter case."; readonly id: "summaryCasing"; readonly presets: readonly [...]; }, "lowercaseStart" | "uppercaseStart", { ...; }>, Rule<...>, Rule<...>]>.presets: PluginPresets<[Rule<PluginRuleAbout<string> & { readonly description: "Reports changeset summaries that don't start with the configured letter case."; readonly id: "summaryCasing"; readonly presets: readonly ["stylistic"];}, "lowercaseStart" | "uppercaseStart", { casing: ZodDefault<ZodEnum<{ lowercase: "lowercase"; uppercase: "uppercase"; }>>; types: ZodDefault<ZodArray<ZodString>>;}>, Rule<PluginRuleAbout<string> & { ...;}, "missingPunctuation" | "unnecessaryPunctuation", { ...;}>, Rule<...>]>
Preset lists of rules to enable on files.
presets.stylistic: (Rule<PluginRuleAbout<string> & { readonly description: "Reports changeset summaries that don't start with the configured letter case."; readonly id: "summaryCasing"; readonly presets: readonly ["stylistic"];}, "lowercaseStart" | "uppercaseStart", { casing: ZodDefault<ZodEnum<{ lowercase: "lowercase"; uppercase: "uppercase"; }>>; types: ZodDefault<ZodArray<ZodString>>;}> | Rule<PluginRuleAbout<string> & { ...;}, "missingPunctuation" | "unnecessaryPunctuation", { ...;}> | Rule<...>)[]
stylistic, }, ],});| Flint Rule | Preset |
|---|---|
summaryReadabilityReports changeset summaries that are missing or start with a conventional commit prefix. | logical |
summaryCasingReports changeset summaries that don't start with the configured letter case. | stylistic |
summaryPunctuationReports changeset summaries that don't match the configured ending punctuation. | stylistic |
