0.2.0 • Published 8 years ago
@silesia-corporation/eslint-plugin-marionette v0.2.0
eslint-plugin-marionette
ESLint rules for marionette
Usage
Install
eslint-plugin-marionetteas a dev-dependency:npm install --save-dev @silesia-corporation/eslint-plugin-marionetteEnable 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
| Rule | Recommended | Options |
|---|---|---|
| deprecated-marionette-composite-view | 1 | |
| no-config-requiring | 0 | |
| no-left-out-listeners | 1 | |
| no-view-onoff-binding | 1 | |
| require-guard-in-subapps-only | 0 | |
| when-guard-in-controller-only | 0 | |
| no-translate-in-defaults | 0 |
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: 0See configuring rules for more information.
Author
© 2017 Silesia Corporation and contributors.