Skip to content

Commit

Permalink
Update to latest Effect (#156)
Browse files Browse the repository at this point in the history
* update to latest effect

* add changeset
  • Loading branch information
IMax153 authored Sep 17, 2024
1 parent fcdc5e7 commit 197170a
Show file tree
Hide file tree
Showing 11 changed files with 1,661 additions and 1,411 deletions.
7 changes: 7 additions & 0 deletions .changeset/sour-bees-deny.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@effect-rx/rx-react": minor
"@effect-rx/rx-vue": minor
"@effect-rx/rx": minor
---

update to latest effect
79 changes: 0 additions & 79 deletions .eslintrc.cjs

This file was deleted.

140 changes: 140 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
import { fixupPluginRules } from "@eslint/compat"
import { FlatCompat } from "@eslint/eslintrc"
import js from "@eslint/js"
import tsParser from "@typescript-eslint/parser"
import codegen from "eslint-plugin-codegen"
import deprecation from "eslint-plugin-deprecation"
import _import from "eslint-plugin-import"
import simpleImportSort from "eslint-plugin-simple-import-sort"
import sortDestructureKeys from "eslint-plugin-sort-destructure-keys"
import path from "node:path"
import { fileURLToPath } from "node:url"

const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
})

export default [
{
ignores: ["**/dist", "**/build", "**/docs", "**/*.md"]
},
...compat.extends(
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@effect/recommended"
),
{
plugins: {
deprecation,
import: fixupPluginRules(_import),
"sort-destructure-keys": sortDestructureKeys,
"simple-import-sort": simpleImportSort,
codegen
},

languageOptions: {
parser: tsParser,
ecmaVersion: 2018,
sourceType: "module"
},

settings: {
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
},

"import/resolver": {
typescript: {
alwaysTryTypes: true
}
}
},

rules: {
"codegen/codegen": "error",
"no-fallthrough": "off",
"no-irregular-whitespace": "off",
"object-shorthand": "error",
"prefer-destructuring": "off",
"sort-imports": "off",

"no-restricted-syntax": [
"error",
{
selector: "CallExpression[callee.property.name='push'] > SpreadElement.arguments",
message: "Do not use spread arguments in Array.push"
}
],

"no-unused-vars": "off",
"prefer-rest-params": "off",
"prefer-spread": "off",
"import/first": "error",
"import/newline-after-import": "error",
"import/no-duplicates": "error",
"import/no-unresolved": "off",
"import/order": "off",
"simple-import-sort/imports": "off",
"sort-destructure-keys/sort-destructure-keys": "error",
"deprecation/deprecation": "off",

"@typescript-eslint/array-type": [
"warn",
{
default: "generic",
readonly: "generic"
}
],

"@typescript-eslint/member-delimiter-style": 0,
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-empty-interface": "off",
"@typescript-eslint/consistent-type-imports": "warn",

"@typescript-eslint/no-unused-vars": [
"error",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_"
}
],

"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/camelcase": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/interface-name-prefix": "off",
"@typescript-eslint/no-array-constructor": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-namespace": "off",

"@effect/dprint": [
"error",
{
config: {
indentWidth: 2,
lineWidth: 120,
semiColons: "asi",
quoteStyle: "alwaysDouble",
trailingCommas: "never",
operatorPosition: "maintain",
"arrowFunction.useParentheses": "force"
}
}
]
}
},
{
files: ["packages/*/src/**/*", "packages/*/test/**/*"],
rules: {
"no-console": "error"
}
}
]
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

41 changes: 22 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,50 +1,53 @@
{
"private": true,
"packageManager": "pnpm@9.1.0",
"packageManager": "pnpm@9.10.0+sha512.73a29afa36a0d092ece5271de5177ecbf8318d454ecd701343131b8ebc0c1a91c487da46ab77c8e596d6acf1461e3594ced4becedf8921b074fbd8653ed7051c",
"workspaces": [
"packages/*"
],
"scripts": {
"clean": "node scripts/clean.mjs",
"build": "tsc -b tsconfig.build.json && pnpm -r run build",
"circular": "madge --extensions ts --circular --no-color --no-spinner packages/*/src",
"lint": "eslint \"**/{src,test,examples,scripts,dtslint}/**/*.{ts,mjs}\"",
"lint-fix": "pnpm lint --fix",
"test": "vitest",
"coverage": "vitest --coverage",
"check": "tsc -b tsconfig.json",
"indexgen": "pnpm -r exec build-utils prepare-v2",
"docgen": "pnpm -r exec docgen && pnpm docgen-cp",
"docgen-cp": "node scripts/docs-cp.js",
"lint": "eslint \"packages/*/{src,test,examples}/**/*.ts\"",
"lint-fix": "pnpm lint --fix"
"docgen-cp": "node scripts/docs-cp.js"
},
"devDependencies": {
"@babel/cli": "^7.24.8",
"@babel/cli": "^7.25.6",
"@babel/core": "^7.25.2",
"@babel/plugin-transform-export-namespace-from": "^7.24.7",
"@babel/plugin-transform-modules-commonjs": "^7.24.8",
"@changesets/changelog-github": "^0.5.0",
"@changesets/cli": "^2.27.7",
"@effect/build-utils": "^0.7.7",
"@effect/docgen": "^0.4.3",
"@changesets/cli": "^2.27.8",
"@effect/build-utils": "^0.7.8",
"@effect/docgen": "^0.4.4",
"@effect/eslint-plugin": "^0.2.0",
"@effect/language-service": "^0.1.0",
"@typescript-eslint/eslint-plugin": "^8.0.1",
"@typescript-eslint/parser": "^8.0.1",
"@vitest/coverage-v8": "^2.0.5",
"@eslint/compat": "^1.1.1",
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.10.0",
"@typescript-eslint/eslint-plugin": "^8.6.0",
"@typescript-eslint/parser": "^8.6.0",
"@vitest/coverage-v8": "^2.1.1",
"babel-plugin-annotate-pure-calls": "^0.4.0",
"eslint": "^8.57.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-codegen": "^0.28.0",
"eslint": "^9.10.0",
"eslint-import-resolver-typescript": "^3.6.3",
"eslint-plugin-codegen": "^0.29.0",
"eslint-plugin-deprecation": "^3.0.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-import": "^2.30.0",
"eslint-plugin-simple-import-sort": "^12.1.1",
"eslint-plugin-sort-destructure-keys": "^2.0.0",
"fast-check": "^3.20.0",
"fast-check": "^3.22.0",
"glob": "^11.0.0",
"madge": "^8.0.0",
"prettier": "^3.3.3",
"tsx": "^4.16.5",
"typescript": "^5.5.4",
"vitest": "^2.0.5"
"tsx": "^4.19.1",
"typescript": "^5.6.2",
"vitest": "^2.1.1"
}
}
4 changes: 2 additions & 2 deletions packages/rx-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
"devDependencies": {
"@types/react": "^18.3.3",
"@types/scheduler": "^0.23.0",
"effect": "^3.6.1",
"effect": "^3.8.0",
"react": "^18.3.1",
"scheduler": "^0.23"
},
"peerDependencies": {
"effect": "^3.0.5",
"effect": "^3.8.0",
"react": "^18",
"scheduler": "*"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/rx-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
"license": "MIT",
"sideEffects": [],
"devDependencies": {
"effect": "^3.6.1",
"effect": "^3.8.0",
"vue": "^3.4.35"
},
"peerDependencies": {
"effect": "^3.0.5",
"effect": "^3.8.0",
"vue": "^3.4"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/rx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
"license": "MIT",
"sideEffects": [],
"devDependencies": {
"effect": "^3.6.1"
"effect": "^3.8.0"
},
"peerDependencies": {
"effect": "^3.0.5"
"effect": "^3.8.0"
}
}
Loading

0 comments on commit 197170a

Please sign in to comment.