Skip to content

Commit

Permalink
disconnect examples from workspaces
Browse files Browse the repository at this point in the history
  • Loading branch information
IMax153 committed Sep 5, 2024
1 parent d4d1439 commit c5ab365
Show file tree
Hide file tree
Showing 9 changed files with 144 additions and 3,269 deletions.
7 changes: 1 addition & 6 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": [
"@changesets/changelog-github",
{
"repo": "Effect-TS/examples"
}
],
"changelog": ["@changesets/changelog-github", { "repo": "Effect-TS/examples" }],
"commit": false,
"fixed": [],
"linked": [],
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ dist/
node_modules/
scratchpad/*
!scratchpad/tsconfig.json
examples/*/pnpm-lock.yaml
*.tsbuildinfo
10 changes: 0 additions & 10 deletions .gitpod.yml

This file was deleted.

3 changes: 3 additions & 0 deletions examples/http-server/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.js
*.ts
*.cjs
122 changes: 122 additions & 0 deletions examples/http-server/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
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"
}
}]
}
}
]
17 changes: 14 additions & 3 deletions examples/http-server/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"name": "http-server",
"version": "1.0.0",
"version": "0.0.0",
"type": "module",
"author": "",
"description": "",
"scripts": {
"check": "tsc -b tsconfig.json",
"dev": "tsx --env-file=.env --watch src/main.ts",
Expand All @@ -25,10 +23,23 @@
"uuid": "^10.0.0"
},
"devDependencies": {
"@effect/eslint-plugin": "^0.2.0",
"@effect/language-service": "^0.1.0",
"@effect/vitest": "^0.9.2",
"@eslint/compat": "^1.1.1",
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.9.1",
"@types/node": "^22.5.3",
"@types/uuid": "^10.0.0",
"@typescript-eslint/eslint-plugin": "^8.4.0",
"@typescript-eslint/parser": "^8.4.0",
"eslint": "^9.9.1",
"eslint-import-resolver-typescript": "^3.6.3",
"eslint-plugin-codegen": "^0.28.0",
"eslint-plugin-deprecation": "^3.0.0",
"eslint-plugin-import": "^2.30.0",
"eslint-plugin-simple-import-sort": "^12.1.1",
"eslint-plugin-sort-destructure-keys": "^2.0.0",
"prettier": "^3.3.3",
"tsup": "^8.2.4",
"tsx": "^4.19.0",
Expand Down
Loading

0 comments on commit c5ab365

Please sign in to comment.