Skip to content

Commit 4bfba8c

Browse files
committed
chore: lint
1 parent 806eab5 commit 4bfba8c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+3566
-4493
lines changed

app/Actions/Dashboard/Settings/UpdateAiConfig.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,16 @@ export default new Action({
88
method: 'POST',
99

1010
validations: {
11-
'default': {
11+
default: {
1212
rule: schema.enum(['meta.llama2-70b-chat-v1', 'meta.llama2-70b-chat-v2']),
13-
message: '`default` must refer to a valid AI model. Choose from `meta.llama2-70b-chat-v1` or `meta.llama2-70b-chat-v2`.',
13+
message:
14+
'`default` must refer to a valid AI model. Choose from `meta.llama2-70b-chat-v1` or `meta.llama2-70b-chat-v2`.',
1415
},
1516

1617
models: {
1718
rule: schema.enum(['meta.llama2-70b-chat-v1', 'meta.llama2-70b-chat-v2']),
18-
message: '`models` must refer to a valid AI model. Choose from `meta.llama2-70b-chat-v1` or `meta.llama2-70b-chat-v2`.',
19+
message:
20+
'`models` must refer to a valid AI model. Choose from `meta.llama2-70b-chat-v1` or `meta.llama2-70b-chat-v2`.',
1921
},
2022
},
2123

app/Models/SubscriberEmail.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,10 @@ export default {
2929
message: {
3030
email: 'Email must be valid',
3131
required: 'Email is required',
32-
}
32+
},
3333
},
3434

3535
factory: () => faker.internet.email(),
3636
},
3737
},
38-
3938
} satisfies Model

app/Models/User.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export default {
4747
rule: schema.string().minLength(3).maxLength(255),
4848
message: {
4949
minLength: 'Name must have a minimum of 3 characters',
50-
maxLength: 'Name must have a maximum of 255 characters'
50+
maxLength: 'Name must have a maximum of 255 characters',
5151
},
5252
},
5353

@@ -60,7 +60,7 @@ export default {
6060
rule: schema.string().email(),
6161
message: {
6262
email: 'Email must be a valid email address',
63-
}
63+
},
6464
},
6565

6666
factory: () => faker.internet.email(),
@@ -71,7 +71,7 @@ export default {
7171
rule: schema.string().minLength(3).maxLength(255),
7272
message: {
7373
minLength: 'Job title must have a minimum of 3 characters',
74-
maxLength: 'Job title must have a maximum of 255 characters'
74+
maxLength: 'Job title must have a maximum of 255 characters',
7575
},
7676
},
7777

@@ -83,7 +83,7 @@ export default {
8383
rule: schema.string().minLength(6).maxLength(255),
8484
message: {
8585
minLength: 'Password must have a minimum of 6 characters',
86-
maxLength: 'Password must have a maximum of 255 characters'
86+
maxLength: 'Password must have a maximum of 255 characters',
8787
},
8888
},
8989

@@ -102,5 +102,4 @@ export default {
102102
dashboard: {
103103
highlight: true,
104104
},
105-
106105
} satisfies Model

database/migrations/1716822278688-create-projects-table.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ import { sql } from '@stacksjs/database'
44
export async function up(db: Database<any>) {
55
await db.schema
66
.createTable('projects')
7-
.addColumn('id', 'integer', col => col.primaryKey().autoIncrement())
7+
.addColumn('id', 'integer', (col) => col.primaryKey().autoIncrement())
88
.addColumn('name', 'varchar(255)')
99
.addColumn('description', 'varchar(255)')
1010
.addColumn('url', 'varchar(255)')
1111
.addColumn('status', 'varchar(255)')
12-
.addColumn('created_at', 'timestamp', col => col.notNull().defaultTo(sql.raw('CURRENT_TIMESTAMP')))
12+
.addColumn('created_at', 'timestamp', (col) => col.notNull().defaultTo(sql.raw('CURRENT_TIMESTAMP')))
1313
.addColumn('updated_at', 'timestamp')
1414
.execute()
1515
}

