# configuration/constants/tool.constants.ts

> 72 lines of code and 21 definitions.

Tree: GovLab Quality
Language: typescript
Layer: infrastructure
Canonical: https://banes-lab.com/anatomy/quality#file-quality-configuration-constants-tool-constants-ts
Source text: https://banes-lab.com/source/quality/configuration/constants/tool.constants.ts.txt

Listed in [configuration/constants](https://banes-lab.com/api/source/quality/configuration/constants.md), after [configuration/constants/target.constants.ts](https://banes-lab.com/source/quality/configuration/constants/target.constants.ts.md) and before [configuration/constants/tool.htmlhint.constants.ts](https://banes-lab.com/source/quality/configuration/constants/tool.htmlhint.constants.ts.md).

## Definitions

- `PROFILE_ID_TO_ECOSYSTEM` (lexical_declaration, line 1, exported)
- `DEFAULT_PATHS` (lexical_declaration, line 9, exported)
- `FALLBACK_PATHS` (lexical_declaration, line 41, exported)
- `CURRENT_DIRECTORY` (lexical_declaration, line 43, exported)
- `POSITION` (lexical_declaration, line 45, exported)
- `COLUMN_BASE` (lexical_declaration, line 47, exported)
- `UNKNOWN_STATUS` (lexical_declaration, line 49, exported)
- `STDERR_TAIL` (lexical_declaration, line 51, exported)
- `MEGABYTE` (lexical_declaration, line 53)
- `OUTPUT_LIMIT` (lexical_declaration, line 55, exported)
- `LOCATION_SEGMENTS` (lexical_declaration, line 57, exported)
- `NOT_FOUND_CODE` (lexical_declaration, line 59, exported)
- `MODULE_MISSING_CODES` (lexical_declaration, line 61, exported)
- `ADAPTER_SUFFIX` (lexical_declaration, line 63, exported)
- `GO_MODULE` (lexical_declaration, line 65, exported)
- `CARGO_MANIFEST` (lexical_declaration, line 67, exported)
- `NPM_MANIFEST` (lexical_declaration, line 69, exported)
- `CONCEPT_TO_PRETTIER_OPTION` (lexical_declaration, line 71, exported)
- `PRETTIER_DEFAULTS` (lexical_declaration, line 76, exported)
- `SUCCESS_STATUSES` (lexical_declaration, line 90, exported)
- `FINDING_STATUSES` (lexical_declaration, line 92, exported)

## Contained in

- [configuration/constants](https://banes-lab.com/anatomy/quality/folder-quality-configuration-constants.md)

## Source

```typescript
export const PROFILE_ID_TO_ECOSYSTEM: Readonly<Record<string, string>> = {
    arm: "iac",
    cloudformation: "iac",
    github_actions: "actions",
    kubernetes: "iac",
    terraform: "iac",
};

export const DEFAULT_PATHS: Readonly<Record<string, readonly string[]>> = {
    actions: [],
    ansible: ["."],
    clojure: ["."],
    cpp: ["**/*.{cpp,cc,cxx,hpp,hh}"],
    csharp: ["."],
    css: ["**/*.{css,scss}"],
    dockerfile: ["**/Dockerfile", "**/*.dockerfile"],
    elixir: ["."],
    go: ["./..."],
    html: ["**/*.html"],
    iac: ["."],
    java: ["."],
    javascript: ["**/*.{js,jsx,cjs,mjs}"],
    json: ["**/*.json"],
    kotlin: ["."],
    lua: ["."],
    perl: ["."],
    php: ["**/*.php"],
    python: ["."],
    r: ["."],
    ruby: ["."],
    rust: ["."],
    scala: ["."],
    shell: ["**/*.sh"],
    solidity: ["."],
    sql: ["**/*.sql"],
    swift: ["."],
    typescript: ["**/*.{ts,tsx,cts,mts}"],
    yaml: ["."],
};

export const FALLBACK_PATHS: readonly string[] = ["."];

export const CURRENT_DIRECTORY = ".";

export const POSITION = 1;

export const COLUMN_BASE = 1;

export const UNKNOWN_STATUS = -1;

export const STDERR_TAIL = 3;

const MEGABYTE = 1024 * 1024;

export const OUTPUT_LIMIT = 256 * MEGABYTE;

export const LOCATION_SEGMENTS = 2;

export const NOT_FOUND_CODE = "ENOENT";

export const MODULE_MISSING_CODES: ReadonlySet<string> = new Set(["ERR_MODULE_NOT_FOUND", "MODULE_NOT_FOUND"]);

export const ADAPTER_SUFFIX = ".adapter.ts";

export const GO_MODULE = "go.mod";

export const CARGO_MANIFEST = "Cargo.toml";

export const NPM_MANIFEST = "package.json";

export const CONCEPT_TO_PRETTIER_OPTION: ReadonlyMap<string, string> = new Map([
    ["line-length", "printWidth"],
    ["spacing", "tabWidth"],
]);

export const PRETTIER_DEFAULTS: Readonly<Record<string, unknown>> = {
    arrowParens: "always",
    bracketSpacing: true,
    endOfLine: "lf",
    objectWrap: "collapse",
    printWidth: 120,
    quoteProps: "as-needed",
    semi: true,
    singleQuote: false,
    tabWidth: 4,
    trailingComma: "es5",
    useTabs: false,
};

export const SUCCESS_STATUSES: ReadonlySet<number> = new Set([0]);

export const FINDING_STATUSES: ReadonlySet<number> = new Set([0, 1]);
```
