Skip to content

Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.

5.3 KB
Raw Blame
{
  "$schema": "https://biomejs.dev/schemas/2.5.15/schema.json",
  "vcs": { "enabled": true, "clientKind": "git", "useIgnoreFile": true },
  "files": {
    "ignoreUnknown": false,
    "maxSize": 1258291, // 1.2 MB
    "includes": [
      "!.vscode",
      "!sst.env.d.ts",
      "!packages/database/src/types.ts",
      "!packages/database/src/swagger-docs-schema.ts",
      "!**/mcp*/lib/tools/**",
      "!**/mcp*/lib/server.ts",
      "**/*.json",
      "!**/mcp*/lib/tool-metadata.json",
      // Generated, and its ONE-LINE-PER-OPERATION layout is the point: formatting
      // it to nine lines an operation turns a single changed schema into a
      // nine-line hunk, which is exactly what this file exists to avoid.
      "!**/mcp*/lib/tool-manifest.digest.json",
      "contrib/building/examples/**/*"
    ]
  },
  "formatter": { "enabled": true, "indentStyle": "space", "indentWidth": 2 },
  "linter": {
    "enabled": true,
    "rules": {
      "preset": "none",
      "a11y": {
        "noAccessKey": "warn",
        "noAriaUnsupportedElements": "warn",
        "noRedundantAlt": "warn",
        "noRedundantRoles": "warn",
        "useAltText": "warn",
        "useAnchorContent": "warn",
        "useAriaActivedescendantWithTabindex": "warn",
        "useAriaPropsForRole": "warn",
        "useAriaPropsSupportedByRole": "warn",
        "useIframeTitle": "warn",
        "useValidAnchor": "warn",
        "useValidAriaProps": "warn",
        "useValidAriaRole": {
          "level": "warn",
          "options": { "ignoreNonDom": true }
        },
        "useValidAriaValues": "warn",
        "useValidLang": "warn"
      },
      "complexity": {
        "noCommaOperator": "warn",
        "noExtraBooleanCast": "warn",
        "noUselessConstructor": "warn",
        "noUselessEscapeInRegex": "warn",
        "noUselessLabel": "warn",
        "noUselessLoneBlockStatements": "warn",
        "noUselessRename": "warn",
        "noUselessStringConcat": "warn",
        "useLiteralKeys": "warn"
      },
      "correctness": {
        "noConstAssign": "error",
        "noEmptyCharacterClassInRegex": "warn",
        "noEmptyPattern": "warn",
        "noInvalidUseBeforeDeclaration": "warn",
        "noSelfAssign": "warn",
        "noUndeclaredVariables": "error",
        "noUnreachable": "warn",
        "noUnreachableSuper": "warn",
        "noUnusedLabels": "warn",
        "noUnusedVariables": "error",
        "noUnusedImports": "error",
        "useExhaustiveDependencies": "warn",
        "useHookAtTopLevel": "error",
        "useIsNan": "warn",
        "useJsxKeyInIterable": "warn",
        "useValidTypeof": "warn",
        "useYield": "warn"
      },
      "security": {
        "noDangerouslySetInnerHtmlWithChildren": "warn",
        "noGlobalEval": "error"
      },
      "style": {
        "useArrayLiterals": "warn",
        "useImportType": {
          "level": "error",
          "options": {
            "style": "auto"
          }
        }
      },
      "suspicious": {
        "noCatchAssign": "warn",
        "noCommentText": "warn",
        // Use @carbon/logging (getLogger) instead of console.*. Warn for now;
        // ratchet to error per-area as call sites migrate.
        "noConsole": "warn",
        "noControlCharactersInRegex": "warn",
        "noDuplicateCase": "warn",
        "noDuplicateClassMembers": "warn",
        "noDuplicateObjectKeys": "warn",
        "noDuplicateParameters": "warn",
        "noEmptyBlockStatements": "warn",
        "noFunctionAssign": "error",
        "noGlobalAssign": "error",
        "noLabelVar": "warn",
        "noRedeclare": "error",
        "noSelfCompare": "warn",
        "noShadowRestrictedNames": "off",
        "noSparseArray": "warn",
        "noTemplateCurlyInString": "warn",
        "noUnsafeNegation": "warn",
        "useGetterReturn": "warn",
        "useIterableCallbackReturn": "warn"
      }
    }
  },
  "javascript": {
    "formatter": { "quoteStyle": "double", "trailingCommas": "none" }
  },
  "json": {
    "parser": {
      "allowTrailingCommas": false
    },
    "formatter": {
      "trailingCommas": "none"
    }
  },
  "overrides": [
    {
      // Keep the typed path helpers alphabetically sorted. Applies on
      // `biome check --write` (pre-commit lint-staged + CI), not plain
      // `biome format`, which does not run assists.
      "includes": ["**/erp/app/utils/path.ts", "**/mes/app/utils/path.ts"],
      "assist": { "actions": { "source": { "useSortedKeys": "on" } } }
    },
    {
      "linter": {
        "rules": {
          "complexity": { "noUselessConstructor": "warn" },
          "correctness": {
            "noInvalidUseBeforeDeclaration": "warn",
            "noUndeclaredVariables": "off",
            "noUnusedVariables": "warn"
          },
          "style": { "useArrayLiterals": "warn" },
          "suspicious": {
            "noDuplicateClassMembers": "off",
            "noRedeclare": "error"
          }
        }
      }
    },
    {
      "includes": [
        "*.spec.ts",
        "*.test.ts",
        "**/tests/**/*.ts",
        "**/__tests__/**/*.ts"
      ],
      "javascript": {
        "globals": []
      },
      "linter": {
        "rules": {
          "suspicious": { "noConsole": "off" }
        }
      }
    }
  ],
  "css": {
    "parser": { "tailwindDirectives": true }
  },
  "assist": {
    "enabled": true,
    "actions": { "source": { "organizeImports": "on" } }
  }
}