@interpriz/eslint-config
v0.1.0
Published
Shared ESLint and Prettier configuration for projects.
Readme
@interpriz/eslint-config 🧩
Official ESLint + Prettier config for Interpriz projects
Features
- ⚡ Next.js 14+ optimized
- 🎨 Pre-configured Prettier rules
- 🧼 Auto-fix import sorting
- 🛡 TypeScript-ready
- 🌈 Tailwind CSS class sorting
- 🔥 React best practices
Requirements
- Node.js >= 18.18
- Peers in your app:
- eslint ^9.35.0
- react ^19.1.1 (for React projects)
- typescript ^5.9 (if using TypeScript)
Installation
Install the config and core tools in your project:
npm install --save-dev @interpriz/eslint-config eslint prettier typescriptIf you’re not using TypeScript, omit typescript.
ESLint setup (Flat config)
Create eslint.config.mjs in your project root:
import config from '@interpriz/eslint-config';
export default config;Optional: extend or override rules:
import base from '@interpriz/eslint-config';
export default [
...base,
{
rules: {
'no-console': 'off'
}
}
];Note: Using .mjs ensures Node loads the flat config as ESM consistently across projects.
Prettier setup
Point Prettier to the shared config (includes Tailwind plugin):
{
"prettier": "@interpriz/eslint-config/prettier-config.json"
}You can place that in your project’s package.json or .prettierrc.
Scripts
Add helpful scripts to package.json:
{
"scripts": {
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"format": "prettier --write ."
}
}Usage
# Lint
npx eslint .
# Lint and fix
npx eslint . --fix
# Check formatting
npx prettier --check .
# Format
npx prettier --write .