Skip to content

Commit 25894d2

Browse files
authored
Feature/replace proselint with vale (webpack#4195)
* add proselint styles * add .vale.ini * disable rules according to .proselintrc * use vale * set env * fix prose * fix prose lint * fix prose * bye python * clean obsolete files
1 parent 8809e6c commit 25894d2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1893
-112
lines changed

.github/CONTRIBUTING.md

-3
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ See the `package.json` for the full list of `scripts`.
3131

3232
> Note that __Node 6.9.x__ or above is required for the build process to run properly.
3333
34-
> Note that a __Python version between v2.5.0 and 3.0.0__ is required for the [proselint][12] dependency.
35-
3634
> 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.
3735
3836
> 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.
@@ -129,5 +127,4 @@ any time spent fixing typos or clarifying sections in the documentation.
129127
[9]: https://help.github.com/articles/proposing-changes-to-your-work-with-pull-requests/
130128
[10]: http://conventionalcommits.org/
131129
[11]: https://github.com/conventional-changelog/standard-version
132-
[12]: https://github.com/amperser/proselint
133130
[13]: https://yarnpkg.com/lang/en/docs/install

.github/workflows/testing.yml

+5-18
Original file line numberDiff line numberDiff line change
@@ -44,29 +44,16 @@ jobs:
4444
strategy:
4545
matrix:
4646
os: [ubuntu-latest]
47-
python-version: [3.6]
4847
runs-on: ${{ matrix.os }}
4948
steps:
5049
- uses: actions/checkout@v2
5150

52-
- name: Set up Python ${{ matrix.python-version }}
53-
uses: actions/setup-python@v2
51+
- name: Vale
52+
uses: errata-ai/vale-action@v1.3.0
5453
with:
55-
python-version: ${{ matrix.python-version }}
56-
- uses: actions/cache@v2
57-
with:
58-
path: ~/.cache/pip
59-
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
60-
restore-keys: |
61-
${{ runner.os }}-pip-
62-
63-
- name: Install dependencies
64-
run: |
65-
python -m pip install --upgrade pip
66-
pip install -r requirements.txt
67-
68-
- run: cp .proselintrc ~/
69-
- run: proselint src/content
54+
files: src/content
55+
env:
56+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
7057

7158
lintLinks:
7259
name: Check Links

.proselintrc

-84
This file was deleted.

.vale.ini

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Vale configuration file.
2+
#
3+
# For more information, see https://errata-ai.gitbook.io/vale/getting-started/configuratio
4+
5+
6+
StylesPath = .vale
7+
MinAlertLevel = warning
8+
9+
[*.{md,mdx}]
10+
BasedOnStyles = proselint
11+
12+
proselint.But = NO
13+
proselint.Typography = NO
14+
proselint.Annotations = NO

.vale/proselint/Airlinese.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
extends: existence
2+
message: "'%s' is airlinese."
3+
ignorecase: true
4+
level: error
5+
tokens:
6+
- enplan(?:e|ed|ing|ement)
7+
- deplan(?:e|ed|ing|ement)
8+
- taking off momentarily

.vale/proselint/AnimalLabels.yml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
extends: substitution
2+
message: "Consider using '%s' instead of '%s'."
3+
level: error
4+
action:
5+
name: replace
6+
swap:
7+
(?:bull|ox)-like: taurine
8+
(?:calf|veal)-like: vituline
9+
(?:crow|raven)-like: corvine
10+
(?:leopard|panther)-like: pardine
11+
bird-like: avine
12+
centipede-like: scolopendrine
13+
crab-like: cancrine
14+
crocodile-like: crocodiline
15+
deer-like: damine
16+
eagle-like: aquiline
17+
earthworm-like: lumbricine
18+
falcon-like: falconine
19+
ferine: wild animal-like
20+
fish-like: piscine
21+
fox-like: vulpine
22+
frog-like: ranine
23+
goat-like: hircine
24+
goose-like: anserine
25+
gull-like: laridine
26+
hare-like: leporine
27+
hawk-like: accipitrine
28+
hippopotamus-like: hippopotamine
29+
lizard-like: lacertine
30+
mongoose-like: viverrine
31+
mouse-like: murine
32+
ostrich-like: struthionine
33+
peacock-like: pavonine
34+
porcupine-like: hystricine
35+
rattlesnake-like: crotaline
36+
sable-like: zibeline
37+
sheep-like: ovine
38+
shrew-like: soricine
39+
sparrow-like: passerine
40+
swallow-like: hirundine
41+
swine-like: suilline
42+
tiger-like: tigrine
43+
viper-like: viperine
44+
vulture-like: vulturine
45+
wasp-like: vespine
46+
wolf-like: lupine
47+
woodpecker-like: picine
48+
zebra-like: zebrine

.vale/proselint/Annotations.yml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
extends: existence
2+
message: "'%s' left in text."
3+
ignorecase: false
4+
level: error
5+
tokens:
6+
- XXX
7+
- FIXME
8+
- TODO
9+
- NOTE

.vale/proselint/Apologizing.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
extends: existence
2+
message: "Excessive apologizing: '%s'"
3+
ignorecase: true
4+
level: error
5+
action:
6+
name: remove
7+
tokens:
8+
- More research is needed

.vale/proselint/Archaisms.yml

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
extends: existence
2+
message: "'%s' is archaic."
3+
ignorecase: true
4+
level: error
5+
tokens:
6+
- alack
7+
- anent
8+
- begat
9+
- belike
10+
- betimes
11+
- boughten
12+
- brocage
13+
- brokage
14+
- camarade
15+
- chiefer
16+
- chiefest
17+
- Christiana
18+
- completely obsolescent
19+
- cozen
20+
- divers
21+
- deflexion
22+
- fain
23+
- forsooth
24+
- foreclose from
25+
- haply
26+
- howbeit
27+
- illumine
28+
- in sooth
29+
- maugre
30+
- meseems
31+
- methinks
32+
- nigh
33+
- peradventure
34+
- perchance
35+
- saith
36+
- shew
37+
- sistren
38+
- spake
39+
- to wit
40+
- verily
41+
- whilom
42+
- withal
43+
- wot
44+
- enclosed please find
45+
- please find enclosed
46+
- enclosed herewith
47+
- enclosed herein
48+
- inforce
49+
- ex postfacto
50+
- foreclose from
51+
- forewent
52+
- for ever

.vale/proselint/But.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
extends: existence
2+
message: "Do not start a paragraph with a 'but'."
3+
level: error
4+
scope: paragraph
5+
action:
6+
name: remove
7+
tokens:
8+
- ^But

0 commit comments

Comments
 (0)