Skip to content

Commit

Permalink
Add CSpell (#25)
Browse files Browse the repository at this point in the history
PR: #25
  • Loading branch information
dEdmishka authored Oct 22, 2023
1 parent f0e9829 commit 8730760
Show file tree
Hide file tree
Showing 8 changed files with 5,506 additions and 478 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
4 changes: 4 additions & 0 deletions .lintstagedrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
const toRelative = require('./src/utils/relativePath.js');

module.exports = {
'*': 'prettier --check --ignore-unknown',
'*.js': 'eslint --cache',
'*.{js,ts}': () => 'npm run typescript:check',
'*': (files) =>
`cspell --show-suggestions --quiet --gitignore ${toRelative(files)}`,
};
13 changes: 13 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json",
"version": "0.2",
"dictionaryDefinitions": [
{
"name": "project-words",
"path": "./project-words.txt",
"addWords": true
}
],
"dictionaries": ["project-words"],
"ignorePaths": ["node_modules", "/project-words.txt"]
}
5,919 changes: 5,460 additions & 459 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"prettier:check": "prettier --check .",
"prettier:write": "prettier --write .",
"typescript:check": "tsc -p tsconfig.json",
"prepare": "husky install"
"prepare": "husky install",
"cspell": "cspell --show-suggestions --show-context --gitignore ."
},
"author": "",
"license": "MIT",
Expand All @@ -32,6 +33,7 @@
"devDependencies": {
"@flydotio/dockerfile": "^0.4.10",
"@types/node": "^20.8.6",
"cspell": "^7.3.8",
"eslint": "^8.50.0",
"husky": "^8.0.3",
"lint-staged": "^14.0.1",
Expand Down
31 changes: 13 additions & 18 deletions prisma/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
# Messenger

> Generated by [`prisma-markdown`](https://github.com/samchon/prisma-markdown)
- [default](#default)

## default

```mermaid
erDiagram
User {
Expand Down Expand Up @@ -34,27 +32,24 @@ Message }|--|| Chat : chat
### `User`

**Properties**

- `id`:
- `username`:
- `email`:
- `password`:
- `createdAt`:
- `id`:
- `username`:
- `email`:
- `password`:
- `createdAt`:

### `Message`

**Properties**

- `id`:
- `content`:
- `senderId`:
- `chatId`:
- `createdAt`:
- `id`:
- `content`:
- `senderId`:
- `chatId`:
- `createdAt`:

### `Chat`

**Properties**

- `id`:
- `name`:
- `createdAt`:
- `id`:
- `name`:
- `createdAt`:
6 changes: 6 additions & 0 deletions project-words.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
nocheck
datasource
fastify
Fastify
pino
flydotio
6 changes: 6 additions & 0 deletions src/utils/relativePath.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const path = require('node:path');

const toRelative = (files) =>
files.map((file) => path.relative(process.cwd(), file)).join(' ');

module.exports = toRelative;

0 comments on commit 8730760

Please sign in to comment.