Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test #20

Merged
merged 108 commits into from
Sep 6, 2024
Merged

test #20

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
69a9e6a
Localization: remove all `"<key>_female": null` entries in /en (#3918)
flx-sta Sep 1, 2024
55e0d65
[Refactor] Improvements on getOrder() (#3547)
frutescens Sep 1, 2024
335d32e
[UI] [QoL] [Enhancement] Exclude redundant species from certain filte…
Fontbane Sep 1, 2024
a41133a
blocking inputs while showing texts to prevent moveing cursor (#2371)
ysh4296 Sep 1, 2024
7755f79
[Ability] Implement Tera Shell (#3856)
innerthunder Sep 2, 2024
97e3250
[Sprite] Chien-Pao sprite cleanup (#3961)
chaosgrimmon Sep 2, 2024
3bcee77
[Move] Fully implement dragon cheer (#3959)
torranx Sep 2, 2024
64368b6
[Ability] Add form change support for Flower Gift (#3941)
torranx Sep 2, 2024
0c28da7
[Bug] Fix Opponent pokemon sprite disappears after using Roar and Dra…
flx-sta Sep 2, 2024
c070f11
[Localization(fr)] Additional nature entries in pokemon-summary (#3869)
gitlocalize-app[bot] Sep 2, 2024
49c3158
[Localization(ko)] Change ghost type challenge acv for achv-female (#…
gitlocalize-app[bot] Sep 2, 2024
14e0c66
[Localisation] [ES] Finished and reviewed terrain, modifier, trainer-…
gitlocalize-app[bot] Sep 2, 2024
dcb03f4
[Test] Add test for final boss fight phase switch (#3847)
MokaStitcher Sep 2, 2024
709066b
[Move] Finish Alluring Voice, Burning Jealousy and Lash Out (#3508)
DayKev Sep 2, 2024
8082835
[Localization(en)] Fix Roark Dialouge (#3873)
gitlocalize-app[bot] Sep 2, 2024
56b3903
[Dev] add script to create test boilerplate file (#3954)
torranx Sep 2, 2024
1fd6621
[Test] Tests now default to using "Set" battle style (#3728)
DayKev Sep 2, 2024
e29f1fe
[Bug] Fix some trapping moves' interactions with Ghost-type Pokemon (…
innerthunder Sep 2, 2024
781bfd8
[Localization] pokemon names, party-ui-handler, pokemon-info and poke…
gitlocalize-app[bot] Sep 2, 2024
08fe9e1
[Localization(fr)] Translate trainer-classes.json (#3882)
gitlocalize-app[bot] Sep 2, 2024
8edb9ca
[Localizaiton(pt_br)] Translate pokemon-summary.json via GitLocalize …
gitlocalize-app[bot] Sep 2, 2024
c4c9cf9
[Bug] Moved RNG call if the Pokemon's ability hasn't been determined …
frutescens Sep 2, 2024
0671a24
[Localisation] [ES] Reviewed and finished ability.json and bgm-name.j…
gitlocalize-app[bot] Sep 2, 2024
dd033f4
[Localization] [pt_BR] Updated many translations (#3917)
gitlocalize-app[bot] Sep 2, 2024
a894438
[Localisation] [JA] Several files translated (#3916)
gitlocalize-app[bot] Sep 2, 2024
22d31bc
[Localisation] [ES] Review and finished pokemon-form and pokemon-form…
gitlocalize-app[bot] Sep 2, 2024
4553c1c
[Bug] Fix Octolock Ignores Clear Body, White Smoke, Big Pecks #3876
PrabbyDD Sep 2, 2024
69a9916
[Bug] Moves copied by Dancer should not consume PP (#3623)
DayKev Sep 2, 2024
f3c41ed
[Bug] Don't reset turn count or used moves array at the start of a ne…
DayKev Sep 2, 2024
2d5bd57
[Localization] [FR] pokemon-info.json and dialogue-misc.json completi…
gitlocalize-app[bot] Sep 2, 2024
f54846f
[Move] Implement Safeguard (#3447)
DayKev Sep 2, 2024
1e432fc
[Bug] Fixed pre-set volume oversight (#3963)
frutescens Sep 2, 2024
84ef7f0
[Balance] Double base shiny odds, adjusted Shiny Charm to match (#3964)
DayKev Sep 2, 2024
0cbdaab
[UI][Misc] Force users to have an active challenge (#3953)
frutescens Sep 2, 2024
744c8f8
[Test] Update/modernize/fix some tests (#3968)
DayKev Sep 2, 2024
434b823
[Enhancement/Item] Separate form change items into non-rare and rare …
Madmadness65 Sep 2, 2024
634bfb7
[Sprite] Pelipper variant cleanup (#3969)
chaosgrimmon Sep 2, 2024
39cfe69
[Bug] Fix affix used when enemy trainer switches Pokemon (#3899)
Fontbane Sep 2, 2024
c20f37b
[P3 Bug] Add dialog lines for Rood (#3970)
DayKev Sep 2, 2024
ad77810
[DEV] Remove female achv file (#3977)
CodeTappert Sep 2, 2024
86316bd
[Localization] [DE] DisguiseChange (#3979)
CodeTappert Sep 2, 2024
256dfbd
Fixed conditional (#3983)
frutescens Sep 2, 2024
aae4d69
[QoL] Enable female gender for all default starters and all existing…
timchi94 Sep 2, 2024
e9998fc
[Localisation] [ES] Bugfix pokemon-form-battle.json (#3981)
AsdarDevelops Sep 2, 2024
ce5a923
[UI][Misc] Rename Space to Action in voucher/achv menu (#3982)
frutescens Sep 2, 2024
4c4a2c1
[Localisation] [JA] Translated trainer-classes.json, trainer-names.js…
Chapybara-jp Sep 2, 2024
03567ed
[Bugfix #3930] Moves That a Pokemon Knows and are not in their List o…
njahja Sep 2, 2024
9c30e5b
[Localization] [FR] [Fix] Dialogue fixs batch + ignored entries form …
Adri1 Sep 2, 2024
89a1ff7
[Bug] Fix Inconsistency with stat boost when breaking through boss sh…
MokaStitcher Sep 2, 2024
df1c6ef
[Localization] [Fix] Restoring inverted rival dialogues in all dialog…
Adri1 Sep 2, 2024
60becf5
[Enhancement][UI] `Passive` ability will be displayed even if it is l…
KimJeongSun Sep 2, 2024
b036012
[Balance] [QoL] [Feature] Allow mons to track and relearn used TMs (#…
Fontbane Sep 2, 2024
672bc77
Added Donate Link to Community Page (#3989)
pom-eranian Sep 3, 2024
234d617
[Bug] Let Shedinja relearn egg moves when evolved from a starter (#3915)
ckincaid17 Sep 3, 2024
947400f
[Test] Add tests for Freeze-Dry (#3990)
DayKev Sep 3, 2024
89e80f3
[Refactor/Bug/Move] Overhaul Stats and Battle Items, Implement Severa…
xsn34kzx Sep 3, 2024
deb4e9d
[UI] Run history fixes and improvements (#3987)
frutescens Sep 3, 2024
587360c
[Bug] Fix eggs having exploitable RNG (#3913)
PigeonBar Sep 3, 2024
97a02e7
[Test] Set boss Pokémon test timeout to 20 seconds instead of 2.5 sec…
DayKev Sep 3, 2024
684d7b3
[Misc] Repack Keyboard button sprites (#3993)
chaosgrimmon Sep 3, 2024
d004d90
[Test] Remove nature RNG from Beast Boost tests (#3994)
DayKev Sep 3, 2024
38ae0a5
Merge remote-tracking branch 'upstream/main' into main-beta-merge
innerthunder Sep 3, 2024
666cde9
Merge pull request #3997 from innerthunder/main-beta-merge
f-fsantos Sep 3, 2024
940992a
[Localization] [FR] Added missing keys in French (#4000)
Adri1 Sep 3, 2024
232cd2c
[Localization] [DE] Added missing keys in DE (#3998)
CodeTappert Sep 3, 2024
3a61469
[Bug] Fix reloads causing RNG inconsistencies, Moody and Acupressure …
PigeonBar Sep 3, 2024
3242a35
[Misc][UI] Default Cursor Positioning for Command / Fight / Party (#4…
frutescens Sep 3, 2024
4e3a24c
[Localization] [ES] 5 files reviewed and finish. [Ready] (#3921)
gitlocalize-app[bot] Sep 3, 2024
f63492d
chore: Update merge_group configuration in GitHub workflows
f-fsantos Sep 4, 2024
200deef
[P1 Bug][UI/UX] Address shop cursor target feedbacks (#4009)
torranx Sep 4, 2024
1055386
starter select defaults to shiny with highest variant again (#4001)
MokaStitcher Sep 4, 2024
3704680
Update dialogue.json (#4021)
Adri1 Sep 4, 2024
e822c91
[Enhancement] Skip egg hatching and show summary (#3726)
j-diefenbach Sep 4, 2024
11ac929
fix getting the highest ivs for the iv scanner (#4022)
MokaStitcher Sep 4, 2024
207b3e1
[Test] Add `forceEnemyMove` Game Manager util (#3678)
innerthunder Sep 4, 2024
fde32ce
[Misc][Bug] Add `isBatonPassable` property to `BattlerTag`s (#3472)
DayKev Sep 4, 2024
a537113
Re-add lost i18n strings (#4024)
DayKev Sep 4, 2024
8835ae0
[Sprite] Index egg skip UI (#4027)
chaosgrimmon Sep 4, 2024
cebd449
I have a brain made of cheese!!! (#4028)
frutescens Sep 4, 2024
f3ced7e
[Bug] Fix inconsistencies with move type resolution for some ability …
innerthunder Sep 4, 2024
8342554
Fix mbh not using user's nickname (#4033)
Tempo-anon Sep 5, 2024
31d3bec
[Test] Fix Rage Powder test failing randomly (#4038)
innerthunder Sep 5, 2024
237aad2
[Misc] Clean up the `Battle` class a bit (#3995)
DayKev Sep 5, 2024
61ab52c
[Balance] Changed escape calculation (#3973)
Opaque02 Sep 5, 2024
1434a3e
Fix random failure in Parental Bond tests (#4036)
innerthunder Sep 5, 2024
13f38dc
[Move] Use BattlerTag for move-disabling effects (#2051)
zacharied Sep 5, 2024
1968680
[Enhancement] add font size option per language on registration UI (#…
KimJeongSun Sep 5, 2024
41bb12d
skip pre-commit on merge and rebase, add pre-push (#1607)
OrangeRed Sep 5, 2024
c902369
[Localization] Restoring "Safeguard" entries in arena-flyout.json of …
Adri1 Sep 5, 2024
01eb054
[QoL] Username finder (#4040)
Opaque02 Sep 5, 2024
e2e5b2c
[Localisation] [JA] Translated remaining JA text files (#3999)
Chapybara-jp Sep 5, 2024
6d312a2
Update egg.ts Same-Species Egg Shiny Rate (#4052)
damocleas Sep 5, 2024
6e26db2
Protection moves now fail when used last (#4045)
innerthunder Sep 5, 2024
deac314
remove partial from tera blast (#4044)
torranx Sep 5, 2024
57a3efd
[Bug] Fix off-by-one errors in some random number calls (#3665)
DayKev Sep 5, 2024
39f3572
[Test] Add Dragon Cheer tests (#4013)
torranx Sep 5, 2024
f3bdaa1
[Bug][Refactor] fix username-finder issues + code & visual improvemen…
flx-sta Sep 6, 2024
f1650d2
[Sprite] Fix Tangrowth Variants (#4059)
chaosgrimmon Sep 6, 2024
7b97657
[Bug] Fix Aura Break applying without Dark/Fairy Aura present (#4057)
innerthunder Sep 6, 2024
d58f035
[Misc] Migrate REROLL_TARGET to SHOP_CURSOR_TARGET (#4016)
torranx Sep 6, 2024
d830442
fix endless end dialogue (#4069)
flx-sta Sep 6, 2024
acda34c
[P2 Bug] Underwater and underground Pokemond do not take sand/hail da…
torranx Sep 6, 2024
33cb999
[Localization] [JA] Translated bgm-name.json (#4066)
Chapybara-jp Sep 6, 2024
e6a574c
[P2 Bug] Revert to normal form when Pokémon is fainted (#4049)
torranx Sep 6, 2024
0ba8791
add multiple vitest projects
flx-sta Sep 6, 2024
9340f1e
run vitest projects in multiple jobs
flx-sta Sep 6, 2024
d394791
see if I can trigger the pipeline
flx-sta Sep 6, 2024
ec3ddae
see if I can trigger the pipeline (2)
flx-sta Sep 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ on:
branches:
- main # Trigger on pull request events targeting the main branch
- beta # Trigger on pull request events targeting the beta branch
merge_group:
types: [checks_requested]

jobs:
run-linters: # Define a job named "run-linters"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
branches:
- main
- beta
merge_group:
types: [checks_requested]

jobs:
pages:
Expand Down
89 changes: 85 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,18 @@ on:
branches:
- main # Trigger on push events to the main branch
- beta # Trigger on push events to the beta branch
- refactor/paralle-test-runs # TODO: delete
pull_request:
branches:
- main # Trigger on pull request events targeting the main branch
- beta # Trigger on pull request events targeting the beta branch
- refactor/paralle-test-runs # TODO: delete
merge_group:
types: [checks_requested]

jobs:
run-tests: # Define a job named "run-tests"
name: Run tests # Human-readable name for the job
run-other-tests: # Define a job named "run-tests"
name: Run all other tests # Human-readable name for the job
runs-on: ubuntu-latest # Specify the latest Ubuntu runner for the job

steps:
Expand All @@ -29,5 +33,82 @@ jobs:
- name: Install Node.js dependencies # Step to install Node.js dependencies
run: npm ci # Use 'npm ci' to install dependencies

- name: tests # Step to run tests
run: npm run test:silent
- name: pre-test # pre-test to check overrides
run: npx vitest run --project pre
- name: test achievments
run: npx vitest --project achievments
- name: test arena
run: npx vitest --project arena
- name: test battle
run: npx vitest --project battle
- name: test battlerTags
run: npx vitest --project battlerTags
- name: test eggs
run: npx vitest --project eggs
- name: test field
run: npx vitest --project field
- name: test inputs
run: npx vitest --project inputs
- name: test localization
run: npx vitest --project localization
- name: test phases
run: npx vitest --project phases
- name: test settingMenu
run: npx vitest --project settingMenu
- name: test sprites
run: npx vitest --project sprites
- name: test ui
run: npx vitest --project ui
- name: test root
run: npx vitest --project root

run-abilities-tests:
name: Run abilities tests
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install Node.js dependencies
run: npm ci
- name: pre-test
run: npx vitest run --project pre
- name: test abilities
run: npx vitest --project abilities

run-items-tests:
name: Run items tests
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install Node.js dependencies
run: npm ci
- name: pre-test
run: npx vitest run --project pre
- name: test items
run: npx vitest --project items

run-moves-tests:
name: Run moves tests
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install Node.js dependencies
run: npm ci
- name: pre-test
run: npx vitest run --project pre
- name: test moves
run: npx vitest --project moves
101 changes: 101 additions & 0 deletions create-test-boilerplate.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
import fs from 'fs';
import path from 'path';
import { fileURLToPath } from 'url';

/**
* This script creates a test boilerplate file for a move or ability.
* @param {string} type - The type of test to create. Either "move" or "ability".
* @param {string} fileName - The name of the file to create.
* @example npm run create-test move tackle
*/

// Get the directory name of the current module file
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

// Get the arguments from the command line
const args = process.argv.slice(2);
const type = args[0]; // "move" or "ability"
let fileName = args[1]; // The file name

if (!type || !fileName) {
console.error('Please provide both a type ("move" or "ability") and a file name.');
process.exit(1);
}

// Convert fileName from to snake_case if camelCase is given
fileName = fileName.replace(/([a-z])([A-Z])/g, '$1_$2').toLowerCase();

// Format the description for the test case
const formattedName = fileName
.replace(/_/g, ' ')
.replace(/\b\w/g, char => char.toUpperCase());

// Determine the directory based on the type
let dir;
let description;
if (type === 'move') {
dir = path.join(__dirname, 'src', 'test', 'moves');
description = `Moves - ${formattedName}`;
} else if (type === 'ability') {
dir = path.join(__dirname, 'src', 'test', 'abilities');
description = `Abilities - ${formattedName}`;
} else {
console.error('Invalid type. Please use "move" or "ability".');
process.exit(1);
}

// Ensure the directory exists
if (!fs.existsSync(dir)) {
fs.mkdirSync(dir, { recursive: true });
}

// Create the file with the given name
const filePath = path.join(dir, `${fileName}.test.ts`);

if (fs.existsSync(filePath)) {
console.error(`File "${fileName}.test.ts" already exists.`);
process.exit(1);
}

// Define the content template
const content = `import { Abilities } from "#enums/abilities";
import GameManager from "#test/utils/gameManager";
import { SPLASH_ONLY } from "#test/utils/testUtils";
import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, it } from "vitest";

describe("${description}", () => {
let phaserGame: Phaser.Game;
let game: GameManager;
const TIMEOUT = 20 * 1000;

beforeAll(() => {
phaserGame = new Phaser.Game({
type: Phaser.HEADLESS,
});
});

afterEach(() => {
game.phaseInterceptor.restoreOg();
});

beforeEach(() => {
game = new GameManager(phaserGame);
game.override
.battleType("single")
.enemyAbility(Abilities.BALL_FETCH)
.enemyMoveset(SPLASH_ONLY);
});

it("test case", async () => {
// await game.classicMode.startBattle();
// game.move.select();
}, TIMEOUT);
});
`;

// Write the template content to the file
fs.writeFileSync(filePath, content, 'utf8');

console.log(`File created at: ${filePath}`);
8 changes: 4 additions & 4 deletions docs/enemy-ai.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,15 +191,15 @@ Now that the enemy Pokémon with the best matchup score is on the field (assumin

We then need to apply a 2x multiplier for the move's type effectiveness and a 1.5x multiplier since STAB applies. After applying these multipliers, the final score for this move is **75**.

- **Swords Dance**: As a non-attacking move, this move's benefit score is derived entirely from the sum of its attributes' benefit scores. Swords Dance's `StatChangeAttr` has a user benefit score of 0 and a target benefit score that, in this case, simplifies to
- **Swords Dance**: As a non-attacking move, this move's benefit score is derived entirely from the sum of its attributes' benefit scores. Swords Dance's `StatStageChangeAttr` has a user benefit score of 0 and a target benefit score that, in this case, simplifies to

$\text{TBS}=4\times \text{levels} + (-2\times \text{sign(levels)})$

where `levels` is the number of stat stages added by the attribute (in this case, +2). The final score for this move is **6** (Note: because this move is self-targeted, we don't flip the sign of TBS when computing the target score).

- **Crush Claw**: This move is a 75-power Normal-type physical attack with a 50 percent chance to lower the target's Defense by one stage. The additional effect is implemented by the same `StatChangeAttr` as Swords Dance, so we can use the same formulas from before to compute the total TBS and base target score.
- **Crush Claw**: This move is a 75-power Normal-type physical attack with a 50 percent chance to lower the target's Defense by one stage. The additional effect is implemented by the same `StatStageChangeAttr` as Swords Dance, so we can use the same formulas from before to compute the total TBS and base target score.

$\text{TBS}=\text{getTargetBenefitScore(StatChangeAttr)}-\text{attackScore}$
$\text{TBS}=\text{getTargetBenefitScore(StatStageChangeAttr)}-\text{attackScore}$

$\text{TBS}=(-4 + 2)-(-2\times 2 + \lfloor \frac{75}{5} \rfloor)=-2-11=-13$

Expand All @@ -221,4 +221,4 @@ When implementing a new move attribute, it's important to override `MoveAttr`'s
- A move's **user benefit score (UBS)** incentivizes (or discourages) the move's usage in general. A positive UBS gives the move more incentive to be used, while a negative UBS gives the move less incentive.
- A move's **target benefit score (TBS)** incentivizes (or discourages) the move's usage on a specific target. A positive TBS indicates the move is better used on the user or its allies, while a negative TBS indicates the move is better used on enemies.
- **The total benefit score (UBS + TBS) of a move should never be 0.** The move selection algorithm assumes the move's benefit score is unimplemented if the total score is 0 and penalizes the move's usage as a result. With status moves especially, it's important to have some form of implementation among the move's attributes to avoid this scenario.
- **Score functions that use formulas should include comments.** If your attribute requires complex logic or formulas to calculate benefit scores, please add comments to explain how the logic works and its intended effect on the enemy's decision making.
- **Score functions that use formulas should include comments.** If your attribute requires complex logic or formulas to calculate benefit scores, please add comments to explain how the logic works and its intended effect on the enemy's decision making.
11 changes: 1 addition & 10 deletions index.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,6 @@ body {
}
}

#links {
width: 90%;
text-align: center;
position: fixed;
bottom: 0;
display: flex;
justify-content: space-around;
}

#app {
display: flex;
justify-content: center;
Expand Down Expand Up @@ -93,7 +84,7 @@ input:-internal-autofill-selected {

@media (orientation: landscape) {
#touchControls {
--controls-size: 20vh;
--controls-size: 20vh;
--text-shadow-size: 1.3vh;
--small-button-offset: 4vh;
}
Expand Down
8 changes: 0 additions & 8 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
</style>
<link rel="stylesheet" type="text/css" href="./index.css" />
<link rel="manifest" href="./manifest.webmanifest">
<script type="text/javascript" src="https://app.termly.io/resource-blocker/c5dbfa2f-9723-4c0f-a84b-2895124e851f?autoBlock=on"></script>
<script>
if ("serviceWorker" in navigator) {
window.addEventListener("load", function () {
Expand Down Expand Up @@ -144,13 +143,6 @@

</div>
</div>
<div id="tnc-links">
<a href="#" class="termly-display-preferences" style="display: none;" target="_blank" rel="noreferrer noopener">Consent Preferences</a>
<a href="https://app.termly.io/policy-viewer/policy.html?policyUUID=bc96778b-3f04-4d25-bafc-0deba53e8bec" target="_blank" rel="noreferrer noopener">Privacy Policy</a>
<a href="https://app.termly.io/policy-viewer/policy.html?policyUUID=8b523c05-7ec2-4646-9534-5bd61b386e2a" target="_blank" rel="noreferrer noopener">Cookie Disclaimer</a>
<a href="https://app.termly.io/policy-viewer/policy.html?policyUUID=b01e092a-9721-477f-8356-45576702ff9e" target="_blank" rel="noreferrer noopener">Terms & Conditions</a>
<a href="https://app.termly.io/policy-viewer/policy.html?policyUUID=3b5d1928-3f5b-4ee1-b8df-2d6c276b0bcc" target="_blank" rel="noreferrer noopener">Acceptable Use Policy</a>
</div>
<script type="module" src="./src/main.ts"></script>
<script src="./src/touch-controls.ts" type="module"></script>
<script src="./src/debug.js" type="module"></script>
Expand Down
13 changes: 11 additions & 2 deletions lefthook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@ pre-commit:
parallel: true
commands:
eslint:
glob: '*.{js,jsx,ts,tsx}'
glob: "*.{js,jsx,ts,tsx}"
run: npx eslint --fix {staged_files}
stage_fixed: true
stage_fixed: true
skip:
- merge
- rebase

pre-push:
commands:
eslint:
glob: "*.{js,ts,jsx,tsx}"
run: npx eslint --fix {push_files}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"eslint-ci": "eslint .",
"docs": "typedoc",
"depcruise": "depcruise src",
"depcruise:graph": "depcruise src --output-type dot | node dependency-graph.js > dependency-graph.svg"
"depcruise:graph": "depcruise src --output-type dot | node dependency-graph.js > dependency-graph.svg",
"create-test": "node ./create-test-boilerplate.js"
},
"devDependencies": {
"@eslint/js": "^9.3.0",
Expand Down
Loading
Loading