mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-04-03 23:53:29 +08:00
refactor: deduplicate config lists and unify resolveFormatterBin branches
Extract BIOME_CONFIGS and PRETTIER_CONFIGS as shared constants to eliminate duplication between PROJECT_ROOT_MARKERS and detectFormatter(). Unify the biome/prettier branches in resolveFormatterBin() via a FORMATTER_PACKAGES map. Remove redundant path.resolve() in quality-gate.js.
This commit is contained in:
@@ -67,7 +67,7 @@ function maybeRunQualityGate(filePath) {
|
||||
const strict = String(process.env.ECC_QUALITY_GATE_STRICT || '').toLowerCase() === 'true';
|
||||
|
||||
if (['.ts', '.tsx', '.js', '.jsx', '.json', '.md'].includes(ext)) {
|
||||
const projectRoot = findProjectRoot(path.dirname(path.resolve(filePath)));
|
||||
const projectRoot = findProjectRoot(path.dirname(filePath));
|
||||
const formatter = detectFormatter(projectRoot);
|
||||
|
||||
if (formatter === 'biome') {
|
||||
|
||||
Reference in New Issue
Block a user