-
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
0 parents
commit 3f66c5c
Showing
23 changed files
with
3,135 additions
and
0 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,8 @@ | ||
# Changesets | ||
|
||
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works | ||
with multi-package repos, or single-package repos to help you version and publish your code. You can | ||
find the full documentation for it [in our repository](https://github.com/changesets/changesets) | ||
|
||
We have a quick list of common questions to get you started engaging with this project in | ||
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) |
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,11 @@ | ||
{ | ||
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json", | ||
"changelog": "@changesets/cli/changelog", | ||
"commit": false, | ||
"fixed": [], | ||
"linked": [], | ||
"access": "restricted", | ||
"baseBranch": "main", | ||
"updateInternalDependencies": "patch", | ||
"ignore": [] | ||
} |
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,23 @@ | ||
{ | ||
"$schema": "https://plugins.dprint.dev/dprint/dprint-plugin-json/latest/schema.json", | ||
"lineWidth": 120, | ||
"useTabs": true, | ||
"indentWidth": 3, | ||
"typescript": { | ||
"quoteStyle": "preferSingle", | ||
"quoteProps": "asNeeded", | ||
"semiColons": "asi" | ||
}, | ||
"plugins": [ | ||
"https://plugins.dprint.dev/typescript-0.74.0.wasm", | ||
"https://plugins.dprint.dev/json-0.15.6.wasm", | ||
"https://plugins.dprint.dev/markdown-0.14.1.wasm", | ||
"https://plugins.dprint.dev/dockerfile-0.3.0.wasm" | ||
], | ||
"includes": [ | ||
"**/*" | ||
], | ||
"excludes": [ | ||
"out" | ||
] | ||
} |
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,2 @@ | ||
node_modules | ||
out |
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,73 @@ | ||
// @ts-check | ||
|
||
/** @type { import('eslint').Linter.Config } */ | ||
const config = { | ||
root: true, | ||
env: { | ||
browser: true, | ||
es2021: true, | ||
node: true, | ||
}, | ||
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'xo'], | ||
parser: '@typescript-eslint/parser', | ||
plugins: ['@typescript-eslint'], | ||
overrides: [ | ||
{ | ||
files: ['*.ts', '*.mts', '*.cts', '*.tsx'], | ||
rules: { | ||
'no-undef': 'off', | ||
}, | ||
}, | ||
], | ||
parserOptions: { | ||
ecmaVersion: 'latest', | ||
sourceType: 'module', | ||
project: [ | ||
'./tsconfig.json', | ||
'./tsconfig.eslint.json', | ||
], | ||
}, | ||
rules: { | ||
// deactivate defaults | ||
'capitalized-comments': 'off', | ||
'comma-spacing': 'off', | ||
'no-implicit-coercion': 'off', | ||
camelcase: 'off', | ||
'no-redeclare': 'off', | ||
'no-undef': 'off', | ||
|
||
// modify defaults | ||
'no-multi-spaces': 'warn', | ||
'no-trailing-spaces': 'warn', | ||
'no-multiple-empty-lines': 'warn', | ||
'no-mixed-spaces-and-tabs': 'warn', | ||
'object-shorthand': 'warn', | ||
'space-in-parens': 'warn', | ||
'comma-dangle': 'warn', | ||
'key-spacing': 'warn', | ||
'padded-blocks': 'warn', | ||
|
||
// TypeScript overrides | ||
'no-useless-constructor': 'off', | ||
'@typescript-eslint/no-useless-constructor': 'warn', | ||
'no-unused-vars': 'off', | ||
'@typescript-eslint/no-unused-vars': 'warn', | ||
'@typescript-eslint/no-redeclare': 'error', | ||
'no-return-assign': 'off', | ||
'@typescript-eslint/no-floating-promises': 'error', | ||
'@typescript-eslint/no-misused-promises': 'error', | ||
|
||
// modify rules | ||
'no-var': 'error', | ||
'no-console': ['error'], | ||
quotes: ['error', 'single', { avoidEscape: true, allowTemplateLiterals: true }], | ||
semi: ['error', 'never'], | ||
indent: ['off', 'tab'], | ||
'object-curly-spacing': ['warn', 'always'], | ||
curly: ['warn', 'multi-line'], | ||
'no-unused-expressions': ['warn', { allowShortCircuit: true }], | ||
'@typescript-eslint/no-empty-function': ['warn'], | ||
}, | ||
} | ||
|
||
module.exports = config |
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,33 @@ | ||
name: run linters | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- 'main' | ||
push: | ||
branches: | ||
- 'main' | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: setup pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 7.13.4 | ||
|
||
- name: install node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16.17.0 | ||
cache: 'pnpm' | ||
|
||
- name: install dependencies | ||
run: pnpm install --no-save | ||
|
||
- name: run linters | ||
run: pnpm lint |
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,19 @@ | ||
name: check PR title | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- edited | ||
- synchronize | ||
- reopened | ||
|
||
jobs: | ||
check-pr-title: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: check PR title | ||
uses: deepakputhraya/action-pr-title@master | ||
with: | ||
regex: '^(chore|fix)|(#\d+): ' | ||
prefix_case_sensitive: 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,39 @@ | ||
name: release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
concurrency: ${{ github.workflow }}-${{ github.ref }} | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: setup pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 7.13.4 | ||
|
||
- name: install node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16.17.0 | ||
cache: 'pnpm' | ||
|
||
- name: install dependencies | ||
run: pnpm install --no-save | ||
|
||
- name: create Release PR or publish to npm | ||
id: changesets | ||
uses: changesets/action@v1 | ||
with: | ||
publish: pnpm release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
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,34 @@ | ||
name: run tests | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- 'main' | ||
push: | ||
branches: | ||
- 'main' | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: setup pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 7.13.4 | ||
|
||
- name: install node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16.17.0 | ||
cache: 'pnpm' | ||
|
||
- name: install dependencies | ||
run: pnpm install --no-save | ||
|
||
- name: run tests | ||
run: pnpm test |
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 @@ | ||
node_modules | ||
out | ||
.eslintcache |
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,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
pnpm i |
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,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
pnpm i |
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,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
pnpm lint-staged |
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 @@ | ||
// @ts-check | ||
|
||
/** @type { Record<string, string[]> } */ | ||
const config = { | ||
'*.{json,md,dockerfile}': [ | ||
'pnpm format:fix', | ||
], | ||
'*.{js,cjs,mjs,ts,mts,d.ts}': [ | ||
'pnpm format:fix', | ||
'pnpm eslint:fix:base', | ||
], | ||
} | ||
|
||
module.exports = config |
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,6 @@ | ||
{ | ||
"recommendations": [ | ||
"dprint.dprint", | ||
"dbaeumer.vscode-eslint" | ||
] | ||
} |
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,25 @@ | ||
{ | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll": true | ||
}, | ||
"editor.formatOnSave": true, | ||
"editor.formatOnSaveMode": "file", | ||
"eslint.validate": [ | ||
"typescript", | ||
"javascript" | ||
], | ||
"files.associations": { | ||
"**/tsconfig*.json": "jsonc" | ||
}, | ||
"explorer.fileNesting.patterns": { | ||
"package.json": "package-lock.json, yarn.lock, pnpm-lock.yaml, pnpm-workspace.yaml, .npmrc", | ||
"*.ts": "${capture}.test.ts, ${capture}.test.types.ts" | ||
}, | ||
"explorer.fileNesting.enabled": true, | ||
"editor.wordWrapColumn": 120, | ||
"editor.wordWrap": "bounded", | ||
"search.exclude": { | ||
"**/out": true | ||
}, | ||
"typescript.tsdk": "node_modules/typescript/lib" | ||
} |
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 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"type": "npm", | ||
"script": "dev", | ||
"path": "./", | ||
"problemMatcher": [], | ||
"label": "pnpm: dev", | ||
"group": { | ||
"kind": "build", | ||
"isDefault": 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,3 @@ | ||
# exceptionally | ||
|
||
**A fully type-safe and lightweight way of using exceptions instead of throwing errors** |
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,55 @@ | ||
{ | ||
"name": "exceptionally", | ||
"version": "0.0.0", | ||
"description": "A fully type-safe and lightweight way of using exceptions instead of throwing errors", | ||
"scripts": { | ||
"---- DEV -----------------------------------------------------------------------------": "", | ||
"dev": "echo hi", | ||
"---- BUILD ---------------------------------------------------------------------------": "", | ||
"build": "tsc", | ||
"release": "pnpm build && changeset publish", | ||
"---- TEST ----------------------------------------------------------------------------": "", | ||
"test": "tsc --noEmit", | ||
"---- LINT ----------------------------------------------------------------------------": "", | ||
"lint": "pnpm format && pnpm eslint", | ||
"lint:fix": "pnpm format:fix && pnpm eslint:fix", | ||
"eslint:base": "eslint --cache", | ||
"eslint": "pnpm eslint:base .", | ||
"eslint:fix:base": "pnpm eslint:base --fix", | ||
"eslint:fix": "pnpm eslint:fix:base .", | ||
"format": "dprint check", | ||
"format:fix": "dprint fmt", | ||
"---- OTHER ---------------------------------------------------------------------------": "", | ||
"prepare": "husky install", | ||
"---- SHORTCUTS -----------------------------------------------------------------------": "", | ||
"changeset": "changeset", | ||
"changeset:apply": "changeset version", | ||
"lint-staged": "lint-staged" | ||
}, | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"@changesets/cli": "^2.25.0", | ||
"@typescript-eslint/eslint-plugin": "^5.40.0", | ||
"@typescript-eslint/parser": "^5.40.0", | ||
"dprint": "^0.32.1", | ||
"eslint": "^8.25.0", | ||
"eslint-config-xo": "^0.42.0", | ||
"eslint-config-xo-typescript": "^0.53.0", | ||
"husky": "^8.0.1", | ||
"lint-staged": "^13.0.3", | ||
"typescript": "^4.8.4" | ||
}, | ||
"type": "module", | ||
"author": "ivanhofer", | ||
"keywords": [], | ||
"license": "MIT", | ||
"homepage": "https://github.com/ivanhofer/exceptionally#readme", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/ivanhofer/exceptionally" | ||
}, | ||
"funding": { | ||
"type": "github", | ||
"url": "https://github.com/sponsors/ivanhofer" | ||
} | ||
} |
Oops, something went wrong.