Skip to content
This repository has been archived by the owner on Jan 7, 2025. It is now read-only.

Commit

Permalink
Update validation and formatting scripts (#10)
Browse files Browse the repository at this point in the history
* Update validation and formatting scripts
* Update npm script names
* Add a test script which runs all the tests
* Apply prettier to all files in the repository
* Improve logging in validateRules.
  * Log all json validation errors rather than just the first one.
    This also cleans up the iterator in the duplicate check loop.
* Remove unused fields 'last_updated' and 'schema'.
  This prepares the list for stricter JSON validation disallowing
  additional unknown properties.
  • Loading branch information
Trikolon authored Oct 24, 2022
1 parent 15395bc commit 2933425
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 170 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@ name: Node.js CI

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]

jobs:
test:

runs-on: ubuntu-latest

strategy:
Expand All @@ -22,5 +21,5 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run validate
- run: npm run prettier
- run: npm run test-formatting
- run: npm run test-validate-rules
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@ See [CookieBannerRuleList.schema.json](./CookieBannerRuleList.schema.json) and [
Before submitting run the following commands to ensure the rule list is well formatted and valid:

Install dependencies:

```
npm install
```

Run tests:

```
npm test
```
Expand Down
Loading

0 comments on commit 2933425

Please sign in to comment.