base-config-tuia

raw JSON →
1.0.16 verified Fri May 01 auth: no javascript

base-config-tuia is a shared configuration package for stylelint, commitlint, and lint-staged, designed to standardize frontend development workflows. Version 1.0.16 is the latest stable release. It provides predefined configurations for CSS linting, commit message conventions, and pre-commit hooks. The package is lightweight and requires manual installation of peer dependencies like stylelint, commitlint, husky, and lint-staged. Compared to alternatives like `@commitlint/config-conventional` alone, base-config-tuia bundles multiple tools into a single dependency.

error ERR_PACKAGE_PATH_NOT_EXPORTED: Package subpath './lintstaged' is not defined
cause Using incorrect require path with dot notation
fix
Use 'base-config-tuia/lintstaged' with forward slash
error Cannot find module 'base-config-tuia'
cause Package not installed or missing dependencies
fix
Run npm install base-config-tuia --save-dev
error Configuration for 'stylelint' is missing
cause Missing .stylelintrc.js file with extends
fix
Create .stylelintrc.js with extends: ['base-config-tuia/stylelintrc']
gotcha Package.json lint-staged config takes precedence over .lintstagedrc.js if both exist
fix Remove 'lint-staged' key from package.json when using .lintstagedrc.js
gotcha Require paths use slash separators, e.g., require('base-config-tuia/lintstaged') not 'base-config-tuia.lintstaged'
fix Use correct path with forward slash
deprecated No active development; package may become stale
fix Consider using alternative like @commitlint/config-conventional directly
npm install base-config-tuia
yarn add base-config-tuia
pnpm add base-config-tuia

Shows how to install base-config-tuia and set up configuration files for stylelint, lint-staged, and commitlint.

// Step 1: Install package and peer dependencies
npm install base-config-tuia --save-dev
npm install stylelint stylelint-config-standard @commitlint/cli @commitlint/config-conventional husky lint-staged --save-dev

// Step 2: Create .stylelintrc.js
module.exports = {
  extends: ['base-config-tuia/stylelintrc'],
  rules: {
    // Custom rules
  }
};

// Step 3: Create .lintstagedrc.js
module.exports = {
  ...require('base-config-tuia/lintstaged'),
  // Add custom patterns here
};

// Step 4: Create commitlint.config.js
module.exports = {
  ...require('base-config-tuia/commitlint.config'),
  // Override rules as needed
};

// Step 5: Remove lint-staged config from package.json to avoid conflicts