mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-04-21 15:03:37 +02:00
Add eslint and run linter in workflow (#1819)
Some checks are pending
Project CI / build (24.x) (push) Waiting to run
Some checks are pending
Project CI / build (24.x) (push) Waiting to run
This commit is contained in:
parent
f850cbda76
commit
3cbc18f42b
23 changed files with 974 additions and 36 deletions
|
|
@ -1,12 +1,12 @@
|
|||
import { compilePack } from '@foundryvtt/foundryvtt-cli';
|
||||
import readline from 'node:readline/promises';
|
||||
import { promises as fs } from 'fs';
|
||||
import systemJSON from "../system.json" with { type: "json" };
|
||||
import systemJSON from '../system.json' with { type: 'json' };
|
||||
|
||||
const MODULE_ID = process.cwd();
|
||||
|
||||
const answer = await (async () => {
|
||||
if (process.argv.includes("--build")) return "overwrite";
|
||||
if (process.argv.includes('--build')) return 'overwrite';
|
||||
|
||||
const rl = readline.createInterface({
|
||||
input: process.stdin,
|
||||
|
|
@ -42,8 +42,8 @@ async function pullToLDB() {
|
|||
function transformEntry(entry) {
|
||||
const stats = {
|
||||
coreVersion: systemJSON.compatibility.minimum,
|
||||
systemId: "daggerheart",
|
||||
systemVersion: systemJSON.version,
|
||||
systemId: 'daggerheart',
|
||||
systemVersion: systemJSON.version
|
||||
};
|
||||
|
||||
entry._stats = { ...stats };
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ for (const pack of packs) {
|
|||
await extractPack(`${MODULE_ID}/${pack}`, `${MODULE_ID}/src/${pack}`, {
|
||||
yaml,
|
||||
transformName,
|
||||
transformEntry,
|
||||
transformEntry
|
||||
});
|
||||
}
|
||||
/**
|
||||
|
|
@ -45,12 +45,12 @@ function transformEntry(entry) {
|
|||
|
||||
delete entry._stats;
|
||||
for (const effect of entry.effects ?? []) {
|
||||
effect._stats = prune(effect._stats)
|
||||
effect._stats = prune(effect._stats);
|
||||
}
|
||||
for (const item of entry.items ?? []) {
|
||||
item._stats = prune(item._stats);
|
||||
for (const effect of item.effects ?? []) {
|
||||
effect._stats = prune(effect._stats)
|
||||
effect._stats = prune(effect._stats);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue