Skip to content

Commit cddceff

Browse files
committed
wip
1 parent d1e00a2 commit cddceff

37 files changed

+1413
-895
lines changed

examples/react/todo/src/lib/collections.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ initializeDbDevtools()
1717
// Electric Todo Collection
1818
export const electricTodoCollection = createCollection(
1919
electricCollectionOptions({
20-
id: `todos`,
20+
id: `electric-todos`,
2121
shapeOptions: {
2222
url: `http://localhost:3003/v1/shape`,
2323
params: {
@@ -65,7 +65,7 @@ export const electricTodoCollection = createCollection(
6565
// Query Todo Collection
6666
export const queryTodoCollection = createCollection(
6767
queryCollectionOptions({
68-
id: `todos`,
68+
id: `query-todos`,
6969
queryKey: [`todos`],
7070
refetchInterval: 3000,
7171
queryFn: async () => {
@@ -110,7 +110,7 @@ export const queryTodoCollection = createCollection(
110110
// Electric Config Collection
111111
export const electricConfigCollection = createCollection(
112112
electricCollectionOptions({
113-
id: `config`,
113+
id: `electric-config`,
114114
shapeOptions: {
115115
url: `http://localhost:3003/v1/shape`,
116116
params: {
@@ -143,7 +143,7 @@ export const electricConfigCollection = createCollection(
143143
// Query Config Collection
144144
export const queryConfigCollection = createCollection(
145145
queryCollectionOptions({
146-
id: `config`,
146+
id: `query-config`,
147147
queryKey: [`config`],
148148
refetchInterval: 3000,
149149
queryFn: async () => {
@@ -174,5 +174,3 @@ export const queryConfigCollection = createCollection(
174174
},
175175
})
176176
)
177-
178-
Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,33 @@
1+
import prettierPlugin from "eslint-plugin-prettier"
2+
import prettierConfig from "eslint-config-prettier"
3+
import stylisticPlugin from "@stylistic/eslint-plugin"
4+
import { tanstackConfig } from "@tanstack/config/eslint"
5+
16
export default [
7+
...tanstackConfig,
8+
{ ignores: [`dist/`, 'build/**', 'coverage/**', 'eslint.config.js'] },
29
{
3-
ignores: ['build/**', 'dist/**', 'node_modules/**', 'coverage/**']
4-
},
5-
{
6-
files: ['src/**/*.{ts,tsx}'],
7-
languageOptions: {
8-
parser: '@typescript-eslint/parser',
9-
parserOptions: {
10-
ecmaVersion: 'latest',
11-
sourceType: 'module',
12-
ecmaFeatures: {
13-
jsx: true
14-
}
15-
}
10+
plugins: {
11+
stylistic: stylisticPlugin,
12+
prettier: prettierPlugin,
1613
},
1714
rules: {
18-
'no-console': 'warn',
19-
'no-unused-vars': 'warn',
20-
'@typescript-eslint/no-unused-vars': 'warn'
21-
}
22-
}
15+
"prettier/prettier": `error`,
16+
"stylistic/quotes": [`error`, `backtick`],
17+
...prettierConfig.rules,
18+
"no-console": "warn",
19+
"@typescript-eslint/no-unused-vars": [
20+
`error`,
21+
{ argsIgnorePattern: `^_`, varsIgnorePattern: `^_` },
22+
],
23+
"@typescript-eslint/naming-convention": [
24+
"error",
25+
{
26+
selector: "typeParameter",
27+
format: ["PascalCase"],
28+
leadingUnderscore: `allow`,
29+
},
30+
],
31+
},
32+
},
2333
]

packages/db-devtools/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
"test:lib": "vitest",
7171
"test:lib:dev": "pnpm run test:lib --watch",
7272
"test:build": "publint --strict && attw --pack",
73+
"lint": "eslint . --fix",
7374
"build": "vite build",
7475
"build:dev": "tsup --watch"
7576
},

0 commit comments

Comments
 (0)