-
Notifications
You must be signed in to change notification settings - Fork 0
/
cspell.config.ts
75 lines (69 loc) · 2.78 KB
/
cspell.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/**
* @file cspell.config.ts
* @description Configuration file for cSpell, a spelling checker for code, comments, and more.
*
* This file defines cSpell settings to configure how it scans and checks spelling
* within the project, including the language, paths to ignore, and additional advanced options.
*
* @see https://cspell.org/configuration
* @see https://www.npmjs.com/package/cspell
*
* @type {import("cspell").CSpellUserSettings}
*/
import { noCase } from "change-case";
import { type AdvancedCSpellSettings } from "@cspell/cspell-types";
import { type PackageManifest } from "@pnpm/types";
import { readPackageJson } from "@pnpm/read-package-json";
// Load the `package.json` file to access metadata dynamically.
const packageJson: PackageManifest = await readPackageJson("package.json");
// Log the package name in kebab-case using `noCase` from the `change-case` library.
console.log(noCase(packageJson.name, { delimiter: "-" }));
/**
* cSpell settings object.
*
* - Defines the version of the settings schema.
* - Sets the default language to English (US).
* - Includes paths and file patterns to ignore during spell checking.
*/
const settings: AdvancedCSpellSettings = {
version: "0.2", // Version of the cSpell configuration schema.
language: "en-US", // Default language for spell checking.
useGitignore: true, // Enable ignoring paths defined in `.gitignore`.
/**
* List of file paths and patterns to ignore during spell checking.
*
* Includes commonly ignored directories, lock files, build outputs, and
* various types of binary and image files.
*/
ignorePaths: [
"**/.gitignore", // Gitignore files
"**/pnpm-lock.yaml", // Lock files
"**/package.json", // `package.json` files
"**/package-lock.json", // `package-lock.json` files
"**/node_modules", // Node.js modules
"**/dist", // Distribution directories
"**/build", // Build directories
"**/coverage", // Coverage reports
"**/public", // Public assets
"**/venv", // Virtual environments
"**/virtualenv", // Alternative virtual environment folder
"**/.venv", // Common hidden virtual environment folder
"**/temp", // Temporary files and directories
"**/tmp", // Alternative temporary directory
"**/out", // Output directories
"**/output", // Alternative output directory
"**/bin", // Binary files
"**/.git", // Git metadata
"**/.vscode", // VSCode settings
"**/.idea", // IntelliJ IDEA settings
"**/*.drawio", // Diagrams
"**/*.svg", // Scalable vector graphics
"**/*.png", // PNG images
"**/*.jpg", // JPEG images
"**/*.jpeg", // Alternative JPEG format
"**/*.otf", // Font files
"**/.vitepress/cache", // VitePress cache
"**/.vitepress/dist", // VitePress distribution folder
],
};
export default settings;