Skip to content

My personal opinionated ESLint plugin with JS, TS, React, Next, and Nest configurations

License

Notifications You must be signed in to change notification settings

embyth/eslint-plugin

Repository files navigation

🎯 @embyth/eslint-plugin

Embyth's shareable plugin with variety of configurations for eslint.

🔧 Installation

# Yarn:
yarn add --dev eslint prettier @embyth/eslint-plugin

# npm:
npm install --save-dev eslint prettier @embyth/eslint-plugin

# pnpm:
pnpm add --save-dev eslint prettier @embyth/eslint-plugin

👀 Usage

Add it to your .eslintrc file config you want to use:

{
  "extends": "plugin:@embyth/typescript"
}

List of available configs:

  • @embyth/core - core config with variety of rules including node, import, json, yml, markdown, promise, redos, unicorn, comments, testing, prettier eslint plugins
  • @embyth/typescript - includes @embyth/core and rules for TypeScript
  • @embyth/react - includes @embyth/core and rules for React
  • @embyth/next - includes @embyth/typescript, @embyth/react and rules for Next.js
  • @embyth/nest - includes @embyth/typescript and rules for Nest.js

🧩 Extending the config

The defined rules can be modified by adding other configurations, plugins or custom rules:

{
  "extends": ["plugin:@embyth/core", "some-other-config-you-use"],
  "rules": {
    "curly": "off"
  }
}

🤔 Documentations

Read the eslint docs for more information.