Code Monkey home page Code Monkey logo

eslint-plugin-erento-rules's Introduction

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.

eslint-plugin-erento-rules's People

Contributors

rokerkony avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.