Back to all reviewers

Centralize configuration values

facebook/yoga
Based on 2 comments
JavaScript

Consolidate all configuration variables, constants, and settings into a centralized configuration object rather than declaring them as scattered variables throughout the codebase. This improves maintainability, reduces duplication, and enables consistent templating patterns.

Configurations JavaScript

Reviewer Prompt

Consolidate all configuration variables, constants, and settings into a centralized configuration object rather than declaring them as scattered variables throughout the codebase. This improves maintainability, reduces duplication, and enables consistent templating patterns.

Instead of defining variables separately:

var cTestClean, cTestCompile, cTestExecute;
var pathDelimiter = path.delimiter;

Add them to your config object:

var config = {
  libName: 'css-layout',
  distFolder: 'dist',
  srcFolder: 'src',
  cTestClean: '...',
  cTestCompile: '...',
  cTestExecute: '...',
  pathDelimiter: path.delimiter
};

This allows for consistent templating usage like <%= config.pathDelimiter %> instead of mixing template strings with concatenation, and keeps all configuration in one discoverable location.

2
Comments Analyzed
JavaScript
Primary Language
Configurations
Category

Source Discussions