Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ncalteen committed Sep 7, 2023
0 parents commit 8c99751
Show file tree
Hide file tree
Showing 48 changed files with 13,505 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: true
contact_links:
- name: GitHub Community Support
url: https://github.com/orgs/community/discussions
about: Please ask and answer questions here.
- name: GitHub Security Bug Bounty
url: https://bounty.github.com/
about: Please report security vulnerabilities here.
20 changes: 20 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: 2

updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
labels:
- dependabot
- actions
open-pull-requests-limit: 10

- package-ecosystem: npm
directory: /
schedule:
interval: weekly
labels:
- dependabot
- npm
open-pull-requests-limit: 10
76 changes: 76 additions & 0 deletions .github/linters/.eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
#############################
## JavaScript Linter rules ##
#############################

parser: '@typescript-eslint/parser'

env:
node: true
es6: true
jest: true
commonjs: true

globals:
Atomics: readonly
SharedArrayBuffer: readonly

ignorePatterns:
- '!.*'
- '**/node_modules/**'
- '**/dist/**'
- '**/coverage/**'
- '**/.github/**'
- '**/.vscode/**'

parserOptions:
ecmaVersion: 2023
sourceType: module
project:
- './.github/linters/tsconfig.json'
- './tsconfig.json'

plugins:
- 'jest'
- '@typescript-eslint'

extends:
- eslint:recommended
- plugin:@typescript-eslint/eslint-recommended
- plugin:@typescript-eslint/recommended
- plugin:github/recommended
- plugin:jest/recommended

rules:
{
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-var-requires': 'off',
'camelcase': 'off',
'i18n-text/no-en': 'off',
'import/no-commonjs': 'off',
'import/no-namespace': 'off',
'no-console': 'off',
'prettier/prettier': 'error'
}

overrides:
- files:
- '*.json'
extends:
- plugin:jsonc/recommended-with-json
parser: jsonc-eslint-parser
parserOptions:
jsonSyntax: JSON
- files:
- '*.jsonc'
extends:
- plugin:jsonc/recommended-with-jsonc
parser: jsonc-eslint-parser
parserOptions:
jsonSyntax: JSONC
- files:
- '*.json5'
extends:
- plugin:jsonc/recommended-with-json5
parser: jsonc-eslint-parser
parserOptions:
jsonSyntax: JSON5
12 changes: 12 additions & 0 deletions .github/linters/.jscpd.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"threshold": 0,
"reporters": ["consoleFull"],
"ignore": [
"**/__snapshots__/**",
"**/*.yml",
"**/dist/**",
"**/coverage/**",
"**/node_modules/**"
],
"absolute": true
}
17 changes: 17 additions & 0 deletions .github/linters/.markdown-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
###########################
## Markdown Linter rules ##
###########################

MD004:
style: dash

MD026: false

MD029:
style: one

MD033: false

MD034: false

MD036: false
14 changes: 14 additions & 0 deletions .github/linters/.yaml-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
###########################
## YAML Linter rules ##
###########################

rules:
document-end: disable
document-start:
level: warning
present: false
line-length:
level: warning
max: 80
allow-non-breakable-words: true
allow-non-breakable-inline-mappings: true
9 changes: 9 additions & 0 deletions .github/linters/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "../../tsconfig.json",
"compilerOptions": {
"noEmit": true
},
"include": ["../../__tests__/**/*", "../../src/**/*"],
"exclude": ["../../dist", "../../node_modules", "../../coverage", "*.json"]
}
59 changes: 59 additions & 0 deletions .github/workflows/check-dist.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Check dist/

on:
push:
branches:
- main
paths-ignore:
- '**.md'
pull_request:
branches:
- main
paths-ignore:
- '**.md'

jobs:
check-dist:
name: Check dist/
runs-on: ubuntu-latest

permissions:
contents: read
statuses: write

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

- name: Setup Node.js
id: setup-node
uses: actions/setup-node@v3
with:
node-version: 18
cache: npm

- name: Install Dependencies
id: install
run: npm ci

- name: Build dist/ Directory
id: build
run: npm run bundle

- name: Compare Expected and Actual Directories
id: diff
run: |
if [ "$(git diff --ignore-space-at-eol --text dist/ | wc -l)" -gt "0" ]; then
echo "Detected uncommitted changes after build. See status below:"
git diff --ignore-space-at-eol --text dist/
exit 1
fi
- if: ${{ failure() && steps.diff.conclusion == 'failure' }}
name: Upload Artifact
id: upload
uses: actions/upload-artifact@v3
with:
name: dist
path: dist/
47 changes: 47 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: CodeQL

on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: '30 1 * * 4'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

permissions:
actions: read
checks: write
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language:
- javascript

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

- name: Initialize CodeQL
id: initialize
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}

- name: Autobuild
id: autobuild
uses: github/codeql-action/autobuild@v2

- name: Perform CodeQL Analysis
id: analyze
uses: github/codeql-action/analyze@v2
46 changes: 46 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Continuous Integration

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
continuous-integration:
name: Continuous Integration
runs-on: ubuntu-latest

permissions:
contents: read
statuses: write

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

- name: Setup Node.js
id: setup-node
uses: actions/setup-node@v3
with:
node-version: 18
cache: npm

- name: Install Dependencies
id: install
run: npm ci

- name: Check Format
id: format-check
run: npm run format:check

- name: Lint
id: lint
run: npm run lint

- name: Test
id: test
run: npm run ci-test
45 changes: 45 additions & 0 deletions .github/workflows/super-linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Super Linter

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
lint:
name: Lint Codebase
runs-on: ubuntu-latest

permissions:
contents: read
packages: read
statuses: write

steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node.js
id: setup-node
uses: actions/setup-node@v3
with:
node-version-file: 18
cache: npm

- name: Install Dependencies
id: install
run: npm ci

- name: Super Linter
id: super-linter
uses: super-linter/super-linter/slim@v5
env:
VALIDATE_ALL_CODEBASE: false
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# vscode
.vscode

# Dependency directory
node_modules/

# Coverage directory used by tools like istanbul
coverage

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# OS metadata
.DS_Store
Thumbs.db

# Extra
tmp/
13 changes: 13 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.*.swp
.DS_Store
.bundle/
.jekyll*
.sass-cache/
_site/
node_modules/
*.min.js
*.min.js.map
*.scss
dist/
coverage/
fixtures/
Loading

0 comments on commit 8c99751

Please sign in to comment.