Skip to content

Commit b7012a5

Browse files
authored
add eslint (#10)
1 parent 86513d9 commit b7012a5

File tree

3 files changed

+1620
-15
lines changed

3 files changed

+1620
-15
lines changed

eslint.config.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import js from "@eslint/js";
2+
import globals from "globals";
3+
import tseslint from "typescript-eslint";
4+
import { defineConfig } from "eslint/config";
5+
6+
7+
export default defineConfig([
8+
{ files: ["**/*.{ts}"], plugins: { js }, extends: ["js/recommended"] },
9+
{ files: ["**/*.{ts}"], languageOptions: { globals: globals.node } },
10+
tseslint.configs.recommended,
11+
{
12+
rules: {
13+
'@typescript-eslint/naming-convention': [
14+
'error',
15+
{
16+
selector: 'default',
17+
format: ['camelCase', 'PascalCase'],
18+
},
19+
{
20+
selector: ['objectLiteralProperty', 'typeProperty'],
21+
format: null,
22+
},
23+
],
24+
},
25+
},
26+
]);

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@
2727
"weaviate-client": "^3.5.4"
2828
},
2929
"devDependencies": {
30-
"typescript": "^5.8.3"
30+
"@eslint/js": "^9.26.0",
31+
"eslint": "^9.26.0",
32+
"globals": "^16.1.0",
33+
"typescript": "^5.8.3",
34+
"typescript-eslint": "^8.32.1"
3135
}
3236
}

0 commit comments

Comments
 (0)