Choose and apply a style guide
Pick the right EkLine style guide for your content and apply it consistently across the CLI, CI pipelines, and VS Code.
A style guide tells EkLine which writing standard to enforce. EkLine ships with three built-in style guides and supports a custom standard built from your own rules. This guide helps you choose the right one and apply it consistently everywhere your team reviews documentation.
Before you start
Section titled “Before you start”You need:
- An EkLine account and integration token. Get yours from the EkLine Dashboard.
- One review surface set up: the CLI, a CI integration, or the VS Code extension.
Step 1: Choose a style guide
Section titled “Step 1: Choose a style guide”EkLine enforces one style guide at a time. Pick the one that matches the content you write most often.
| Style guide | Value | Best for |
|---|---|---|
google | Developer documentation, API guides, READMEs, and tutorials. Concise and task-focused. | |
| Microsoft | microsoft | Product documentation, UI-heavy guides, and enterprise content. Warm and professional. |
| Marketing | marketing | Landing pages, blog posts, and release announcements. Brand-voice and promotional copy. |
| Custom | — | A standard built from your own rules and terminology. Available in VS Code and through your account’s custom rules. |
To see the individual rules each style guide enforces, browse the rules reference.
Step 2: Apply it in the config file
Section titled “Step 2: Apply it in the config file”For the CLI and any pipeline that runs the CLI, set the style guide once in ekline.config.json. Every team member and every pipeline that uses the file then enforces the same standard.
Add the styleGuide field to ekline.config.json in your project root:
{ "contentDirectory": ["docs"], "styleGuide": "google"}Run a review to apply it:
ekline-cli --ek-token YOUR_TOKENEkLine discovers ekline.config.json by searching from the current directory up the directory tree, so a single file at your repository root applies to the whole project.
Override for a single run
Section titled “Override for a single run”CLI arguments take precedence over the config file. Use the --style-guide flag to try a different standard without changing the shared config:
# Uses ekline.config.json, but enforces Microsoft style for this run onlyekline-cli --ek-token YOUR_TOKEN --style-guide microsoftStep 3: Apply it in VS Code
Section titled “Step 3: Apply it in VS Code”The VS Code extension has its own Style Guide setting so writers get the same standard while they work.
-
Open Settings > Extensions > EkLine, or edit
.vscode/settings.jsondirectly. -
Set the Style Guide to match your config file:
.vscode/settings.json {"ekline-vscode.StyleGuide": "Google"} -
Save. EkLine reviews the active file against the selected style guide.
Verify your style guide is active
Section titled “Verify your style guide is active”Run a review against a file that breaks a rule and confirm the rule ID appears.
ekline-cli --ek-token YOUR_TOKEN --content-directory ./docsFlagged issues include a rule ID in brackets, for example:
[EK00005] Where possible, don't structure sentences in future tense. Use present tense instead.Open a Markdown file and run EkLine: Review current document from the Command Palette (Cmd/Ctrl + Shift + P). Suggestions appear in the EkLine Suggestions panel.
If the rules that fire match the style guide you chose, the setting is active.
Troubleshooting
Section titled “Troubleshooting”The CLI ignores my style guide
Section titled “The CLI ignores my style guide”Confirm ekline.config.json is valid JSON and sits in the current directory or a parent directory. A --style-guide flag on the command line overrides the file, so check for a flag in your scripts or pipeline.
VS Code and the CLI flag different issues
Section titled “VS Code and the CLI flag different issues”VS Code reads its Style Guide setting, not ekline.config.json. Set the same value in both places so local editing and CI enforce one standard.
I want a standard the built-in guides don’t cover
Section titled “I want a standard the built-in guides don’t cover”Build a custom standard from your own rules and terminology. See the rules reference, then select Custom in VS Code or contact support@ekline.io.
Next steps
Section titled “Next steps”- Add words to your dictionary — stop the spell-check rule flagging your product names and jargon.
- Ignoring rules — handle false positives from your style guide.
- Framework support — check prose inside MDX components.
- CLI reference — all configuration options and flags.