Skip to content
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

Feature/replace proselint with vale #4195

Merged
merged 11 commits into from
Nov 24, 2020
Merged
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
3 changes: 0 additions & 3 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ See the `package.json` for the full list of `scripts`.

> Note that __Node 6.9.x__ or above is required for the build process to run properly.

> Note that a __Python version between v2.5.0 and 3.0.0__ is required for the [proselint][12] dependency.

> Although __Yarn__ is not required to work with webpack docs, the core team is using it more extensively. If you prefer to use Yarn make sure that you [get it installed][13] and run `yarn` to pull all dependencies, `yarn build` to build the project, or `yarn start` to start the development server.

> On Debian and Ubuntu operating systems you may have to use `node >= 7.0.0` to avoid build errors with `node-sass`. Please note that we don't officially support building on these systems.
Expand Down Expand Up @@ -129,5 +127,4 @@ any time spent fixing typos or clarifying sections in the documentation.
[9]: https://help.github.com/articles/proposing-changes-to-your-work-with-pull-requests/
[10]: http://conventionalcommits.org/
[11]: https://github.com/conventional-changelog/standard-version
[12]: https://github.com/amperser/proselint
[13]: https://yarnpkg.com/lang/en/docs/install
23 changes: 5 additions & 18 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,29 +44,16 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.6]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
- name: Vale
uses: errata-ai/vale-action@v1.3.0
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt

- run: cp .proselintrc ~/
- run: proselint src/content
files: src/content
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

lintLinks:
name: Check Links
Expand Down
84 changes: 0 additions & 84 deletions .proselintrc

This file was deleted.

14 changes: 14 additions & 0 deletions .vale.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Vale configuration file.
#
# For more information, see https://errata-ai.gitbook.io/vale/getting-started/configuratio


StylesPath = .vale
MinAlertLevel = warning

[*.{md,mdx}]
BasedOnStyles = proselint

proselint.But = NO
proselint.Typography = NO
proselint.Annotations = NO
8 changes: 8 additions & 0 deletions .vale/proselint/Airlinese.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
extends: existence
message: "'%s' is airlinese."
ignorecase: true
level: error
tokens:
- enplan(?:e|ed|ing|ement)
- deplan(?:e|ed|ing|ement)
- taking off momentarily
48 changes: 48 additions & 0 deletions .vale/proselint/AnimalLabels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
extends: substitution
message: "Consider using '%s' instead of '%s'."
level: error
action:
name: replace
swap:
(?:bull|ox)-like: taurine
(?:calf|veal)-like: vituline
(?:crow|raven)-like: corvine
(?:leopard|panther)-like: pardine
bird-like: avine
centipede-like: scolopendrine
crab-like: cancrine
crocodile-like: crocodiline
deer-like: damine
eagle-like: aquiline
earthworm-like: lumbricine
falcon-like: falconine
ferine: wild animal-like
fish-like: piscine
fox-like: vulpine
frog-like: ranine
goat-like: hircine
goose-like: anserine
gull-like: laridine
hare-like: leporine
hawk-like: accipitrine
hippopotamus-like: hippopotamine
lizard-like: lacertine
mongoose-like: viverrine
mouse-like: murine
ostrich-like: struthionine
peacock-like: pavonine
porcupine-like: hystricine
rattlesnake-like: crotaline
sable-like: zibeline
sheep-like: ovine
shrew-like: soricine
sparrow-like: passerine
swallow-like: hirundine
swine-like: suilline
tiger-like: tigrine
viper-like: viperine
vulture-like: vulturine
wasp-like: vespine
wolf-like: lupine
woodpecker-like: picine
zebra-like: zebrine
9 changes: 9 additions & 0 deletions .vale/proselint/Annotations.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
extends: existence
message: "'%s' left in text."
ignorecase: false
level: error
tokens:
- XXX
- FIXME
- TODO
- NOTE
8 changes: 8 additions & 0 deletions .vale/proselint/Apologizing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
extends: existence
message: "Excessive apologizing: '%s'"
ignorecase: true
level: error
action:
name: remove
tokens:
- More research is needed
52 changes: 52 additions & 0 deletions .vale/proselint/Archaisms.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
extends: existence
message: "'%s' is archaic."
ignorecase: true
level: error
tokens:
- alack
- anent
- begat
- belike
- betimes
- boughten
- brocage
- brokage
- camarade
- chiefer
- chiefest
- Christiana
- completely obsolescent
- cozen
- divers
- deflexion
- fain
- forsooth
- foreclose from
- haply
- howbeit
- illumine
- in sooth
- maugre
- meseems
- methinks
- nigh
- peradventure
- perchance
- saith
- shew
- sistren
- spake
- to wit
- verily
- whilom
- withal
- wot
- enclosed please find
- please find enclosed
- enclosed herewith
- enclosed herein
- inforce
- ex postfacto
- foreclose from
- forewent
- for ever
8 changes: 8 additions & 0 deletions .vale/proselint/But.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
extends: existence
message: "Do not start a paragraph with a 'but'."
level: error
scope: paragraph
action:
name: remove
tokens:
- ^But
Loading