Adding Prettier

* Added prettier with automatic useage on pre-commit to avoid style breakage
* Ran Prettier on the project
This commit is contained in:
WBHarry 2025-05-23 18:57:50 +02:00 committed by GitHub
parent 820c2df1f4
commit b24cdcc9ed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
136 changed files with 13929 additions and 12206 deletions

View file

@ -1,64 +1,64 @@
import { range } from "./generalConfig.mjs";
import { range } from './generalConfig.mjs';
export const valueTypes = {
numberString: {
id: 'numberString',
id: 'numberString'
},
select: {
id: 'select',
id: 'select'
}
}
};
export const parseTypes = {
string: {
id: 'string',
id: 'string'
},
number: {
id: 'number',
},
}
id: 'number'
}
};
export const applyLocations = {
attackRoll: {
id: 'attackRoll',
name: "DAGGERHEART.Effects.ApplyLocations.AttackRoll.Name",
name: 'DAGGERHEART.Effects.ApplyLocations.AttackRoll.Name'
},
damageRoll: {
id: 'damageRoll',
name: "DAGGERHEART.Effects.ApplyLocations.DamageRoll.Name",
name: 'DAGGERHEART.Effects.ApplyLocations.DamageRoll.Name'
}
};
export const effectTypes = {
health: {
id: "health",
name: "DAGGERHEART.Effects.Types.Health.Name",
id: 'health',
name: 'DAGGERHEART.Effects.Types.Health.Name',
values: [],
valueType: valueTypes.numberString.id,
parseType: parseTypes.number.id,
parseType: parseTypes.number.id
},
stress: {
id: "stress",
name: "DAGGERHEART.Effects.Types.Stress.Name",
id: 'stress',
name: 'DAGGERHEART.Effects.Types.Stress.Name',
valueType: valueTypes.numberString.id,
parseType: parseTypes.number.id,
parseType: parseTypes.number.id
},
reach: {
id: "reach",
name: "DAGGERHEART.Effects.Types.Reach.Name",
id: 'reach',
name: 'DAGGERHEART.Effects.Types.Reach.Name',
valueType: valueTypes.select.id,
parseType: parseTypes.string.id,
options: Object.keys(range).map(x => ({ name: range[x].name, value: x }))
},
damage: {
id: "damage",
name: "DAGGERHEART.Effects.Types.Damage.Name",
id: 'damage',
name: 'DAGGERHEART.Effects.Types.Damage.Name',
valueType: valueTypes.numberString.id,
parseType: parseTypes.string.id,
appliesOn: applyLocations.damageRoll.id,
applyLocationChoices: {
[applyLocations.damageRoll.id]: applyLocations.damageRoll.name,
[applyLocations.attackRoll.id]: applyLocations.attackRoll.name,
},
[applyLocations.attackRoll.id]: applyLocations.attackRoll.name
}
}
};
};