Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/javascript/controllers/hotkeys_controller.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {Controller} from "@hotwired/stimulus";

import {assert} from "javascript/helpers";
import {assert} from "helpers/assert";

export default class extends Controller {
static override targets = ["click"];
Expand Down
1 change: 0 additions & 1 deletion app/javascript/helpers/index.ts

This file was deleted.

2 changes: 1 addition & 1 deletion spec/javascript/controllers/hotkeys_controller_spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {bootStimulus, getController} from "support/stimulus";
import HotkeysController from "controllers/hotkeys_controller";
import {assert} from "javascript/helpers";
import {assert} from "helpers/assert";

function setupDOM(): void {
document.body.innerHTML = `
Expand Down
2 changes: 1 addition & 1 deletion spec/javascript/helpers/assert_spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {assert} from "javascript/helpers";
import {assert} from "helpers/assert";

describe("assert", () => {
it("throws an error when the passed value is null", () => {
Expand Down
2 changes: 1 addition & 1 deletion spec/javascript/support/stimulus.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type {Context, Controller} from "@hotwired/stimulus";
import {Application} from "@hotwired/stimulus";

import {assert} from "javascript/helpers";
import {assert} from "helpers/assert";

let application: Application | null = null;

Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"paths": {
"channels/*": ["./app/javascript/channels/*"],
"controllers/*": ["./app/javascript/controllers/*"],
"helpers/*": ["./app/javascript/helpers/*"],
"javascript/*": ["./app/javascript/*"],
"support/*": ["./spec/javascript/support/*"]
},
Expand Down
1 change: 1 addition & 0 deletions vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export default defineConfig({
alias: [
{find: /^channels\//u, replacement: appPath("channels")},
{find: /^controllers\//u, replacement: appPath("controllers")},
{find: /^helpers\//u, replacement: appPath("helpers")},
{find: /^javascript\//u, replacement: appPath("")},
{find: /^spec\//u, replacement: `${path.resolve(root, "spec")}/`},
{find: "jquery", replacement: path.resolve(root, "node_modules/jquery/jquery.js")},
Expand Down