2.1.2 โ€ข Published 1 month ago

@elsikora/eslint-config v2.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

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

FeatureDescription
โš™๏ธArchitectureESLint-Config is designed for JS/TS projects, integrating Prettier and Unicorn plugins.
๐Ÿ”ฉCode QualityFocuses on consistency & best practices by leveraging eslint, prettier, and custom ESLint rules.
๐Ÿ“„DocumentationHas basic documentation within code files and package.json, outlining usage and contributions.
๐Ÿ”ŒIntegrationsIntegrates with GitHub Actions for CI/CD, and uses @changesets/cli for release management.
๐ŸงฉModularityConfigurations are modular, allowing easy extension and customization for JS/TS projects.
๐ŸงชTestingNo specific testing tools mentioned, focus is on linting and code style consistency.
โšก๏ธPerformancePerformance impact is minimal, primarily affects development through linting processes.
๐Ÿ›ก๏ธSecurityNo specific security measures mentioned, as it's a development tool focusing on code quality.
๐Ÿ“ฆDependenciesDepends on various eslint plugins and configurations, including eslint-plugin-prettier.
๐Ÿš€ScalabilityScalable through the addition of custom rules and extensions for various JavaScript environments.
---

##  Repository Structure

```bash
โ””โ”€โ”€ ESLint-Config/
    โ”œโ”€โ”€ .github
    โ”‚   โ””โ”€โ”€ workflows
    โ”œโ”€โ”€ CHANGELOG.md
    โ”œโ”€โ”€ README.md
    โ”œโ”€โ”€ index.js
    โ”œโ”€โ”€ nest.js
    โ””โ”€โ”€ package.json

Modules

FileSummary
index.jsDefines and customizes ESLint rules for the ESLint-Config repository, focusing on ensuring code consistency while providing flexibility in filename conventions and the use of top-level await, by integrating popular ESLint configurations and plugins like Prettier and Unicorn.
nest.jsDefines the ESLint configuration specifically for NestJS projects within the ESLint-Config repository. It selects an environment supporting ES2021 and Node.js, extending recommended settings from a custom plugin designed to enforce typing conventions and best practices tailored for NestJS development.

Getting Started

System Requirements:

  • ESLint: >= 8.0.0
  • Prettier: >= 3.0.0

Installation

Install configuration from the repository using the command below:

$ npm install @elsikora/eslint-config --save-dev

Usage

To configure ESLint for your project, first install the necessary package(s) based on your project type. Then, create a .eslintrc.json file in your project root (if you haven't already) and add the corresponding configuration:

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

.eslintrc.json:

{
  "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

  • โ–บ NestJS Configuration
  • โ–บ React Configuration
  • โ–บ Next.js Configuration

Contributing

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

  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. Congratulations on your contribution!

License

This project is protected under the MIT License. For more details, refer to the LICENSE file.


Acknowledgments

  • List any resources, contributors, inspiration, etc. here.

Return


2.1.2

1 month ago

2.1.1

1 month ago

2.1.0

1 month ago

2.0.7

2 months ago

2.0.6

2 months ago

2.0.5

2 months ago

2.0.3

2 months ago

2.0.2

2 months ago

2.0.4

2 months ago

2.0.0

2 months ago

1.2.0

2 months ago

1.1.2

2 months ago

1.1.1

2 months ago

1.1.0

2 months ago