Skip to content

Commit 18b612f

Browse files
committed
initial commit
Oh shit, here we go again..
0 parents  commit 18b612f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+9620
-0
lines changed

.babel.cjs.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"plugins": [
3+
["@effect/babel-plugin"],
4+
["@babel/transform-modules-commonjs"],
5+
["annotate-pure-calls"]
6+
]
7+
}

.babel.mjs.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"plugins": [["@effect/babel-plugin"], ["annotate-pure-calls"]]
3+
}

.changeset/config.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": ["@changesets/changelog-github", { "repo": "datner/react-effect" }],
4+
"commit": false,
5+
"linked": [],
6+
"access": "restricted",
7+
"baseBranch": "main",
8+
"updateInternalDependencies": "patch",
9+
"ignore": []
10+
}

.devcontainer.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"image": "mcr.microsoft.com/vscode/devcontainers/typescript-node:16",
3+
"customizations": {
4+
"vscode": {
5+
"extensions": [
6+
"dbaeumer.vscode-eslint"
7+
]
8+
}
9+
},
10+
"initializeCommand": "npm install -g pnpm && pnpm install && pnpm run build"
11+
}

.envrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
use flake;

.eslintrc.cjs

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
/* eslint-disable no-undef */
2+
module.exports = {
3+
ignorePatterns: ["build", "dist", "*.mjs", "docs", "*.md"],
4+
parser: "@typescript-eslint/parser",
5+
parserOptions: {
6+
ecmaVersion: 2018,
7+
sourceType: "module"
8+
},
9+
settings: {
10+
"import/parsers": {
11+
"@typescript-eslint/parser": [".ts", ".tsx"]
12+
},
13+
"import/resolver": {
14+
typescript: {
15+
alwaysTryTypes: true
16+
}
17+
}
18+
},
19+
extends: [
20+
"eslint:recommended",
21+
"plugin:@typescript-eslint/eslint-recommended",
22+
"plugin:@typescript-eslint/recommended",
23+
"plugin:@repo-tooling/dprint/recommended"
24+
],
25+
plugins: ["deprecation", "import", "sort-destructure-keys", "simple-import-sort", "codegen"],
26+
rules: {
27+
"codegen/codegen": "error",
28+
"no-fallthrough": "off",
29+
"no-irregular-whitespace": "off",
30+
"object-shorthand": "error",
31+
"prefer-destructuring": "off",
32+
"sort-imports": "off",
33+
"no-unused-vars": "off",
34+
"prefer-rest-params": "off",
35+
"prefer-spread": "off",
36+
"import/first": "error",
37+
"import/no-cycle": "error",
38+
"import/newline-after-import": "error",
39+
"import/no-duplicates": "error",
40+
"import/no-unresolved": "off",
41+
"import/order": "off",
42+
"simple-import-sort/imports": "off",
43+
"sort-destructure-keys/sort-destructure-keys": "error",
44+
"deprecation/deprecation": "off",
45+
"@typescript-eslint/array-type": ["warn", { "default": "generic", "readonly": "generic" }],
46+
"@typescript-eslint/member-delimiter-style": 0,
47+
"@typescript-eslint/no-non-null-assertion": "off",
48+
"@typescript-eslint/ban-types": "off",
49+
"@typescript-eslint/no-explicit-any": "off",
50+
"@typescript-eslint/no-empty-interface": "off",
51+
"@typescript-eslint/consistent-type-imports": "warn",
52+
"@typescript-eslint/no-unused-vars": ["error", {
53+
"argsIgnorePattern": "^_",
54+
"varsIgnorePattern": "^_"
55+
}],
56+
"@typescript-eslint/ban-ts-comment": "off",
57+
"@typescript-eslint/camelcase": "off",
58+
"@typescript-eslint/explicit-function-return-type": "off",
59+
"@typescript-eslint/explicit-module-boundary-types": "off",
60+
"@typescript-eslint/interface-name-prefix": "off",
61+
"@typescript-eslint/no-array-constructor": "off",
62+
"@typescript-eslint/no-use-before-define": "off",
63+
"@typescript-eslint/no-namespace": "off",
64+
"@repo-tooling/dprint/dprint": [
65+
"error",
66+
{
67+
config: {
68+
"indentWidth": 2,
69+
"lineWidth": 120,
70+
"semiColons": "asi",
71+
"quoteStyle": "alwaysDouble",
72+
"trailingCommas": "never",
73+
"operatorPosition": "maintain",
74+
"arrowFunction.useParentheses": "force"
75+
}
76+
}
77+
]
78+
}
79+
}

.github/FUNDING.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# These are supported funding model platforms
2+
3+
github: [datner]

.github/workflows/main.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Main Flow
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
# Allows you to run this workflow manually from the Actions tab
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v3
16+
with:
17+
fetch-depth: 0
18+
- name: Install nix
19+
uses: cachix/install-nix-action@v22
20+
with:
21+
nix_path: nixpkgs=channel:nixos-unstable
22+
extra_nix_config: |
23+
auto-optimise-store = true
24+
keep-outputs = true
25+
keep-derivations = true
26+
- name: Cache nix
27+
uses: cachix/cachix-action@v12
28+
with:
29+
name: react-effect
30+
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
31+
- name: Setup direnv
32+
uses: HatsuneMiku3939/direnv-action@v1
33+
with:
34+
direnvVersion: 2.32.2
35+
- name: Get pnpm store directory
36+
id: pnpm-cache
37+
run: |
38+
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
39+
- uses: actions/cache@v3
40+
name: Cache pnpm
41+
with:
42+
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
43+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
44+
restore-keys: |
45+
${{ runner.os }}-pnpm-store-
46+
- run: pnpm install
47+
- run: pnpm run build
48+
- run: pnpm run circular
49+
- run: pnpm run test --coverage
50+
- run: pnpm run lint
51+
- name: Create Release Pull Request or Publish
52+
id: changesets
53+
uses: changesets/action@v1
54+
with:
55+
version: pnpm run version
56+
publish: pnpm exec changeset publish
57+
env:
58+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/pr.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: PR Flow
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- "main"
7+
8+
# Allows you to run this workflow manually from the Actions tab
9+
workflow_dispatch:
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v3
17+
with:
18+
fetch-depth: 0
19+
- name: Install nix
20+
uses: cachix/install-nix-action@v22
21+
with:
22+
nix_path: nixpkgs=channel:nixos-unstable
23+
extra_nix_config: |
24+
auto-optimise-store = true
25+
keep-outputs = true
26+
keep-derivations = true
27+
- name: Cache nix
28+
uses: cachix/cachix-action@v12
29+
with:
30+
name: react-effect
31+
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
32+
- name: Setup direnv
33+
uses: HatsuneMiku3939/direnv-action@v1
34+
with:
35+
direnvVersion: 2.32.2
36+
- name: Get pnpm store directory
37+
id: pnpm-cache
38+
run: |
39+
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
40+
- uses: actions/cache@v3
41+
name: Cache pnpm
42+
with:
43+
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
44+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
45+
restore-keys: |
46+
${{ runner.os }}-pnpm-store-
47+
- run: pnpm install
48+
- run: pnpm run build
49+
- run: pnpm run circular
50+
- run: pnpm run test --coverage
51+
- run: pnpm run lint

.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
coverage/
2+
*.tsbuildinfo
3+
node_modules/
4+
yarn-error.log
5+
.ultra.cache.json
6+
.DS_Store
7+
tmp/
8+
build/
9+
dist/
10+
.cache/
11+
.direnv/
12+
.idea/

0 commit comments

Comments
 (0)