Skip to content

Test Vale CLI prose linter #324

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 17 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .vale.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Vale Configuration for SignalWire Documentation
# Enforces sentence case headers instead of title case

# Global settings
StylesPath = .vale/styles
MinAlertLevel = warning
Vocab = Base
VocabPath = .vale/styles/config/vocabularies

# File patterns to lint - focusing on Markdown files
[*.md]
# Base linting rules - only using Vale built-in and our custom styles
BasedOnStyles = Vale, SentenceCase

# Built-in Vale rules (tuned for technical documentation)
Vale.Spelling = NO # Too many false positives with technical terms
Vale.Repetition = YES

# Enable our custom sentence case rule
SentenceCase.SentenceCase = error

# Simple MDX support - treat as plain text with limited processing
[*.mdx]
BasedOnStyles = SentenceCase
SentenceCase.SentenceCase = error

# File patterns to ignore
[*.{yml,yaml,json,js,ts,tsx,jsx}]
BasedOnStyles = ""

[package*.json]
BasedOnStyles = ""
102 changes: 102 additions & 0 deletions .vale/styles/SentenceCase/SentenceCase.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
extends: capitalization
message: "Headers should use sentence case. Change '%s' to '%s'."
level: error
scope: heading

# Define the capitalization style for headers
# Only the first word and proper nouns should be capitalized
match: $sentence

# Exceptions for proper nouns, acronyms, and technical terms that should always be capitalized
exceptions:
- API
- SDK
- AI
- SWML
- SignalWire
- REST
- HTTP
- HTTPS
- URL
- JSON
- YAML
- XML
- WebSocket
- JavaScript
- TypeScript
- OAuth
- JWT
- UUID
- SQL
- NoSQL
- CSS
- HTML
- DOM
- CLI
- GUI
- UI
- UX
- FAQ
- README
- CHANGELOG
- LICENSE
- GitHub
- GitLab
- npm
- Node.js
- React
- Vue
- Angular
- Docker
- Kubernetes
- AWS
- GCP
- Azure
- TCP
- UDP
- IP
- DNS
- SSL
- TLS
- CORS
- CSRF
- XSS
- GDPR
- CCPA
- SIP
- RTP
- RTCP
- WebRTC
- VoIP
- SMS
- MMS
- E164
- SIM
- PSTN
- PBX
- IVR
- TTS
- ASR
- NLP
- ML
- LLM
- GPT
- BERT
- CNN
- RNN
- LSTM
- GRU
- PoC
- MVP
- SaaS
- PaaS
- IaaS
- DevOps
- CI/CD
- QA
- SWAIG
- DataMap
- Relay
- Call
- Fabric
- Compatibility
161 changes: 161 additions & 0 deletions .vale/styles/config/vocabularies/Base/accept.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
SignalWire
SWML
SWAIG
DataMap
Call Fabric
Compatibility API
Relay
WebRTC
VoIP
E164
SIP
RTP
RTCP
PSTN
PBX
IVR
ASR
TTS
SMS
MMS
AI
SDK
API
REST
HTTP
HTTPS
JSON
YAML
XML
URL
WebSocket
JavaScript
TypeScript
OAuth
JWT
UUID
SQL
NoSQL
CSS
HTML
DOM
CLI
GUI
UI
UX
FAQ
README
CHANGELOG
LICENSE
GitHub
GitLab
npm
Node.js
React
Vue
Angular
Docker
Kubernetes
AWS
GCP
Azure
TCP
UDP
IP
DNS
SSL
TLS
CORS
CSRF
XSS
GDPR
CCPA
NLP
ML
LLM
GPT
BERT
CNN
RNN
LSTM
GRU
PoC
MVP
SaaS
PaaS
IaaS
DevOps
CI/CD
QA
microservice
webhook
endpoint
middleware
namespace
localhost
frontend
backend
fullstack
config
env
localhost
subfolder
subdirectory
filename
pathname
hostname
username
timestamp
metadata
payload
boolean
async
await
callback
middleware
npm
yarn
webpack
babel
eslint
prettier
typescript
javascript
nodejs
reactjs
vuejs
angularjs
dockerfile
kubernetes
devops
github
gitlab
bitbucket
vscode
webstorm
intellij
postman
insomnia
swagger
openapi
graphql
grpc
mongodb
postgresql
mysql
redis
elasticsearch
kibana
grafana
prometheus
jenkins
travis
circleci
heroku
vercel
netlify
cloudflare
aws
gcp
azure
digitalocean
36 changes: 27 additions & 9 deletions config/navbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,19 @@ const navbar: NavbarItem[] = [
{
to: "/platform",
label: "Platform",
position: "left",
position: "right",
type: "dropdown",
items: [
{
label: "Call Fabric",
to: "/platform/call-fabric",
},
{
href: "https://signalwire.com/signin",
label: "SignalWire Space",
className: "dashboard-navbar-link",
"aria-label": "Open SignalWire Space",
},
{
label: "Dashboard",
to: "/platform/dashboard",
Expand All @@ -42,6 +48,26 @@ const navbar: NavbarItem[] = [
},
],
},
/// SWML Dropdown -------- ///
{
type: "dropdown",
label: "SWML",
position: "left",
items: [
{
label: "SWML Guides",
to: "/swml/guides",
},
{
label: "Method Reference",
to: "/swml/methods",
},
{
label: "Agents SDK",
to: "/agents-sdk",
},
],
},

/// Products Dropdown -------- ///
{
Expand Down Expand Up @@ -202,14 +228,6 @@ const navbar: NavbarItem[] = [
},
],
},

{
href: "https://signalwire.com/signin",
label: "Dashboard",
position: "right",
className: "dashboard-navbar-link",
"aria-label": "Dashboard",
},
{
href: 'https://github.com/signalwire/docs',
position: 'right',
Expand Down
9 changes: 9 additions & 0 deletions config/sidebarsConfig/agents-sdk-sidebar.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import type { SidebarsConfig } from "@docusaurus/plugin-content-docs";

const agentsSdkSidebar: SidebarsConfig = {
agentsSdkSidebar: [
{ type: "autogenerated", dirName: "swml/agents-sdk" }
],
};

export default agentsSdkSidebar;
2 changes: 2 additions & 0 deletions config/sidebarsConfig/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import apiSidebar from './rest-api-sidebar';
import swmlTechRefSidebar from './swml-sidebar';
import compatibilityAPI from './compatibility-api-sidebar';
import cantinaSidebar from './cantina-sidebar';
import agentsSdkSidebar from './agents-sdk-sidebar';

const sidebars: SidebarsConfig = {
...homeSidebar,
Expand All @@ -32,6 +33,7 @@ const sidebars: SidebarsConfig = {
...swmlTechRefSidebar,
...compatibilityAPI,
...cantinaSidebar,
...agentsSdkSidebar,
};

export default sidebars;
4 changes: 4 additions & 0 deletions docs/swml/agents-sdk/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "AI Agents SDK",
"position": 6
}
Loading