Repository navigation
chore: modernize validation feedback loops #13
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
7b393e8
chore: modernize validation feedback loops
jimeh 0aefda8
fix: route staged validation inputs correctly
jimeh 4bfa5e6
fix: cover contract inputs in staged checks
jimeh 8dfb776
fix: validate formatter hook configuration
jimeh 818a12b
fix: enable type-aware editor linting
jimeh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| { | ||
| "$schema": "./node_modules/oxfmt/configuration_schema.json", | ||
| "ignorePatterns": [ | ||
| ".vscode-test/**", | ||
| ".vscode-test-web/**", | ||
| "artifacts/**", | ||
| "coverage/**", | ||
| "dist/**", | ||
| "docs/plans/**", | ||
| "mise.lock", | ||
| "mise.toml", | ||
| "node_modules/**", | ||
| "out/**", | ||
| "pnpm-lock.yaml" | ||
| ], | ||
| "printWidth": 80, | ||
| "singleQuote": true, | ||
| "sortPackageJson": false, | ||
| "trailingComma": "all", | ||
| "useTabs": true | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| { | ||
| "$schema": "./node_modules/oxlint/configuration_schema.json", | ||
| "categories": { | ||
| "correctness": "error" | ||
| }, | ||
| "env": { | ||
| "browser": true, | ||
| "mocha": true, | ||
| "node": true, | ||
| "vitest": true | ||
| }, | ||
| "ignorePatterns": [ | ||
| ".vscode-test/**", | ||
| ".vscode-test-web/**", | ||
| "artifacts/**", | ||
| "coverage/**", | ||
| "dist/**", | ||
| "node_modules/**", | ||
| "out/**" | ||
| ], | ||
| "rules": { | ||
| "curly": "error", | ||
| "eqeqeq": "error", | ||
| "no-throw-literal": "error", | ||
| "typescript/await-thenable": "error", | ||
| "typescript/no-floating-promises": "error", | ||
| "typescript/no-misused-promises": "error", | ||
| "typescript/only-throw-error": "error" | ||
| } | ||
| } |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,80 @@ | ||
| pre-commit: | ||
| parallel: true | ||
| jobs: | ||
| - name: check staged formatting | ||
| glob: '*.{css,html,js,json,jsonc,md,mjs,mts,ts,yaml,yml}' | ||
| exclude: | ||
| - '.vscode-test/**' | ||
| - '.vscode-test-web/**' | ||
| - 'artifacts/**' | ||
| - 'coverage/**' | ||
| - 'dist/**' | ||
| - 'docs/plans/**' | ||
| - 'mise.lock' | ||
| - 'mise.toml' | ||
| - 'node_modules/**' | ||
| - 'out/**' | ||
| - 'pnpm-lock.yaml' | ||
| run: pnpm exec oxfmt --check {staged_files} | ||
|
|
||
| - name: check staged TOML formatting | ||
| glob: 'mise.toml' | ||
| run: mise exec -- taplo format --check {staged_files} | ||
|
|
||
| - name: lint staged code | ||
| glob: '*.{js,mjs,mts,ts}' | ||
| run: pnpm exec oxlint --deny-warnings {staged_files} | ||
|
|
||
| - name: lint staged CSS | ||
| glob: '*.css' | ||
| run: pnpm exec stylelint {staged_files} | ||
|
|
||
| - name: lint staged Markdown | ||
| glob: '*.md' | ||
| run: pnpm exec markdownlint-cli2 --no-globs {staged_files} | ||
|
|
||
| - name: type-aware product lint | ||
| glob: | ||
| - '.oxlintrc.json' | ||
| - 'package.json' | ||
| - 'pnpm-lock.yaml' | ||
| - 'pnpm-workspace.yaml' | ||
| - 'src/*.{ts,mts}' | ||
| - 'src/**/*.{ts,mts}' | ||
| - 'tsconfig.json' | ||
| run: pnpm run lint:types | ||
|
|
||
| - name: typecheck TypeScript projects | ||
| glob: | ||
| - '*.{js,json,mjs,mts,ts}' | ||
| - 'pnpm-lock.yaml' | ||
| - 'pnpm-workspace.yaml' | ||
| run: pnpm run typecheck | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
|
|
||
| - name: run unit tests | ||
| glob: | ||
| - 'package.json' | ||
| - 'pnpm-lock.yaml' | ||
| - 'pnpm-workspace.yaml' | ||
| - 'src/*.{ts,mts}' | ||
| - 'src/**/*.{ts,mts}' | ||
| - 'vitest.config.mts' | ||
| run: pnpm run test:unit | ||
|
|
||
| - name: run Node contract tests | ||
| glob: | ||
| - '.github/workflows/*.{yaml,yml}' | ||
| - '.oxfmtrc.json' | ||
| - '.vscode/tasks.json' | ||
| - 'CHANGELOG.md' | ||
| - 'esbuild.mts' | ||
| - 'lefthook.yml' | ||
| - 'media/preview.css' | ||
| - 'package.json' | ||
| - 'pnpm-lock.yaml' | ||
| - 'pnpm-workspace.yaml' | ||
| - 'scripts/*.{ts,mts}' | ||
| - 'scripts/**/*.{ts,mts}' | ||
| - 'test/*.{ts,mts}' | ||
| - 'test/**/*.{ts,mts}' | ||
| run: pnpm run test:contracts | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.