0.1.0 • Published 1 year ago

@pankaj-refyne/eslint-plugin v0.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

Refyne ESLint Plugin

The repository includes custom ESLint rules, written in TypeScript, designed to serve as guardrails. These rules help prevent errors and avoid mistakes when working with NestJS and Mongoose.


File Structure:

  • docs/rules/ for documentation.
  • src/rules/ for rule definitions.
  • tests/ for tests for src/.

Installation

Use npm or a compatibility tool to install.

$ npm install --save-dev @refyne/eslint-plugin

Requirements

  • Node.js v18.10.0
  • ESLint

Usage

Modify your .eslintrc.js

{
  plugins: ['@refyne'],
  extends: [
    'plugin:@refyne/recommended',
  ]
}

See also Configuring ESLint.

Rules

šŸ’¼ Set in the recommended configuration.\ šŸ”§ Automatically fixable by the --fix CLI option.\ šŸ’” Manually fixable by editor suggestions.

NameDescriptionšŸ’¼šŸ”§šŸ’”
inconsistent-mongoose-type-declarationDetects inconsistent mongoose types in schemaāœ…šŸ’”
incorrect-mongoose-index-field-nameFlags incorrect mongoose index creation on non-existing fieldāœ…
inappropriate-model-injectionRestricts model injection in certain filesāœ…
incorrect-type-annotation-for-injection-modelFlags incorrect injection model type in constructorāœ…šŸ’”
incorrect-forward-ref-decorator-usageFlags incorrect usage of forwardRef decorator in constructorāœ…šŸ’”

Development Tools

  • npm test runs tests.
0.1.0

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago