@pixpilot/dev-config
v3.17.0
Published
Modern, opinionated development configurations.
Downloads
377
Readme
@pixpilot/dev-config
Modern, opinionated configurations for TypeScript projects.
Note: These configurations are designed for our organization's projects but are adaptable for your needs. Settings may evolve to enhance our codebase.
🚀 Installation
Getting started is simple. Your project needs to have prettier and typescript installed, as they are peer dependencies.
Install the necessary packages:
npm install -D @pixpilot/dev-configInstall Jest (Optional): If your project uses Jest for testing, install it separately.
npm install -D jest ts-jest
⚙️ Usage
All the required Prettier plugins are bundled in this package. The easiest way to get started is to use the shared Prettier setup and TypeScript base config.
Prettier Usage
Create prettier.config.js to use the shared Prettier setup.
import config from '@pixpilot/dev-config/prettier';
export default config;TypeScript
Create tsconfig.json to extend the base configuration.
{
"extends": "@pixpilot/dev-config/typescript",
"compilerOptions": {
"outDir": "./dist",
"rootDir": "./src"
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist"]
}Jest
If you are using Jest, you must install both jest and ts-jest:
npm install -D jest ts-jestCreate a jest.config.js file:
import config from '@pixpilot/dev-config/jest';
export default config;MarkdownLint
Install:
npm install -D markdownlint-cliCreate
.markdownlint.json:{ "extends": "@pixpilot/dev-config/markdownlint" }
Commitlint
Install:
npm install -D @commitlint/cli @commitlint/config-conventionalCreate
commitlint.config.mjsin your project root:import config from '@pixpilot/dev-config/commitlint'; export default config;
Vitest
Install:
npm install -D vitest @vitest/coverage-v8Create
vitest.config.tsin your project root:import defineConfig from '@pixpilot/dev-config/vitest'; export default defineConfig();
Coverage is enabled by default. Reports are generated in text, JSON, and HTML formats.
