@hyperfrontend/project-scope/tech/lintinglinting
Linting-tool detectors for code-quality tools commonly found alongside JavaScript/TypeScript projects.
Covers ESLint, Prettier, Stylelint, and Biome. Each <tool>Detector follows the shared LintingToolDetector contract; tools that ship multiple config-file shapes also expose a <TOOL>_CONFIG_PATTERNS constant. detectLintingTools runs the full set and returns the aggregate LintingToolDetection[].
API Reference
ƒ Functions
Detect Biome in project.
Parameters
Returns
LintingToolDetectionDetection result or null if not detected
Example
Detecting Biome linter
const result = biomeDetector('/path/to/project', {
devDependencies: { '@biomejs/biome': '^1.5.0' },
})
// => { id: 'biome', name: 'Biome', confidence: 70, version: '1.5.0', ... }Detect all linting tools in project.
Parameters
Returns
LintingToolDetection[]Array of detected linting tools, sorted by confidence
Example
Detecting multiple linting tools
const results = detectLintingTools('/path/to/project', {
devDependencies: { eslint: '^8.0.0', prettier: '^3.0.0' },
})
// => [{ id: 'eslint', confidence: 50 }, { id: 'prettier', confidence: 50 }]Detect ESLint in project.
Parameters
Returns
LintingToolDetectionDetection result or null if not detected
Example
Detecting ESLint linter
const result = eslintDetector('/path/to/project', {
devDependencies: { eslint: '^8.50.0', '@typescript-eslint/parser': '^6.0.0' },
scripts: { lint: 'eslint src/' },
})
// => { id: 'eslint', name: 'ESLint', confidence: 65, version: '8.50.0', ... }Detect Prettier in project.
Parameters
Returns
LintingToolDetectionDetection result or null if not detected
Example
Detecting Prettier formatter
const result = prettierDetector('/path/to/project', {
devDependencies: { prettier: '^3.0.0' },
scripts: { format: 'prettier --write .' },
})
// => { id: 'prettier', name: 'Prettier', confidence: 55, version: '3.0.0', ... }Detect Stylelint in project.
Parameters
Returns
LintingToolDetectionDetection result or null if not detected
Example
Detecting Stylelint linter
const result = stylelintDetector('/path/to/project', {
devDependencies: { stylelint: '^15.0.0', 'stylelint-config-standard': '^30.0.0' },
})
// => { id: 'stylelint', name: 'Stylelint', confidence: 65, version: '15.0.0', ... }◈ Interfaces
Linting tool detection result.