1.3.0 • Published 8 months ago

@devmy/eslint-plugin v1.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

@devmy/eslint-plugin

This library provides ESLint configurations with the recommended rules from the Devmy team for TypeScript and popular frameworks like React, Angular. It helps you enforce consistent code style, avoid common pitfalls, and improve the overall quality and maintainability of your projects.

Installation

npm:

npm install --save-dev @devmy/eslint-plugin

pnpm:

pnpm add -D @devmy/eslint-plugin

yarn

yarn add --dev @devmy/eslint-plugin

bun

bun add -d @devmy/eslint-plugin

Note: If you installed ESLint globally then you must also install @devmy/eslint-plugin globally.

Usage

If you're using flat configuration:

With flat configuration, just import the plugin and away you go:

// .eslintrc.js
const pluginDevmy = require('@devmy/eslint-plugin');

module.exports = {
  extends: [
    pluginDevmy.configs.recommended
  ]
};

With legacy configuration, add @devmy/eslint-plugin to the plugins section of your .eslintrc configuration file:

{
  "extends": ["plugin:@devmy/eslint-plugin/recommended"]
}

Configurations

Configurationfull nameDescription
recommended@devmy/eslint-plugin/recommendedThe base configuration for TypeScript projects.
angular-recommended@devmy/eslint-plugin/angular-recommendedExtends the "recommended" configuration with rules specific to Angular projects.
angular-template-recommended@devmy/eslint-plugin/angular-template-recommendedProvides recommended rules for Angular templates.
cypress-recommended@devmy/eslint-plugin/cypress-recommendedProvides recommended rules for Cypress projects.
jest-recommended@devmy/eslint-plugin/jest-recommendedProvides recommended rules for jest tests.

Rules

Key

  • :white_check_mark: = recommended
  • :wrench: = fixable
  • :bulb: = has suggestions
RuleDescription:white_check_mark::wrench::bulb:
prefer-class-bindingsEnsures the usage of class bindings instead of ngClass for elements

Contributing

We welcome contributions to this project! If you find any issues or have suggestions for new rules or configurations, please open an issue or submit a pull request.