Spelling Plugin
Rules that detect misspelling typos in source files using the code-optimized "CSpell" spell-checker.
This plugin is provided in a standalone @flint.fyi/plugin-spelling npm package.
npm install @flint.fyi/plugin-spellingbun install @flint.fyi/plugin-spellingdeno install @flint.fyi/plugin-spellingpnpm install @flint.fyi/plugin-spellingyarn install @flint.fyi/plugin-spellingSee the CSpell spell checker documentation for more details on spell-checking code.
Presets
Section titled “Presets”logical
Section titled “logical”Rules that run CSpell to find likely spell-checking mistakes.
import { const spelling: Plugin<RuleAbout<string>, string | undefined, [Rule<{ readonly description: "Runs the CSpell spell checker on any source code file."; readonly id: "cspell"; readonly presets: readonly ["logical"];} & { readonly pluginId: string; readonly url: string;}, "issue" | "issueWithReplacement", undefined>]>
spelling } from "@flint.fyi/spelling";import { function defineConfig(definition: ConfigDefinition): Config
Defines a new linter configuration for a Flint config file.
defineConfig, const globs: { all: FilesComputer;}
globs } 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 globs: { all: FilesComputer;}
globs.all: FilesComputer
Selects all files included (and not excluded) by past config definitions.
all, ConfigUseDefinition.rules: AnyLevelDeep<ConfigRuleDefinition>
Any number of rules and/or presets of rules to enable for those files.
rules: const spelling: Plugin<RuleAbout<string>, string | undefined, [Rule<{ readonly description: "Runs the CSpell spell checker on any source code file."; readonly id: "cspell"; readonly presets: readonly ["logical"];} & { readonly pluginId: string; readonly url: string;}, "issue" | "issueWithReplacement", undefined>]>
spelling.Plugin<RuleAbout<string>, string | undefined, [Rule<{ readonly description: "Runs the CSpell spell checker on any source code file."; readonly id: "cspell"; readonly presets: readonly [...]; } & { ...; }, "issue" | "issueWithReplacement", undefined>]>.presets: PluginPresets<[Rule<{ readonly description: "Runs the CSpell spell checker on any source code file."; readonly id: "cspell"; readonly presets: readonly ["logical"];} & { readonly pluginId: string; readonly url: string;}, "issue" | "issueWithReplacement", undefined>]>
Preset lists of rules to enable on files.
presets.logical: Rule<{ readonly description: "Runs the CSpell spell checker on any source code file."; readonly id: "cspell"; readonly presets: readonly ["logical"];} & { readonly pluginId: string; readonly url: string;}, "issue" | "issueWithReplacement", undefined>[]
logical, }, ],});