eslint-plugin-slonik 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -53
- package/dist/config.cjs +1 -16
- package/dist/config.cjs.map +1 -1
- package/dist/config.d.cts +0 -181
- package/dist/config.d.mts +0 -181
- package/dist/config.d.ts +0 -181
- package/dist/config.mjs +2 -17
- package/dist/config.mjs.map +1 -1
- package/dist/index.cjs +1 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -161
- package/dist/index.d.mts +3 -161
- package/dist/index.d.ts +3 -161
- package/dist/index.mjs +2 -3
- package/dist/index.mjs.map +1 -1
- package/dist/shared/{eslint-plugin-slonik.BxexVlk1.cjs → eslint-plugin-slonik.BEK35rSu.cjs} +5 -43
- package/dist/shared/eslint-plugin-slonik.BEK35rSu.cjs.map +1 -0
- package/dist/shared/{eslint-plugin-slonik.C0xTyWZ2.mjs → eslint-plugin-slonik.BqlRHJaM.mjs} +2 -2
- package/dist/shared/{eslint-plugin-slonik.C0xTyWZ2.mjs.map → eslint-plugin-slonik.BqlRHJaM.mjs.map} +1 -1
- package/dist/shared/{eslint-plugin-slonik.DbzoLz5_.mjs → eslint-plugin-slonik.CYdFN4nX.mjs} +6 -43
- package/dist/shared/eslint-plugin-slonik.CYdFN4nX.mjs.map +1 -0
- package/dist/workers/check-sql.worker.cjs +9 -1
- package/dist/workers/check-sql.worker.cjs.map +1 -1
- package/dist/workers/check-sql.worker.mjs +10 -2
- package/dist/workers/check-sql.worker.mjs.map +1 -1
- package/package.json +4 -4
- package/dist/shared/eslint-plugin-slonik.BxexVlk1.cjs.map +0 -1
- package/dist/shared/eslint-plugin-slonik.DbzoLz5_.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@ yarn add eslint-plugin-slonik --dev
|
|
|
25
25
|
### Peer Dependencies
|
|
26
26
|
|
|
27
27
|
```bash
|
|
28
|
-
npm install
|
|
28
|
+
npm install libpg-query --save-dev
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
## Configuration
|
|
@@ -66,49 +66,6 @@ export default [
|
|
|
66
66
|
];
|
|
67
67
|
```
|
|
68
68
|
|
|
69
|
-
### Using a Config File (slonik.config.ts)
|
|
70
|
-
|
|
71
|
-
Alternatively, use a separate config file:
|
|
72
|
-
|
|
73
|
-
**eslint.config.js:**
|
|
74
|
-
```js
|
|
75
|
-
import slonik from "eslint-plugin-slonik/config";
|
|
76
|
-
|
|
77
|
-
export default [
|
|
78
|
-
slonik.configs.useConfigFile,
|
|
79
|
-
];
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
**slonik.config.ts:**
|
|
83
|
-
```ts
|
|
84
|
-
import { defineConfig } from "eslint-plugin-slonik";
|
|
85
|
-
|
|
86
|
-
export default defineConfig({
|
|
87
|
-
connections: {
|
|
88
|
-
databaseUrl: process.env.DATABASE_URL,
|
|
89
|
-
overrides: {
|
|
90
|
-
types: {
|
|
91
|
-
date: "DateSqlToken",
|
|
92
|
-
timestamp: "TimestampSqlToken",
|
|
93
|
-
interval: "IntervalSqlToken",
|
|
94
|
-
json: "JsonSqlToken",
|
|
95
|
-
jsonb: "JsonBinarySqlToken",
|
|
96
|
-
uuid: "UuidSqlToken",
|
|
97
|
-
"int4[]": 'ArraySqlToken<"int4">',
|
|
98
|
-
"text[]": 'ArraySqlToken<"text">',
|
|
99
|
-
"uuid[]": 'ArraySqlToken<"uuid">',
|
|
100
|
-
},
|
|
101
|
-
},
|
|
102
|
-
targets: [
|
|
103
|
-
{
|
|
104
|
-
tag: "sql.+(type\\(*\\)|typeAlias\\(*\\)|unsafe)",
|
|
105
|
-
skipTypeAnnotations: true,
|
|
106
|
-
},
|
|
107
|
-
],
|
|
108
|
-
},
|
|
109
|
-
});
|
|
110
|
-
```
|
|
111
|
-
|
|
112
69
|
## Slonik SQL Tag Support
|
|
113
70
|
|
|
114
71
|
| SQL Tag | Support | Behavior |
|
|
@@ -323,7 +280,7 @@ This plugin is specifically designed for Slonik and includes:
|
|
|
323
280
|
|
|
324
281
|
- Node.js 24+
|
|
325
282
|
- pnpm 10+
|
|
326
|
-
- PostgreSQL
|
|
283
|
+
- PostgreSQL 17
|
|
327
284
|
|
|
328
285
|
### Setup
|
|
329
286
|
|
|
@@ -342,14 +299,8 @@ docker run -d --name postgres -p 5432:5432 \
|
|
|
342
299
|
### Running Tests
|
|
343
300
|
|
|
344
301
|
```bash
|
|
345
|
-
#
|
|
346
|
-
|
|
347
|
-
export PGPASSWORD=postgres
|
|
348
|
-
export PGHOST=localhost
|
|
349
|
-
export PGDATABASE=postgres
|
|
350
|
-
|
|
351
|
-
# Run tests
|
|
352
|
-
pnpm run test:vitest
|
|
302
|
+
# Run tests with DATABASE_URL
|
|
303
|
+
DATABASE_URL=postgres://postgres:postgres@localhost:5432/postgres pnpm run test:vitest
|
|
353
304
|
```
|
|
354
305
|
|
|
355
306
|
### Linting
|
package/dist/config.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./shared/eslint-plugin-slonik.
|
|
3
|
+
const index = require('./shared/eslint-plugin-slonik.BEK35rSu.cjs');
|
|
4
4
|
require('./shared/eslint-plugin-slonik.rlOTrCdf.cjs');
|
|
5
5
|
require('path');
|
|
6
6
|
require('postgres');
|
|
@@ -18,7 +18,6 @@ require('typescript');
|
|
|
18
18
|
require('synckit');
|
|
19
19
|
require('node:url');
|
|
20
20
|
require('zod');
|
|
21
|
-
require('module');
|
|
22
21
|
|
|
23
22
|
const version = "1.0.0";
|
|
24
23
|
|
|
@@ -32,20 +31,6 @@ const slonikPlugin = {
|
|
|
32
31
|
|
|
33
32
|
const config = {
|
|
34
33
|
configs: {
|
|
35
|
-
/**
|
|
36
|
-
* If you prefer configuring via a config file (slonik.config.ts), use this config.
|
|
37
|
-
*/
|
|
38
|
-
useConfigFile: {
|
|
39
|
-
plugins: {
|
|
40
|
-
slonik: slonikPlugin
|
|
41
|
-
},
|
|
42
|
-
rules: {
|
|
43
|
-
"slonik/check-sql": ["error", { useConfigFile: true }]
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
/**
|
|
47
|
-
* If you prefer configuring via a flat config, use this config.
|
|
48
|
-
*/
|
|
49
34
|
connections: (connections) => ({
|
|
50
35
|
plugins: {
|
|
51
36
|
slonik: slonikPlugin
|
package/dist/config.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.cjs","sources":["../src/plugin.ts","../src/config.ts"],"sourcesContent":["import { FlatConfig } from \"@typescript-eslint/utils/ts-eslint\";\nimport rules from \"./rules\";\nimport { version } from \"../package.json\";\n\nexport default {\n rules: rules,\n meta: {\n name: \"eslint-plugin-slonik\",\n version: version,\n },\n} satisfies FlatConfig.Plugin;\n","import { FlatConfig } from \"@typescript-eslint/utils/ts-eslint\";\nimport { Config } from \"./rules/RuleOptions\";\nimport slonikPlugin from \"./plugin\";\n\nexport default {\n configs: {\n
|
|
1
|
+
{"version":3,"file":"config.cjs","sources":["../src/plugin.ts","../src/config.ts"],"sourcesContent":["import { FlatConfig } from \"@typescript-eslint/utils/ts-eslint\";\nimport rules from \"./rules\";\nimport { version } from \"../package.json\";\n\nexport default {\n rules: rules,\n meta: {\n name: \"eslint-plugin-slonik\",\n version: version,\n },\n} satisfies FlatConfig.Plugin;\n","import { FlatConfig } from \"@typescript-eslint/utils/ts-eslint\";\nimport { Config } from \"./rules/RuleOptions\";\nimport slonikPlugin from \"./plugin\";\n\nexport default {\n configs: {\n connections: (connections: Config[\"connections\"]): FlatConfig.Config => ({\n plugins: {\n slonik: slonikPlugin,\n },\n rules: {\n \"slonik/check-sql\": [\"error\", { connections }],\n },\n }),\n },\n};\n"],"names":["rules"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAIA,qBAAe;AAAA,SACbA,WAAA;AAAA,EACA,IAAA,EAAM;AAAA,IACJ,IAAA,EAAM,sBAAA;AAAA,IACN;AAAA;AAEJ,CAAA;;ACNA,eAAe;AAAA,EACb,OAAA,EAAS;AAAA,IACP,WAAA,EAAa,CAAC,WAAA,MAA2D;AAAA,MACvE,OAAA,EAAS;AAAA,QACP,MAAA,EAAQ;AAAA,OACV;AAAA,MACA,KAAA,EAAO;AAAA,QACL,kBAAA,EAAoB,CAAC,OAAA,EAAS,EAAE,aAAa;AAAA;AAC/C,KACF;AAAA;AAEJ,CAAA;;;;"}
|
package/dist/config.d.cts
CHANGED
|
@@ -1,190 +1,9 @@
|
|
|
1
|
-
import * as _typescript_eslint_utils_ts_eslint from '@typescript-eslint/utils/ts-eslint';
|
|
2
1
|
import { FlatConfig } from '@typescript-eslint/utils/ts-eslint';
|
|
3
2
|
import { C as Config } from './shared/eslint-plugin-slonik.1m1xlVmw.cjs';
|
|
4
3
|
import 'zod';
|
|
5
4
|
|
|
6
5
|
declare const _default: {
|
|
7
6
|
configs: {
|
|
8
|
-
/**
|
|
9
|
-
* If you prefer configuring via a config file (slonik.config.ts), use this config.
|
|
10
|
-
*/
|
|
11
|
-
useConfigFile: {
|
|
12
|
-
plugins: {
|
|
13
|
-
slonik: {
|
|
14
|
-
rules: {
|
|
15
|
-
"check-sql": _typescript_eslint_utils_ts_eslint.RuleModule<"error" | "typeInferenceFailed" | "invalidQuery" | "missingTypeAnnotations" | "incorrectTypeAnnotations" | "invalidTypeAnnotations", ({
|
|
16
|
-
connections: {
|
|
17
|
-
targets: ({
|
|
18
|
-
wrapper: string | {
|
|
19
|
-
regex: string;
|
|
20
|
-
};
|
|
21
|
-
maxDepth?: number | undefined;
|
|
22
|
-
transform?: string | (string | [string, string])[] | undefined;
|
|
23
|
-
fieldTransform?: "snake" | "pascal" | "camel" | "screaming snake" | undefined;
|
|
24
|
-
skipTypeAnnotations?: boolean | undefined;
|
|
25
|
-
} | {
|
|
26
|
-
tag: string | {
|
|
27
|
-
regex: string;
|
|
28
|
-
};
|
|
29
|
-
transform?: string | (string | [string, string])[] | undefined;
|
|
30
|
-
fieldTransform?: "snake" | "pascal" | "camel" | "screaming snake" | undefined;
|
|
31
|
-
skipTypeAnnotations?: boolean | undefined;
|
|
32
|
-
})[];
|
|
33
|
-
migrationsDir: string;
|
|
34
|
-
keepAlive?: boolean | undefined;
|
|
35
|
-
overrides?: {
|
|
36
|
-
types?: Record<"bigint" | "boolean" | "int" | "null" | "void" | "date" | "int2" | "int4" | "int8" | "smallint" | "real" | "float4" | "float" | "float8" | "numeric" | "decimal" | "smallserial" | "serial" | "bigserial" | "uuid" | "text" | "varchar" | "char" | "bpchar" | "citext" | "bit" | "bool" | "timestamp" | "timestamptz" | "time" | "timetz" | "interval" | "inet" | "cidr" | "macaddr" | "macaddr8" | "money" | "json" | "jsonb" | "bytea", string | {
|
|
37
|
-
parameter: string | {
|
|
38
|
-
regex: string;
|
|
39
|
-
};
|
|
40
|
-
return: string;
|
|
41
|
-
}> | Record<string, string | {
|
|
42
|
-
parameter: string | {
|
|
43
|
-
regex: string;
|
|
44
|
-
};
|
|
45
|
-
return: string;
|
|
46
|
-
}> | undefined;
|
|
47
|
-
columns?: Record<string, string> | undefined;
|
|
48
|
-
} | undefined;
|
|
49
|
-
nullAsUndefined?: boolean | undefined;
|
|
50
|
-
nullAsOptional?: boolean | undefined;
|
|
51
|
-
inferLiterals?: boolean | ("string" | "number" | "boolean")[] | undefined;
|
|
52
|
-
connectionUrl?: string | undefined;
|
|
53
|
-
databaseName?: string | undefined;
|
|
54
|
-
watchMode?: boolean | undefined;
|
|
55
|
-
} | {
|
|
56
|
-
targets: ({
|
|
57
|
-
wrapper: string | {
|
|
58
|
-
regex: string;
|
|
59
|
-
};
|
|
60
|
-
maxDepth?: number | undefined;
|
|
61
|
-
transform?: string | (string | [string, string])[] | undefined;
|
|
62
|
-
fieldTransform?: "snake" | "pascal" | "camel" | "screaming snake" | undefined;
|
|
63
|
-
skipTypeAnnotations?: boolean | undefined;
|
|
64
|
-
} | {
|
|
65
|
-
tag: string | {
|
|
66
|
-
regex: string;
|
|
67
|
-
};
|
|
68
|
-
transform?: string | (string | [string, string])[] | undefined;
|
|
69
|
-
fieldTransform?: "snake" | "pascal" | "camel" | "screaming snake" | undefined;
|
|
70
|
-
skipTypeAnnotations?: boolean | undefined;
|
|
71
|
-
})[];
|
|
72
|
-
databaseUrl: string;
|
|
73
|
-
keepAlive?: boolean | undefined;
|
|
74
|
-
overrides?: {
|
|
75
|
-
types?: Record<"bigint" | "boolean" | "int" | "null" | "void" | "date" | "int2" | "int4" | "int8" | "smallint" | "real" | "float4" | "float" | "float8" | "numeric" | "decimal" | "smallserial" | "serial" | "bigserial" | "uuid" | "text" | "varchar" | "char" | "bpchar" | "citext" | "bit" | "bool" | "timestamp" | "timestamptz" | "time" | "timetz" | "interval" | "inet" | "cidr" | "macaddr" | "macaddr8" | "money" | "json" | "jsonb" | "bytea", string | {
|
|
76
|
-
parameter: string | {
|
|
77
|
-
regex: string;
|
|
78
|
-
};
|
|
79
|
-
return: string;
|
|
80
|
-
}> | Record<string, string | {
|
|
81
|
-
parameter: string | {
|
|
82
|
-
regex: string;
|
|
83
|
-
};
|
|
84
|
-
return: string;
|
|
85
|
-
}> | undefined;
|
|
86
|
-
columns?: Record<string, string> | undefined;
|
|
87
|
-
} | undefined;
|
|
88
|
-
nullAsUndefined?: boolean | undefined;
|
|
89
|
-
nullAsOptional?: boolean | undefined;
|
|
90
|
-
inferLiterals?: boolean | ("string" | "number" | "boolean")[] | undefined;
|
|
91
|
-
} | ({
|
|
92
|
-
targets: ({
|
|
93
|
-
wrapper: string | {
|
|
94
|
-
regex: string;
|
|
95
|
-
};
|
|
96
|
-
maxDepth?: number | undefined;
|
|
97
|
-
transform?: string | (string | [string, string])[] | undefined;
|
|
98
|
-
fieldTransform?: "snake" | "pascal" | "camel" | "screaming snake" | undefined;
|
|
99
|
-
skipTypeAnnotations?: boolean | undefined;
|
|
100
|
-
} | {
|
|
101
|
-
tag: string | {
|
|
102
|
-
regex: string;
|
|
103
|
-
};
|
|
104
|
-
transform?: string | (string | [string, string])[] | undefined;
|
|
105
|
-
fieldTransform?: "snake" | "pascal" | "camel" | "screaming snake" | undefined;
|
|
106
|
-
skipTypeAnnotations?: boolean | undefined;
|
|
107
|
-
})[];
|
|
108
|
-
migrationsDir: string;
|
|
109
|
-
keepAlive?: boolean | undefined;
|
|
110
|
-
overrides?: {
|
|
111
|
-
types?: Record<"bigint" | "boolean" | "int" | "null" | "void" | "date" | "int2" | "int4" | "int8" | "smallint" | "real" | "float4" | "float" | "float8" | "numeric" | "decimal" | "smallserial" | "serial" | "bigserial" | "uuid" | "text" | "varchar" | "char" | "bpchar" | "citext" | "bit" | "bool" | "timestamp" | "timestamptz" | "time" | "timetz" | "interval" | "inet" | "cidr" | "macaddr" | "macaddr8" | "money" | "json" | "jsonb" | "bytea", string | {
|
|
112
|
-
parameter: string | {
|
|
113
|
-
regex: string;
|
|
114
|
-
};
|
|
115
|
-
return: string;
|
|
116
|
-
}> | Record<string, string | {
|
|
117
|
-
parameter: string | {
|
|
118
|
-
regex: string;
|
|
119
|
-
};
|
|
120
|
-
return: string;
|
|
121
|
-
}> | undefined;
|
|
122
|
-
columns?: Record<string, string> | undefined;
|
|
123
|
-
} | undefined;
|
|
124
|
-
nullAsUndefined?: boolean | undefined;
|
|
125
|
-
nullAsOptional?: boolean | undefined;
|
|
126
|
-
inferLiterals?: boolean | ("string" | "number" | "boolean")[] | undefined;
|
|
127
|
-
connectionUrl?: string | undefined;
|
|
128
|
-
databaseName?: string | undefined;
|
|
129
|
-
watchMode?: boolean | undefined;
|
|
130
|
-
} | {
|
|
131
|
-
targets: ({
|
|
132
|
-
wrapper: string | {
|
|
133
|
-
regex: string;
|
|
134
|
-
};
|
|
135
|
-
maxDepth?: number | undefined;
|
|
136
|
-
transform?: string | (string | [string, string])[] | undefined;
|
|
137
|
-
fieldTransform?: "snake" | "pascal" | "camel" | "screaming snake" | undefined;
|
|
138
|
-
skipTypeAnnotations?: boolean | undefined;
|
|
139
|
-
} | {
|
|
140
|
-
tag: string | {
|
|
141
|
-
regex: string;
|
|
142
|
-
};
|
|
143
|
-
transform?: string | (string | [string, string])[] | undefined;
|
|
144
|
-
fieldTransform?: "snake" | "pascal" | "camel" | "screaming snake" | undefined;
|
|
145
|
-
skipTypeAnnotations?: boolean | undefined;
|
|
146
|
-
})[];
|
|
147
|
-
databaseUrl: string;
|
|
148
|
-
keepAlive?: boolean | undefined;
|
|
149
|
-
overrides?: {
|
|
150
|
-
types?: Record<"bigint" | "boolean" | "int" | "null" | "void" | "date" | "int2" | "int4" | "int8" | "smallint" | "real" | "float4" | "float" | "float8" | "numeric" | "decimal" | "smallserial" | "serial" | "bigserial" | "uuid" | "text" | "varchar" | "char" | "bpchar" | "citext" | "bit" | "bool" | "timestamp" | "timestamptz" | "time" | "timetz" | "interval" | "inet" | "cidr" | "macaddr" | "macaddr8" | "money" | "json" | "jsonb" | "bytea", string | {
|
|
151
|
-
parameter: string | {
|
|
152
|
-
regex: string;
|
|
153
|
-
};
|
|
154
|
-
return: string;
|
|
155
|
-
}> | Record<string, string | {
|
|
156
|
-
parameter: string | {
|
|
157
|
-
regex: string;
|
|
158
|
-
};
|
|
159
|
-
return: string;
|
|
160
|
-
}> | undefined;
|
|
161
|
-
columns?: Record<string, string> | undefined;
|
|
162
|
-
} | undefined;
|
|
163
|
-
nullAsUndefined?: boolean | undefined;
|
|
164
|
-
nullAsOptional?: boolean | undefined;
|
|
165
|
-
inferLiterals?: boolean | ("string" | "number" | "boolean")[] | undefined;
|
|
166
|
-
})[];
|
|
167
|
-
} | {
|
|
168
|
-
useConfigFile: boolean;
|
|
169
|
-
})[], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
170
|
-
name: string;
|
|
171
|
-
};
|
|
172
|
-
};
|
|
173
|
-
meta: {
|
|
174
|
-
name: string;
|
|
175
|
-
version: string;
|
|
176
|
-
};
|
|
177
|
-
};
|
|
178
|
-
};
|
|
179
|
-
rules: {
|
|
180
|
-
"slonik/check-sql": ["error", {
|
|
181
|
-
useConfigFile: boolean;
|
|
182
|
-
}];
|
|
183
|
-
};
|
|
184
|
-
};
|
|
185
|
-
/**
|
|
186
|
-
* If you prefer configuring via a flat config, use this config.
|
|
187
|
-
*/
|
|
188
7
|
connections: (connections: Config["connections"]) => FlatConfig.Config;
|
|
189
8
|
};
|
|
190
9
|
};
|
package/dist/config.d.mts
CHANGED
|
@@ -1,190 +1,9 @@
|
|
|
1
|
-
import * as _typescript_eslint_utils_ts_eslint from '@typescript-eslint/utils/ts-eslint';
|
|
2
1
|
import { FlatConfig } from '@typescript-eslint/utils/ts-eslint';
|
|
3
2
|
import { C as Config } from './shared/eslint-plugin-slonik.1m1xlVmw.mjs';
|
|
4
3
|
import 'zod';
|
|
5
4
|
|
|
6
5
|
declare const _default: {
|
|
7
6
|
configs: {
|
|
8
|
-
/**
|
|
9
|
-
* If you prefer configuring via a config file (slonik.config.ts), use this config.
|
|
10
|
-
*/
|
|
11
|
-
useConfigFile: {
|
|
12
|
-
plugins: {
|
|
13
|
-
slonik: {
|
|
14
|
-
rules: {
|
|
15
|
-
"check-sql": _typescript_eslint_utils_ts_eslint.RuleModule<"error" | "typeInferenceFailed" | "invalidQuery" | "missingTypeAnnotations" | "incorrectTypeAnnotations" | "invalidTypeAnnotations", ({
|
|
16
|
-
connections: {
|
|
17
|
-
targets: ({
|
|
18
|
-
wrapper: string | {
|
|
19
|
-
regex: string;
|
|
20
|
-
};
|
|
21
|
-
maxDepth?: number | undefined;
|
|
22
|
-
transform?: string | (string | [string, string])[] | undefined;
|
|
23
|
-
fieldTransform?: "snake" | "pascal" | "camel" | "screaming snake" | undefined;
|
|
24
|
-
skipTypeAnnotations?: boolean | undefined;
|
|
25
|
-
} | {
|
|
26
|
-
tag: string | {
|
|
27
|
-
regex: string;
|
|
28
|
-
};
|
|
29
|
-
transform?: string | (string | [string, string])[] | undefined;
|
|
30
|
-
fieldTransform?: "snake" | "pascal" | "camel" | "screaming snake" | undefined;
|
|
31
|
-
skipTypeAnnotations?: boolean | undefined;
|
|
32
|
-
})[];
|
|
33
|
-
migrationsDir: string;
|
|
34
|
-
keepAlive?: boolean | undefined;
|
|
35
|
-
overrides?: {
|
|
36
|
-
types?: Record<"bigint" | "boolean" | "int" | "null" | "void" | "date" | "int2" | "int4" | "int8" | "smallint" | "real" | "float4" | "float" | "float8" | "numeric" | "decimal" | "smallserial" | "serial" | "bigserial" | "uuid" | "text" | "varchar" | "char" | "bpchar" | "citext" | "bit" | "bool" | "timestamp" | "timestamptz" | "time" | "timetz" | "interval" | "inet" | "cidr" | "macaddr" | "macaddr8" | "money" | "json" | "jsonb" | "bytea", string | {
|
|
37
|
-
parameter: string | {
|
|
38
|
-
regex: string;
|
|
39
|
-
};
|
|
40
|
-
return: string;
|
|
41
|
-
}> | Record<string, string | {
|
|
42
|
-
parameter: string | {
|
|
43
|
-
regex: string;
|
|
44
|
-
};
|
|
45
|
-
return: string;
|
|
46
|
-
}> | undefined;
|
|
47
|
-
columns?: Record<string, string> | undefined;
|
|
48
|
-
} | undefined;
|
|
49
|
-
nullAsUndefined?: boolean | undefined;
|
|
50
|
-
nullAsOptional?: boolean | undefined;
|
|
51
|
-
inferLiterals?: boolean | ("string" | "number" | "boolean")[] | undefined;
|
|
52
|
-
connectionUrl?: string | undefined;
|
|
53
|
-
databaseName?: string | undefined;
|
|
54
|
-
watchMode?: boolean | undefined;
|
|
55
|
-
} | {
|
|
56
|
-
targets: ({
|
|
57
|
-
wrapper: string | {
|
|
58
|
-
regex: string;
|
|
59
|
-
};
|
|
60
|
-
maxDepth?: number | undefined;
|
|
61
|
-
transform?: string | (string | [string, string])[] | undefined;
|
|
62
|
-
fieldTransform?: "snake" | "pascal" | "camel" | "screaming snake" | undefined;
|
|
63
|
-
skipTypeAnnotations?: boolean | undefined;
|
|
64
|
-
} | {
|
|
65
|
-
tag: string | {
|
|
66
|
-
regex: string;
|
|
67
|
-
};
|
|
68
|
-
transform?: string | (string | [string, string])[] | undefined;
|
|
69
|
-
fieldTransform?: "snake" | "pascal" | "camel" | "screaming snake" | undefined;
|
|
70
|
-
skipTypeAnnotations?: boolean | undefined;
|
|
71
|
-
})[];
|
|
72
|
-
databaseUrl: string;
|
|
73
|
-
keepAlive?: boolean | undefined;
|
|
74
|
-
overrides?: {
|
|
75
|
-
types?: Record<"bigint" | "boolean" | "int" | "null" | "void" | "date" | "int2" | "int4" | "int8" | "smallint" | "real" | "float4" | "float" | "float8" | "numeric" | "decimal" | "smallserial" | "serial" | "bigserial" | "uuid" | "text" | "varchar" | "char" | "bpchar" | "citext" | "bit" | "bool" | "timestamp" | "timestamptz" | "time" | "timetz" | "interval" | "inet" | "cidr" | "macaddr" | "macaddr8" | "money" | "json" | "jsonb" | "bytea", string | {
|
|
76
|
-
parameter: string | {
|
|
77
|
-
regex: string;
|
|
78
|
-
};
|
|
79
|
-
return: string;
|
|
80
|
-
}> | Record<string, string | {
|
|
81
|
-
parameter: string | {
|
|
82
|
-
regex: string;
|
|
83
|
-
};
|
|
84
|
-
return: string;
|
|
85
|
-
}> | undefined;
|
|
86
|
-
columns?: Record<string, string> | undefined;
|
|
87
|
-
} | undefined;
|
|
88
|
-
nullAsUndefined?: boolean | undefined;
|
|
89
|
-
nullAsOptional?: boolean | undefined;
|
|
90
|
-
inferLiterals?: boolean | ("string" | "number" | "boolean")[] | undefined;
|
|
91
|
-
} | ({
|
|
92
|
-
targets: ({
|
|
93
|
-
wrapper: string | {
|
|
94
|
-
regex: string;
|
|
95
|
-
};
|
|
96
|
-
maxDepth?: number | undefined;
|
|
97
|
-
transform?: string | (string | [string, string])[] | undefined;
|
|
98
|
-
fieldTransform?: "snake" | "pascal" | "camel" | "screaming snake" | undefined;
|
|
99
|
-
skipTypeAnnotations?: boolean | undefined;
|
|
100
|
-
} | {
|
|
101
|
-
tag: string | {
|
|
102
|
-
regex: string;
|
|
103
|
-
};
|
|
104
|
-
transform?: string | (string | [string, string])[] | undefined;
|
|
105
|
-
fieldTransform?: "snake" | "pascal" | "camel" | "screaming snake" | undefined;
|
|
106
|
-
skipTypeAnnotations?: boolean | undefined;
|
|
107
|
-
})[];
|
|
108
|
-
migrationsDir: string;
|
|
109
|
-
keepAlive?: boolean | undefined;
|
|
110
|
-
overrides?: {
|
|
111
|
-
types?: Record<"bigint" | "boolean" | "int" | "null" | "void" | "date" | "int2" | "int4" | "int8" | "smallint" | "real" | "float4" | "float" | "float8" | "numeric" | "decimal" | "smallserial" | "serial" | "bigserial" | "uuid" | "text" | "varchar" | "char" | "bpchar" | "citext" | "bit" | "bool" | "timestamp" | "timestamptz" | "time" | "timetz" | "interval" | "inet" | "cidr" | "macaddr" | "macaddr8" | "money" | "json" | "jsonb" | "bytea", string | {
|
|
112
|
-
parameter: string | {
|
|
113
|
-
regex: string;
|
|
114
|
-
};
|
|
115
|
-
return: string;
|
|
116
|
-
}> | Record<string, string | {
|
|
117
|
-
parameter: string | {
|
|
118
|
-
regex: string;
|
|
119
|
-
};
|
|
120
|
-
return: string;
|
|
121
|
-
}> | undefined;
|
|
122
|
-
columns?: Record<string, string> | undefined;
|
|
123
|
-
} | undefined;
|
|
124
|
-
nullAsUndefined?: boolean | undefined;
|
|
125
|
-
nullAsOptional?: boolean | undefined;
|
|
126
|
-
inferLiterals?: boolean | ("string" | "number" | "boolean")[] | undefined;
|
|
127
|
-
connectionUrl?: string | undefined;
|
|
128
|
-
databaseName?: string | undefined;
|
|
129
|
-
watchMode?: boolean | undefined;
|
|
130
|
-
} | {
|
|
131
|
-
targets: ({
|
|
132
|
-
wrapper: string | {
|
|
133
|
-
regex: string;
|
|
134
|
-
};
|
|
135
|
-
maxDepth?: number | undefined;
|
|
136
|
-
transform?: string | (string | [string, string])[] | undefined;
|
|
137
|
-
fieldTransform?: "snake" | "pascal" | "camel" | "screaming snake" | undefined;
|
|
138
|
-
skipTypeAnnotations?: boolean | undefined;
|
|
139
|
-
} | {
|
|
140
|
-
tag: string | {
|
|
141
|
-
regex: string;
|
|
142
|
-
};
|
|
143
|
-
transform?: string | (string | [string, string])[] | undefined;
|
|
144
|
-
fieldTransform?: "snake" | "pascal" | "camel" | "screaming snake" | undefined;
|
|
145
|
-
skipTypeAnnotations?: boolean | undefined;
|
|
146
|
-
})[];
|
|
147
|
-
databaseUrl: string;
|
|
148
|
-
keepAlive?: boolean | undefined;
|
|
149
|
-
overrides?: {
|
|
150
|
-
types?: Record<"bigint" | "boolean" | "int" | "null" | "void" | "date" | "int2" | "int4" | "int8" | "smallint" | "real" | "float4" | "float" | "float8" | "numeric" | "decimal" | "smallserial" | "serial" | "bigserial" | "uuid" | "text" | "varchar" | "char" | "bpchar" | "citext" | "bit" | "bool" | "timestamp" | "timestamptz" | "time" | "timetz" | "interval" | "inet" | "cidr" | "macaddr" | "macaddr8" | "money" | "json" | "jsonb" | "bytea", string | {
|
|
151
|
-
parameter: string | {
|
|
152
|
-
regex: string;
|
|
153
|
-
};
|
|
154
|
-
return: string;
|
|
155
|
-
}> | Record<string, string | {
|
|
156
|
-
parameter: string | {
|
|
157
|
-
regex: string;
|
|
158
|
-
};
|
|
159
|
-
return: string;
|
|
160
|
-
}> | undefined;
|
|
161
|
-
columns?: Record<string, string> | undefined;
|
|
162
|
-
} | undefined;
|
|
163
|
-
nullAsUndefined?: boolean | undefined;
|
|
164
|
-
nullAsOptional?: boolean | undefined;
|
|
165
|
-
inferLiterals?: boolean | ("string" | "number" | "boolean")[] | undefined;
|
|
166
|
-
})[];
|
|
167
|
-
} | {
|
|
168
|
-
useConfigFile: boolean;
|
|
169
|
-
})[], unknown, _typescript_eslint_utils_ts_eslint.RuleListener> & {
|
|
170
|
-
name: string;
|
|
171
|
-
};
|
|
172
|
-
};
|
|
173
|
-
meta: {
|
|
174
|
-
name: string;
|
|
175
|
-
version: string;
|
|
176
|
-
};
|
|
177
|
-
};
|
|
178
|
-
};
|
|
179
|
-
rules: {
|
|
180
|
-
"slonik/check-sql": ["error", {
|
|
181
|
-
useConfigFile: boolean;
|
|
182
|
-
}];
|
|
183
|
-
};
|
|
184
|
-
};
|
|
185
|
-
/**
|
|
186
|
-
* If you prefer configuring via a flat config, use this config.
|
|
187
|
-
*/
|
|
188
7
|
connections: (connections: Config["connections"]) => FlatConfig.Config;
|
|
189
8
|
};
|
|
190
9
|
};
|