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 0213e71
Show file tree
Hide file tree
Showing 19 changed files with 676 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",
"type": "blank",
"_template": "https://github.com/mrsimonemms/new"
}
},
"directory": "js",
"skip": [
".git"
]
}
14 changes: 14 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"image": "ghcr.io/mrsimonemms/devcontainers/full",
"name": "devcontainer",
"features": {},
"customizations": {
"vscode": {
"extensions": [
"ms-vscode.makefile-tools",
"esbenp.prettier-vscode"
],
"settings": {}
}
}
}
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
25 changes: 25 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
tsconfigRootDir: __dirname,
sourceType: 'module',
},
plugins: ['@typescript-eslint/eslint-plugin'],
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
],
root: true,
env: {
node: true,
jest: true,
},
ignorePatterns: ['.eslintrc.js'],
rules: {
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
},
};
70 changes: 70 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Build
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
permissions:
contents: write
id-token: write
packages: write
pages: write
pull-requests: read
jobs:
commitlint:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # fetch-depth is required

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

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

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

- name: Set up Go
uses: actions/setup-go@v5
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/[email protected]

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
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
dist
tmp

node_modules

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

coverage
.nyc_output
18 changes: 18 additions & 0 deletions .licenserc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
header:
license:
spdx-id: Apache-2.0
copyright-owner: "Telford Tech organisers"
copyright-year: 2024
paths-ignore:
- dist
- tmp
- LICENSE
- .*
- "go.*"
- "**/*.{json,md,yml,yaml}"
- "**/.gitkeep"
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
}
52 changes: 52 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
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
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?$ # *.js, *.jsx *.ts and *.tsx
types: [file]
- repo: https://github.com/mrsimonemms/toodaloo
rev: v0.2.2
hooks:
- id: scan
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*.md
*.yml
*.yaml
*.json
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"singleQuote": true,
"trailingComma": "all",
"printWidth": 80,
"plugins": ["prettier-plugin-organize-imports"]
}
17 changes: 17 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"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"
}
}
Loading

0 comments on commit 0213e71

Please sign in to comment.