-
Notifications
You must be signed in to change notification settings - Fork 0
chore: lint hardening, prettier and CI quality gates #9
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
11 commits
Select commit
Hold shift + click to select a range
46eb3cc
chore: add oxlint hardened config and fix violations
b146301
chore: enable exactOptionalPropertyTypes and stricter tsconfig flags
338b5e6
chore: add prettier, editorconfig and lefthook hooks
a8a73a3
fix: strip inherited GIT_DIR/GIT_WORK_TREE from git subprocess env
9d7534c
fix: extract multi-statement click handlers in ReviewShell
75dc854
style: format codebase with prettier
df939a1
test: force non-interactive TTY state for sync push assertions
b29ab2a
ci: add quality workflow with lint, format, typecheck, tests and publint
5732e38
fix: restrict git env filtering to repo-targeting variables
56c1f20
Merge branch 'develop' into chore/durcissement-lint
f273600
ci: restrict quality workflow token to contents read
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| root = true | ||
|
|
||
| [*] | ||
| charset = utf-8 | ||
| end_of_line = lf | ||
| indent_style = space | ||
| indent_size = 2 | ||
| insert_final_newline = true | ||
| trim_trailing_whitespace = true | ||
|
|
||
| [*.md] | ||
| trim_trailing_whitespace = false |
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 |
|---|---|---|
|
|
@@ -3,7 +3,7 @@ name: Publish to npm | |
| on: | ||
| push: | ||
| tags: | ||
| - "v*" | ||
| - 'v*' | ||
|
|
||
| permissions: | ||
| id-token: write | ||
|
|
||
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,35 @@ | ||
| name: Quality | ||
|
|
||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: | ||
| - main | ||
| - develop | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| quality: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: oven-sh/setup-bun@v2 | ||
|
|
||
| - run: bun install --frozen-lockfile | ||
|
|
||
| - run: bun run lint | ||
|
|
||
| - run: bun run format:check | ||
|
|
||
| - run: bun run typecheck | ||
|
|
||
| - run: bun run build | ||
|
|
||
| - run: bun run test | ||
|
|
||
| - run: bunx publint packages/cli | ||
|
|
||
| - run: bunx publint packages/contract | ||
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,65 @@ | ||
| { | ||
| "$schema": "./node_modules/oxlint/configuration_schema.json", | ||
| "categories": { | ||
| "correctness": "error", | ||
| "perf": "error", | ||
| "suspicious": "error" | ||
| }, | ||
| "rules": { | ||
| "complexity": ["warn", 10], | ||
| "curly": ["error", "all"], | ||
| "eqeqeq": ["error", "always", { "null": "ignore" }], | ||
| "max-depth": ["warn", 3], | ||
| "max-lines": ["warn", { "max": 400, "skipBlankLines": true, "skipComments": true }], | ||
| "max-lines-per-function": ["warn", { "max": 60, "skipBlankLines": true, "skipComments": true }], | ||
| "max-nested-callbacks": ["warn", 3], | ||
| "max-params": ["error", { "max": 4 }], | ||
| "no-await-in-loop": "off", | ||
| "no-else-return": ["error", { "allowElseIf": false }], | ||
| "no-lonely-if": "error", | ||
| "no-param-reassign": "error", | ||
| "no-underscore-dangle": [ | ||
| "error", | ||
| { "allow": ["__CODESEMA_VERSION__", "__CODESEMA_LOCALE__", "__CODESEMA_FIX_TOKEN__"] } | ||
| ], | ||
| "oxc/no-map-spread": "off", | ||
| "typescript/consistent-type-definitions": ["error", "type"], | ||
| "typescript/no-explicit-any": "error", | ||
| "typescript/no-non-null-assertion": "error", | ||
| "typescript/no-require-imports": "error", | ||
| "unicorn/consistent-function-scoping": "warn", | ||
| "unicorn/filename-case": ["error", { "case": "kebabCase" }], | ||
| "unicorn/prefer-node-protocol": "error" | ||
| }, | ||
| "overrides": [ | ||
| { | ||
| "files": ["**/*.test.ts"], | ||
| "rules": { | ||
| "max-lines": "off", | ||
| "max-lines-per-function": "off", | ||
| "max-nested-callbacks": ["warn", 5], | ||
| "typescript/no-non-null-assertion": "off" | ||
| } | ||
| }, | ||
| { | ||
| "files": ["**/*.vue"], | ||
| "rules": { | ||
| "unicorn/filename-case": ["error", { "case": "pascalCase" }] | ||
| } | ||
| }, | ||
| { | ||
| "files": ["packages/web/src/composables/**"], | ||
| "rules": { | ||
| "unicorn/filename-case": ["error", { "case": "camelCase" }] | ||
| } | ||
| }, | ||
| { | ||
| "files": ["**/*.d.ts"], | ||
| "rules": { | ||
| "typescript/consistent-type-definitions": "off", | ||
| "unicorn/require-module-specifiers": "off" | ||
| } | ||
| } | ||
| ], | ||
| "ignorePatterns": ["node_modules", "dist", "web-dist", "coverage"] | ||
| } |
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,6 @@ | ||
| node_modules | ||
| dist | ||
| web-dist | ||
| coverage | ||
| bun.lock | ||
| CHANGELOG.md |
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
Oops, something went wrong.
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.