JSPM

  • Created
  • Published
  • Downloads 263
  • Score
    100M100P100Q98827F
  • License MIT

ESLint configuration vision of ElsiKora

Package Exports

  • @elsikora/eslint-config
  • @elsikora/eslint-config/cli

Readme

project-logo

ESLint Config by ElsiKora

Crafting Consistency, Nesting Best Practices, Enhancing Code Quality

license last-commit repo-top-language repo-language-count

Developed with the software and tools below.

JavaScript Prettier ESLint GitHub%20Actions JSON


Table of Contents

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:

  1. Guide you through feature selection (JavaScript, TypeScript, React, etc.)
  2. Set up ESLint configuration
  3. Configure Prettier (optional)
  4. Configure Stylelint (optional)
  5. Set up IDE configurations (VSCode, WebStorm)
  6. Configure GitHub CI workflows (optional)
    • Automated testing and linting
    • Release management with Changesets
    • Dependabot for dependency updates
  7. 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

  • โ–บ Interactive CLI Setup
  • โ–บ NestJS Configuration
  • โ–บ React Configuration
  • โ–บ Changesets Integration
  • โ–บ GitHub CI Workflows
  • โ–บ Next.js Configuration
  • โ–บ Angular Configuration
  • โ–บ Vue Configuration

Contributing

Contributions are welcome! Here are several ways you can contribute:

Contributing Guidelines
  1. Fork the Repository: Start by forking the project repository to your GitHub account.
  2. Clone Locally: Clone the forked repository to your local machine using a git client.
    git clone https://github.com/ElsiKora/ESLint-Config.git
  3. Create a New Branch: Always work on a new branch, giving it a descriptive name.
    git checkout -b new-feature-x
  4. Make Your Changes: Develop and test your changes locally.
  5. Commit Your Changes: Commit with a clear message describing your updates.
    git commit -m 'Implemented new feature x.'
  6. Push to GitHub: Push the changes to your forked repository.
    git push origin new-feature-x
  7. Submit a Pull Request: Create a PR against the original project repository. Clearly describe the changes and their motivations.
  8. 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.

Return