eslint-config-axkit
v1.4.0
Published
Reusable ESLint flat config for TypeScript + Node.js projects with strict type checking, Prettier, Unicorn, and Vitest
Maintainers
Readme
eslint-config-axkit
Reusable ESLint flat config for TypeScript + Node.js projects with strict type checking, Prettier, Unicorn, and Vitest.
Quick Start
# Install
npm install -D eslint eslint-config-axkitCreate an eslint.config.js in your project root:
import path from "node:path";
import { axkit } from "eslint-config-axkit";
const gitignorePath = path.join(import.meta.dirname, ".gitignore");
export default axkit({ gitignorePath });# Run
npx eslint .Installation
# npm
npm install -D eslint eslint-config-axkit
# pnpm
pnpm add -D eslint eslint-config-axkitConfiguration
Create an eslint.config.js in your project root:
import path from "node:path";
import { axkit } from "eslint-config-axkit";
const gitignorePath = path.join(import.meta.dirname, ".gitignore");
export default axkit({ gitignorePath });Or without gitignore integration:
import { axkit } from "eslint-config-axkit";
export default axkit();What's Included
For the current rule set and presets, see the source code in src/.
Extending the Config
Add additional rules or override existing ones by spreading additional config objects:
import path from "node:path";
import { axkit } from "eslint-config-axkit";
const gitignorePath = path.join(import.meta.dirname, ".gitignore");
export default [
...axkit({ gitignorePath }),
{
rules: {
// Your custom rules
"no-console": "warn",
},
},
];Options
| Option | Type | Description |
| --------------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| gitignorePath | string | Path to .gitignore file. Patterns will be added to ESLint's ignore list. |
| nextjs | boolean | Enable Next.js rules (eslint-config-next core-web-vitals + typescript). Requires eslint-config-next to be installed. |
| storybook | boolean | Enable Storybook rules (eslint-plugin-storybook flat/recommended). Requires eslint-plugin-storybook to be installed. |
| tailwindcss | string | Path to the Tailwind CSS entry point (e.g. "src/app/globals.css"). Enables eslint-plugin-better-tailwindcss recommended rules enforcing stylistic and correctness rules. Requires eslint-plugin-better-tailwindcss to be installed. |
Requirements
- Node.js >= 22.14.0
- ESLint >= 10
License
MIT
