Skip to content

Commit 83b07cd

Browse files
committed
chore: add eslint rule
1 parent d971989 commit 83b07cd

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

packages/db/eslint.config.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,19 @@ import baseConfig from '@acme/eslint-config/base'
33
/** @type {import('typescript-eslint').Config} */
44
export default [
55
{
6+
// NOTE: we should ban accesses on the `transaction` property for kysely
7+
// because this doesn't work well with the plugin
8+
rules: {
9+
'no-restricted-syntax': [
10+
'error',
11+
{
12+
selector:
13+
"MemberExpression[property.name='transaction'][object.property.name='$kysely']",
14+
message:
15+
'Use prisma.$transaction() instead of db.$kysely.transaction()',
16+
},
17+
],
18+
},
619
ignores: ['dist/**', 'src/generated/**'],
720
},
821
...baseConfig,

0 commit comments

Comments
 (0)