dev: update format/lint scripts
This commit is contained in:
parent
50b2d1c22b
commit
0335a353e8
4 changed files with 7 additions and 6 deletions
|
@ -20,12 +20,16 @@
|
||||||
"watch": "pnpm run dev",
|
"watch": "pnpm run dev",
|
||||||
"dev": "pnpm node ./scripts/dev.mjs",
|
"dev": "pnpm node ./scripts/dev.mjs",
|
||||||
"dev:staging": "NODE_OPTIONS=--max_old_space_size=3072 NODE_ENV=development pnpm run build && pnpm run start",
|
"dev:staging": "NODE_OPTIONS=--max_old_space_size=3072 NODE_ENV=development pnpm run build && pnpm run start",
|
||||||
"lint": "pnpm --filter !megalodon --filter !firefish-js -r --parallel run lint",
|
"lint": "pnpm run lint:ts; pnpm run lint:rs",
|
||||||
|
"lint:ts": "pnpm --filter !firefish-js -r --parallel run lint",
|
||||||
|
"lint:rs": "cargo clippy --fix --allow-dirty --allow-staged && cargo fmt --all --",
|
||||||
"debug": "pnpm run build:debug && pnpm run start",
|
"debug": "pnpm run build:debug && pnpm run start",
|
||||||
"build:debug": "pnpm run clean && pnpm node ./scripts/dev-build.mjs && pnpm run gulp",
|
"build:debug": "pnpm run clean && pnpm node ./scripts/dev-build.mjs && pnpm run gulp",
|
||||||
"mocha": "pnpm --filter backend run mocha",
|
"mocha": "pnpm --filter backend run mocha",
|
||||||
"test": "pnpm run mocha",
|
"test": "pnpm run mocha",
|
||||||
"format": "pnpm -r --parallel run format",
|
"format": "pnpm run format:ts; pnpm run format:rs",
|
||||||
|
"format:ts": "pnpm -r --parallel run format",
|
||||||
|
"format:rs": "cargo fmt --all --",
|
||||||
"clean": "pnpm node ./scripts/clean-built.mjs",
|
"clean": "pnpm node ./scripts/clean-built.mjs",
|
||||||
"clean-npm": "pnpm node ./scripts/clean-npm.mjs",
|
"clean-npm": "pnpm node ./scripts/clean-npm.mjs",
|
||||||
"clean-cargo": "cargo clean",
|
"clean-cargo": "cargo clean",
|
||||||
|
|
|
@ -19,7 +19,7 @@ regenerate-entities:
|
||||||
done
|
done
|
||||||
sed -i 's/#\[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum)\]/#[derive(Debug, PartialEq, Eq, EnumIter, DeriveActiveEnum)]\n#[cfg_attr(not(feature = "napi"), derive(Clone))]\n#[cfg_attr(feature = "napi", napi_derive::napi)]/' \
|
sed -i 's/#\[derive(Debug, Clone, PartialEq, Eq, EnumIter, DeriveActiveEnum)\]/#[derive(Debug, PartialEq, Eq, EnumIter, DeriveActiveEnum)]\n#[cfg_attr(not(feature = "napi"), derive(Clone))]\n#[cfg_attr(feature = "napi", napi_derive::napi)]/' \
|
||||||
src/model/entity/sea_orm_active_enums.rs
|
src/model/entity/sea_orm_active_enums.rs
|
||||||
pnpm run format
|
cargo fmt --all --
|
||||||
|
|
||||||
index.js: $(SRC)
|
index.js: $(SRC)
|
||||||
NODE_OPTIONS='--max_old_space_size=3072' pnpm run build:debug
|
NODE_OPTIONS='--max_old_space_size=3072' pnpm run build:debug
|
||||||
|
|
|
@ -39,8 +39,6 @@
|
||||||
"test": "pnpm run cargo:test && pnpm run build:debug && ava",
|
"test": "pnpm run cargo:test && pnpm run build:debug && ava",
|
||||||
"universal": "napi universal",
|
"universal": "napi universal",
|
||||||
"version": "napi version",
|
"version": "napi version",
|
||||||
"format": "cargo fmt --all --",
|
|
||||||
"lint": "cargo clippy --fix --allow-dirty --allow-staged && cargo fmt --all --",
|
|
||||||
"cargo:test": "pnpm run cargo:unit && pnpm run cargo:integration",
|
"cargo:test": "pnpm run cargo:unit && pnpm run cargo:integration",
|
||||||
"cargo:unit": "cargo test unit_test && cargo test -F napi unit_test",
|
"cargo:unit": "cargo test unit_test && cargo test -F napi unit_test",
|
||||||
"cargo:integration": "cargo test int_test"
|
"cargo:integration": "cargo test int_test"
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc -p ./",
|
"build": "tsc -p ./",
|
||||||
"build:debug": "pnpm run build",
|
"build:debug": "pnpm run build",
|
||||||
"lint": "pnpm biome check **/*.ts --apply",
|
|
||||||
"format": "pnpm biome format --write src/**/*.ts",
|
"format": "pnpm biome format --write src/**/*.ts",
|
||||||
"doc": "typedoc --out ../docs ./src",
|
"doc": "typedoc --out ../docs ./src",
|
||||||
"test": "NODE_ENV=test jest -u --maxWorkers=3"
|
"test": "NODE_ENV=test jest -u --maxWorkers=3"
|
||||||
|
|
Loading…
Reference in a new issue