Skip to content

Commit

Permalink
chore: initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mrsimonemms committed Oct 19, 2024
0 parents commit 0959a05
Show file tree
Hide file tree
Showing 32 changed files with 5,320 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .commitlintrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
extends:
- "@commitlint/config-conventional"
18 changes: 18 additions & 0 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"template": "https://github.com/mrsimonemms/new",
"commit": "205721d3de7e267ed2a2569c310e4e10e39c9cde",
"checkout": "main",
"context": {
"cookiecutter": {
"project_name": "telfordtech.dev",
"description": "Telford Tech Meetup",
"author": "Telford Tech organisers <telfordtech.dev>",
"type": "svelte",
"_template": "https://github.com/mrsimonemms/new"
}
},
"directory": "js",
"skip": [
".git"
]
}
18 changes: 18 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"image": "ghcr.io/mrsimonemms/devcontainers/full",
"name": "devcontainer",
"features": {},
"customizations": {
"vscode": {
"extensions": [
"ms-vscode.makefile-tools",
"esbenp.prettier-vscode",
"svelte.svelte-vscode"
],
"settings": {}
}
},
"containerEnv": {
"VITE_HOST": "0.0.0.0"
}
}
18 changes: 18 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# editorconfig.org
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.go]
indent_style = tab
indent_size = 4

[Makefile]
indent_style = tab
indent_size = 4
13 changes: 13 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example

# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock
30 changes: 30 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
module.exports = {
root: true,
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:svelte/recommended',
'prettier',
],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
parserOptions: {
sourceType: 'module',
ecmaVersion: 2020,
extraFileExtensions: ['.svelte'],
},
env: {
browser: true,
es2017: true,
node: true,
},
overrides: [
{
files: ['*.svelte'],
parser: 'svelte-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser',
},
},
],
};
98 changes: 98 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: Deploy to GitHub Pages
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
permissions:
pull-requests: read
jobs:
commitlint:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # fetch-depth is required

# This needs a generated dependency - doesn't add anything to this test
- run: rm tsconfig.json

- uses: wagoid/commitlint-github-action@v5

pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v4
with:
python-version: 3.x

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '>=1.20.0'

- name: Set up JS
uses: actions/setup-node@v3
with:
node-version: lts/*
cache: "npm"

- name: Install dependencies
run: npm ci

- uses: pre-commit/action@v3.0.0

build:
runs-on: ubuntu-latest
needs:
- commitlint
- pre-commit
steps:
- name: Checkout
uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: lts/*

- name: Install dependencies
run: npm ci

- name: Lint
run: npm run lint

- name: Build
run: |
npm run build
touch build/.nojekyll
- name: Upload Artifacts
uses: actions/upload-pages-artifact@v1
with:
path: 'build/'

deploy:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
needs:
- build

permissions:
pages: write
id-token: write

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Deploy
id: deployment
uses: actions/deploy-pages@v1
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
dist
tmp

node_modules

.idea
.DS_Store
Thumbs.db
.commit
.devbox
.envrc

coverage
.nyc_output
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
19 changes: 19 additions & 0 deletions .licenserc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
header:
license:
spdx-id: Apache-2.0
copyright-owner: "Telford Tech organisers <telfordtech.dev>"
copyright-year: 2024
paths-ignore:
- dist
- tmp
- LICENSE
- .*
- "go.*"
- "**/*.{json,md,yml,yaml}"
- "**/.gitkeep"
- "**/*.svelte"
comment: on-failure

dependency:
files:
- package.json # If this is a npm project.
12 changes: 12 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"MD007": {
"indent": 2
},
"MD013": {
"code_blocks": false,
"tables": false
},
"MD032": false,
"MD033": false,
"default": true
}
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
engine-strict=true
resolution-mode=highest
57 changes: 57 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
repos:
- repo: https://github.com/mrsimonemms/pre-commit-hooks
rev: v1.2.0
hooks:
- id: license-eye
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: pretty-format-json
args:
- --autofix
- --no-sort-keys
- id: check-json
- id: check-yaml
args:
- --allow-multiple-documents
- id: end-of-file-fixer
- id: trailing-whitespace
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v3.2.0
hooks:
- id: conventional-pre-commit
stages:
- commit-msg
- repo: https://github.com/trussworks/pre-commit-hooks
rev: v1.1.1
hooks:
- id: markdown-toc
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.13.0
hooks:
- id: markdownlint-cli2
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
args:
- --plugin
- prettier-plugin-svelte
- --plugin
- prettier-plugin-organize-imports
stages:
- pre-commit
- repo: https://github.com/pre-commit/mirrors-eslint
# Pin to v8 until TS support is in GA
# @link https://github.com/typescript-eslint/typescript-eslint/issues/8211
rev: 'v8.56.0'
hooks:
- id: eslint
files: \.([jt]sx?|svelte)$ # *.js, *.jsx *.ts, *.tsx and *.svelte
types: [file]
- repo: https://github.com/mrsimonemms/toodaloo
rev: v0.2.2
hooks:
- id: scan
17 changes: 17 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
*.md
*.yml
*.yaml
*.json
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example

# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"useTabs": true,
"singleQuote": true,
"trailingComma": "all",
"printWidth": 80,
"plugins": ["prettier-plugin-svelte", "prettier-plugin-organize-imports"],
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
}
26 changes: 26 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"editor.formatOnSave": true,
"editor.rulers": [
80
],
"yaml.schemas": {
"https://json.schemastore.org/github-workflow.json": [
".github/workflows/*.{yml,yaml}"
]
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[scss]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[svelte]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
Loading

0 comments on commit 0959a05

Please sign in to comment.