Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Langgenius Dify ESLint Suppressions

From Leeroopedia
Knowledge Sources
Domains Frontend, Linting, BuildConfig
Last Updated 2026-02-12 07:00 GMT

Overview

JSON configuration file that records existing ESLint rule violations per file, allowing the project to adopt stricter linting rules incrementally without blocking the build on legacy code.

Description

web/eslint-suppressions.json is a suppression baseline file used with ESLint's suppression system. It maps relative file paths to the specific ESLint rules that have known violations in those files, along with the count of suppressed occurrences.

The file structure is:

{
  "path/to/file.ts": {
    "rule-name": {
      "count": N
    }
  }
}

This approach allows the Dify team to:

  • Adopt new linting rules without requiring immediate fixes across the entire codebase
  • Track technical debt by recording exactly which files have how many violations
  • Prevent regression by ensuring no new violations are introduced (only suppressed counts are allowed)
  • Gradually reduce suppressions by fixing violations file-by-file

Common suppressed rules observed in the file include:

  • ts/no-explicit-any - TypeScript files using any type
  • no-console - Files with console.log statements
  • regexp/no-unused-capturing-group - Regex patterns with unused captures

The file covers test files (__tests__/), application components, and utility modules throughout the frontend codebase.

Usage

This file is automatically managed by ESLint's suppression tooling. It should not be manually edited. When fixing linted code, the suppression counts decrease automatically. New violations in unsuppressed files will fail the lint check.

Code Reference

Source Location

Data Structure

{
  "__tests__/check-i18n.test.ts": {
    "regexp/no-unused-capturing-group": { "count": 1 },
    "ts/no-explicit-any": { "count": 2 }
  },
  "__tests__/document-detail-navigation-fix.test.tsx": {
    "no-console": { "count": 10 }
  },
  "__tests__/document-list-sorting.test.tsx": {
    "ts/no-explicit-any": { "count": 3 }
  }
}

Import

Referenced by ESLint configuration; not imported in application code.

I/O Contract

Inputs

Name Type Required Description
N/A N/A N/A Generated/managed by ESLint tooling; not programmatically consumed.

Outputs

Name Type Description
suppressions Record<string, Record<string, { count: number }>> Per-file, per-rule suppression counts

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment