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 .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Deploy to GitHub Pages
on:
# Trigger the workflow every time you push to the `main` branch
push:
branches: [ main ]
branches: [main]
# Allows you to run this workflow manually from the Actions tab on GitHub.
workflow_dispatch:

Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/lint-format-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Lint & Format Check

on:
pull_request:

jobs:
quality_gates:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "22"

- name: Install dependencies
run: npm ci

- name: Lint
run: npm run lint

- name: Check formatting
run: npm run format:check
12 changes: 12 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,15 @@ repos:
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- repo: local
hooks:
- id: eslint
name: eslint
entry: npx eslint
language: system
files: \.(js|mjs|ts)$
- id: prettier
name: prettier
entry: npx prettier --check
language: system
files: \.(js|mjs|ts|md|mdx|json|yml|yaml)$
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dist
.astro
node_modules
package-lock.json
46 changes: 27 additions & 19 deletions astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,24 +1,32 @@
// @ts-check
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
import { defineConfig } from "astro/config";
import starlight from "@astrojs/starlight";

// https://astro.build/config
export default defineConfig({
site: "https://replace-me.mrs-electronics.dev",
integrations: [
starlight({
plugins: [],
title: 'Docs Template',
social: [
{ icon: 'github', label: 'GitHub', href: 'https://github.com/mrs-electronics-inc' },
{ icon: 'gitlab', label: 'GitLab', href: 'https://gitlab.com/mrs-electronics' },
],
sidebar: [
{
label: "Getting Started",
autogenerate: { directory: "getting-started" },
},
],
}),
],
site: "https://replace-me.mrs-electronics.dev",
integrations: [
starlight({
plugins: [],
title: "Docs Template",
social: [
{
icon: "github",
label: "GitHub",
href: "https://github.com/mrs-electronics-inc",
},
{
icon: "gitlab",
label: "GitLab",
href: "https://gitlab.com/mrs-electronics",
},
],
sidebar: [
{
label: "Getting Started",
autogenerate: { directory: "getting-started" },
},
],
}),
],
});
19 changes: 19 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import js from "@eslint/js";
import globals from "globals";
import tseslint from "typescript-eslint";

export default [
{
ignores: ["dist/**", "node_modules/**", ".astro/**"],
},
js.configs.recommended,
...tseslint.configs.recommended,
{
files: ["**/*.js", "**/*.mjs", "**/*.ts"],
languageOptions: {
globals: {
...globals.node,
},
},
},
];
12 changes: 10 additions & 2 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ deps:
setup: deps
pre-commit install

# Run in development environment
dev:
# Run lint and type checks.
lint:
npm run lint

# Format code.
format:
npm run format

# Run docs locally.
run:
npm run dev
Loading
Loading