diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml new file mode 100644 index 0000000..34336c0 --- /dev/null +++ b/.github/workflows/lint.yaml @@ -0,0 +1,49 @@ +name: Lint +on: + push: + branches: + - main + pull_request: + workflow_dispatch: +jobs: + markdown-lint: + runs-on: ubuntu-latest + steps: + - name: Set up Git repository + uses: actions/checkout@v4 + with: + show-progress: '' + - name: markdownlint-cli2-action + uses: DavidAnson/markdownlint-cli2-action@v9 + with: + globs: | + **/*.md + #node_modules + textlint: + runs-on: ubuntu-latest + continue-on-error: true + steps: + - name: Set up Git repository + uses: actions/checkout@v4 + with: + show-progress: '' + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 + - name: Install dependencies + run: npm install + - name: textlint + run: npm run textlint + vale-lint: + runs-on: ubuntu-latest + continue-on-error: true + steps: + - name: Set up Git repository + uses: actions/checkout@v4 + with: + show-progress: '' + - name: vale + uses: vale-cli/vale-action@v2 + with: + fail_on_error: false diff --git a/.textlintrc.json b/.textlintrc.json new file mode 100644 index 0000000..802decf --- /dev/null +++ b/.textlintrc.json @@ -0,0 +1,5 @@ +{ + "rules": { + "common-misspellings": true + } +} diff --git a/.vale.ini b/.vale.ini new file mode 100644 index 0000000..ce34bca --- /dev/null +++ b/.vale.ini @@ -0,0 +1,9 @@ +StylesPath = .github/styles +MinAlertLevel = suggestion + +Packages = write-good + +[*.md] +BasedOnStyles = write-good +# E-Prime (flagging every "is"/"are"/"be") is too strict for technical docs. +write-good.E-Prime = NO diff --git a/package.json b/package.json new file mode 100644 index 0000000..bd8d2dc --- /dev/null +++ b/package.json @@ -0,0 +1,11 @@ +{ + "name": "adr.github.io", + "private": true, + "devDependencies": { + "textlint": "^15.7.1", + "textlint-rule-common-misspellings": "^1.0.1" + }, + "scripts": { + "textlint": "textlint -f github \"**/*.md\"" + } +}