Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Check
on:
workflow_dispatch:
pull_request:
branches: [main, next-minor, next-major]
push:
branches: [main, next-minor, next-major]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions: {}

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- name: Install dependencies
uses: ./.github/actions/setup
- run: pnpm lint
- run: pnpm codegen
- name: Check for codegen changes
run: git diff --exit-code
32 changes: 26 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,28 @@
out
dist
node_modules
# Generated by Direnv
.direnv/

# Generated by TypeScript
dist/
build/
.tsbuildinfo/
tsconfig.tsbuildinfo

# Generated by Pnpm
node_modules/

coverage/
docs/

.DS_Store
tmp
stats.html
jsdoc-analysis-results.json
jsdoc-stats.md

# scratchpad files
scratchpad/**/*.ts

# VsCode test and extension files
.vscode-test/
*.vsix
*.tsbuildinfo
.DS_Store
.direnv/
opencode.jsonc
21 changes: 7 additions & 14 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,17 @@
"name": "Run Extension",
"type": "extensionHost",
"request": "launch",
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
"outFiles": ["${workspaceFolder}/out/**/*.js"],
"args": [
"--extensionDevelopmentPath=${workspaceFolder}/packages/devtools/vscode"
],
"outFiles": ["${workspaceFolder}/packages/devtools/vscode/dist/**/*.js"],
"sourceMaps": true,
"resolveSourceMapLocations": [
"${workspaceFolder}/src/**",
"${workspaceFolder}/out/**",
"${workspaceFolder}/packages/devtools/vscode/src/**",
"${workspaceFolder}/packages/devtools/vscode/dist/**",
"!**/node_modules/**"
]
},
{
"name": "Extension Tests",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
],
"outFiles": ["${workspaceFolder}/out/test/**/*.js"]
"preLaunchTask": "npm: build"
}
]
}
8 changes: 2 additions & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,8 @@
"[typescriptreact]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"eslint.validate": [
"markdown",
"javascript",
"typescript"
],
"eslint.validate": ["markdown", "javascript", "typescript"],
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
}
}
}
32 changes: 21 additions & 11 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ import * as tsResolver from "eslint-import-resolver-typescript"
import importPlugin from "eslint-plugin-import-x"
import simpleImportSort from "eslint-plugin-simple-import-sort"
import sortDestructureKeys from "eslint-plugin-sort-destructure-keys"
import unusedImports from "eslint-plugin-unused-imports"
import tseslint from "typescript-eslint"

export default tseslint.config(
{
ignores: ["**/dist", "**/out", "**/build", "**/docs", "**/*.md"]
ignores: ["**/dist", "**/docs", "**/.tsbuildinfo", "**/*.md"]
},
eslint.configs.recommended,
tseslint.configs.strict,
Expand All @@ -23,6 +24,9 @@ export default tseslint.config(

languageOptions: {
parser: tseslint.parser,
parserOptions: {
tsconfigRootDir: import.meta.dirname
},
ecmaVersion: 2018,
sourceType: "module"
},
Expand Down Expand Up @@ -119,24 +123,30 @@ export default tseslint.config(
}
},
{
files: ["packages/*/src/**/*", "packages/*/test/**/*"],
files: ["packages/*/src/**/*.ts", "packages/*/test/**/*.ts"],
rules: {
"no-console": "error"
}
},
{
files: ["src/instrumentation/**/*"],
files: ["scratchpad/eslint/**/*"],
plugins: {
"unused-imports": unusedImports
},
rules: {
"@typescript-eslint/no-restricted-imports": [
"unused-imports/no-unused-imports": "error",
"@effect/dprint": [
"error",
{
"patterns": [
{
"group": ["effect", "effect/*"],
"message": "Importing the effect module is not allowed; only type imports are allowed.",
"allowTypeImports": true
}
]
config: {
indentWidth: 2,
lineWidth: 80,
semiColons: "asi",
quoteStyle: "alwaysDouble",
trailingCommas: "never",
operatorPosition: "maintain",
"arrowFunction.useParentheses": "force"
}
}
]
}
Expand Down
39 changes: 4 additions & 35 deletions flake.lock

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

32 changes: 19 additions & 13 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
};
outputs = inputs @ {flake-parts, ...}:
flake-parts.lib.mkFlake {inherit inputs;} {
systems = inputs.nixpkgs.lib.systems.flakeExposed;
perSystem = {pkgs, ...}: {
devShells.default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [
corepack
nodejs_22
];
};
outputs = {nixpkgs, ...}: let
forAllSystems = function:
nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed (
system: function nixpkgs.legacyPackages.${system}
);
in {
formatter = forAllSystems (pkgs: pkgs.alejandra);
devShells = forAllSystems (pkgs: {
default = pkgs.mkShell {
packages = with pkgs; [
bun
deno
corepack
nodejs_24
python3
];
};
};
}
});
};
}
Loading