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
6 changes: 4 additions & 2 deletions .devcontainer/ui-design/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
"Vue.volar",
"bradlc.vscode-tailwindcss",
"mrmlnc.vscode-scss",
"sibiraj-s.vscode-scss-formatter",
"esbenp.prettier-vscode",
"oxc.oxc-vscode",
"ms-vscode.live-server",
"usernamehw.errorlens",
"charliermarsh.ruff",
Expand All @@ -20,6 +19,9 @@
"workbench.colorTheme": "Default Light+",
"editor.fontSize": 14,
"editor.formatOnSave": true,
"[javascript][typescript][vue][json][jsonc][css][scss][markdown][html]": {
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"files.exclude": {
"**/.git": true,
"**/node_modules": true,
Expand Down
2 changes: 1 addition & 1 deletion .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ uv run ruff check # Run ruff linting

### Linting Configuration
- Python: Ruff with shared configuration across packages
- Frontend: ESLint + Prettier with TypeScript support
- Frontend: oxlint + ESLint (Vue templates/i18n) for linting, oxfmt for formatting
- Pre-commit hooks for code formatting and linting

# `extralit-server/` Backend Architecture Overview
Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/extralit-frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,20 @@ jobs:
npm run api:types
git diff --exit-code -- types/generated/api.d.ts

- name: Run lint 🧹
- name: Check formatting 🎨
run: |
npm run format:check

- name: Run oxlint 🦀
run: |
npm run lint:oxc

# ESLint keeps the Vue template + i18n rules oxlint cannot run yet, and carries
# ~1300 pre-existing advisory warnings, so it stays non-gating.
- name: Run eslint 🧹
continue-on-error: true
run: |
npm run lint
npm run lint:eslint

- name: Run tests with coverage 🧪
id: run-tests
Expand Down
13 changes: 10 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,15 @@ repos:
##############################################################################
- repo: local
hooks:
- id: frontend-format
name: "Format extralit-frontend files with oxfmt"
# Same path-rewriting contract as frontend-lint below. Blocking: unlike lint, a
# formatting failure here means oxfmt could not parse the file.
entry: bash -c 'cd extralit-frontend && npx oxfmt --no-error-on-unmatched-pattern "${@#extralit-frontend/}"' --
language: system
files: '^extralit-frontend/.*\.(js|mjs|cjs|ts|tsx|vue|json|jsonc|css|scss|md|html)$'
pass_filenames: true
Comment thread
coderabbitai[bot] marked this conversation as resolved.

- id: frontend-lint
name: "Lint and fix extralit-frontend files"
# pre-commit passes repo-relative paths (extralit-frontend/foo.vue). The trailing
Expand All @@ -78,8 +87,6 @@ ci:
autoupdate_commit_msg: "[pre-commit.ci] pre-commit autoupdate"
autoupdate_schedule: weekly
skip:
- helmlint # Disabling helmlint on CI by now because helm dependency is not available
- frontend-eslint # Requires npm dependencies to be installed in extralit-frontend
- frontend-prettier # Requires npm dependencies to be installed in extralit-frontend
- frontend-format # Requires npm dependencies to be installed in extralit-frontend
- frontend-lint # Requires npm dependencies to be installed in extralit-frontend
submodules: false
1 change: 1 addition & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"recommendations": [
"astral-sh.ty",
"ms-python.python",
"oxc.oxc-vscode",
"usernamehw.errorlens",
"charliermarsh.ruff"
]
Expand Down
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
"source.organizeImports.ruff": "explicit"
}
},
"[javascript][typescript][vue][json][jsonc][css][scss][markdown][html]": {
"editor.defaultFormatter": "oxc.oxc-vscode",
"editor.formatOnSave": true
},
"editor.rulers": [
120
],
Expand Down
21 changes: 21 additions & 0 deletions extralit-frontend/.oxfmtrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"$schema": "./node_modules/oxfmt/configuration_schema.json",
"trailingComma": "es5",
"printWidth": 120,
"tabWidth": 2,
"semi": true,
"singleQuote": false,
"sortPackageJson": false,
"ignorePatterns": [
"node_modules",
"dist",
".output",
".nuxt",
".nuxt-stale-root",
".vercel",
"package-lock.json",
"types/generated",
"demo",
"static"
]
}
219 changes: 219 additions & 0 deletions extralit-frontend/.oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,219 @@
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": ["vue", "unicorn"],
"categories": {
"correctness": "off"
},
"env": {
"builtin": true,
"es2022": true,
"browser": true,
"jest": true,
"node": true
},
"globals": {
"$nuxt": "readonly",
"vi": "readonly",
"defineNuxtPlugin": "readonly",
"defineNuxtRouteMiddleware": "readonly",
"definePageMeta": "readonly",
"navigateTo": "readonly",
"abortNavigation": "readonly",
"useNuxtApp": "readonly",
"useRuntimeConfig": "readonly",
"useRoute": "readonly",
"useRouter": "readonly",
"useState": "readonly",
"useCookie": "readonly",
"useHead": "readonly",
"useSeoMeta": "readonly",
"useError": "readonly",
"createError": "readonly",
"clearError": "readonly",
"showError": "readonly"
},
"ignorePatterns": [
"node_modules/**",
"dist/**",
".nuxt/**",
".output/**",
"e2e/**",
"demo/**",
"v1/domain/entities/document/Document.ts",
"v1/domain/usecases/get-extraction-completion-use-case.ts",
"components/base/base-render-table/**",
"types/generated/**"
],
"rules": {
"constructor-super": "error",
"for-direction": "error",
"getter-return": "error",
"no-async-promise-executor": "error",
"no-case-declarations": "error",
"no-class-assign": "error",
"no-compare-neg-zero": "error",
"no-cond-assign": "error",
"no-const-assign": "error",
"no-constant-binary-expression": "warn",
"no-constant-condition": "error",
"no-control-regex": "error",
"no-delete-var": "error",
"no-dupe-class-members": "error",
"no-dupe-else-if": "error",
"no-dupe-keys": "error",
"no-duplicate-case": "error",
"no-empty": "error",
"no-empty-character-class": "error",
"no-empty-pattern": "error",
"no-empty-static-block": "error",
"no-ex-assign": "error",
"no-extra-boolean-cast": "error",
"no-fallthrough": "error",
"no-func-assign": "error",
"no-global-assign": "error",
"no-import-assign": "error",
"no-invalid-regexp": "error",
"no-irregular-whitespace": "error",
"no-loss-of-precision": "error",
"no-misleading-character-class": "error",
"no-new-native-nonconstructor": "error",
"no-nonoctal-decimal-escape": "error",
"no-obj-calls": "error",
"no-prototype-builtins": "error",
"no-redeclare": "error",
"no-regex-spaces": "error",
"no-self-assign": "error",
"no-setter-return": "error",
"no-shadow-restricted-names": "error",
"no-sparse-arrays": "error",
"no-this-before-super": "error",
"no-unassigned-vars": "error",
"no-unreachable": "error",
"no-unsafe-finally": "error",
"no-unsafe-negation": "error",
"no-unsafe-optional-chaining": "error",
"no-unused-labels": "error",
"no-unused-private-class-members": "error",
"no-unused-vars": [
"warn",
{
"ignoreRestSiblings": true
}
],
"no-useless-backreference": "error",
"no-useless-catch": "error",
"no-useless-escape": "error",
"no-with": "error",
"preserve-caught-error": "warn",
"require-yield": "error",
"use-isnan": "error",
"valid-typeof": "error",
"vue/no-arrow-functions-in-watch": "error",
"vue/no-async-in-computed-properties": "error",
"vue/no-computed-properties-in-data": "error",
"vue/no-deprecated-data-object-declaration": "error",
"vue/no-deprecated-delete-set": "error",
"vue/no-deprecated-destroyed-lifecycle": "warn",
"vue/no-deprecated-events-api": "error",
"vue/no-deprecated-model-definition": "error",
"vue/no-deprecated-props-default-this": "error",
"vue/no-deprecated-vue-config-keycodes": "error",
"vue/no-dupe-keys": "error",
"vue/no-export-in-script-setup": "error",
"vue/no-expose-after-await": "error",
"vue/no-lifecycle-after-await": "error",
"vue/no-reserved-component-names": "error",
"vue/no-reserved-keys": "error",
"vue/no-reserved-props": "error",
"vue/no-shared-component-data": "error",
"vue/no-side-effects-in-computed-properties": "warn",
"vue/no-watch-after-await": "error",
"vue/prefer-import-from-vue": "error",
"vue/require-prop-type-constructor": "warn",
"vue/require-render-return": "error",
"vue/require-slots-as-functions": "error",
"vue/return-in-computed-property": "warn",
"vue/return-in-emits-validator": "error",
"vue/valid-define-emits": "error",
"vue/valid-define-options": "error",
"vue/valid-define-props": "error",
"vue/valid-next-tick": "warn",
"vue/component-definition-name-casing": "warn",
"vue/prop-name-casing": "warn",
"vue/require-default-prop": "warn",
"vue/require-prop-types": "warn",
"vue/no-multiple-slot-args": "warn",
"vue/no-required-prop-with-default": "warn",
"prefer-const": "warn",
"prefer-arrow-callback": "warn"
},
"overrides": [
{
"files": ["*.yaml", "**/*.yaml", "*.yml", "**/*.yml"],
"rules": {
"no-irregular-whitespace": "off"
}
},
{
"files": ["**/*.ts"],
"rules": {
"constructor-super": "off",
"getter-return": "off",
"no-class-assign": "off",
"no-const-assign": "off",
"no-dupe-class-members": "off",
"no-dupe-keys": "off",
"no-func-assign": "off",
"no-import-assign": "off",
"no-new-native-nonconstructor": "off",
"no-obj-calls": "off",
"no-redeclare": "off",
"no-setter-return": "off",
"no-this-before-super": "off",
"no-unreachable": "off",
"no-unsafe-negation": "off",
"no-var": "error",
"no-with": "off",
"prefer-const": "error",
"prefer-rest-params": "error",
"prefer-spread": "error",
"no-array-constructor": "error",
"no-unused-expressions": "error",
"no-unused-vars": [
"warn",
{
"ignoreRestSiblings": true,
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_"
}
],
"typescript/ban-ts-comment": "error",
"typescript/no-duplicate-enum-values": "error",
"typescript/no-empty-object-type": "error",
"typescript/no-explicit-any": "warn",
"typescript/no-extra-non-null-assertion": "error",
"typescript/no-misused-new": "error",
"typescript/no-namespace": [
"error",
{
"allowDeclarations": true
}
],
"typescript/no-non-null-asserted-optional-chain": "error",
"typescript/no-require-imports": "error",
"typescript/no-this-alias": "error",
"typescript/no-unnecessary-type-constraint": "error",
"typescript/no-unsafe-declaration-merging": "error",
"typescript/no-unsafe-function-type": "error",
"typescript/no-wrapper-object-types": "error",
"typescript/prefer-as-const": "error",
"typescript/prefer-namespace-keyword": "error",
"typescript/triple-slash-reference": "error",
"no-useless-constructor": "off",
"no-throw-literal": "off",
"no-new": "off"
},
"plugins": ["typescript"]
}
]
}
12 changes: 0 additions & 12 deletions extralit-frontend/.prettierignore

This file was deleted.

7 changes: 0 additions & 7 deletions extralit-frontend/.prettierrc.js

This file was deleted.

Loading
Loading