Skip to content

Latest commit

 

History

History
65 lines (49 loc) · 1.54 KB

README.md

File metadata and controls

65 lines (49 loc) · 1.54 KB

@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 install --save-dev @devmy/eslint-plugin

Usage

Typescript

// .eslintrc.js
module.exports = {
  extends: [
    'plugin:@devmy/eslint-plugin/recommended'
  ]
};

Angular

// .eslintrc.js
module.exports = {
  extends: [
    'plugin:@devmy/eslint-plugin/angular-recommended'
  ]
};

Angular with separate template configuration

// eslint.config.js
const tseslint = require("typescript-eslint");
const devmy = require("@devmy/eslint-plugin");

module.exports = tseslint.config(
  {
    files: ["**/*.ts"],
    plugins: { "devmy": devmy },
    extends: [devmy.configs["angular-recommended"]],
  },
  {
    files: ["**/*.html"],
    plugins: { "devmy": devmy },
    extends: [devmy.configs["angular-template-recommended"]],
  }
);

Configurations

  • recommended: The base configuration for TypeScript projects.
  • angular-recommended: Extends the "recommended" configuration with rules specific to Angular projects.
  • angular-template-recommended: Provides recommended rules for Angular templates.

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.