0.2.2 • Published 10 months ago

@quintal/config v0.2.2

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

Quintal Config

NPM version NPM downloads License Bundle size Code coverage Pull requests welcome

The solution to the infamous Node.JS Config Hell Problem

Table of Contents

Getting Started

pnpm add @quintal/config
# or
bun add @quintal/config
# or
yarn add @quintal/config
# or
npm install @quintal/config

Plan

The plan for this package is to be the solution to the infamous Node.JS Config Hell Problem. This package will be a CLI tool that auto-generates configuration files in a .config directory at the root of your repository, based on a config.ts file in your project root.

Example

You can define all your config in the config.ts file at the root of your project.

// config.ts

import { defineConfig } from '@quintal/config';
import { prettierRecommendedConfig } from '@quintal/config-prettier';
import { eslintRecommendedConfig } from '@quintal/config-eslint';
import {
  typescriptConfig,
  typescriptRecommendedConfig,
} from '@quintal/config-typescript';

export default defineConfig({
  outputDir: '.config',
  configs: [
    prettierRecommendedConfig,
    eslintRecommendedConfig,
    typescriptConfig({
      ...typescriptRecommendedConfig,
      noPropertyAccessFromIndexSignature: false,
    }),
  ],
});

After creating this config file, you can run the quintal-config install command to install all packages required to use the packages defined in your config file. Then run the quintal-config generate command on postinstall, and you never have to worry about configuration again.