Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update devtools #1

Merged
merged 15 commits into from
May 25, 2024
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

41 changes: 0 additions & 41 deletions .eslintrc.cjs

This file was deleted.

23 changes: 14 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,21 @@ jobs:
strategy:
matrix:
node-version:
- '14'
- '16'
- '18'
- '20'
- '22'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- run: yarn install --frozen-lockfile
- run: yarn lint
- run: yarn test
- run: yarn build
cache: 'pnpm'
- run: pnpm install
- run: pnpm format:check
- run: pnpm lint:check
- run: pnpm typecheck
- run: pnpm test
- run: pnpm build
12 changes: 5 additions & 7 deletions .prettierrc.cjs → .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
"use strict";

module.exports = {
parser: "typescript",
export default {
printWidth: 100,
tabWidth: 2,
useTabs: false,
semi: true,
singleQuote: false,
quoteProps: "consistent",
quoteProps: "as-needed",
jsxSingleQuote: false,
trailingComma: "es5",
trailingComma: "all",
bracketSpacing: true,
bracketSameLine: false,
arrowParens: "avoid",
arrowParens: "always",
endOfLine: "lf",
experimentalTernaries: true,
};
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
# @susisu/effectful

[![CI](https://github.com/susisu/effectful/workflows/CI/badge.svg)](https://github.com/susisu/effectful/actions?query=workflow%3ACI)
[![CI](https://github.com/susisu/effectful/actions/workflows/ci.yml/badge.svg)](https://github.com/susisu/effectful/actions/workflows/ci.yml)

``` shell
# npm
npm i @susisu/effectful
# or
# yarn
yarn add @susisu/effectful
# pnpm
pnpm add @susisu/effectful
```

## Example
Expand Down Expand Up @@ -91,7 +94,7 @@ console.log(state);

Susisu ([GitHub](https://github.com/susisu), [Twitter](https://twitter.com/susisu2413))

## Prior works
## Prior art

- [briancavalier/fx-ts](https://github.com/briancavalier/fx-ts/)
- [susisu/effects](https://github.com/susisu/effects)
34 changes: 34 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import { config } from "@susisu/eslint-config";
import vitestPlugin from "eslint-plugin-vitest";
import globals from "globals";

export default config({}, [
{
plugins: {
vitest: vitestPlugin,
},
},
{
files: ["src/**/*.ts"],
languageOptions: {
globals: {
...globals.es2021,
},
},
},
{
files: ["src/**/*.spec.ts"],
rules: {
...vitestPlugin.configs.recommended.rules,
},
},
{
files: ["*.js"],
languageOptions: {
globals: {
...globals.es2021,
...globals.node,
},
},
},
]);
23 changes: 0 additions & 23 deletions jest.config.cjs

This file was deleted.

47 changes: 22 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"files": [
"lib",
"src",
"!src/**/*.spec.ts",
"!src/**/*.{test,spec}.{ts,tsx}",
"!src/**/__tests__"
],
"main": "./lib/index.js",
Expand All @@ -19,37 +19,34 @@
"import": {
"default": "./lib/index.js",
"types": "./lib/index.d.ts"
},
"require": {
"default": "./lib/index.cjs",
"types": "./lib/index.d.cts"
}
}
},
"scripts": {
"lint": "run-s lint:eslint lint:prettier",
"lint-fix": "run-s lint-fix:eslint lint-fix:prettier",
"lint:eslint": "eslint '*.cjs' src",
"lint-fix:eslint": "eslint --fix '*.cjs' src",
"lint:prettier": "prettier --check '*.cjs' src",
"lint-fix:prettier": "prettier --write '*.cjs' src",
"test": "NODE_OPTIONS=--experimental-vm-modules jest",
"format": "prettier --write '*.js' src",
"format:check": "prettier --check '*.js' src",
"lint": "eslint --fix '*.js' src",
"lint:check": "eslint '*.js' src",
"typecheck": "tsc -p tsconfig.json --noEmit",
"build": "tsc --build tsconfig.build.json",
"clean": "run-s clean:build clean:rm",
"clean:build": "tsc --build tsconfig.build.json --clean",
"clean:rm": "rimraf lib",
"prepublishOnly": "run-s clean lint test build"
"test": "vitest run --coverage",
"test:dev": "vitest dev --coverage.enabled --coverage.reporter=text",
"build": "tsup",
"prepublishOnly": "run-s format:check lint:check typecheck test build"
},
"dependencies": {},
"devDependencies": {
"@susisu/eslint-config": "^0.0.55",
"@types/jest": "^29.2.0",
"@susisu/eslint-config": "^0.0.82",
"@vitest/coverage-v8": "^1.6.0",
"eslint": "^8.26.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-jest": "^27.1.3",
"eslint-plugin-jest-formatting": "^3.1.0",
"jest": "^29.2.1",
"npm-run-all": "^4.1.5",
"prettier": "^2.7.1",
"rimraf": "^3.0.2",
"ts-jest": "^29.0.3",
"typescript": "~4.8.4"
"eslint-plugin-vitest": "^0.5.4",
"globals": "^15.3.0",
"npm-run-all2": "^6.2.0",
"prettier": "^3.2.5",
"tsup": "^8.0.2",
"typescript": "~5.4.5",
"vitest": "^1.6.0"
}
}
Loading