Skip to content

Commit

Permalink
Basic tooling: link & spell chack, and formatting
Browse files Browse the repository at this point in the history
Signed-off-by: Patrice Chalin <[email protected]>
  • Loading branch information
chalin committed May 14, 2024
1 parent 0f50086 commit a8c473c
Show file tree
Hide file tree
Showing 6 changed files with 72 additions and 9 deletions.
24 changes: 24 additions & 0 deletions .cspell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# cSpell:ignore textlintrc
# For settings, see
# https://www.streetsidesoftware.com/vscode-spell-checker/docs/configuration/
version: '0.2'
caseSensitive: true
# ignorePaths:
# - '*.svg'
# patterns:
# - name: CodeBlock
# pattern: |
# /
# ^(\s*[~`]{3,}) # code-block start
# .* # all languages and options, e.g. shell {hl_lines=[12]}
# [\s\S]*? # content
# \1 # code-block end
# /igmx # cspell:disable-line
# languageSettings:
# - languageId: markdown
# ignoreRegExpList:
# - CodeBlock
words:
- CNCF
- Docsy
- techdocs
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# npm assets
node_modules/
package-lock.json
10 changes: 10 additions & 0 deletions .markdown-link-check.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"ignorePatterns": [
{
"pattern": "^http://localhost"
}
],
"timeout": "3s",
"retryOn429": true,
"aliveStatusCodes": [200, 206]
}
6 changes: 6 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.github

# temporary

assessments
docs
9 changes: 0 additions & 9 deletions .vscode/cspell.json

This file was deleted.

29 changes: 29 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "techdocs",
"version": "0.0.0",
"description": "Resources provided by the CNCF Technical Documentation team.",
"scripts": {
"_check:format:any": "npx prettier --check --ignore-path ''",
"_check:format": "npx prettier --check .",
"check:format": "npm run _check:format || (echo '[help] Run: npm run fix:format'; exit 1)",
"check:links": "npx markdown-link-check --config .markdown-link-check.json *.md",
"check:spelling": "npx cspell --no-progress -c .cspell.yml .",
"check": "npm run seq -- $(npm run -s _list:check:*)",
"fix:format": "npm run _check:format -- --write",
"fix": "npm run seq -- $(npm -s run _list:fix:*)",
"seq": "bash -c 'for cmd in \"$@\"; do npm run $cmd || exit 1; done' - ",
"test": "npm run check"
},
"author": "CNCF",
"license": "CC-BY-4.0",
"devDependencies": {
"cspell": "^8.8.1",
"markdown-link-check": "^3.12.1",
"prettier": "^3.2.5"
},
"private": true,
"prettier": {
"proseWrap": "always",
"singleQuote": true
}
}

0 comments on commit a8c473c

Please sign in to comment.