Skip to content

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.

Terminal window
npm install @flint.fyi/plugin-spelling

See the CSpell spell checker documentation for more details on spell-checking code.

Rules that run CSpell to find likely spell-checking mistakes.

flint.config.ts
import {
const spelling: Plugin<RuleAbout, string | undefined, [Rule<{
readonly description: "Runs the CSpell spell checker on any source code file.";
readonly id: "cspell";
readonly presets: ["logical"];
} & {
presets?: "logical"[] | undefined;
url: string;
}, object, object, "issue" | "issueWithReplacement", AnyOptionalSchema>]>
spelling
} from "@flint.fyi/spelling";
import {
function defineConfig(definition: ConfigDefinition): Config

Defines a new linter configuration for a Flint config file.

@seehttps://flint.fyi/configuration flint.fyi/configuration

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.

@seehttps://flint.fyi/configuration flint.fyi/configuration

defineConfig
({
ConfigDefinition.use: ConfigUseDefinition[]

Specifies the files to be linted alongside the rules and settings to lint with.

@seehttps://flint.fyi/configuration#use flint.fyi/configuration#use

use
: [
{
ConfigUseDefinition.files: AnyLevelDeep<FilesValue>

A list of glob patterns describing which file(s) to lint.

@seehttps://flint.fyi/configuration#files flint.fyi/configuration#files

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.

@seehttps://flint.fyi/configuration#rules flint.fyi/configuration#rules

rules
:
const spelling: Plugin<RuleAbout, string | undefined, [Rule<{
readonly description: "Runs the CSpell spell checker on any source code file.";
readonly id: "cspell";
readonly presets: ["logical"];
} & {
presets?: "logical"[] | undefined;
url: string;
}, object, object, "issue" | "issueWithReplacement", AnyOptionalSchema>]>
spelling
.
Plugin<RuleAbout, string | undefined, [Rule<{ readonly description: "Runs the CSpell spell checker on any source code file."; readonly id: "cspell"; readonly presets: [...]; } & { ...; }, object, object, "issue" | "issueWithReplacement", AnyOptionalSchema>]>.presets: PluginPresets<RuleAbout, "logical">

Preset lists of rules to enable on files.

@seehttps://flint.fyi/glossary#preset flint.fyi/glossary#preset

presets
.
logical: Rule<RuleAbout, object, object, string, AnyOptionalSchema | undefined>[]
logical
,
},
],
});
Flint RulePreset
cspellRuns the CSpell spell checker on any source code file.logical
Made with ❤️‍🔥 around the world by the Flint team and contributors.