Skip to content
Merged
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
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

include config/make/common.mk

.PHONY: all help clean build test lint lint-ast format hooks run dev dev-backend compose-up compose-down compose-logs compose-ps health ingest citations fetch-all fetch-force fetch-quick process-all process-doc-sets process-github-repo update-github-repos full-pipeline frontend-install frontend-build
.PHONY: all help clean build test lint lint-ast lint-frontend format hooks run dev dev-backend compose-up compose-down compose-logs compose-ps health ingest citations fetch-all fetch-force fetch-quick process-all process-doc-sets process-github-repo update-github-repos full-pipeline frontend-install frontend-build

all: help ## Default target (alias)

Expand All @@ -20,9 +20,11 @@ test: ## Run tests (loads .env if present)
@$(call load_env); \
$(GRADLEW) test

lint: lint-ast ## Run static analysis (Java: SpotBugs + PMD + ast-grep, Frontend: svelte-check)
lint: lint-ast lint-frontend ## Run static analysis (Java + Frontend)
$(GRADLEW) spotbugsMain pmdMain
cd frontend && npm run check

lint-frontend: ## Run frontend linting (oxlint + ast-grep + svelte-check)
cd frontend && npm run lint && npm run check

lint-ast: ## Run ast-grep rules for Java naming and type safety
@$(call require_cmd,ast-grep,brew install ast-grep)
Expand Down
4 changes: 4 additions & 0 deletions config/prek.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
# https://prek.j178.dev/

# Commands to run before each push
[[pre-push]]
name = "lint"
run = "make lint"

[[pre-push]]
name = "build-and-test"
run = "make build && make test"
74 changes: 74 additions & 0 deletions frontend/config/oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{
"$schema": "../node_modules/oxlint/configuration_schema.json",
"plugins": [
"typescript",
"react",
"react-hooks",
"nextjs",
"import",
"jsx-a11y",
"promise",
"vitest"
],
"jsPlugins": [
{
"name": "zod",
"specifier": "../node_modules/eslint-plugin-zod/dist/index.cjs"
}
],
"env": {
"browser": true,
"node": true,
"es2023": true
},
"categories": {
"correctness": "error",
"suspicious": "error",
"perf": "warn",
"style": "off",
"pedantic": "off"
},
"rules": {
"no-empty": ["error", { "allowEmptyCatch": false }],
"no-await-in-loop": "off",
"import/no-unassigned-import": ["error", {
"allow": ["**/*.css", "@testing-library/**"]
}],
"typescript/no-explicit-any": "error",
"typescript/no-unsafe-type-assertion": "warn",
"typescript/no-floating-promises": "warn",
"zod/no-any-schema": "error",
"zod/no-optional-and-default-together": "error",
"zod/no-throw-in-refine": "error",
"zod/no-empty-custom-schema": "error",
"zod/no-number-schema-with-int": "error",
"zod/consistent-import-source": ["warn", { "sources": ["zod/v4"] }],
"zod/require-error-message": "warn",
"zod/prefer-enum-over-literal-union": "warn",
"zod/require-schema-suffix": "warn",
"zod/prefer-meta": "warn",
"zod/array-style": "warn",
"zod/consistent-import": ["warn", { "syntax": "named" }]
},
"overrides": [
{
"files": ["**/*.{test,spec}.{js,jsx,ts,tsx}", "src/test/**/*.{js,jsx,ts,tsx}"],
"env": {
"vitest": true
},
"rules": {
"zod/require-schema-suffix": "off",
"zod/require-error-message": "off"
}
}
],
"ignorePatterns": [
"node_modules/**",
"dist/**",
"build/**",
"coverage/**",
"public/**",
"**/*.svelte",
"**/*.d.ts"
]
}
2 changes: 2 additions & 0 deletions frontend/config/sgconfig.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ruleDirs:
- ../rules/ast-grep
46 changes: 0 additions & 46 deletions frontend/eslint.config.mjs

This file was deleted.

48 changes: 0 additions & 48 deletions frontend/oxlintrc.json

This file was deleted.

Loading