eslint-plugin-ryanair

1.1.1 • Public • Published

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

Rule Recommended Fixable Options
no-element-directive 1,
no-pre-assign-bindings-enabled 1,
prefer-comp-ctrl-class 1,
require-comp-ctrl-on-init 1,

AngularJS performance issues

Rule Recommended Fixable Options
no-two-way-binding 1,

AngularJS stylistic issues

Rule Recommended Fixable Options
consistent-compt-ctrl-name 1, namingPatternObject

Jasmine best practices

Rule Recommended Fixable Options
consistent-test-filename 1, namingPatternObject

See also

Package Sidebar

Install

npm i eslint-plugin-ryanair

Weekly Downloads

2

Version

1.1.1

License

MIT

Unpacked Size

55.7 kB

Total Files

29

Last publish

Collaborators

  • fortunatof
  • izifortune