database/migrations/1716822278689-create-subscriber_emails-table.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import { sql } from '@stacksjs/database'
44
export async function up(db: Database<any>) {
55
await db.schema
66
.createTable('subscriber_emails')
7-
.addColumn('id', 'integer', col => col.primaryKey().autoIncrement())
8-
.addColumn('email', 'varchar(255)', col => col.unique())
9-
.addColumn('created_at', 'timestamp', col => col.notNull().defaultTo(sql.raw('CURRENT_TIMESTAMP')))
7+
.addColumn('id', 'integer', (col) => col.primaryKey().autoIncrement())
8+
.addColumn('email', 'varchar(255)', (col) => col.unique())
9+
.addColumn('created_at', 'timestamp', (col) => col.notNull().defaultTo(sql.raw('CURRENT_TIMESTAMP')))
1010
.addColumn('updated_at', 'timestamp')
1111
.addColumn('deleted_at', 'timestamp')
1212
.execute()

database/migrations/1716822278690-create-deployments-table.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,16 @@ import { sql } from '@stacksjs/database'
44
export async function up(db: Database<any>) {
55
await db.schema
66
.createTable('deployments')
7-
.addColumn('id', 'integer', col => col.primaryKey().autoIncrement())
8-
.addColumn('commitSha', 'varchar(512)', col => col.unique())
7+
.addColumn('id', 'integer', (col) => col.primaryKey().autoIncrement())
8+
.addColumn('commitSha', 'varchar(512)', (col) => col.unique())
99
.addColumn('commitMessage', 'varchar(255)')
1010
.addColumn('branch', 'varchar(255)')
1111
.addColumn('status', 'varchar(255)')
1212
.addColumn('executionTime', 'integer')
1313
.addColumn('deployScript', 'varchar(255)')
1414
.addColumn('terminalOutput', 'varchar(255)')
15-
.addColumn('user_id', 'integer', (col) =>
16-
col.references('users.id').onDelete('cascade')
17-
)
18-
.addColumn('created_at', 'timestamp', col => col.notNull().defaultTo(sql.raw('CURRENT_TIMESTAMP')))
15+
.addColumn('user_id', 'integer', (col) => col.references('users.id').onDelete('cascade'))
16+
.addColumn('created_at', 'timestamp', (col) => col.notNull().defaultTo(sql.raw('CURRENT_TIMESTAMP')))
1917
.addColumn('updated_at', 'timestamp')
2018
.execute()
2119
}

database/migrations/1716822278690-create-users-table.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ import { sql } from '@stacksjs/database'
44
export async function up(db: Database<any>) {
55
await db.schema
66
.createTable('users')
7-
.addColumn('id', 'integer', col => col.primaryKey().autoIncrement())
7+
.addColumn('id', 'integer', (col) => col.primaryKey().autoIncrement())
88
.addColumn('name', 'varchar(255)')
9-
.addColumn('email', 'varchar(255)', col => col.unique())
9+
.addColumn('email', 'varchar(255)', (col) => col.unique())
1010
.addColumn('jobTitle', 'varchar(255)')
1111
.addColumn('password', 'varchar(255)')
12-
.addColumn('created_at', 'timestamp', col => col.notNull().defaultTo(sql.raw('CURRENT_TIMESTAMP')))
12+
.addColumn('created_at', 'timestamp', (col) => col.notNull().defaultTo(sql.raw('CURRENT_TIMESTAMP')))
1313
.addColumn('updated_at', 'timestamp')
1414
.addColumn('deleted_at', 'timestamp')
1515
.execute()

database/migrations/1716822278691-create-subscribers-table.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,10 @@ import { sql } from '@stacksjs/database'
44
export async function up(db: Database<any>) {
55
await db.schema
66
.createTable('subscribers')
7-
.addColumn('id', 'integer', col => col.primaryKey().autoIncrement())
7+
.addColumn('id', 'integer', (col) => col.primaryKey().autoIncrement())
88
.addColumn('subscribed', 'boolean')
9-
.addColumn('user_id', 'integer', (col) =>
10-
col.references('users.id').onDelete('cascade')
11-
)
12-
.addColumn('created_at', 'timestamp', col => col.notNull().defaultTo(sql.raw('CURRENT_TIMESTAMP')))
9+
.addColumn('user_id', 'integer', (col) => col.references('users.id').onDelete('cascade'))
10+
.addColumn('created_at', 'timestamp', (col) => col.notNull().defaultTo(sql.raw('CURRENT_TIMESTAMP')))
1311
.addColumn('updated_at', 'timestamp')
1412
.execute()
1513
}

database/migrations/1716822278692-create-access_tokens-table.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,16 @@ import { sql } from '@stacksjs/database'
44
export async function up(db: Database<any>) {
55
await db.schema
66
.createTable('access_tokens')
7-
.addColumn('id', 'integer', col => col.primaryKey().autoIncrement())
7+
.addColumn('id', 'integer', (col) => col.primaryKey().autoIncrement())
88
.addColumn('name', 'varchar(255)')
9-
.addColumn('token', 'varchar(512)', col => col.unique())
9+
.addColumn('token', 'varchar(512)', (col) => col.unique())
1010
.addColumn('plainTextToken', 'varchar(512)')
11-
.addColumn('abilities', sql`enum('read', 'write', 'admin', 'read|write', 'read|admin', 'write|admin', 'read|write|admin')`)
12-
.addColumn('team_id', 'integer', (col) =>
13-
col.references('teams.id').onDelete('cascade')
14-
)
15-
.addColumn('created_at', 'timestamp', col => col.notNull().defaultTo(sql.raw('CURRENT_TIMESTAMP')))
11+
.addColumn(
12+
'abilities',
13+
sql`enum('read', 'write', 'admin', 'read|write', 'read|admin', 'write|admin', 'read|write|admin')`,
14+
)
15+
.addColumn('team_id', 'integer', (col) => col.references('teams.id').onDelete('cascade'))
16+
.addColumn('created_at', 'timestamp', (col) => col.notNull().defaultTo(sql.raw('CURRENT_TIMESTAMP')))
1617
.addColumn('updated_at', 'timestamp')
1718
.execute()
1819
}

database/migrations/1716822278692-create-posts-table.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,11 @@ import { sql } from '@stacksjs/database'
44
export async function up(db: Database<any>) {
55
await db.schema
66
.createTable('posts')
7-
.addColumn('id', 'integer', col => col.primaryKey().autoIncrement())
7+
.addColumn('id', 'integer', (col) => col.primaryKey().autoIncrement())
88
.addColumn('title', 'varchar(255)')
99
.addColumn('body', 'varchar(255)')
10-
.addColumn('user_id', 'integer', (col) =>
11-
col.references('users.id').onDelete('cascade')
12-
)
13-
.addColumn('created_at', 'timestamp', col => col.notNull().defaultTo(sql.raw('CURRENT_TIMESTAMP')))
10+
.addColumn('user_id', 'integer', (col) => col.references('users.id').onDelete('cascade'))
11+
.addColumn('created_at', 'timestamp', (col) => col.notNull().defaultTo(sql.raw('CURRENT_TIMESTAMP')))
1412
.addColumn('updated_at', 'timestamp')
1513
.execute()
1614
}

0 commit comments

Comments
 (0)