1.1.1 • Published 3 years ago

eslint-plugin-ryanair v1.1.1

Weekly downloads
7
License
MIT
Repository
github
Last release
3 years ago

eslint-plugin-ryanair

Ryanair's custom eslint rules

Installation

You'll first need to install ESLint:

$ npm i eslint --save-dev

Next, install eslint-plugin-ryanair:

$ npm install eslint-plugin-ryanair --save-dev

Note: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-ryanair globally.

Usage

Add ryanair to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:

{
    "plugins": [
        "ryanair"
    ]
}

No rules are enabled by default, since those are very specific. Then configure the rules you want to use under the rules section in .eslintrc file.

{
    "rules": {
        "ryanair/another-rule-name": 2,
        "ryanair/consistent-compt-ctrl-name": 2,
        "ryanair/consistent-test-filename": 2,
        "ryanair/no-element-directive": 2,
        "ryanair/no-pre-assign-bindings-enabled": 2,
        "ryanair/no-two-way-binding": 2,
        "ryanair/prefer-comp-ctrl-class": 2,
        "ryanair/require-comp-ctrl-on-init": 2,
    }
}

Supported Rules

AngularJS 1.7 migration

RuleRecommendedFixableOptions
no-element-directive1,
no-pre-assign-bindings-enabled1,
prefer-comp-ctrl-class1,
require-comp-ctrl-on-init1,

AngularJS performance issues

RuleRecommendedFixableOptions
no-two-way-binding1,

AngularJS stylistic issues

RuleRecommendedFixableOptions
consistent-compt-ctrl-name1,namingPatternObject

Jasmine best practices

RuleRecommendedFixableOptions
consistent-test-filename1,namingPatternObject

See also