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

v0.0.3 #2

Merged
merged 10 commits into from
Mar 24, 2024
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.workspace
node_modules
.DS_Store
Prim.zip
2 changes: 1 addition & 1 deletion .vale.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
StylesPath = .

[*.md]
BasedOnStyles = compris
BasedOnStyles = Prim
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Contribution manual

Thank you for your interest in contributing to **compris**. There are many ways to contribute and we appreciate all of them.
Thank you for your interest in contributing to **Prim**. There are many ways to contribute and we appreciate all of them.

> [!TIP]
> **For new contributors**: Visit <https://github.com/firstcontributions/first-contributions> for helpful information on contributing to open source projects

- [Create an issue](https://github.com/Microflash/compris/issues/new) to discuss a change before you start working on it.
- [Create an issue](https://github.com/Microflash/Prim/issues/new) to discuss a change before you start working on it.

## Commit messages

Expand Down
2 changes: 2 additions & 0 deletions CREDITS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- [Joseph Kato](https://github.com/jdkato) for building [Vale](https://vale.sh/)
- [Oxford 3000](https://www.oxfordlearnersdictionaries.com/us/wordlists/oxford3000-5000) for most commonly used English words
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion compris/Ambiguity.yml → Prim/Ambiguity.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
extends: existence
message: "Avoid ambiguity. Don't use '%s'."
level: error
# ignorecase: true
ignorecase: true
tokens:
- and/or
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ swap:
0-day: zero-day
12 am: midnight
12 pm: noon
open-source: open source
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,10 @@ action:
name: replace
swap:
24/7: 24x7
3\-D: 3D
Ajax: AJAX
autodetect: auto-detect
synch: sync
url: URL
URL for: URL of
an URL: a URL
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions Prim/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"feed": "https://github.com/Microflash/Prim/releases.atom",
"vale_version": ">=1.0.0"
}
25 changes: 13 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
# compris
# Prim

[![Regression tests](https://github.com/Microflash/compris/actions/workflows/regression.yml/badge.svg)](https://github.com/Microflash/compris/actions/workflows/regression.yml)
[![Regression tests](https://github.com/Microflash/Prim/actions/workflows/regression.yml/badge.svg)](https://github.com/Microflash/Prim/actions/workflows/regression.yml)

A [Vale](https://vale.sh)-compatible prose style for non-native English speakers. Tailored for technical documentation.

## Status: alpha

**compris** is still in its early stages. It is usable but expect massive and frequent changes before it becomes stable.
> [!IMPORTANT]
> **Prim** is still in its early stages. It is usable but expect massive and frequent changes before it becomes stable.

## Usage

Add <https://github.com/Microflash/compris/releases/download/latest/compris.zip> to the list of `Packages` in the `.vale.ini` file.
Add <https://github.com/Microflash/Prim/releases/download/latest/Prim.zip> to the list of `Packages` in the `.vale.ini` file.

```ini
StylesPath = .github/styles
MinAlertLevel = suggestion

Packages = proselint, \
https://github.com/Microflash/compris/releases/download/latest/compris.zip
https://github.com/Microflash/Prim/releases/download/latest/Prim.zip

[README.md]
BasedOnStyles = Vale, compris, proselint
BasedOnStyles = Vale, Prim, proselint
```

To sync the latest updates, run `vale sync`.
Expand All @@ -35,9 +36,9 @@ To sync the latest updates, run `vale sync`.

## Development

- [Rules](./compris/) are written in `yml` files using the syntax described by [Vale docs](https://vale.sh/docs/).
- Every rule has a [fixture](./fixtures/) against which you can run tests.
- Tests are run against the [log output](./test/expectations/) of Vale.
- [Rules](./Prim/) are written in `yml` files using the syntax described by [Vale docs](https://vale.sh/docs/).
- Every rule has a [fixture](./test/fixtures/) against which you can run tests.
- Tests are run against the [log output snapshots](./test/snapshots/) of Vale.

### Prerequisites

Expand All @@ -51,9 +52,9 @@ Run `pnpm i` to download the test dependencies; you would need them to run the t

A typical workflow looks like this.

1. Add a new rule by creating a new `compris/<RuleName>.yml` file, or modify an existing rule in the existing `compris/<RuleName>.yml` file.
2. Add or update the fixtures in the `fixtures/<RuleName>/test.md` directory.
3. Add the expected logs in the `test/expectations/<RuleName>.log` file.
1. Add a new rule by creating a new `Prim/<RuleName>.yml` file, or modify an existing rule in the existing `Prim/<RuleName>.yml` file.
2. Add or update the fixtures in the `test/fixtures/<RuleName>/test.md` directory.
3. Generate or update a snapshot with `pnpm snapshot:update`
4. Run `pnpm test` to run the tests.

## License
Expand Down
4 changes: 0 additions & 4 deletions compris/meta.json

This file was deleted.

6 changes: 0 additions & 6 deletions fixtures/AMPM/.vale.ini

This file was deleted.

6 changes: 0 additions & 6 deletions fixtures/AbbreviationPeriods/.vale.ini

This file was deleted.

6 changes: 0 additions & 6 deletions fixtures/Ambiguity/.vale.ini

This file was deleted.

6 changes: 0 additions & 6 deletions fixtures/Contractions/.vale.ini

This file was deleted.

6 changes: 0 additions & 6 deletions fixtures/Ellipsis/.vale.ini

This file was deleted.

6 changes: 0 additions & 6 deletions fixtures/EmDash/.vale.ini

This file was deleted.

6 changes: 0 additions & 6 deletions fixtures/EnDash/.vale.ini

This file was deleted.

6 changes: 0 additions & 6 deletions fixtures/Latin/.vale.ini

This file was deleted.

6 changes: 0 additions & 6 deletions fixtures/OptionalPlurals/.vale.ini

This file was deleted.

6 changes: 0 additions & 6 deletions fixtures/Ordinal/.vale.ini

This file was deleted.

6 changes: 0 additions & 6 deletions fixtures/OxfordComma/.vale.ini

This file was deleted.

6 changes: 0 additions & 6 deletions fixtures/Percentages/.vale.ini

This file was deleted.

6 changes: 0 additions & 6 deletions fixtures/PreferredAlternatives/.vale.ini

This file was deleted.

6 changes: 0 additions & 6 deletions fixtures/RequiredAlternatives/.vale.ini

This file was deleted.

7 changes: 0 additions & 7 deletions fixtures/RequiredAlternatives/test.md

This file was deleted.

6 changes: 0 additions & 6 deletions fixtures/Semicolon/.vale.ini

This file was deleted.

6 changes: 0 additions & 6 deletions fixtures/SentenceLength/.vale.ini

This file was deleted.

6 changes: 0 additions & 6 deletions fixtures/SimplerAlternatives/.vale.ini

This file was deleted.

6 changes: 0 additions & 6 deletions fixtures/Space/.vale.ini

This file was deleted.

6 changes: 0 additions & 6 deletions fixtures/WordRepitition/.vale.ini

This file was deleted.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{
"name": "compris",
"version": "0.0.2",
"name": "prim",
"version": "0.0.3",
"description": "A Vale-compatible prose style for non-native English speaker",
"scripts": {
"snapshot:update": "vitest rules --update",
"test": "vitest rules",
"dist": "zip -r compris.zip compris -x \"*.DS_Store\""
"dist": "zip -r Prim.zip Prim -x \"*.DS_Store\""
},
"devDependencies": {
"execa": "^8.0.1",
Expand Down
5 changes: 0 additions & 5 deletions test/expectations/AMPM.log

This file was deleted.

1 change: 0 additions & 1 deletion test/expectations/AbbreviationPeriods.log

This file was deleted.

1 change: 0 additions & 1 deletion test/expectations/Ambiguity.log

This file was deleted.

106 changes: 0 additions & 106 deletions test/expectations/Contractions.log

This file was deleted.

2 changes: 0 additions & 2 deletions test/expectations/Ellipsis.log

This file was deleted.

Loading
Loading