Skip to content

Latest commit

 

History

History
88 lines (59 loc) · 3.03 KB

File metadata and controls

88 lines (59 loc) · 3.03 KB

Development Utilities Unit Test Lint Check CodeQL

Shared development-time configurations for TypeScript, ESLint (flat config), and Next.js. These utilities are dev-only and should not ship with application runtime artifacts.

These configurations are not exhaustive and might require bespoke changes once extended or included in your target repo (based on the configuration used).

Installation

npm install --save-dev @shi-corp/development-utilities

Note

Do not import anything from this package in production/runtime code.

TS Config configuration

Since it is not a code but just configuration file, it would require particular handling to use:

in tsconfig.json make these changes

{
  "extends": "@shi-corp/development-utilities/config/typescript/baseTsConfig.json",
  "compilerOptions": {
    "outDir": "./bin" // Adjust for your project
  }
  // ... Any other options that need to override base behavior
}

Lint configuration

This project is using flat file for eslint (best results achieved with version >=9.9.0) and the intention to be compatible with that style only:

In eslint.config.(m)js make these changes:

Normal (Non-UI)

import { eslintConfig } from '@shi-corp/development-utilities/optimized/lint/base.js'
import { defineConfig } from 'eslint/config'

export default defineConfig(eslintConfig)

User Interface (Next.JS)

import { eslintConfig } from '@shi-corp/development-utilities/optimized/lint/next.js'
import { defineConfig } from 'eslint/config'

export default defineConfig([
    ...eslintConfig,
    // Add project-specific rules, ignores, or plugins here
])

Next.js configuration

in next.config.(m)js make these changes

import { nextConfig } from '@shi-corp/development-utilities';

export default {
  ...nextConfig,
  ... // any other options that need to override base behavior
};

Scope and intent

  • Dev-only: configurations used for authoring, linting, and building. They should not be bundled into final application artifacts.
  • Centralized defaults: opinionated baselines to standardize behavior across repos.
  • Opt-in overrides: extend and override per project as needed.

Compatibility

  • Node.JS (Latest LTS)
  • ES Lint >= 9.38.0
  • TypeScript >= 5.9
  • Next.JS >= 16 (only if using the provided next config)

License

MIT