Update Supabase clients and refactor codebase
Refactored several Supabase client functions and updated them to use generics. Also, the '@kit/supabase-config' package was removed from the project and all references were replaced accordingly. The project's dependencies were updated as well, including the Supabase package which was upgraded to the latest version.
This commit is contained in:
29
tooling/eslint/apps.js
Normal file
29
tooling/eslint/apps.js
Normal file
@@ -0,0 +1,29 @@
|
||||
/** @type {import("eslint").Linter.Config} */
|
||||
const config = {
|
||||
env: {
|
||||
es2022: true,
|
||||
node: true,
|
||||
},
|
||||
parser: '@typescript-eslint/parser',
|
||||
parserOptions: {
|
||||
project: true,
|
||||
},
|
||||
plugins: ['@typescript-eslint', 'import'],
|
||||
rules: {
|
||||
'no-restricted-imports': [
|
||||
'error',
|
||||
{
|
||||
paths: [
|
||||
{
|
||||
name: '@kit/supabase/database',
|
||||
importNames: ['Database'],
|
||||
message:
|
||||
'Please use the application types from your app "~/lib/database.types" instead',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
module.exports = config;
|
||||
@@ -32,6 +32,18 @@ const config = {
|
||||
2,
|
||||
{ checksVoidReturn: { attributes: false } },
|
||||
],
|
||||
'no-restricted-imports': [
|
||||
'error',
|
||||
{
|
||||
paths: [
|
||||
{
|
||||
name: 'react-i18next',
|
||||
importNames: ['Trans'],
|
||||
message: 'Please use `@kit/ui/trans` instead',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
ignorePatterns: [
|
||||
'**/.eslintrc.cjs',
|
||||
|
||||
@@ -4,9 +4,7 @@
|
||||
"private": true,
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"./base.js",
|
||||
"./nextjs.js",
|
||||
"./react.js"
|
||||
"./apps.js"
|
||||
],
|
||||
"scripts": {
|
||||
"clean": "rm -rf .turbo node_modules",
|
||||
@@ -35,7 +33,7 @@
|
||||
"eslintConfig": {
|
||||
"root": true,
|
||||
"extends": [
|
||||
"./base.js"
|
||||
"./apps.js"
|
||||
]
|
||||
},
|
||||
"prettier": "@kit/prettier-config"
|
||||
|
||||
Reference in New Issue
Block a user