Skip to content

Commit 7fa20e1

Browse files
authored
Merge pull request #80 from coldenate/agent/refactor-folder-structure-and-improve-types
Scaffold modular refactor structure
2 parents 2631474 + 942d43f commit 7fa20e1

36 files changed

+323
-12
lines changed

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true

.eslintrc.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"root": true,
3+
"parser": "@typescript-eslint/parser",
4+
"parserOptions": {
5+
"project": "./tsconfig.json"
6+
},
7+
"plugins": ["@typescript-eslint"],
8+
"extends": [
9+
"eslint:recommended",
10+
"plugin:@typescript-eslint/recommended",
11+
"plugin:@typescript-eslint/recommended-requiring-type-checking"
12+
],
13+
"env": {
14+
"node": true,
15+
"es2020": true
16+
}
17+
}

.github/workflows/ci.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: CI
2+
on:
3+
push:
4+
branches: [main]
5+
pull_request:
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
- uses: actions/setup-node@v3
13+
with:
14+
node-version: 18
15+
- run: npm ci
16+
- run: npm run lint
17+
- run: npm run format
18+
- run: npm run typecheck
19+
- run: npm test -- --runInBand
20+
- run: npm run deps

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,5 @@ dist-ssr
77
exampleCollections.json
88
exampleItems.json
99
exampleUnfileditems.json
10+
11+
docs/deps.svg

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
npx lint-staged

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
16.15.1
1+
18

__mocks__/remnoteAdapter.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export const createRem = jest.fn(
2+
async (_plugin: unknown, title: string, parentId?: string) => `mock-${title}`
3+
);
4+
export const moveRem = jest.fn(async () => {});
5+
export const deleteRem = jest.fn(async () => {});

jest.config.cjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
preset: 'ts-jest',
3+
testEnvironment: 'node',
4+
testMatch: ['**/__tests__/**/*.test.ts'],
5+
};

jest.config.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

lint-staged.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
'**/*.{ts,tsx}': ['eslint --fix', 'prettier --write'],
3+
'**/*.{json,md,css}': ['prettier --write']
4+
};

0 commit comments

Comments
 (0)