@erento/eslint-plugin-erento-rules
TypeScript icon, indicating that this package has built-in type declarations

3.0.0 • Public • Published

Erento's ESLint rules

Usage

  1. Install this package: npm install --save-dev @erento/eslint-plugin-erento-rules and any of missing peer dependencies, if any.
  2. Add "@erento/erento-rules" into plugins in .eslintrc file.
  3. Use any of rules directly in rules or use our opinionated set of rules:
    {
        "extends": [
            "plugin:@erento/erento-rules/recommended"
        ],
        "plugins": [
            "@erento/erento-rules"
        ]
    }

Rules

Each rule has emojis denoting:

  • ✅ if it belongs to the recommended configuration
  • 🔧 if some problems reported by the rule are automatically fixable by the --fix command line option
  • 💡 if some problems reported by the rule are manually fixable by editor suggestions
Name                                         Description 🔧 💡
injectable-order Enforces sorted parameters in constructor of classes using DI. 🔧

Development

Tests

To run tests:

npm run test

Run against the existing repository

In case you can use published version, use dexcription in Usage section above. To check existing sources against development version, please, follow next steps:

  1. In the folder of this repository run:

    npm run build
    npm pack
  2. In the folder of your project's repository run:

    npm install <ESLINT_RULES_ROOT>/erento-eslint-plugin-erento-rules-X.Y.Z.tgz

Where:

  • <RULES_ROOT> is e.g. /Users/konradcerny/Sites/Erento/eslint-rules
  • X.Y.Z is current version in package.json - we follow SEMVER versioning.

Assuming you have installed all peer dependencies and defined .eslintrc file, you can now run: ./node_modules/.bin/eslint -c .eslintrc.json ./src/**/*.ts

You can run it also with the --fix argument to execute a fixer.

Readme

Keywords

none

Package Sidebar

Install

npm i @erento/eslint-plugin-erento-rules

Weekly Downloads

1,093

Version

3.0.0

License

MIT

Unpacked Size

96 kB

Total Files

16

Last publish

Collaborators

  • maria.eltsova
  • blazn99
  • rokerkony
  • aljazb