Skip to content

Commit

Permalink
Superouter v1 rewrite (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
JAForbes authored Feb 11, 2024
1 parent f8ac71f commit 37e78f5
Show file tree
Hide file tree
Showing 18 changed files with 3,735 additions and 2,722 deletions.
106 changes: 21 additions & 85 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,86 +1,22 @@
{
"parserOptions": {
"ecmaVersion": 2017,
"sourceType": "module"
},
"env": {
"node": true,
"es6": true
},
"rules": {
"no-var": 1,
"no-undef": 2,
"no-unused-vars": [
"error",
{
"argsIgnorePattern": "_"
}
],
"comma-style": [
"warn",
"first"
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
"single"
],
"operator-linebreak": [
"warn",
"before",
{
"overrides": {
"=": "after"
}
}
],
"quote-props": [
"warn",
"as-needed"
],
"no-const-assign": [
"warn"
],
"operator-assignment": [
"warn",
"never"
],
"no-dupe-keys": [
"warn"
],
"no-cond-assign": [
"warn"
],
"no-extra-parens": [
"warn"
],
"no-sparse-arrays": [
"warn"
],
"array-callback-return": [
"error"
],
"complexity": [
"warn"
],
"no-param-reassign": [
"warn"
],
"callback-return": [
"error"
],
"max-depth": [
"warn",
4
],
"max-len": [
"warn",
80,
4
],
"consistent-return": 2
}
}
"env": {
"browser": true,
"es2021": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"rules": {
"@typescript-eslint/no-unused-vars": ["error", { "varsIgnorePattern": "_", "argsIgnorePattern": "_" }]
}
}
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:

strategy:
matrix:
node-version: [14.x, 16.x]
node-version: [20.x]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
Expand Down
36 changes: 0 additions & 36 deletions .gitlab-ci.yml

This file was deleted.

24 changes: 24 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "test",
"type": "node",
"request": "launch",
"args": [
"--test",
"${relativeFile}"
],
"runtimeArgs": [
"--import",
"tsx"
],
"cwd": "${workspaceRoot}",
"protocol": "inspector",
"internalConsoleOptions": "openOnSessionStart"
}
]
}
5 changes: 0 additions & 5 deletions .vscode/settings.json

This file was deleted.

12 changes: 12 additions & 0 deletions lib/either.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
export type Either<L, R> =
| { type: "Either"; tag: "Left"; value: L }
| { type: "Either"; tag: "Right"; value: R };

export const Either = {
Left<L, R>(value: L): Either<L, R> {
return { type: "Either", tag: "Left", value };
},
Right<L, R>(value: R): Either<L, R> {
return { type: "Either", tag: "Right", value };
},
};
Loading

0 comments on commit 37e78f5

Please sign in to comment.