@eoussama/dx
v0.0.4
Published
Personal developer-experience configs.
Readme
Description
DX is a personal developer-experience configuration toolkit. It provides a set of opinionated ESLint, stylistic, and code quality rules to help you maintain consistent, readable, and robust code across my JavaScript and TypeScript projects.
Installation
Using pnpm:
pnpm add @eoussama/dxOr with npm:
npm install @eoussama/dxOr with yarn:
yarn add @eoussama/dxUsage
Quick Start
Initialize the configuration:
pnpx @eoussama/dx initThis creates an
eslint.config.jsfile with the default configuration:import dx from "@eoussama/dx"; export default dx();Run the linter:
pnpx dx lintAuto-fix issues:
pnpx dx lint --fix
Manual Setup (Alternative)
You can also manually create an eslint.config.js file at the root of your project:
import dx from "@eoussama/dx";
export default dx();Overriding Rules or Options (Optional)
You can override any rules or options by passing them to the dx function:
import dx from "@eoussama/dx";
export default dx({
rules: {
// Override/add rules here
"no-console": "off",
"quotes": ["error", "single"],
// ...
},
// You can also override other options, e.g.:
stylistic: {
indent: 4,
semi: false,
},
});CLI Commands
After installation, you can use the following commands:
# Initialize eslint.config.js (recommended first step)
pnpx dx init
# Run ESLint on your project
pnpx dx lint
# Run ESLint and auto-fix issues
pnpx dx lint --fix
# Get help
pnpx dx --help
pnpx dx init --help
pnpx dx lint --help
# Force overwrite existing config file
pnpx dx init --forceDevelopment
To contribute or run the project locally:
# 1. Clone the repository
$ git clone https://github.com/eoussama/dx.git
$ cd dx
# 2. Install dependencies (requires pnpm)
$ pnpm install
# 3. Build the project
$ pnpm build- The main configuration is in
src/index.js. - For contributing guidelines and documentation standards, see CONTRIBUTING.md.
