Skip to content

Commit 094365b

Browse files
author
福晋
committed
feat: add transformer implementation
1 parent 3670846 commit 094365b

41 files changed

Lines changed: 5133 additions & 291 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintrc.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"env": {
3+
"node": true,
4+
"es2020": true
5+
},
6+
"parserOptions": {
7+
"ecmaVersion": 2020,
8+
"sourceType": "module"
9+
},
10+
"parser": "@typescript-eslint/parser",
11+
"extends": [
12+
"eslint:recommended",
13+
"plugin:@typescript-eslint/recommended",
14+
"prettier"
15+
],
16+
"plugins": ["@typescript-eslint"],
17+
"rules": {
18+
"@typescript-eslint/no-explicit-any": "warn",
19+
"@typescript-eslint/no-unused-vars": ["warn", { "argsIgnorePattern": "^_" }],
20+
"@typescript-eslint/explicit-function-return-type": "off",
21+
"@typescript-eslint/no-non-null-assertion": "warn",
22+
"no-console": "off"
23+
},
24+
"ignorePatterns": ["dist/", "node_modules/", "test/fixtures/"]
25+
}

.prettierrc.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"semi": true,
3+
"singleQuote": true,
4+
"trailingComma": "all",
5+
"printWidth": 100,
6+
"tabWidth": 2,
7+
"arrowParens": "always"
8+
}

README.md

Lines changed: 285 additions & 26 deletions
Large diffs are not rendered by default.

package.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44
"description": "A local context retrieval library that enables semantic search over your documentation. It loads documents (Markdown, JSON, Text), vectorizes them using [Transformers.js](https://huggingface.co/transformers.js), and stores vectors locally in `.zvec` files for fast semantic querying. ",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",
7-
"type": "module",
87
"scripts": {
98
"build": "tsc",
10-
"test": "vitest run --coverage"
9+
"test": "vitest run --coverage",
10+
"lint": "eslint src/ --ext .ts",
11+
"lint:fix": "eslint src/ --ext .ts --fix",
12+
"format": "prettier --write 'src/**/*.ts' 'test/**/*.ts'"
1113
},
1214
"keywords": [
1315
"context",
@@ -28,7 +30,12 @@
2830
},
2931
"devDependencies": {
3032
"@types/node": "^20.0.0",
33+
"@typescript-eslint/eslint-plugin": "^7.0.0",
34+
"@typescript-eslint/parser": "^7.0.0",
3135
"@vitest/coverage-v8": "^3.2.6",
36+
"eslint": "^8.0.0",
37+
"eslint-config-prettier": "^9.0.0",
38+
"prettier": "^3.0.0",
3239
"typescript": "^5.0.0",
3340
"vitest": "^3.2.6"
3441
},

0 commit comments

Comments
 (0)