Basic tooling: link & spell chack, and formatting (#231)

Signed-off-by: Patrice Chalin <pchalin@gmail.com>
This commit is contained in:
Patrice Chalin 2024-05-14 15:51:08 -04:00 committed by GitHub
parent e44c02eb40
commit c96c55fdc7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 72 additions and 9 deletions

24
.cspell.yml Normal file
View File

@ -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
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
# npm assets
node_modules/
package-lock.json

10
.markdown-link-check.json Normal file
View File

@ -0,0 +1,10 @@
{
"ignorePatterns": [
{
"pattern": "^http://localhost"
}
],
"timeout": "3s",
"retryOn429": true,
"aliveStatusCodes": [200, 206]
}

6
.prettierignore Normal file
View File

@ -0,0 +1,6 @@
.github
# temporary
assessments
docs

9
.vscode/cspell.json vendored
View File

@ -1,9 +0,0 @@
// For settings, see https://www.streetsidesoftware.com/vscode-spell-checker/docs/configuration/
{
"version": "0.2",
"caseSensitive": true,
"words": [
"CNCF",
"Docsy"
]
}

29
package.json Normal file
View File

@ -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
}
}