Skip to content

Commit

Permalink
chore: add prettier and lint-staged (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaLicense authored Feb 13, 2024
1 parent be6a3c6 commit 2493c0e
Show file tree
Hide file tree
Showing 13 changed files with 775 additions and 17 deletions.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion .github/workflows/conventional-commits.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
workflow_call:
inputs:
title:
description: 'PR title'
description: "PR title"
type: string
required: true

Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx --no -- lint-staged
3 changes: 3 additions & 0 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"*": ["prettier --ignore-unknown --write"]
}
8 changes: 4 additions & 4 deletions commitlint.config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import type {UserConfig} from '@commitlint/types';
import type { UserConfig } from "@commitlint/types";
import * as fs from "fs";

const Configuration: UserConfig = {
extends: ['@commitlint/config-conventional'],
extends: ["@commitlint/config-conventional"],
rules: {
'scope-enum': [2, 'always', fs.readdirSync('app').filter((file) => fs.statSync(`app/${file}`).isDirectory())],
}
"scope-enum": [2, "always", fs.readdirSync("app").filter((file) => fs.statSync(`app/${file}`).isDirectory())],
},
};

module.exports = Configuration;
15 changes: 8 additions & 7 deletions docs/rfc/rfc-001-mono-repository.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ The VOL project consists of three separate repositories: [olcs-backend](http://g
## Proposal

Create a mono-repository by merging the following repositories:
- [olcs-backend](http://github.com/dvsa/olcs-backend)
- [olcs-selfserve](http://github.com/dvsa/olcs-selfserve)
- [olcs-internal](http://github.com/dvsa/olcs-internal)
- [vol-docker-compose](http://github.com/dvsa/vol-docker-compose)

- [olcs-backend](http://github.com/dvsa/olcs-backend)
- [olcs-selfserve](http://github.com/dvsa/olcs-selfserve)
- [olcs-internal](http://github.com/dvsa/olcs-internal)
- [vol-docker-compose](http://github.com/dvsa/vol-docker-compose)

Subdirectories within the mono-repository will be named without their prefixes, i.e., `api`, `selfserve`, `internal`, and `vol-docker-compose` will be replaced.

Expand All @@ -32,8 +33,8 @@ GitHub Action workflows will be designed to execute only on sub-projects with de

## Implementation

- Create a new repository named `vol-app`.
- Adopt a directory structure similar to the following:
- Create a new repository named `vol-app`.
- Adopt a directory structure similar to the following:
```
|__ `.github`
| |__ `workflows/`
Expand All @@ -53,4 +54,4 @@ GitHub Action workflows will be designed to execute only on sub-projects with de
|__ `docker-compose.yaml`
|__ ...
```
- Import repositories while retaining their git history for relevant commits during the merge.
- Import repositories while retaining their git history for relevant commits during the merge.
7 changes: 4 additions & 3 deletions docs/rfc/rfc-002-documentation-as-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Traditional documentation stored in platforms like Confluence is often difficult
Documentation will be authored in Markdown and stored within the mono-repository (as proposed in RFC-001) under the `/docs` directory.

Additional tools proposed include:
- Utilizing the Docusaurus library to build the static site.
- Using GitHub Pages for serving the documentation.
- Employing GitHub Actions for deployment.

- Utilizing the Docusaurus library to build the static site.
- Using GitHub Pages for serving the documentation.
- Employing GitHub Actions for deployment.
Loading

0 comments on commit 2493c0e

Please sign in to comment.