-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
33 changed files
with
10,565 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 2 | ||
charset = utf-8 | ||
trim_trailing_whitespace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"Version": "v3.0.0", | ||
"Verbose": false, | ||
"Format": "", | ||
"Debug": false, | ||
"IgnoreDefaults": false, | ||
"SpacesAftertabs": false, | ||
"NoColor": false, | ||
"Exclude": [], | ||
"AllowedContentTypes": [], | ||
"PassedFiles": [], | ||
"Disable": { | ||
"EndOfLine": false, | ||
"Indentation": false, | ||
"InsertFinalNewline": false, | ||
"TrimTrailingWhitespace": false, | ||
"IndentSize": false, | ||
"MaxLineLength": false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
const { resolve } = require('node:path') | ||
|
||
const project = resolve(process.cwd(), 'tsconfig.json') | ||
|
||
/** @type {import("eslint").Linter.Config} */ | ||
module.exports = { | ||
root: true, | ||
env: { | ||
jest: false, | ||
}, | ||
ignorePatterns: [".eslintrc.cjs"], | ||
extends: [ | ||
require.resolve('@vercel/style-guide/eslint/node'), | ||
require.resolve('@vercel/style-guide/eslint/typescript'), | ||
'plugin:prettier/recommended' | ||
], | ||
parserOptions: { | ||
project, | ||
}, | ||
settings: { | ||
'import/resolver': { | ||
typescript: { | ||
project | ||
}, | ||
node: { | ||
extensions: ['.js', '.jsx', '.ts', '.tsx'] | ||
} | ||
} | ||
}, | ||
rules: { | ||
'@typescript-eslint/consistent-type-definitions': ['error', 'type'], | ||
'@typescript-eslint/no-shadow': 'off', | ||
'@typescript-eslint/explicit-function-return-type': 'off', | ||
'@typescript-eslint/array-type': ['error', { default: 'array-simple' }], | ||
'@typescript-eslint/require-await': 'off', | ||
'import/no-extraneous-dependencies': 'off' | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Git Town configuration file | ||
|
||
push-hook = true | ||
push-new-branches = false | ||
ship-delete-tracking-branch = false | ||
sync-before-ship = false | ||
sync-upstream = true | ||
|
||
[branches] | ||
main = "main" | ||
|
||
[sync-strategy] | ||
feature-branches = "merge" | ||
perennial-branches = "rebase" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: Setup Env | ||
description: Setup Node.js and install dependencies | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Setup Node.js | ||
id: setup-node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: .node-version | ||
cache: npm | ||
|
||
- name: Install Dependencies | ||
id: install | ||
run: npm ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: github-actions | ||
directory: / | ||
schedule: | ||
interval: weekly | ||
groups: | ||
actions-minor: | ||
update-types: | ||
- minor | ||
- patch | ||
|
||
- package-ecosystem: npm | ||
directory: / | ||
schedule: | ||
interval: weekly | ||
groups: | ||
npm-development: | ||
dependency-type: development | ||
update-types: | ||
- minor | ||
- patch | ||
npm-production: | ||
dependency-type: production | ||
update-types: | ||
- patch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## Stack | ||
|
||
<!-- branch-stack --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# In TypeScript actions, `dist/` is a special directory. When you reference | ||
# an action with the `uses:` property, `dist/index.js` is the code that will be | ||
# run. For this project, the `dist/index.js` file is transpiled from other | ||
# source files. This workflow ensures the `dist/` directory contains the | ||
# expected transpiled code. | ||
# | ||
# If this workflow is run from a feature branch, it will act as an additional CI | ||
# check and fail if the checked-in `dist/` directory does not match what is | ||
# expected from the build. | ||
name: Check Transpiled JavaScript | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- '**' | ||
push: | ||
branches: | ||
- main | ||
|
||
concurrency: | ||
group: check-dist-${{ github.sha }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
check-dist: | ||
name: Check dist/ | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
id: checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Env | ||
id: setup-env | ||
uses: ./.github/actions/setup-env | ||
|
||
- name: Build dist/ Directory | ||
id: build | ||
run: npm run build | ||
|
||
- name: Compare 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.outcome == 'failure' }} | ||
name: Upload Artifact | ||
id: upload | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: dist | ||
path: dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- '**' | ||
push: | ||
branches: | ||
- 'main' | ||
|
||
concurrency: | ||
group: ci-${{ github.sha }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
eslint: | ||
name: Lint - ESLint | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
id: checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Env | ||
id: setup-env | ||
uses: ./.github/actions/setup-env | ||
|
||
- name: Lint | ||
id: lint | ||
run: | | ||
npm run lint:eslint | ||
editorconfig: | ||
name: Lint - EditorConfig | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
id: checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Env | ||
id: setup-env | ||
uses: ./.github/actions/setup-env | ||
|
||
- name: Lint | ||
id: lint | ||
run: npm run lint:ec | ||
|
||
tests: | ||
name: Tests | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
id: checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Env | ||
id: setup-env | ||
uses: ./.github/actions/setup-env | ||
|
||
- name: Tests | ||
id: tests | ||
run: npm run test:ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: CodeQL | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- '**' | ||
push: | ||
branches: | ||
- main | ||
schedule: | ||
- cron: '31 7 * * 3' | ||
|
||
concurrency: | ||
group: codeql-${{ github.sha }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
actions: read | ||
checks: write | ||
contents: read | ||
security-events: write | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: | ||
- TypeScript | ||
|
||
steps: | ||
- name: Checkout | ||
id: checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Initialize CodeQL | ||
id: initialize | ||
uses: github/codeql-action/init@v3 | ||
with: | ||
languages: ${{ matrix.language }} | ||
source-root: src | ||
|
||
- name: Perform CodeQL Analysis | ||
id: analyze | ||
uses: github/codeql-action/analyze@v3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Git Town | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- '**' | ||
|
||
concurrency: | ||
group: git-town-${{ github.sha }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
branch-stack: | ||
name: Display the Branch Stack | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: read | ||
pull-requests: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Git Town | ||
uses: ./ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
!dist | ||
node_modules | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
npm exec lint-staged | ||
npm run lint:ec | ||
npm run test:ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
"src/**/*.{ts,tsx}": "npm exec eslint --fix --max-warnings=0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
20.6.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/** @type {import("prettier").Config} */ | ||
module.exports = { | ||
experimentalTernaries: true, | ||
printWidth: 90, | ||
tabWidth: 2, | ||
useTabs: false, | ||
semi: false, | ||
singleQuote: true, | ||
quoteProps: 'as-needed', | ||
trailingComma: 'es5', | ||
arrowParens: 'always', | ||
endOfLine: 'lf', | ||
singleAttributePerLine: false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# How to contribute | ||
|
||
We invite everybody to help make Git Town better. Every contribution is welcome, | ||
no matter how big or small. | ||
|
||
#### I want to report a bug or need a feature | ||
|
||
please [open an issue](https://github.com/git-town/action/issues/new) | ||
|
||
#### I want to fix a bug or add a feature | ||
|
||
- see our [developer guidelines](DEVELOPMENT.md) to get started | ||
- if you plan a larger change or need guidance, connect with the maintainers by | ||
[opening an issue](https://github.com/git-town/action/issues/new) | ||
- otherwise, hack away and | ||
[send a pull request](https://help.github.com/articles/using-pull-requests) | ||
|
||
#### I want to say thank you | ||
|
||
Please star this repo on GitHub and tweet or blog about us! |
Oops, something went wrong.