@azodik/eslint-config
v0.0.1
Published
Shared ESLint configuration for Azodik
Readme
@azodik/eslint-config
A comprehensive ESLint configuration package with TypeScript, React, Next.js, and Prettier support.
🚀 Features
- TypeScript Support: Full TypeScript ESLint rules and configuration
- React Support: React and React Hooks linting rules
- Next.js Support: Next.js specific linting rules and optimizations
- Prettier Integration: ESLint and Prettier work together without conflicts
- Turbo Support: Turbo-specific linting rules for monorepos
- Modern ESLint: Uses the latest ESLint flat config format
- Zero Config: Ready-to-use configurations out of the box
📦 Installation
npm install --save-dev @azodik/eslint-config
# or
yarn add --dev @azodik/eslint-config
# or
pnpm add --save-dev @azodik/eslint-config🔧 Usage
Basic Configuration
Create an eslint.config.js file in your project root:
import { base } from '@azodik/eslint-config';
export default [
...base,
// Your custom rules here
];Next.js Projects
import { nextJsConfig } from '@azodik/eslint-config';
export default [
...nextJsConfig,
// Additional Next.js specific rules
];React Projects
import { reactInternal } from '@azodik/eslint-config';
export default [
...reactInternal,
// Additional React specific rules
];Mixed Configuration
import { base, nextJsConfig, reactInternal } from '@azodik/eslint-config';
export default [
...base,
...nextJsConfig,
...reactInternal,
// Your custom configurations
];📋 Available Configurations
base
Base configuration with:
- ESLint recommended rules
- TypeScript ESLint rules
- Prettier integration
- Turbo plugin rules
- Basic ignores
nextJsConfig
Next.js specific configuration including:
- All base configurations
- React recommended rules
- Next.js specific rules
- React Hooks rules
- Service Worker globals
reactInternal
React internal configuration including:
- All base configurations
- React recommended rules
- React Hooks rules
- Browser and Service Worker globals
🎯 What's Included
- ESLint Core: Latest ESLint recommended rules
- TypeScript: Full TypeScript support with
typescript-eslint - React: React and React Hooks linting
- Next.js: Next.js specific optimizations and rules
- Prettier: ESLint and Prettier compatibility
- Turbo: Monorepo and build tool optimizations
- Globals: Browser and Service Worker environment globals
🔍 Example Rules
The configurations include optimized rules for:
- TypeScript: Strict type checking and best practices
- React: Modern React patterns and hooks usage
- Next.js: Next.js specific optimizations
- Code Quality: Consistent code style and patterns
- Performance: Performance-related linting rules
📝 Package.json Scripts
{
"scripts": {
"lint": "eslint .",
"lint:fix": "eslint . --fix"
}
}🤝 Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
- ESLint - The base linting utility
- typescript-eslint - TypeScript support
- eslint-config-prettier - Prettier integration
- @next/eslint-plugin-next - Next.js ESLint plugin
