0.2.0 • Published 7 years ago

@silesia-corporation/eslint-plugin-marionette v0.2.0

Weekly downloads
3
License
-
Repository
-
Last release
7 years ago

eslint-plugin-marionette

ESLint rules for marionette

Usage

  1. Install eslint-plugin-marionette as a dev-dependency:

    npm install --save-dev @silesia-corporation/eslint-plugin-marionette
  2. Enable the plugin by adding it to your .eslintrc:

    plugins:
      - marionette

Configuration

This plugin exports a recommended configuration that enforces good practices.

To enable this configuration, use the extends property in your .eslintrc config file:

plugins:
  - marionette
extends: 'plugin:marionette/recommended'

See the ESLint config docs for more information about extending configuration files.

Rules

RuleRecommendedOptions
deprecated-marionette-composite-view1
no-config-requiring0
no-left-out-listeners1
no-view-onoff-binding1
require-guard-in-subapps-only0
when-guard-in-controller-only0
no-translate-in-defaults0

For example, using the recommended configuration, the deprecated-marionette-composite-view rule is enabled and will cause ESLint to throw an error (with an exit code of 1) when triggered.

You may customise each rule by adding a value in your .eslintrc rules property:

plugins:
  - marionette
rules:
  marionette/deprecated-marionette-composite-view: 1,
  marionette/no-config-requiring: 0,
  marionette/no-left-out-listeners: 1,
  marionette/no-view-onoff-binding: 1,
  marionette/require-guard-in-subapps-only: 0,
  marionette/when-guard-in-controller-only: 0

See configuring rules for more information.

Author

© 2017 Silesia Corporation and contributors.