0.2.0 • Published 7 years ago

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

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

eslint-plugin-ejs

ESLint rules for ejs

Usage

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

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

    plugins:
      - ejs

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:
  - ejs
extends: 'plugin:ejs/recommended'

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

Rules

RuleRecommendedOptions
no-func-definitions1
no-global-variables1
no-string-concatenations1
no-view-onoff-binding1
no-unwanted-literals1
no-variable-declarations1

For example, using the recommended configuration, the no-func-definitions 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:
  - ejs
rules:
  ejs/no-func-definitions: 1,
  ejs/no-global-variables: 1,
  ejs/no-string-concatenations: 1,
  ejs/no-view-onoff-binding: 1,
  ejs/no-unwanted-literals: 1,
  ejs/no-variable-declarations: 1

See configuring rules for more information.

Author

© 2017 Silesia Corporation and contributors.