1.0.1 • Published 5 months ago
@ic-ntcees/eslint-config-react v1.0.1
@ic-ntcees/eslint-config-react
Shared ESLint configuration for React projects.
Installation
npm install --save-dev @ic-ntcees/eslint-config-react
Usage
ESLint Flat Config (eslint.config.js)
import eslintConfigReact from '@ic-ntcees/eslint-config-react'
import { defineConfig } from 'vite'
export default defineConfig([
...eslintConfigReact,
// Переопределяем правила
{
files: ['**/*.{ts,tsx}'],
languageOptions: {
parserOptions: {
// Настраивается в том случае, если ваша конфигурация не находится в tsconfig.app.json
project: './tsconfig.json',
tsconfigRootDir: import.meta.dirname,
},
},
rules: {
'@typescript-eslint/no-unused-expressions': 'off',
'@typescript-eslint/no-unused-vars': 'error',
},
},
])
TypeScript Configuration
This package expects a tsconfig.app.json
file in your project root. A sample configuration is provided that you can copy:
cp node_modules/@ic-ntcees/eslint-config-react/tsconfig.app.example.json ./tsconfig.app.json
Features
- TypeScript support
- React best practices
- React Hooks rules
- Import sorting and organization
- Prettier integration
- Consistent code style enforcement
Versioning
This package follows Semantic Versioning with the following guidelines:
Major version (
1.0.0
→2.0.0
): Breaking changes that require user action- ESLint rule changes that will cause new errors in previously valid code
- Adding/removing plugins that significantly change linting behavior
- Changes to peer dependency requirements
Minor version (
1.0.0
→1.1.0
): Non-breaking enhancements- New rules added in "warn" mode
- New features that don't break existing configurations
- Dependency updates without breaking changes
Patch version (
1.0.0
→1.0.1
): Bug fixes and minor updates- Documentation improvements
- Internal refactoring with no user impact
- Bug fixes in existing rules
When upgrading, check the CHANGELOG.md for detailed release notes.
License
MIT