-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: 更新eslint 9并修复大量代码风格错误 (#1343)
- Loading branch information
Showing
217 changed files
with
2,100 additions
and
1,737 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,6 +45,9 @@ jobs: | |
- name: Install dependencies | ||
run: pnpm i --frozen-lockfile | ||
|
||
- name: Prepare dev libs and code | ||
run: pnpm prepareDev | ||
|
||
- name: Lint code | ||
run: pnpm lint | ||
|
||
|
@@ -60,10 +63,6 @@ jobs: | |
if: vars.RUN_TESTS == 'true' | ||
run: docker ps | ||
|
||
- name: Prepare dev libs and code | ||
if: vars.RUN_TESTS == 'true' || vars.RUN_RELEASE == 'true' | ||
run: pnpm prepareDev | ||
|
||
- name: Wait for ports | ||
if: vars.RUN_TESTS == 'true' | ||
uses: ifaxity/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const base = require("../../eslint.config"); | ||
const react = require("@ddadaal/eslint-config/react"); | ||
|
||
module.export = { | ||
...base, | ||
...react, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 17 additions & 3 deletions
20
apps/audit-server/src/migrations/Migration20230817054947.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,27 @@ | ||
import { Migration } from '@mikro-orm/migrations'; | ||
/** | ||
* Copyright (c) 2022 Peking University and Peking University Institute for Computing and Digital Economy | ||
* SCOW is licensed under Mulan PSL v2. | ||
* You can use this software according to the terms and conditions of the Mulan PSL v2. | ||
* You may obtain a copy of Mulan PSL v2 at: | ||
* http://license.coscl.org.cn/MulanPSL2 | ||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, | ||
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, | ||
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. | ||
* See the Mulan PSL v2 for more details. | ||
*/ | ||
|
||
/* eslint-disable @stylistic/max-len */ | ||
|
||
import { Migration } from "@mikro-orm/migrations"; | ||
|
||
export class Migration20230817054947 extends Migration { | ||
|
||
async up(): Promise<void> { | ||
this.addSql('create table `operation_log` (`id` int unsigned not null auto_increment primary key, `operator_user_id` varchar(255) not null, `operator_ip` varchar(255) not null, `operation_time` DATETIME(6) not null default current_timestamp(6), `operation_result` enum(\'UNKNOWN\', \'SUCCESS\', \'FAIL\') not null comment \'UNKNOWN, SUCCESS, FAIL\', `meta_data` json null) default character set utf8mb4 engine = InnoDB;'); | ||
this.addSql("create table `operation_log` (`id` int unsigned not null auto_increment primary key, `operator_user_id` varchar(255) not null, `operator_ip` varchar(255) not null, `operation_time` DATETIME(6) not null default current_timestamp(6), `operation_result` enum('UNKNOWN', 'SUCCESS', 'FAIL') not null comment 'UNKNOWN, SUCCESS, FAIL', `meta_data` json null) default character set utf8mb4 engine = InnoDB;"); | ||
} | ||
|
||
async down(): Promise<void> { | ||
this.addSql('drop table if exists `operation_log`;'); | ||
this.addSql("drop table if exists `operation_log`;"); | ||
} | ||
|
||
} |
14 changes: 14 additions & 0 deletions
14
apps/audit-server/src/migrations/Migration20240218000000.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 21 additions & 7 deletions
28
apps/audit-server/src/migrations/Migration20240313015230.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,32 @@ | ||
import { Migration } from '@mikro-orm/migrations'; | ||
/** | ||
* Copyright (c) 2022 Peking University and Peking University Institute for Computing and Digital Economy | ||
* SCOW is licensed under Mulan PSL v2. | ||
* You can use this software according to the terms and conditions of the Mulan PSL v2. | ||
* You may obtain a copy of Mulan PSL v2 at: | ||
* http://license.coscl.org.cn/MulanPSL2 | ||
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, | ||
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, | ||
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. | ||
* See the Mulan PSL v2 for more details. | ||
*/ | ||
|
||
/* eslint-disable @stylistic/max-len */ | ||
|
||
import { Migration } from "@mikro-orm/migrations"; | ||
|
||
export class Migration20240313015230 extends Migration { | ||
|
||
async up(): Promise<void> { | ||
this.addSql('alter table `operation_log` add `custom_event_type` varchar(255) null;'); | ||
this.addSql('alter table `operation_log` modify `operation_time` DATETIME(6) not null default current_timestamp(6), modify `operation_result` enum(\'UNKNOWN\', \'SUCCESS\', \'FAIL\') not null comment \'UNKNOWN, SUCCESS, FAIL\';'); | ||
this.addSql('alter table `operation_log` add index `custom_event`(`custom_event_type`);'); | ||
this.addSql("alter table `operation_log` add `custom_event_type` varchar(255) null;"); | ||
this.addSql("alter table `operation_log` modify `operation_time` DATETIME(6) not null default current_timestamp(6), modify `operation_result` enum('UNKNOWN', 'SUCCESS', 'FAIL') not null comment 'UNKNOWN, SUCCESS, FAIL';"); | ||
this.addSql("alter table `operation_log` add index `custom_event`(`custom_event_type`);"); | ||
} | ||
|
||
async down(): Promise<void> { | ||
this.addSql('alter table `operation_log` drop index `custom_event`;'); | ||
this.addSql('alter table `operation_log` drop column `custom_event_type`;'); | ||
this.addSql("alter table `operation_log` drop index `custom_event`;"); | ||
this.addSql("alter table `operation_log` drop column `custom_event_type`;"); | ||
|
||
this.addSql('alter table `operation_log` modify `operation_time` DATETIME(6) not null default current_timestamp(0), modify `operation_result` enum(\'UNKNOWN\', \'SUCCESS\', \'FAIL\') not null comment \'UNKNOWN, SUCCESS, FAIL\';'); | ||
this.addSql("alter table `operation_log` modify `operation_time` DATETIME(6) not null default current_timestamp(0), modify `operation_result` enum('UNKNOWN', 'SUCCESS', 'FAIL') not null comment 'UNKNOWN, SUCCESS, FAIL';"); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.