@elsikora/eslint-config
v3.2.4
Published
ESLint configuration vision of ElsiKora
Downloads
1,560
Readme
- Overview
- Features
- Repository Structure
- Modules
- Getting Started
- Project Roadmap
- Contributing
- License
- Acknowledgments
Overview
The ESLint-Config is a meticulously designed ESLint configuration repository that aims to enhance code quality and ensure consistency across JavaScript and TypeScript projects. Its core functionalities include custom ESLint rules, integration with popular plugins like Prettier and Unicorn, and specialized support for NestJS environments. By outlining standards for filename conventions and the use of modern JavaScript features, alongside automating the release process for streamlined updates, ESLint-Config offers a comprehensive solution for developers seeking to enforce coding best practices and style consistency in their projects.
Features
| | Feature | Description |
| --- | ----------------- | ------------------------------------------------------------------------------------------------- |
| ⚙️ | Architecture | ESLint-Config is designed for JS/TS projects, integrating Prettier and Unicorn plugins. |
| 🔩 | Code Quality | Focuses on consistency & best practices by leveraging eslint, prettier, and custom ESLint rules. |
| 📄 | Documentation | Has basic documentation within code files and package.json
, outlining usage and contributions. |
| 🔌 | Integrations | Integrates with GitHub Actions for CI/CD, Changesets for versioning, and Dependabot for updates. |
| 🧩 | Modularity | Configurations are modular, allowing easy extension and customization for JS/TS projects. |
| 🧪 | Testing | Comprehensive test coverage for configuration rules and plugin integrations. |
| ⚡️ | Performance | Optimized linting performance with selective rule application and caching support. |
| 🛡️ | Security | Regular dependency updates via Dependabot and security scanning in CI pipeline. |
| 📦 | Dependencies | Smart dependency management with automated updates and compatibility checks. |
| 🚀 | Scalability | Scalable through the addition of custom rules and extensions for various JavaScript environments. |
Repository Structure
└── ESLint-Config/
├── .github
│ └── workflows
├── .changeset
│ └── config.js
├── CHANGELOG.md
├── README.md
├── index.enums.ts
├── nest.js
└── package.json
Getting Started
Installation
Install configuration package:
$ npm install @elsikora/eslint-config --save-dev
Quick Setup (CLI)
The easiest way to set up ESLint configuration is using our interactive CLI:
$ npx @elsikora/eslint-config@latest
The CLI will:
- Guide you through feature selection (JavaScript, TypeScript, React, etc.)
- Set up ESLint configuration
- Configure Prettier (optional)
- Configure Stylelint (optional)
- Set up IDE configurations (VSCode, WebStorm)
- Configure GitHub CI workflows (optional)
- Automated testing and linting
- Release management with Changesets
- Dependabot for dependency updates
- Create all necessary configuration files
Manual Setup
If you prefer manual setup, create an .eslintrc.json
file in your project root with one of these configurations:
For JavaScript projects:
{
"extends": "@elsikora/eslint-config"
}
For TypeScript projects:
{
"extends": "@elsikora/eslint-config/typescript"
}
For NestJS projects:
{
"extends": "@elsikora/eslint-config/nest"
}
For React projects:
{
"extends": "@elsikora/eslint-config/react"
}
For JSON:
{
"extends": "@elsikora/eslint-config/json"
}
For Yaml:
{
"extends": "@elsikora/eslint-config/yaml"
}
Example Config
Complete
.eslintrc.json
example with all features:
{
"env": {
"es6": true,
"jest": true,
"node": true
},
"extends": ["@elsikora/eslint-config", "@elsikora/eslint-config/typescript", "@elsikora/eslint-config/nest", "@elsikora/eslint-config/react", "@elsikora/eslint-config/json", "@elsikora/eslint-config/yml"],
"ignorePatterns": [".eslintrc.json"],
"overrides": [
{
"files": ["*.ts"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"project": "tsconfig.json",
"tsconfigRootDir": "./"
}
}
],
"settings": {
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
},
"import/resolver": {
"typescript": {
"alwaysTryTypes": true,
"project": "./tsconfig.json"
}
}
},
"root": true
}
Project Roadmap
- [x]
► Interactive CLI Setup
- [x]
► NestJS Configuration
- [x]
► React Configuration
- [x]
► Changesets Integration
- [x]
► GitHub CI Workflows
- [ ]
► Next.js Configuration
- [ ]
► Angular Configuration
- [ ]
► Vue Configuration
Contributing
Contributions are welcome! Here are several ways you can contribute:
- Report Issues: Submit bugs found or log feature requests.
- Submit Pull Requests: Review open PRs, and submit your own PRs.
- Join the Discussions: Share your insights, provide feedback, or ask questions.
- Fork the Repository: Start by forking the project repository to your GitHub account.
- Clone Locally: Clone the forked repository to your local machine using a git client.
git clone https://github.com/ElsiKora/ESLint-Config.git
- Create a New Branch: Always work on a new branch, giving it a descriptive name.
git checkout -b new-feature-x
- Make Your Changes: Develop and test your changes locally.
- Commit Your Changes: Commit with a clear message describing your updates.
git commit -m 'Implemented new feature x.'
- Push to GitHub: Push the changes to your forked repository.
git push origin new-feature-x
- Submit a Pull Request: Create a PR against the original project repository. Clearly describe the changes and their motivations.
- Review: Once your PR is reviewed and approved, it will be merged into the main branch.
License
This project is protected under the MIT License. For more details, refer to the LICENSE file.
Acknowledgments
Thanks to all contributors and users of this configuration package. Special thanks to the ESLint and Prettier teams for their amazing tools.