Skip to content

Commit 2ae4619

Browse files
authored
Initial commit
0 parents  commit 2ae4619

35 files changed

+14073
-0
lines changed

.devcontainer/devcontainer.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"name": "GitHub Actions (JavaScript)",
3+
"image": "mcr.microsoft.com/devcontainers/javascript-node:20",
4+
"postCreateCommand": "npm install",
5+
"customizations": {
6+
"codespaces": {
7+
"openFiles": ["README.md"]
8+
},
9+
"vscode": {
10+
"extensions": [
11+
"bierner.markdown-preview-github-styles",
12+
"davidanson.vscode-markdownlint",
13+
"dbaeumer.vscode-eslint",
14+
"esbenp.prettier-vscode",
15+
"github.copilot",
16+
"github.copilot-chat",
17+
"github.vscode-github-actions",
18+
"github.vscode-pull-request-github",
19+
"me-dutour-mathieu.vscode-github-actions",
20+
"redhat.vscode-yaml",
21+
"rvest.vs-code-prettier-eslint",
22+
"yzhang.markdown-all-in-one"
23+
],
24+
"settings": {
25+
"editor.defaultFormatter": "esbenp.prettier-vscode",
26+
"editor.tabSize": 2,
27+
"editor.formatOnSave": true,
28+
"markdown.extension.list.indentationSize": "adaptive",
29+
"markdown.extension.italic.indicator": "_",
30+
"markdown.extension.orderedList.marker": "one"
31+
}
32+
}
33+
},
34+
"remoteEnv": {
35+
"GITHUB_TOKEN": "${localEnv:GITHUB_TOKEN}"
36+
},
37+
"features": {
38+
"ghcr.io/devcontainers/features/github-cli:1": {},
39+
"ghcr.io/devcontainers-contrib/features/prettier:1": {}
40+
}
41+
}

.env.example

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Do not commit your actual .env file to Git! This may contain secrets or other
2+
# private information.
3+
4+
# Enable/disable step debug logging (default: `false`). For local debugging, it
5+
# may be useful to set it to `true`.
6+
ACTIONS_STEP_DEBUG=true
7+
8+
# GitHub Actions inputs should follow `INPUT_<name>` format (case-sensitive).
9+
# Hyphens should not be converted to underscores!
10+
INPUT_MILLISECONDS=2400
11+
12+
# GitHub Actions default environment variables. These are set for every run of a
13+
# workflow and can be used in your actions. Setting the value here will override
14+
# any value set by the local-action tool.
15+
# https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables
16+
17+
# CI="true"
18+
# GITHUB_ACTION=""
19+
# GITHUB_ACTION_PATH=""
20+
# GITHUB_ACTION_REPOSITORY=""
21+
# GITHUB_ACTIONS=""
22+
# GITHUB_ACTOR=""
23+
# GITHUB_ACTOR_ID=""
24+
# GITHUB_API_URL=""
25+
# GITHUB_BASE_REF=""
26+
# GITHUB_ENV=""
27+
# GITHUB_EVENT_NAME=""
28+
# GITHUB_EVENT_PATH=""
29+
# GITHUB_GRAPHQL_URL=""
30+
# GITHUB_HEAD_REF=""
31+
# GITHUB_JOB=""
32+
# GITHUB_OUTPUT=""
33+
# GITHUB_PATH=""
34+
# GITHUB_REF=""
35+
# GITHUB_REF_NAME=""
36+
# GITHUB_REF_PROTECTED=""
37+
# GITHUB_REF_TYPE=""
38+
# GITHUB_REPOSITORY=""
39+
# GITHUB_REPOSITORY_ID=""
40+
# GITHUB_REPOSITORY_OWNER=""
41+
# GITHUB_REPOSITORY_OWNER_ID=""
42+
# GITHUB_RETENTION_DAYS=""
43+
# GITHUB_RUN_ATTEMPT=""
44+
# GITHUB_RUN_ID=""
45+
# GITHUB_RUN_NUMBER=""
46+
# GITHUB_SERVER_URL=""
47+
# GITHUB_SHA=""
48+
# GITHUB_STEP_SUMMARY=""
49+
# GITHUB_TRIGGERING_ACTOR=""
50+
# GITHUB_WORKFLOW=""
51+
# GITHUB_WORKFLOW_REF=""
52+
# GITHUB_WORKFLOW_SHA=""
53+
# GITHUB_WORKSPACE=""
54+
# RUNNER_ARCH=""
55+
# RUNNER_DEBUG=""
56+
# RUNNER_NAME=""
57+
# RUNNER_OS=""
58+
# RUNNER_TEMP=""
59+
# RUNNER_TOOL_CACHE=""

.eslintignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
lib/
2+
dist/
3+
node_modules/
4+
coverage/

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
* text=auto eol=lf
2+
3+
dist/** -diff linguist-generated=true

.github/codeql/codeql-config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
name: JavaScript CodeQL Configuration
2+
3+
paths-ignore:
4+
- node_modules
5+
- dist

.github/dependabot.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: weekly
7+
groups:
8+
actions-minor:
9+
update-types:
10+
- minor
11+
- patch
12+
13+
- package-ecosystem: npm
14+
directory: /
15+
schedule:
16+
interval: weekly
17+
groups:
18+
npm-development:
19+
dependency-type: development
20+
update-types:
21+
- minor
22+
- patch
23+
npm-production:
24+
dependency-type: production
25+
update-types:
26+
- patch

.github/linters/.eslintrc.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
env:
2+
commonjs: true
3+
es6: true
4+
jest: true
5+
node: true
6+
7+
globals:
8+
Atomics: readonly
9+
SharedArrayBuffer: readonly
10+
11+
ignorePatterns:
12+
- '!.*'
13+
- '**/node_modules/.*'
14+
- '**/dist/.*'
15+
- '**/coverage/.*'
16+
- '*.json'
17+
18+
parser: '@babel/eslint-parser'
19+
20+
parserOptions:
21+
ecmaVersion: 2023
22+
sourceType: module
23+
requireConfigFile: false
24+
babelOptions:
25+
babelrc: false
26+
configFile: false
27+
presets:
28+
- jest
29+
30+
plugins:
31+
- jest
32+
33+
extends:
34+
- eslint:recommended
35+
- plugin:github/recommended
36+
- plugin:jest/recommended
37+
38+
rules:
39+
{
40+
'camelcase': 'off',
41+
'eslint-comments/no-use': 'off',
42+
'eslint-comments/no-unused-disable': 'off',
43+
'i18n-text/no-en': 'off',
44+
'import/no-commonjs': 'off',
45+
'import/no-namespace': 'off',
46+
'no-console': 'off',
47+
'no-unused-vars': 'off',
48+
'prettier/prettier': 'error',
49+
'semi': 'off'
50+
}

.github/linters/.markdown-lint.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Unordered list style
2+
MD004:
3+
style: dash
4+
5+
# Ordered list item prefix
6+
MD029:
7+
style: one
8+
9+
# Spaces after list markers
10+
MD030:
11+
ul_single: 1
12+
ol_single: 1
13+
ul_multi: 1
14+
ol_multi: 1
15+
16+
# Code block style
17+
MD046:
18+
style: fenced

.github/linters/.yaml-lint.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
rules:
2+
document-end: disable
3+
document-start:
4+
level: warning
5+
present: false
6+
line-length:
7+
level: warning
8+
max: 80
9+
allow-non-breakable-words: true
10+
allow-non-breakable-inline-mappings: true

.github/workflows/check-dist.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# In JavaScript actions, `dist/` is a special directory. When you reference
2+
# an action with the `uses:` property, `dist/index.js` is the code that will be
3+
# run. For this project, the `dist/index.js` file is transpiled from other
4+
# source files. This workflow ensures the `dist/` directory contains the
5+
# expected transpiled code.
6+
#
7+
# If this workflow is run from a feature branch, it will act as an additional CI
8+
# check and fail if the checked-in `dist/` directory does not match what is
9+
# expected from the build.
10+
name: Check Transpiled JavaScript
11+
12+
on:
13+
pull_request:
14+
branches:
15+
- main
16+
push:
17+
branches:
18+
- main
19+
20+
permissions:
21+
contents: read
22+
23+
jobs:
24+
check-dist:
25+
name: Check dist/
26+
runs-on: ubuntu-latest
27+
28+
steps:
29+
- name: Checkout
30+
id: checkout
31+
uses: actions/checkout@v4
32+
33+
- name: Setup Node.js
34+
id: setup-node
35+
uses: actions/setup-node@v4
36+
with:
37+
node-version-file: .node-version
38+
cache: npm
39+
40+
- name: Install Dependencies
41+
id: install
42+
run: npm ci
43+
44+
- name: Build dist/ Directory
45+
id: build
46+
run: npm run bundle
47+
48+
# This will fail the workflow if the `dist/` directory is different than
49+
# expected.
50+
- name: Compare Directories
51+
id: diff
52+
run: |
53+
if [ ! -d dist/ ]; then
54+
echo "Expected dist/ directory does not exist. See status below:"
55+
ls -la ./
56+
exit 1
57+
fi
58+
if [ "$(git diff --ignore-space-at-eol --text dist/ | wc -l)" -gt "0" ]; then
59+
echo "Detected uncommitted changes after build. See status below:"
60+
git diff --ignore-space-at-eol --text dist/
61+
exit 1
62+
fi
63+
64+
# If `dist/` was different than expected, upload the expected version as a
65+
# workflow artifact.
66+
- if: ${{ failure() && steps.diff.outcome == 'failure' }}
67+
name: Upload Artifact
68+
id: upload
69+
uses: actions/upload-artifact@v4
70+
with:
71+
name: dist
72+
path: dist/

0 commit comments

Comments
 (0)