Skip to content

Migrate to TypeScript; add CI & devcontainer - #60

Draft
iantrich wants to merge 1 commit into
masterfrom
modernization
Draft

iantrich wants to merge 1 commit into
masterfrom
modernization

Conversation

@iantrich

@iantrich iantrich commented Mar 4, 2026

Copy link
Copy Markdown
Owner

This pull request sets up a full-featured development environment for a Home Assistant Lovelace custom card, including devcontainer configuration, code quality tooling, GitHub workflows, and contributor documentation. The main changes establish a reproducible VS Code dev container, enforce coding standards, automate builds and releases, and provide clear instructions for contributors.

Development environment and tooling:

  • Added .devcontainer/devcontainer.json to define a VS Code dev container using a custom Home Assistant image, with workspace mounts, environment variables, port forwarding, and recommended extensions for TypeScript, Lit, and YAML development.
  • Added .devcontainer/config/configuration.yaml for a pre-populated Home Assistant demo configuration, including a template sensor with example feed data for card testing.
  • Added .devcontainer/README.md with setup instructions, troubleshooting tips, and workflow details for building and testing the card in the dev container.

Code quality and standards:

  • Added .prettierrc.json for code formatting rules and .yarnrc.yml to enforce Yarn as the package manager. [1] [2]
  • Added .gitattributes to enforce LF line endings and declare file types for consistent cross-platform development.

GitHub workflows and contributor guidance:

  • Added workflows for build/test (.github/workflows/build.yml), release automation (.github/workflows/release.yml), and prevention of npm lockfiles (.github/workflows/no-npm-lockfiles.yml). [1] [2] [3]
  • Added issue templates for bug reports and feature requests, plus a detailed Copilot instructions file for project-specific coding standards. [1] [2] [3]

(Top refs: [1] [2] [3] [4] [5]

Convert the card to a TypeScript project and modernize the dev/build workflow. Adds TypeScript sources (src/const.ts, src/list-card.ts, src/editor.ts, src/types.ts), Rollup dev/prod configs, ESLint/Prettier config, package.json and yarn setup, and build scripts. Introduces VS Code devcontainer config and sample Home Assistant config for local development (.devcontainer/*), repository metadata (.gitattributes, .gitignore), and contributor templates. Adds GitHub Actions for build, release and disallowing npm lockfiles; release job bumps package.json and src/const.ts from the release tag and uploads dist/list-card.js. Removes the legacy list-card.js and VERSION file and updates README with editor/card notes. CARD_VERSION initialized to 1.0.0.
@iantrich iantrich self-assigned this Mar 4, 2026
@iantrich
iantrich marked this pull request as draft March 4, 2026 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant