mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2026-09-03 21:30:14 +03:00
Compare commits
8
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e2deab2a81 | ||
|
|
3d69006d9d | ||
|
|
35cb66bd5e | ||
|
|
3a57da928d | ||
|
|
596f5fd42c | ||
|
|
68b1c86d4b | ||
|
|
4a1773cd88 | ||
|
|
c73dd3d8de |
+10
-19
@@ -195,40 +195,25 @@ tasks:
|
||||
desc: "Run linting"
|
||||
deps: [install]
|
||||
cmds:
|
||||
- task: lint:eslint
|
||||
- task: lint:dpdm
|
||||
|
||||
lint:eslint:
|
||||
desc: "Run ESLint linting"
|
||||
deps: [install]
|
||||
cmds:
|
||||
- npx eslint --max-warnings=0
|
||||
|
||||
lint:dpdm:
|
||||
desc: "Run circular import linting"
|
||||
deps: [install]
|
||||
cmds:
|
||||
# Globs so dpdm walks the whole tree. dpdm expands the braces itself, so this is
|
||||
# shell-agnostic. Covers the whole editor tree, including the portal layer.
|
||||
- npx dpdm "editor/src/**/*.{ts,tsx}" --circular --no-warning --no-tree --exit-code circular:1
|
||||
- task: lint:oxlint
|
||||
|
||||
lint:fix:
|
||||
desc: "Auto-fix lint issues"
|
||||
deps: [install]
|
||||
cmds:
|
||||
- npx eslint --fix
|
||||
- npx oxlint --fix
|
||||
|
||||
format:
|
||||
desc: "Auto-fix code formatting"
|
||||
deps: [install]
|
||||
cmds:
|
||||
- npx prettier --write .
|
||||
- npx oxfmt --write .
|
||||
|
||||
format:check:
|
||||
desc: "Check code formatting"
|
||||
deps: [install]
|
||||
cmds:
|
||||
- npx prettier --check .
|
||||
- npx oxfmt --check .
|
||||
|
||||
fix:
|
||||
desc: "Auto-fix lint and format"
|
||||
@@ -236,6 +221,12 @@ tasks:
|
||||
- task: format
|
||||
- task: lint:fix
|
||||
|
||||
lint:oxlint:
|
||||
desc: "Run oxlint linting"
|
||||
deps: [install]
|
||||
cmds:
|
||||
- npx oxlint --max-warnings=0
|
||||
|
||||
typecheck:
|
||||
desc: "Typecheck default build of the app"
|
||||
cmds:
|
||||
|
||||
Vendored
+1
-1
@@ -19,6 +19,6 @@
|
||||
"yzhang.markdown-all-in-one", // Markdown All-in-One extension for enhanced Markdown editing
|
||||
"stylelint.vscode-stylelint", // Stylelint extension for CSS and SCSS linting
|
||||
"redhat.vscode-yaml", // YAML extension for Visual Studio Code
|
||||
"dbaeumer.vscode-eslint", // ESLint extension for TypeScript linting
|
||||
"oxc.oxc-vscode", // Oxc (oxlint) extension for TypeScript/JavaScript linting
|
||||
]
|
||||
}
|
||||
|
||||
+1
-1
@@ -158,7 +158,7 @@ Stirling-PDF/
|
||||
│ │ │ └── locales/ # Internationalization files (JSON)
|
||||
│ │ └── vite.config.ts # Vite configuration
|
||||
│ ├── package.json # Shared workspace dependencies
|
||||
│ └── eslint.config.mjs # Shared lint config
|
||||
│ └── oxlint.config.ts # Shared lint config (oxlint)
|
||||
├── customFiles/ # Custom static files and templates (generated at runtime used to replace existing files)
|
||||
├── docs/ # Documentation files
|
||||
├── exampleYmlFiles/ # Example YAML configuration files
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"$schema": "./node_modules/oxfmt/configuration_schema.json",
|
||||
"printWidth": 80,
|
||||
"tabWidth": 2,
|
||||
"useTabs": false,
|
||||
"endOfLine": "lf",
|
||||
"sortPackageJson": false,
|
||||
"ignorePatterns": [
|
||||
"dist/",
|
||||
"editor/dist/",
|
||||
"editor/src-tauri/**/target/",
|
||||
"editor/src-tauri/gen/",
|
||||
"node_modules/",
|
||||
"editor/public/vendor/",
|
||||
"editor/public/mockServiceWorker.js",
|
||||
"editor/public/og-metadata.json",
|
||||
"editor/src/core/data/ogImageMap.json",
|
||||
"editor/public/pdfjs*/",
|
||||
"editor/public/js/thirdParty/",
|
||||
"editor/public/css/cookieconsent.css",
|
||||
"storybook-static/",
|
||||
"playwright-report/",
|
||||
"editor/playwright-report/",
|
||||
"test-results/",
|
||||
"editor/test-results/",
|
||||
"*.min.*",
|
||||
"*.md",
|
||||
"*.wxs",
|
||||
"editor/src/output.css"
|
||||
]
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
dist/
|
||||
editor/dist/
|
||||
# Tauri/Cargo build output (binary assets named *.js etc. confuse Prettier).
|
||||
# Match nested target/ dirs too - provisioner/ and thumbnail-handler/ each
|
||||
# have their own Cargo workspace under src-tauri/.
|
||||
editor/src-tauri/**/target/
|
||||
editor/src-tauri/gen/
|
||||
node_modules/
|
||||
editor/public/vendor/
|
||||
# Auto-generated by MSW (`msw init`); regenerated verbatim, not hand-formatted.
|
||||
editor/public/mockServiceWorker.js
|
||||
# Auto-generated OG/social-preview metadata (scripts/generate-og-metadata.mjs); regenerated verbatim.
|
||||
editor/public/og-metadata.json
|
||||
editor/src/core/data/ogImageMap.json
|
||||
editor/public/pdfjs*/
|
||||
editor/public/js/thirdParty/
|
||||
editor/public/css/cookieconsent.css
|
||||
# Build / test artifacts that may exist locally even though they're gitignored
|
||||
storybook-static/
|
||||
playwright-report/
|
||||
editor/playwright-report/
|
||||
test-results/
|
||||
editor/test-results/
|
||||
*.min.*
|
||||
*.md
|
||||
*.wxs
|
||||
editor/src/output.css
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"printWidth": 80,
|
||||
"tabWidth": 2,
|
||||
"useTabs": false,
|
||||
"endOfLine": "lf"
|
||||
}
|
||||
@@ -6,9 +6,18 @@
|
||||
|
||||
import { readFileSync, writeFileSync, mkdirSync } from "node:fs";
|
||||
import { dirname, resolve } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { parseArgs } from "node:util";
|
||||
import { compile, type JSONSchema } from "json-schema-to-typescript";
|
||||
import * as prettier from "prettier";
|
||||
import { format } from "oxfmt";
|
||||
|
||||
// Formatting config shared with the repo's oxfmt CLI, so generated output
|
||||
// matches `task frontend:format:check`. Resolved relative to this script so it
|
||||
// works regardless of the working directory.
|
||||
const OXFMT_CONFIG_PATH = resolve(
|
||||
dirname(fileURLToPath(import.meta.url)),
|
||||
"../../.oxfmtrc.json",
|
||||
);
|
||||
|
||||
// The API namespaces whose endpoints are real, callable tools. `/api/v1/filter/`
|
||||
// (pipeline-only) and `/api/v1/ai/tools/` (not in the spec) are intentionally
|
||||
@@ -362,11 +371,17 @@ async function compileAndWrite(
|
||||
].join("\n");
|
||||
|
||||
const body = `${FILE_HEADER}\n\n${models}\n\n${footer}\n`;
|
||||
const prettierConfig = await prettier.resolveConfig(outputPath);
|
||||
const formatted = await prettier.format(body, {
|
||||
...prettierConfig,
|
||||
parser: "typescript",
|
||||
});
|
||||
const oxfmtConfig = JSON.parse(readFileSync(OXFMT_CONFIG_PATH, "utf-8"));
|
||||
const { code: formatted, errors } = await format(
|
||||
outputPath,
|
||||
body,
|
||||
oxfmtConfig,
|
||||
);
|
||||
if (errors.length > 0) {
|
||||
throw new Error(
|
||||
`oxfmt failed to format ${outputPath}:\n${errors.map((error) => error.message).join("\n")}`,
|
||||
);
|
||||
}
|
||||
|
||||
if (check) {
|
||||
let current = "";
|
||||
|
||||
@@ -1,220 +0,0 @@
|
||||
// @ts-check
|
||||
|
||||
import eslint from "@eslint/js";
|
||||
import globals from "globals";
|
||||
import { defineConfig } from "eslint/config";
|
||||
import tseslint from "typescript-eslint";
|
||||
|
||||
const srcGlobs = [
|
||||
// The portal layer lives under editor/src/portal, so editor/src/** covers it.
|
||||
"editor/src/**/*.{js,mjs,jsx,ts,tsx}",
|
||||
];
|
||||
const nodeGlobs = [
|
||||
"scripts/**/*.{js,ts,mjs,mts}",
|
||||
"editor/scripts/**/*.{js,ts,mjs,mts}",
|
||||
// Covers editor/vite.config.ts and editor/vitest.config.ts.
|
||||
"editor/*.config.{js,ts,mjs}",
|
||||
"*.config.{js,ts,mjs}",
|
||||
".storybook/*.{js,ts,mjs,mts,tsx}",
|
||||
];
|
||||
|
||||
const baseRestrictedImportPatterns = [
|
||||
{
|
||||
regex: "^\\.",
|
||||
message:
|
||||
"Use a workspace alias (@app/* for editor, @portal/* for portal) instead of relative imports.",
|
||||
},
|
||||
{
|
||||
regex: "^src/",
|
||||
message: "Use a workspace alias instead of absolute src/ imports.",
|
||||
},
|
||||
];
|
||||
|
||||
export default defineConfig(
|
||||
{
|
||||
// Everything that contains 3rd party code that we don't want to lint
|
||||
ignores: [
|
||||
"dist",
|
||||
"node_modules",
|
||||
"playwright-report",
|
||||
"storybook-static",
|
||||
"test-results",
|
||||
"editor/dist",
|
||||
"editor/public",
|
||||
"editor/src-tauri",
|
||||
"editor/playwright-report",
|
||||
"editor/test-results",
|
||||
],
|
||||
},
|
||||
eslint.configs.recommended,
|
||||
tseslint.configs.recommended,
|
||||
{
|
||||
rules: {
|
||||
"no-restricted-imports": [
|
||||
"error",
|
||||
{
|
||||
patterns: baseRestrictedImportPatterns,
|
||||
},
|
||||
],
|
||||
"@typescript-eslint/no-empty-object-type": [
|
||||
"error",
|
||||
{
|
||||
// Allow empty extending interfaces because there's no real reason not to, and it makes it obvious where to put extra attributes in the future
|
||||
allowInterfaces: "with-single-extends",
|
||||
},
|
||||
],
|
||||
"@typescript-eslint/no-explicit-any": "off", // Temporarily disabled until codebase conformant
|
||||
"@typescript-eslint/no-unused-vars": [
|
||||
"error",
|
||||
{
|
||||
args: "all", // All function args must be used (or explicitly ignored)
|
||||
argsIgnorePattern: "^_", // Allow unused variables beginning with an underscore
|
||||
caughtErrors: "all", // Caught errors must be used (or explicitly ignored)
|
||||
caughtErrorsIgnorePattern: "^_", // Allow unused variables beginning with an underscore
|
||||
destructuredArrayIgnorePattern: "^_", // Allow unused variables beginning with an underscore
|
||||
varsIgnorePattern: "^_", // Allow unused variables beginning with an underscore
|
||||
ignoreRestSiblings: true, // Allow unused variables when removing attributes from objects (otherwise this requires explicit renaming like `({ x: _x, ...y }) => y`, which is clunky)
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
// Desktop-only packages must not be imported from core or proprietary code.
|
||||
// Use the stub/shadow pattern instead: define a stub in editor/src/core/ and override in editor/src/desktop/.
|
||||
{
|
||||
files: srcGlobs,
|
||||
ignores: ["editor/src/desktop/**"],
|
||||
rules: {
|
||||
"no-restricted-imports": [
|
||||
"error",
|
||||
{
|
||||
patterns: [
|
||||
...baseRestrictedImportPatterns,
|
||||
{
|
||||
regex: "^@tauri-apps/",
|
||||
message:
|
||||
"Tauri APIs are desktop-only. Review frontend/editor/DeveloperGuide.md for structure advice.",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
// The cloud/ layer is the SHARED hosted/SaaS experience consumed by BOTH the
|
||||
// saas and desktop leaves, so it must stay platform-portable. It must not
|
||||
// reach platform-specific things directly (Supabase, Tauri, raw fetch,
|
||||
// window.location, web storage, or import.meta.env.VITE_*) — those arrive via
|
||||
// @app/* seams (services/apiClient, auth/session, platform/openExternal, ...)
|
||||
// that each leaf provides for its own platform.
|
||||
{
|
||||
files: ["editor/src/cloud/**/*.{js,mjs,jsx,ts,tsx}"],
|
||||
rules: {
|
||||
"no-restricted-imports": [
|
||||
"error",
|
||||
{
|
||||
patterns: [
|
||||
...baseRestrictedImportPatterns,
|
||||
{
|
||||
regex: "^@supabase/",
|
||||
message:
|
||||
"cloud/ must stay platform-portable. Reach Supabase via an @app/* seam (e.g. @app/auth/supabase, @app/auth/session) provided per-platform in saas/ and desktop/.",
|
||||
},
|
||||
{
|
||||
regex: "^@tauri-apps/",
|
||||
message:
|
||||
"cloud/ must stay platform-portable. Tauri APIs are desktop-only — reach native features via an @app/* seam (e.g. @app/platform/openExternal).",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
"no-restricted-globals": [
|
||||
"error",
|
||||
{
|
||||
name: "fetch",
|
||||
message:
|
||||
"cloud/ must not call raw fetch — use @app/services/apiClient so each platform supplies its own transport.",
|
||||
},
|
||||
{
|
||||
name: "localStorage",
|
||||
message:
|
||||
"cloud/ must not touch localStorage — use an @app/* storage seam so desktop/web can differ.",
|
||||
},
|
||||
{
|
||||
name: "sessionStorage",
|
||||
message:
|
||||
"cloud/ must not touch sessionStorage — use an @app/* storage seam so desktop/web can differ.",
|
||||
},
|
||||
],
|
||||
"no-restricted-syntax": [
|
||||
"error",
|
||||
{
|
||||
selector:
|
||||
"MemberExpression[object.name='window'][property.name='location']",
|
||||
message:
|
||||
"cloud/ must not touch window.location — use an @app/* seam (e.g. @app/platform/openExternal) so desktop/web can differ.",
|
||||
},
|
||||
{
|
||||
selector:
|
||||
"MemberExpression[property.name='env'][object.type='MetaProperty'][object.meta.name='import'][object.property.name='meta']",
|
||||
message:
|
||||
"cloud/ must not read import.meta.env — use @app/constants/app / @app/platform seams so config is supplied per-platform.",
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
// Stricter rules that not all sub-folders are conformant to yet.
|
||||
{
|
||||
files: srcGlobs,
|
||||
ignores: [
|
||||
"editor/src/core/components/annotation/**/*.{js,mjs,jsx,ts,tsx}",
|
||||
"editor/src/core/components/pageEditor/*.{js,mjs,jsx,ts,tsx}",
|
||||
"editor/src/core/components/pageEditor/commands/*.{js,mjs,jsx,ts,tsx}",
|
||||
"editor/src/core/components/pageEditor/hooks/*.{js,mjs,jsx,ts,tsx}",
|
||||
"editor/src/core/components/shared/*.{js,mjs,jsx,ts,tsx}",
|
||||
"editor/src/core/components/shared/config/*.{js,mjs,jsx,ts,tsx}",
|
||||
"editor/src/core/components/shared/config/configSections/*.{js,mjs,jsx,ts,tsx}",
|
||||
"editor/src/core/components/shared/pageEditor/*.{js,mjs,jsx,ts,tsx}",
|
||||
"editor/src/core/components/tools/*.{js,mjs,jsx,ts,tsx}",
|
||||
"editor/src/core/components/tools/addStamp/*.{js,mjs,jsx,ts,tsx}",
|
||||
"editor/src/core/components/tools/automate/*.{js,mjs,jsx,ts,tsx}",
|
||||
"editor/src/core/components/tools/bookletImposition/*.{js,mjs,jsx,ts,tsx}",
|
||||
"editor/src/core/components/tools/certSign/*.{js,mjs,jsx,ts,tsx}",
|
||||
"editor/src/core/components/tools/pdfTextEditor/*.{js,mjs,jsx,ts,tsx}",
|
||||
"editor/src/core/components/tools/shared/*.{js,mjs,jsx,ts,tsx}",
|
||||
"editor/src/core/components/viewer/*.{js,mjs,jsx,ts,tsx}",
|
||||
"editor/src/core/contexts/*.{js,mjs,jsx,ts,tsx}",
|
||||
"editor/src/core/contexts/file/*.{js,mjs,jsx,ts,tsx}",
|
||||
"editor/src/core/contexts/viewer/*.{js,mjs,jsx,ts,tsx}",
|
||||
"editor/src/core/hooks/*.{js,mjs,jsx,ts,tsx}",
|
||||
"editor/src/core/hooks/signing/*.{js,mjs,jsx,ts,tsx}",
|
||||
"editor/src/core/hooks/tools/adjustContrast/*.{js,mjs,jsx,ts,tsx}",
|
||||
"editor/src/core/hooks/tools/convert/*.{js,mjs,jsx,ts,tsx}",
|
||||
"editor/src/core/hooks/tools/removePassword/*.{js,mjs,jsx,ts,tsx}",
|
||||
"editor/src/core/hooks/tools/shared/*.{js,mjs,jsx,ts,tsx}",
|
||||
"editor/src/core/services/*.{js,mjs,jsx,ts,tsx}",
|
||||
"editor/src/core/tools/annotate/useAnnotationSelection.ts",
|
||||
"editor/src/core/types/*.{js,mjs,jsx,ts,tsx}",
|
||||
"editor/src/core/utils/*.{js,mjs,jsx,ts,tsx}",
|
||||
],
|
||||
rules: {
|
||||
"@typescript-eslint/no-explicit-any": "error",
|
||||
},
|
||||
},
|
||||
// Config for browser scripts
|
||||
{
|
||||
files: srcGlobs,
|
||||
languageOptions: {
|
||||
globals: {
|
||||
...globals.browser,
|
||||
},
|
||||
},
|
||||
},
|
||||
// Config for node scripts
|
||||
{
|
||||
files: nodeGlobs,
|
||||
languageOptions: {
|
||||
globals: {
|
||||
...globals.node,
|
||||
},
|
||||
},
|
||||
},
|
||||
);
|
||||
@@ -0,0 +1,241 @@
|
||||
import { defineConfig } from "oxlint";
|
||||
|
||||
// App source globs
|
||||
const srcGlobs = [
|
||||
// The portal layer lives under editor/src/portal, so editor/src/** covers it.
|
||||
"editor/src/**/*.{js,mjs,jsx,ts,tsx}",
|
||||
];
|
||||
|
||||
// Node-tooling globs (scripts, config files, storybook).
|
||||
const nodeGlobs = [
|
||||
"scripts/**/*.{js,ts,mjs,mts}",
|
||||
"editor/scripts/**/*.{js,ts,mjs,mts}",
|
||||
"editor/*.config.{js,ts,mjs}",
|
||||
"*.config.{js,ts,mjs}",
|
||||
".storybook/*.{js,ts,mjs,mts,tsx}",
|
||||
];
|
||||
|
||||
// editor/src/core subfolders not yet conformant to the stricter type rules
|
||||
const coreNotYetConformant = [
|
||||
"editor/src/core/components/annotation/**/*.{js,mjs,jsx,ts,tsx}",
|
||||
"editor/src/core/components/pageEditor/*.{js,mjs,jsx,ts,tsx}",
|
||||
"editor/src/core/components/pageEditor/commands/*.{js,mjs,jsx,ts,tsx}",
|
||||
"editor/src/core/components/pageEditor/hooks/*.{js,mjs,jsx,ts,tsx}",
|
||||
"editor/src/core/components/shared/*.{js,mjs,jsx,ts,tsx}",
|
||||
"editor/src/core/components/shared/config/*.{js,mjs,jsx,ts,tsx}",
|
||||
"editor/src/core/components/shared/config/configSections/*.{js,mjs,jsx,ts,tsx}",
|
||||
"editor/src/core/components/shared/pageEditor/*.{js,mjs,jsx,ts,tsx}",
|
||||
"editor/src/core/components/tools/*.{js,mjs,jsx,ts,tsx}",
|
||||
"editor/src/core/components/tools/addStamp/*.{js,mjs,jsx,ts,tsx}",
|
||||
"editor/src/core/components/tools/automate/*.{js,mjs,jsx,ts,tsx}",
|
||||
"editor/src/core/components/tools/bookletImposition/*.{js,mjs,jsx,ts,tsx}",
|
||||
"editor/src/core/components/tools/certSign/*.{js,mjs,jsx,ts,tsx}",
|
||||
"editor/src/core/components/tools/pdfTextEditor/*.{js,mjs,jsx,ts,tsx}",
|
||||
"editor/src/core/components/tools/shared/*.{js,mjs,jsx,ts,tsx}",
|
||||
"editor/src/core/components/viewer/*.{js,mjs,jsx,ts,tsx}",
|
||||
"editor/src/core/contexts/*.{js,mjs,jsx,ts,tsx}",
|
||||
"editor/src/core/contexts/file/*.{js,mjs,jsx,ts,tsx}",
|
||||
"editor/src/core/contexts/viewer/*.{js,mjs,jsx,ts,tsx}",
|
||||
"editor/src/core/hooks/*.{js,mjs,jsx,ts,tsx}",
|
||||
"editor/src/core/hooks/signing/*.{js,mjs,jsx,ts,tsx}",
|
||||
"editor/src/core/hooks/tools/adjustContrast/*.{js,mjs,jsx,ts,tsx}",
|
||||
"editor/src/core/hooks/tools/convert/*.{js,mjs,jsx,ts,tsx}",
|
||||
"editor/src/core/hooks/tools/removePassword/*.{js,mjs,jsx,ts,tsx}",
|
||||
"editor/src/core/hooks/tools/shared/*.{js,mjs,jsx,ts,tsx}",
|
||||
"editor/src/core/services/*.{js,mjs,jsx,ts,tsx}",
|
||||
"editor/src/core/tools/annotate/useAnnotationSelection.ts",
|
||||
"editor/src/core/types/*.{js,mjs,jsx,ts,tsx}",
|
||||
"editor/src/core/utils/*.{js,mjs,jsx,ts,tsx}",
|
||||
];
|
||||
|
||||
// Imports must use workspace aliases, never relative or absolute-src paths.
|
||||
const aliasImportPatterns = [
|
||||
{
|
||||
regex: "^\\.",
|
||||
message:
|
||||
"Use a workspace alias (@app/* for editor, @portal/* for portal) instead of relative imports.",
|
||||
},
|
||||
{
|
||||
regex: "^src/",
|
||||
message: "Use a workspace alias instead of absolute src/ imports.",
|
||||
},
|
||||
];
|
||||
|
||||
const tauriPattern = {
|
||||
regex: "^@tauri-apps/",
|
||||
message:
|
||||
"Tauri APIs are desktop-only. Review frontend/editor/DeveloperGuide.md for structure advice.",
|
||||
};
|
||||
|
||||
export default defineConfig({
|
||||
plugins: ["typescript", "import"],
|
||||
categories: { correctness: "off" },
|
||||
env: { builtin: true },
|
||||
ignorePatterns: [
|
||||
"dist",
|
||||
"node_modules",
|
||||
"playwright-report",
|
||||
"storybook-static",
|
||||
"test-results",
|
||||
"editor/dist",
|
||||
"editor/public",
|
||||
"editor/src-tauri",
|
||||
"editor/playwright-report",
|
||||
"editor/test-results",
|
||||
],
|
||||
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": "error",
|
||||
"no-constant-condition": "error",
|
||||
"no-control-regex": "error",
|
||||
"no-debugger": "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-unexpected-multiline": "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": [
|
||||
"error",
|
||||
{
|
||||
args: "all",
|
||||
argsIgnorePattern: "^_",
|
||||
caughtErrors: "all",
|
||||
caughtErrorsIgnorePattern: "^_",
|
||||
destructuredArrayIgnorePattern: "^_",
|
||||
varsIgnorePattern: "^_",
|
||||
ignoreRestSiblings: true,
|
||||
},
|
||||
],
|
||||
"no-useless-backreference": "error",
|
||||
"no-useless-catch": "error",
|
||||
"no-useless-escape": "error",
|
||||
"no-with": "error",
|
||||
"preserve-caught-error": "error",
|
||||
"require-yield": "error",
|
||||
"use-isnan": "error",
|
||||
"valid-typeof": "error",
|
||||
"no-array-constructor": "error",
|
||||
"no-unused-expressions": "error",
|
||||
"no-restricted-imports": ["error", { patterns: aliasImportPatterns }],
|
||||
"import/no-cycle": "error",
|
||||
"typescript/ban-ts-comment": "error",
|
||||
"typescript/no-duplicate-enum-values": "error",
|
||||
"typescript/no-empty-object-type": [
|
||||
"error",
|
||||
{ allowInterfaces: "with-single-extends" },
|
||||
],
|
||||
"typescript/no-extra-non-null-assertion": "error",
|
||||
"typescript/no-misused-new": "error",
|
||||
"typescript/no-namespace": "error",
|
||||
"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",
|
||||
},
|
||||
overrides: [
|
||||
{
|
||||
files: ["**/*.ts", "**/*.tsx", "**/*.mts", "**/*.cts"],
|
||||
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",
|
||||
},
|
||||
},
|
||||
{
|
||||
files: srcGlobs,
|
||||
rules: {
|
||||
"no-restricted-imports": [
|
||||
"error",
|
||||
{ patterns: [...aliasImportPatterns, tauriPattern] },
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ["editor/src/desktop/**/*.{js,mjs,jsx,ts,tsx}"],
|
||||
rules: {
|
||||
"no-restricted-imports": ["error", { patterns: aliasImportPatterns }],
|
||||
},
|
||||
},
|
||||
{
|
||||
files: srcGlobs,
|
||||
rules: {
|
||||
"typescript/no-explicit-any": "error",
|
||||
},
|
||||
env: { browser: true },
|
||||
},
|
||||
{
|
||||
files: coreNotYetConformant,
|
||||
rules: {
|
||||
"typescript/no-explicit-any": "off",
|
||||
},
|
||||
},
|
||||
{
|
||||
files: nodeGlobs,
|
||||
env: { node: true },
|
||||
},
|
||||
],
|
||||
});
|
||||
Generated
+762
-1285
File diff suppressed because it is too large
Load Diff
@@ -58,7 +58,6 @@
|
||||
"autoprefixer": "^10.4.21",
|
||||
"axios": "^1.15.0",
|
||||
"d3": "^7.9.0",
|
||||
"globals": "^17.5.0",
|
||||
"i18next": "^25.10.10",
|
||||
"i18next-browser-languagedetector": "^8.2.0",
|
||||
"jszip": "^3.10.1",
|
||||
@@ -107,7 +106,6 @@
|
||||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^10.0.1",
|
||||
"@iconify-json/material-symbols": "^1.2.53",
|
||||
"@iconify/utils": "^3.1.0",
|
||||
"@playwright/test": "^1.55.0",
|
||||
@@ -128,31 +126,27 @@
|
||||
"@types/node": "^24.5.2",
|
||||
"@types/react": "^19.1.13",
|
||||
"@types/react-dom": "^19.1.9",
|
||||
"@typescript-eslint/eslint-plugin": "^8.61.1",
|
||||
"@typescript-eslint/parser": "^8.61.1",
|
||||
"@typescript/native-preview": "7.0.0-dev.20260624.1",
|
||||
"@vitejs/plugin-react-swc": "^4.1.0",
|
||||
"@vitest/coverage-v8": "^3.2.4",
|
||||
"dotenv": "^16.4.7",
|
||||
"dpdm": "^3.14.0",
|
||||
"eslint": "^10.0.2",
|
||||
"fake-indexeddb": "^6.2.5",
|
||||
"jsdom": "^27.0.0",
|
||||
"json-schema-to-typescript": "^15.0.4",
|
||||
"license-checker": "^25.0.1",
|
||||
"msw": "^2.14.6",
|
||||
"msw-storybook-addon": "^2.0.7",
|
||||
"oxfmt": "0.55.0",
|
||||
"oxlint": "1.70.0",
|
||||
"postcss": "^8.5.12",
|
||||
"postcss-cli": "^11.0.1",
|
||||
"postcss-preset-mantine": "^1.18.0",
|
||||
"postcss-simple-vars": "^7.0.1",
|
||||
"prettier": "^3.8.1",
|
||||
"puppeteer": "^24.25.0",
|
||||
"rollup-plugin-visualizer": "^7.0.1",
|
||||
"storybook": "^9.1.20",
|
||||
"tsx": "^4.21.0",
|
||||
"typescript": "^6.0.3",
|
||||
"typescript-eslint": "^8.61.1",
|
||||
"vite": "^7.3.2",
|
||||
"vite-plugin-compression2": "^2.5.3",
|
||||
"vite-plugin-static-copy": "^3.1.4",
|
||||
|
||||
Reference in New Issue
Block a user