Skip to content

Commit

Permalink
style: use sentence case over ap style for titles and headings
Browse files Browse the repository at this point in the history
  • Loading branch information
Fdawgs committed Feb 13, 2023
1 parent 3ec2517 commit 3a59481
Show file tree
Hide file tree
Showing 20 changed files with 58 additions and 64 deletions.
18 changes: 6 additions & 12 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ Other processes and specifications that are in use in this repository are:
- [Conventional commits](https://conventionalcommits.org/en/v1.0.0/) following the @commitlint/config-conventional config
- [Prettier](https://prettier.io/) style guide

## Getting Started
## Getting started

Ensure you have all prerequisites installed (including any optional ones), as noted in the [prerequisites section of the readme file](./README.md#prerequisites).

With those in place, you can fork the repository, clone it, and then run `npm ci` to install all dependencies.
Make a copy of `.env.template` in the root directory and rename it to `.env`, configuring the environment variables in the file as required.

### Development Workflow
### Development workflow

After cloning the repository and installing all the dependencies, there are several commands available for local development:

Expand All @@ -29,23 +29,17 @@ After cloning the repository and installing all the dependencies, there are seve
- `npm test` - Runs `npm run lint` and `npm run jest` together
- `npm run start:dev` - Starts a development server with live reload

### Production Workflow
### Production workflow

- `npm start` - Runs a production version. No live reload.

## Documentation Style
## Documentation style

Documentation (both in markdown files and inline comments) should be written in **British English** where possible.

Titles and headings should adhere to the [Associated Press (AP)](https://apstylebook.com/) style:
Titles and headings should use sentence-style capitalisation, where only the first letter of a sentence and proper nouns are capitalised.

- Capitalise words with three or more letters
- Capitalise the first and the last word
- Capitalise nouns, pronouns, adjectives, verbs, adverbs, and subordinate conjunctions
- Lowercase articles (a, an, the), coordinating conjunctions, and prepositions
- Capitalise words with four or more letters (including conjunctions and prepositions)

## Pull Request Checklist
## Pull request checklist

Before submitting a pull request back to the main repository, please make sure you have completed the following steps:

Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Perform the following steps before deployment:
## Deployment

### Standard Deployment
### Standard deployment

1. Run `npm ci --ignore-scripts --omit=dev` to install dependencies
2. Run `npm start`
Expand All @@ -77,13 +77,13 @@ The service should be up and running on the port set in the config. Output simil

To test it, use [Insomnia](https://insomnia.rest/) and import the example requests from `./test_resources/insomnia_test_requests.json`.

### Deploying Using Docker
### Deploying using Docker

This requires [Docker](https://docker.com) installed.

1. Run `docker compose up` (or `docker compose up -d` to run in the background)

### Deploying Using PM2
### Deploying using PM2

If this cannot be deployed into production using Docker, use a process manager such as [PM2](https://pm2.keymetrics.io/).

Expand All @@ -92,7 +92,7 @@ If this cannot be deployed into production using Docker, use a process manager s
3. Launch the application with `pm2 start .pm2.config.js`
4. Check that the application has been deployed using `pm2 list` or `pm2 monit`

#### To Install as a Windows Service:
#### To install as a Windows service:

If using a Microsoft Windows OS utilise [pm2-installer](https://github.com/jessety/pm2-installer) to install PM2 as a Windows service.

Expand All @@ -101,7 +101,7 @@ If using a Microsoft Windows OS utilise [pm2-installer](https://github.com/jesse
## Usage

### Accessing API Documentation
### Accessing API documentation

API documentation can be found at `/docs`:

Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Security

## Disclosure Policy
## Disclosure policy

Please email reports about any security-related issues you find to frazer.dev@outlook.com.
Please use a descriptive subject line in your report email, in addition to a reference or link to this repository.
Expand Down
12 changes: 6 additions & 6 deletions src/config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ async function getConfig() {
.prop("LOG_ROTATION_MAX_LOGS", S.anyOf([S.string(), S.null()]))
.prop("LOG_ROTATION_MAX_SIZE", S.anyOf([S.string(), S.null()]))

// Process Load Handling
// Process load handling
.prop(
"PROC_LOAD_MAX_EVENT_LOOP_DELAY",
S.anyOf([S.number(), S.null()])
Expand All @@ -115,17 +115,17 @@ async function getConfig() {
)
.prop("PROC_LOAD_MAX_RSS_BYTES", S.anyOf([S.number(), S.null()]))

// Rate Limiting
// Rate limiting
.prop("RATE_LIMIT_EXCLUDED_ARRAY", S.anyOf([S.string(), S.null()]))
.prop(
"RATE_LIMIT_MAX_CONNECTIONS_PER_MIN",
S.anyOf([S.number(), S.null()])
)

// Bearer Token Auth
// Bearer token auth
.prop("AUTH_BEARER_TOKEN_ARRAY", S.anyOf([S.string(), S.null()]))

// Binary Paths
// Binary paths
.prop("POPPLER_BINARY_PATH", S.anyOf([S.string(), S.null()]))
.prop("UNRTF_BINARY_PATH", S.anyOf([S.string(), S.null()]))

Expand Down Expand Up @@ -247,7 +247,7 @@ async function getConfig() {
"x-logo": {
url: "/public/images/docsmith-logo-transparent-background-wide-canvas.png",
backgroundColor: "#005EB8",
altText: "Docsmith Logo",
altText: "Docsmith logo",
},
},
// Components object populated by shared schemas at launch
Expand All @@ -273,7 +273,7 @@ async function getConfig() {
"Endpoints used for the conversion of RTF documents",
},
{
name: "System Administration",
name: "System administration",
description: "",
},
],
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/docx-to-html/plugin.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const isHtml = require("is-html");
const sensible = require("@fastify/sensible");
const plugin = require(".");

describe("DOCX-to-HTML Conversion Plugin", () => {
describe("DOCX-to-HTML conversion plugin", () => {
let server;

beforeAll(async () => {
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/docx-to-txt/plugin.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const isHtml = require("is-html");
const sensible = require("@fastify/sensible");
const plugin = require(".");

describe("DOCX-to-TXT Conversion Plugin", () => {
describe("DOCX-to-TXT conversion plugin", () => {
let server;

beforeAll(async () => {
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/embed-html-images/plugin.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const isHtml = require("is-html");
const plugin = require(".");
const getConfig = require("../../config");

describe("Embed-HTML-Images Plugin", () => {
describe("Embed-HTML-Images plugin", () => {
let config;
let server;

Expand Down
2 changes: 1 addition & 1 deletion src/plugins/image-to-txt/plugin.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const isHtml = require("is-html");
const plugin = require(".");
const getConfig = require("../../config");

describe("Image-To-TXT Conversion Plugin", () => {
describe("Image-to-TXT conversion plugin", () => {
let config;
let server;

Expand Down
2 changes: 1 addition & 1 deletion src/plugins/pdf-to-html/plugin.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const getConfig = require("../../config");
const artifacts =
/â¬|âš|Æ|âž|â¦|â¡|Ë|â°|â¹|Ž|â˜|â|âœ|â¢|â|â|Ëœ|Å¡|ž|Ÿ|¯|·|´|°|Ã|ï·|√||Ã|Ã|Ã|Ã|Ã|Ã|È|Ã|Ê|Ã|ÃŒ|ÃŽ|Ã|Ã|Ã|Ã|Ã|Ã|Ã|Ø|Ã|Ú|Ã|Ãœ|Þ|ß|á|â|ã|ä|Ã¥|æ|ç|è|é|ê|ë|ì|í|î|ï|ð|ñ|ò|ó|ô|õ|Ã|÷|ø|ù|ú|û|ü|ý|þ|ÿ|â¤|â¥|Â|Ã|â|/g;

describe("PDF-to-HTML Conversion Plugin", () => {
describe("PDF-to-HTML conversion plugin", () => {
let config;
let server;

Expand Down
2 changes: 1 addition & 1 deletion src/plugins/pdf-to-txt/plugin.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const plugin = require(".");
const getConfig = require("../../config");
const imageToTxt = require("../image-to-txt");

describe("PDF-to-TXT Conversion Plugin", () => {
describe("PDF-to-TXT conversion plugin", () => {
let config;
let server;

Expand Down
2 changes: 1 addition & 1 deletion src/plugins/rtf-to-html/plugin.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const getConfig = require("../../config");
const artifacts =
/â¬|âš|Æ|âž|â¦|â¡|Ë|â°|â¹|Ž|â˜|â|âœ|â¢|â|â|Ëœ|Å¡|ž|Ÿ|¯|·|´|°|Ã|ï·|√||Ã|Ã|Ã|Ã|Ã|Ã|È|Ã|Ê|Ã|ÃŒ|ÃŽ|Ã|Ã|Ã|Ã|Ã|Ã|Ã|Ø|Ã|Ú|Ã|Ãœ|Þ|ß|á|â|ã|ä|Ã¥|æ|ç|è|é|ê|ë|ì|í|î|ï|ð|ñ|ò|ó|ô|õ|Ã|÷|ø|ù|ú|û|ü|ý|þ|ÿ|â¤|â¥|Â|Ã|â|/g;

describe("RTF-to-HTML Conversion Plugin", () => {
describe("RTF-to-HTML conversion plugin", () => {
let config;
let server;

Expand Down
2 changes: 1 addition & 1 deletion src/plugins/rtf-to-txt/plugin.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const sensible = require("@fastify/sensible");
const plugin = require(".");
const getConfig = require("../../config");

describe("RTF-to-TXT Conversion Plugin", () => {
describe("RTF-to-TXT conversion plugin", () => {
let config;
let server;

Expand Down
2 changes: 1 addition & 1 deletion src/plugins/tidy-css/plugin.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const isHtml = require("is-html");
const plugin = require(".");
const getConfig = require("../../config");

describe("Tidy-CSS Plugin", () => {
describe("Tidy-CSS plugin", () => {
let config;
let server;

Expand Down
2 changes: 1 addition & 1 deletion src/plugins/tidy-html/plugin.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const { JSDOM } = require("jsdom");
const sensible = require("@fastify/sensible");
const plugin = require(".");

describe("Tidy-CSS Plugin", () => {
describe("Tidy-CSS plugin", () => {
let server;

beforeEach(() => {
Expand Down
4 changes: 2 additions & 2 deletions src/routes/admin/healthcheck/route.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ const route = require(".");
const getConfig = require("../../../config");
const sharedSchemas = require("../../../plugins/shared-schemas");

describe("Healthcheck Route", () => {
describe("GET Requests", () => {
describe("Healthcheck route", () => {
describe("GET requests", () => {
let config;
let server;

Expand Down
4 changes: 2 additions & 2 deletions src/routes/docs/openapi/route.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ const route = require(".");
const getConfig = require("../../../config");
const sharedSchemas = require("../../../plugins/shared-schemas");

describe("OpenAPI Route", () => {
describe("GET Requests", () => {
describe("OpenAPI route", () => {
describe("GET requests", () => {
let config;
let server;

Expand Down
4 changes: 2 additions & 2 deletions src/routes/docs/route.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ const route = require(".");
const getConfig = require("../../config");
const sharedSchemas = require("../../plugins/shared-schemas");

describe("Docs Route", () => {
describe("GET Requests", () => {
describe("Docs route", () => {
describe("GET requests", () => {
let config;
let server;

Expand Down
Loading

0 comments on commit 3a59481

Please sign in to comment.